Initial uib eplugin sources 72/160572/1 tizen_studio
authorsw83.shim <sw83.shim@samsung.com>
Fri, 17 Nov 2017 02:55:10 +0000 (11:55 +0900)
committersw83.shim <sw83.shim@samsung.com>
Fri, 17 Nov 2017 03:03:10 +0000 (12:03 +0900)
Change-Id: I0d63551693133bf09d711a82245c65322b83eaed
Signed-off-by: sw83.shim <sw83.shim@samsung.com>
2182 files changed:
.gitignore [new file with mode: 0644]
AUTHORS [new file with mode: 0644]
LICENSE.APLv2 [new file with mode: 0644]
LICENSE.EPL [new file with mode: 0644]
NOTICE [new file with mode: 0644]
builder/build.properties.clean [new file with mode: 0644]
builder/customTargets.xml [new file with mode: 0644]
config/Chagall_conventions.xml [new file with mode: 0644]
demo-27-03-2017/databinding_filter_demo.ogv [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/.classpath [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/.project [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/build.properties [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_common_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_common_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodel_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodel_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodels_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodels_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_datasource_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_datasource_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_datasources_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_datasources_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_call_history_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_call_history_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_contacts_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_contacts_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_remote_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_remote_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_static_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_static_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_manager_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_manager_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_view_bindings_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_view_bindings_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_views_binding_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_views_binding_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_button_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_button_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_checkbox_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_checkbox_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselector_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselector_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselectoritem_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselectoritem_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoversel_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoversel_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoverselitem_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoverselitem_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_label_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_label_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_list_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_list_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_listitem_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_listitem_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_radio_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_radio_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/inc/g_inc_uib_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/inc/uib_app_manager_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/inc/uib_util_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/inc/uib_view_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/inc/uib_view_manager_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/inc/uib_views_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/inc/uib_views_inc_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/inc/view_data_header.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/background.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/box.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/button.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/calendar.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/check.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/circledatetime.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/circlegenlist.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/circlegenlistitem.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/circleprogressbar.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/circlescroller.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/circleslider.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/colorselector.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/ctxpopup.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/ctxpopupitem.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/datetime.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/entry.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/flipselector.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/flipselectoritem.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/gengrid.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/gengriditem.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/genlist.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/genlistitem.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/grid.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/hoversel.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/hoverselitem.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/icon.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/image.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/index.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/indexitem.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/label.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/layout.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/list.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/listitem.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/map.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/multibuttonentry.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/multibuttonentryitem.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/panel.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/panes.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/popup.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/progressbar.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/radio.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/scroller.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/slider.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/spinner.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/table.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/tizenPopup.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/toolbar.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/toolbaritem.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/components/view.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/connection.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/uib_app_manager_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/uib_connection_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/uib_util_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/uib_view_manager_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/uib_view_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/src/uib_views_source.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/util/common.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/util/event.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/res/util/rconvert.xsl [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/Activator.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGenerator.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGeneratorConstants.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGeneratorException.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGeneratorUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/DataBindingCodeGenerator.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/ICodeGenerator.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/ManagedCodeGenerator.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/event/EventCodeGenerator.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/event/EventCodeGeneratorUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/event/IEventCodeGenerator.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/view/ViewCodeGenerator.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/AbstractPageCodeGeneratorTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/AllTests.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/CodeGeneratorTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page01PageCodeGeneratorTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page02PageCodeGeneratorTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page03PageCodeGeneratorTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page04PageCodeGeneratorTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page05PageCodeGeneratorTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page06PageCodeGeneratorTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page07PageCodeGeneratorTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page08_CheckTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page09_RadioTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page10_ColorselectorTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page11_LabelTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page12_MultibuttonentryTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page13_GenGridTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page14_GenListTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page15_EntryTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page16_SliderTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page17_LayoutTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page18_PanesTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page19_GenGridTreeTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page20_TableTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page21_BoxTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page98_EventTest.java [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/inc/uib_page1_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/layout1.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test02_panel/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test02_panel/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test03_background/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test03_background/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/src/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test08_check/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test08_check/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test09_radio/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test09_radio/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test11_label/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test11_label/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test15_entry/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/src/uib_view1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test15_entry/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test16_slider/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/src/uib_view1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test16_slider/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test17_layout/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/src/uib_view1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test17_layout/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test18_panes/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/src/uib_view1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test18_panes/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/src/uib_view1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test20_table/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/src/uib_view1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test20_table/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test21_box/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/src/uib_view1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test21_box/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test22_something/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/src/uib_view1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test22_something/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test98_event/app.xml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/src/uib_page1_view.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test98_event/layout.tuml [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/inc/uib_common.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/inc/uib_main_view.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/inc/uib_views.h [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/src/uib_common.c [new file with mode: 0644]
org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/src/uib_main_view.c [new file with mode: 0644]
org.tizen.efluibuilder.common/.classpath [new file with mode: 0644]
org.tizen.efluibuilder.common/.gitignore [new file with mode: 0644]
org.tizen.efluibuilder.common/.project [new file with mode: 0644]
org.tizen.efluibuilder.common/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.efluibuilder.common/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.efluibuilder.common/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.efluibuilder.common/build.properties [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/CachedImage.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/CastUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/CollectionHelper.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/DOMUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/IDEUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/ImageUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/PlatformUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/ResourceUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/XMLUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/deprecated/DomUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/deprecated/FileSelector.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileConstants.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileData.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileDataEntry.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileDataHelper.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileDataProperty.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileFormatter.java [new file with mode: 0644]
org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileReader.java [new file with mode: 0644]
org.tizen.efluibuilder.configurator/.classpath [new file with mode: 0644]
org.tizen.efluibuilder.configurator/.project [new file with mode: 0644]
org.tizen.efluibuilder.configurator/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.efluibuilder.configurator/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.efluibuilder.configurator/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.efluibuilder.configurator/build.properties [new file with mode: 0644]
org.tizen.efluibuilder.configurator/res/devices/default/default_device.xml [new file with mode: 0644]
org.tizen.efluibuilder.configurator/res/devices/mobile-2.3/default_device.xml [new file with mode: 0644]
org.tizen.efluibuilder.configurator/res/devices/mobile-3.0/default_device.xml [new file with mode: 0644]
org.tizen.efluibuilder.configurator/res/devices/tv-3.0/default_device.xml [new file with mode: 0644]
org.tizen.efluibuilder.configurator/res/devices/wearable-2.3.1/default_device.xml [new file with mode: 0644]
org.tizen.efluibuilder.configurator/res/devices/wearable-circle-2.3.1/default_device.xml [new file with mode: 0644]
org.tizen.efluibuilder.configurator/res/devices/wearable-circle-3.0/default_device.xml [new file with mode: 0644]
org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/configurator/Activator.java [new file with mode: 0644]
org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/Device.java [new file with mode: 0644]
org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/DeviceDeserializer.java [new file with mode: 0644]
org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/DeviceFileReader.java [new file with mode: 0644]
org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/DeviceManager.java [new file with mode: 0644]
org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/ScreenDesc.java [new file with mode: 0644]
org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/ScreenDescDeserializer.java [new file with mode: 0644]
org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configurator/Configurator.java [new file with mode: 0644]
org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configurator/ConfiguratorConstants.java [new file with mode: 0644]
org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configurator/ConfiguratorException.java [new file with mode: 0644]
org.tizen.efluibuilder.converter/.classpath [new file with mode: 0644]
org.tizen.efluibuilder.converter/.project [new file with mode: 0644]
org.tizen.efluibuilder.converter/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.efluibuilder.converter/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.efluibuilder.converter/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.efluibuilder.converter/build.properties [new file with mode: 0644]
org.tizen.efluibuilder.converter/plugin.xml [new file with mode: 0644]
org.tizen.efluibuilder.converter/res/convert/default/app_main.c [new file with mode: 0644]
org.tizen.efluibuilder.converter/res/convert/default/app_main.h [new file with mode: 0644]
org.tizen.efluibuilder.converter/res/icons/TIZEN_file_icon.png [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/Activator.java [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/IProjectConverter.java [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/Messages.java [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/Messages.properties [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverter.java [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverterConstants.java [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverterEditor.java [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverterException.java [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/AttributeTable.java [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/ElementTable.java [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/LayoutConverterTable.java [new file with mode: 0644]
org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/ValueTable.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/.classpath [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/.project [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/build.properties [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/efl.style.edj.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/efl.types.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen-native-ui-fw.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen.eventtypes.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen.types.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen.uicomponent.categories.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.bg.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.box.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.button.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.check.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.colorselector.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.ctxpopup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.ctxpopupitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.datetime.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.entry.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.gengrid.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.gengriditem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.genlist.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.genlistitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.grid.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.image.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.index.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.indexitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.label.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.layout.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.list.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.listitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.map.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.multibuttonentry.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.multibuttonentryitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.panel.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.panes.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.popup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.progressbar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.radio.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.scroller.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.slider.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.spinner.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.table.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.toolbar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.toolbaritem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/tizen.view.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/efl.style.edj.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/efl.types.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen-native-ui-fw.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen.eventtypes.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen.types.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen.uicomponent.categories.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.bg.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.box.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.button.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.calendar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.check.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.colorselector.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.ctxpopup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.ctxpopupitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.datetime.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.entry.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.flipselector.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.flipselectoritem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.gengrid.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.gengriditem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.genlist.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.genlistitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.grid.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.hoversel.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.hoverselitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.image.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.index.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.indexitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.label.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.layout.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.list.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.listitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.map.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.multibuttonentry.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.multibuttonentryitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.panel.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.panes.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.popup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.progressbar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.radio.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.scroller.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.slider.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.spinner.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.table.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.toolbar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.toolbaritem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/tizen.view.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/efl.style.edj.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/efl.types.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen-native-ui-fw.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen.eventtypes.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen.types.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen.uicomponent.categories.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.bg.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.box.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.button.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.calendar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.check.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.colorselector.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.ctxpopup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.ctxpopupitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.datetime.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.entry.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.flipselector.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.flipselectoritem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.gengrid.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.gengriditem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.genlist.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.genlistitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.grid.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.hoversel.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.hoverselitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.image.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.index.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.indexitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.label.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.layout.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.list.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.listitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.map.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.multibuttonentry.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.multibuttonentryitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.panel.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.panes.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.popup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.progressbar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.radio.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.scroller.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.slider.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.spinner.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.table.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.toolbar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.toolbaritem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/tizen.view.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/efl.style.edj.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/efl.types.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/tizen-native-ui-fw.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/tizen.eventtypes.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/tizen.uicomponent.categories.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.bg.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.box.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.button.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.calendar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.check.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.ctxpopup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.ctxpopupitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.datetime.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.entry.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.gengrid.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.gengriditem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.genlist.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.genlistitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.grid.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.image.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.label.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.layout.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.popup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.progressbar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.radio.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.scroller.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.slider.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.spinner.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.table.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/tizen.view.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/efl.style.edj.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/efl.types.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/tizen-native-ui-fw.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/tizen.eventtypes.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/tizen.uicomponent.categories.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.bg.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.box.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.button.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.check.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.ctxpopup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.ctxpopupitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.datetime.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.entry.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.genlist.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.genlistitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.grid.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.image.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.index.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.indexitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.label.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.layout.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.list.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.listitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.map.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.popup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.progressbar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.radio.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.scroller.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.slider.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.spinner.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.table.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/tizen.view.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/efl.style.edj.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/efl.types.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/tizen-native-ui-fw.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/tizen.eventtypes.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/tizen.uicomponent.categories.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.bg.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.box.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.button.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.check.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.ctxpopup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.ctxpopupitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.datetime.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.entry.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.genlist.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.genlistitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.grid.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.image.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.index.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.indexitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.label.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.layout.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.list.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.listitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.map.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.popup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.progressbar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.radio.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.scroller.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.slider.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.table.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/tizen.view.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/efl.style.edj.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/efl.types.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen-native-ui-fw.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen.eventtypes.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen.types.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen.uicomponent.categories.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.bg.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.box.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.button.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.check.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.ctxpopup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.ctxpopupitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.datetime.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.entry.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.genlist.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.genlistitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.grid.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.image.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.index.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.indexitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.label.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.layout.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.list.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.listitem.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.map.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.popup.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.progressbar.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.radio.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.scroller.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.slider.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.table.widget.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/tizen.view.xml [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/descriptor/Activator.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/descriptor/DescriptorConstants.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ChildPropertyDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ConditionDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ConstantDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ContentDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/DescriptorManager.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/EventDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/EventParamDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/EventTypeDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/PartConditionDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/PropertyConditionDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/PropertyDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/RelationDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/TypeDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/UnitDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/WidgetDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/AnalisysDescriptorFileData.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/DescriptorFileData.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/file/DescriptorReader.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/file/DescriptorReader_ver_1.java [new file with mode: 0644]
org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/file/DescriptorReader_ver_2.java [new file with mode: 0644]
org.tizen.efluibuilder.feature/.project [new file with mode: 0644]
org.tizen.efluibuilder.feature/Apache-v2.0.html [new file with mode: 0644]
org.tizen.efluibuilder.feature/build.properties [new file with mode: 0644]
org.tizen.efluibuilder.feature/feature.properties [new file with mode: 0644]
org.tizen.efluibuilder.feature/feature.xml [new file with mode: 0644]
org.tizen.efluibuilder.project/.classpath [new file with mode: 0644]
org.tizen.efluibuilder.project/.project [new file with mode: 0644]
org.tizen.efluibuilder.project/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.efluibuilder.project/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.efluibuilder.project/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.efluibuilder.project/build.properties [new file with mode: 0644]
org.tizen.efluibuilder.project/plugin.xml [new file with mode: 0644]
org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/Activator.java [new file with mode: 0644]
org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/AddNatureProcess.java [new file with mode: 0644]
org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/Messages.java [new file with mode: 0644]
org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/Messages.properties [new file with mode: 0644]
org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/NUIBBuilder.java [new file with mode: 0644]
org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/NUIBNature.java [new file with mode: 0644]
org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/NUIBProjectUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/.classpath [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/.project [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/build.properties [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/plugin.xml [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/res/template/user_view [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/Activator.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ConvertHandler.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ConvertTester.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/IProjectMigrator.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ManageUserViewHandler.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ManageUserViewTester.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectConvertParam.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigrator.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigratorConstants.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigratorException.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigratorUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/ASTManager.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/CodeWriterConstants.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/CodeWriterException.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/UserViewGenerator.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/FuncCallParamGetVisitor.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/MethodCheckVisitor.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/NUIBAppEntryAddVisitor.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/ReWriteVisitor.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/UserViewAddVisitor.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/UserViewRemoveVisitor.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/dialog/ProjectMigratorDialogMessages.properties [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/dialog/ProjectMigratorWizardDialog.java [new file with mode: 0755]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/dialog/WizardDialog.java [new file with mode: 0755]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/message/Messages.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/message/messages.properties [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/progress/ProgressConstants.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/progress/ProgressMonitorDialogEx.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/progress/ProjectMigratorRunnableWithProgress.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/ProjectMigratorWizard.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/AppEntryPage.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/BaseWizardPage.java [new file with mode: 0755]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/MainPage.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/ShapeTypePage.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/UserViewPage.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/util/FileUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/util/StringUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/util/UIUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/.classpath [new file with mode: 0644]
org.tizen.efluibuilder.renderer/.gitignore [new file with mode: 0644]
org.tizen.efluibuilder.renderer/.project [new file with mode: 0644]
org.tizen.efluibuilder.renderer/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.efluibuilder.renderer/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.efluibuilder.renderer/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.efluibuilder.renderer/build.properties [new file with mode: 0644]
org.tizen.efluibuilder.renderer/lib/gson-2.2.4.jar [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ChecksumValidator.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/Connector.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ConnectorEvent.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ConnectorFactory.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/Header.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IConnector.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IConnectorListener.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IMessage.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IService.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/MessageReader.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/MessageWriter.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ProtocolConstants.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/Service.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ServiceFactory.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/Message.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/RequestCommandMessage.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/ResponseEventMessage.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/ResponsePaintMessage.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/util/ByteUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/util/ProxyEnvUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/AbstractRenderer.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/Arguments.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/Renderer.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/RendererFactoryImpl.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/AbstractCommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/CreateCommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/DestroyCommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetAllWidgetPositionsCommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetGroupNamesCommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetPlaceholderPositionsCommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetStyleNamesCommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/ICommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/OverlayThemeCommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/RemoveStyleNameCommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/RenderCommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/RendererCommand.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/util/DebugUtil.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/Activator.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/IArguments.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/IRenderer.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/IRendererListener.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/PlaceholderPosition.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/Position.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/RendererConstants.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/RendererFactory.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/WidgetPosition.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/event/RenderEvent.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/event/RendererEvent.java [new file with mode: 0644]
org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/event/ReplyEvent.java [new file with mode: 0644]
org.tizen.efluibuilder.ui/.classpath [new file with mode: 0644]
org.tizen.efluibuilder.ui/.project [new file with mode: 0644]
org.tizen.efluibuilder.ui/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.efluibuilder.ui/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.efluibuilder.ui/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.efluibuilder.ui/build.properties [new file with mode: 0644]
org.tizen.efluibuilder.ui/icons/navigation.png [new file with mode: 0644]
org.tizen.efluibuilder.ui/icons/perspective26/perspective_uib.png [new file with mode: 0644]
org.tizen.efluibuilder.ui/icons/perspective26/perspective_uib_sel.png [new file with mode: 0644]
org.tizen.efluibuilder.ui/icons/resources.png [new file with mode: 0644]
org.tizen.efluibuilder.ui/icons/tizen_blank_16.png [new file with mode: 0644]
org.tizen.efluibuilder.ui/plugin.xml [new file with mode: 0644]
org.tizen.efluibuilder.ui/src/org/tizen/efluibuilder/ui/Activator.java [new file with mode: 0644]
org.tizen.efluibuilder.ui/src/org/tizen/efluibuilder/ui/perspective/NUIBPerspective.java [new file with mode: 0644]
org.tizen.efluibuilder.ui/src/org/tizen/efluibuilder/ui/perspective/PerspectiveUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/.classpath [new file with mode: 0644]
org.tizen.efluibuilder/.project [new file with mode: 0644]
org.tizen.efluibuilder/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.efluibuilder/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.efluibuilder/about.html [new file with mode: 0644]
org.tizen.efluibuilder/about.ini [new file with mode: 0644]
org.tizen.efluibuilder/about.mappings [new file with mode: 0644]
org.tizen.efluibuilder/about.properties [new file with mode: 0644]
org.tizen.efluibuilder/build.properties [new file with mode: 0644]
org.tizen.efluibuilder/lib/gson-2.2.4.jar [new file with mode: 0644]
org.tizen.efluibuilder/lib/org.eclipse.nebula.widgets.gallery_0.6.0.201307092147.jar [new file with mode: 0644]
org.tizen.efluibuilder/plugin.properties [new file with mode: 0644]
org.tizen.efluibuilder/plugin.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/32_TIZEN_SDK_icon.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/TIZEN_file_icon.png [new file with mode: 0755]
org.tizen.efluibuilder/res/icons/databinding/add.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/array.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/array_link.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/binding_delete.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/binding_hide.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/binding_show.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/boolean.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/boolean_link.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/calendar.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/clear.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/collapseallfields.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/compact_jsondata.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/compact_string.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/contact.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/databinding.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/datamodel_1.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/datamodel_2.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/datamodel_add.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/datamodel_delete.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/datasource_add.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/datasource_delete.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/datasource_open.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/delete.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/down.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/empty.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/expandallfields.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/file.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/file_system.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/format_jsondata.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/format_string.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/history.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/import.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/index.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/index_link.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/link.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/link_image.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/linked.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/load.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/modelitem_add.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/number.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/number_link.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/object.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/object_link.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/open.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/reload.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/remote.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/remote_call.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/remove.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/removeall.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/rename.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/saveas.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/set_target.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/static.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/string.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/string_link.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/system_api_calls.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/undefined.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/undefined_link.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/up.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/view_source.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/view_tree.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/databinding/widget_setting.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/connection_line_nor_h.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/connection_line_nor_v.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/connection_line_sel_h.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/connection_line_sel_v.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/connection_line_top_sel_h.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/connection_line_top_sel_v.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_s_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_s_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_sv_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_sv_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_over.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/sc_bg.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/storyboard_arrow_left.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/storyboard_arrow_right.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/view_sample_img.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/view_tab_help_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/dialog/view_tab_help_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/down_arrow.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/edc_icon_32.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/fit.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/ic_view_startup.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/ic_view_startup_b.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/ic_view_startup_w.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/icon_link_to_edc.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/left_arrow.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/ms_config_btn.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/ms_config_delete.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/ms_config_land_off.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/ms_config_land_on.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/ms_config_port_off.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/ms_config_port_on.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/palette/pal_title.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/palette/pal_title_arrow_down_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/palette/pal_title_arrow_up_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/palette/pal_title_snippet_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/palette/pal_title_snippet_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicomponent_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicomponent_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicontainer_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicontainer_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/palette/pal_title_view_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/palette/pal_title_view_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/right_arrow.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/startup_arrow_page.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_design_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_design_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_percent_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_source_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_source_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/zoom_in.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/editor/zoom_out.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_arrow.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_arrow_btn_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_arrow_btn_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_arrow_btn_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_arrow_btn_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_delete_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_delete_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_delete_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_delete_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_plus_dim.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_plus_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_plus_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/event/event_plus_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/eview20/view_palette.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/eview20/view_palette_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/go.png [new file with mode: 0755]
org.tizen.efluibuilder/res/icons/ic_error.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/maximize.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/minimize.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/outline/show_popup.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/outline/show_view.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/page_16.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_1.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_2.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_panel_back.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_support.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_1.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_2.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_panel_back.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_support.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_landscape.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_panel_back.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_landscape.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_panel_back.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right_bottom.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_top.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/wearable_320.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/wearable_360.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/preview/wearable_circle.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/align_center.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/align_left.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/align_right.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/bold.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/btn_ic_location_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/btn_ic_location_over.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/btn_ic_location_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/cancelline.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/cd_icon.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/down_arrow.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/image.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/italic.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/ms_key_autocomplete.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/reset.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/underline.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/properties/up_arrow.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/snippet/default_snippet.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/style_clip_down_arrow.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/style_clip_left_arrow.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/style_clip_right_arrow.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/style_clip_up_arrow.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/style_lowercase.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/transparent_dummy.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_app_entry/code_legacy.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_app_entry/code_uib.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_main/uib_screenshot.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_shape_type/wearable_circle.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_shape_type/wearable_square.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_over.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_over.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_block_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_block_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_block_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_box_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_box_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_box_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_button_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_button_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_button_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_check_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_check_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_check_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_color_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_color_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_color_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_date_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_date_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_date_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_image_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_image_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_image_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_index_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_index_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_index_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_item_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_item_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_item_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_label_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_label_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_label_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_list_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_list_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_list_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_map_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_map_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_map_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_table_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_table_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_table_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_view_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_view_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/16/view_p_view_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_bg_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_bg_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_bg_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_block_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_block_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_block_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_box_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_box_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_box_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_button_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_button_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_button_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_check_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_check_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_check_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_color_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_color_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_color_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_date_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_date_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_date_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_empty_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_empty_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_empty_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_entry_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_entry_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_entry_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_filip_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_filip_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_filip_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_grid_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_grid_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_grid_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_image_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_image_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_image_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_index_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_index_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_index_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_label_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_label_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_label_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_layout_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_layout_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_layout_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_list_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_list_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_list_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_map_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_map_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_map_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_multi_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_multi_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_multi_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_panel_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_panel_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_panel_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_panes_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_panes_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_panes_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_popup_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_popup_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_popup_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_progress_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_progress_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_progress_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_radio_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_radio_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_radio_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_slider_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_slider_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_slider_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_table_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_table_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_table_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_mv.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_nor.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_sel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/background.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/box.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/button.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/calendar.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/checkboxitem.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/color_selector.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/date_time_picker.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/entry.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/flipselector.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/gengrid.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/genlist.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/grid.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/icon.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/image.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/index.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/label.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/layout.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/list.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/map.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/multi_button_entry.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/naviframe.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/panel.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/panes.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/photocam.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/progressbar.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/radiobuttonitem.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/scroller.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/segment_control.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/slider.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/spinner.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/table.png [new file with mode: 0644]
org.tizen.efluibuilder/res/icons/widget/64/toolbar.png [new file with mode: 0644]
org.tizen.efluibuilder/res/json/databinding/callHistory.json [new file with mode: 0644]
org.tizen.efluibuilder/res/json/databinding/contact.json [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet1/descriptor.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet1/image.png [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet1/meta.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet10/descriptor.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet10/image.png [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet10/meta.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet2/descriptor.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet2/image.png [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet2/meta.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet3/descriptor.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet3/image.png [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet3/meta.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet4/descriptor.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet4/image.png [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet4/meta.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet6/descriptor.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet6/image.png [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet6/meta.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet7/descriptor.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet7/image.png [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet7/meta.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet8/descriptor.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet8/image.png [new file with mode: 0644]
org.tizen.efluibuilder/res/snippets/snippet8/meta.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/attribute/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/attribute/type.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/element/configuration.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/element/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/element/variation.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/bg.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/box.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/button.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/calendar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/check.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/colorselector.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/ctxpopup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/datetime.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/entry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/flipselector.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/gengrid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/genlist.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/grid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/hoversel.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/image.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/index.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/label.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/list.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/map.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/multibuttonentry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/panel.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/panes.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/popup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/progressbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/radio.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/scroller.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/slider.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/spinner.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/table.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/toolbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/default/widget/view.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/attribute/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/attribute/type.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/element/configuration.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/element/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/element/variation.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/bg.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/box.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/button.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/check.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/colorselector.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/ctxpopup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/datetime.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/entry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/gengrid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/genlist.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/grid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/image.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/index.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/label.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/list.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/map.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/multibuttonentry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/panel.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/panes.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/popup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/progressbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/radio.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/scroller.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/slider.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/spinner.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/table.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/toolbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/view.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/attribute/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/attribute/type.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/element/configuration.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/element/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/element/variation.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/bg.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/box.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/button.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/calendar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/check.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/colorselector.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/ctxpopup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/datetime.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/entry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/flipselector.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/gengrid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/genlist.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/grid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/hoversel.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/image.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/index.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/label.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/list.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/map.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/multibuttonentry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/panel.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/panes.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/popup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/progressbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/radio.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/scroller.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/slider.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/spinner.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/table.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/toolbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/view.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/attribute/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/attribute/type.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/element/configuration.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/element/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/element/variation.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/bg.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/box.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/button.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/calendar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/check.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/colorselector.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/ctxpopup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/datetime.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/entry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/flipselector.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/gengrid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/genlist.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/grid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/hoversel.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/image.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/index.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/label.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/list.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/map.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/multibuttonentry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/panel.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/panes.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/popup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/progressbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/radio.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/scroller.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/slider.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/spinner.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/table.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/toolbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/view.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/properties/org/tizen/efluibuilder/model/properties/ObjectFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/properties/org/tizen/efluibuilder/model/properties/Properties.java [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/properties/properties.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/properties/tmp/properties.xml [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/attribute/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/attribute/type.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/element/configuration.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/element/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/element/variation.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/bg.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/box.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/button.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/calendar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/check.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/ctxpopup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/datetime.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/entry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/gengrid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/genlist.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/grid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/hoversel.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/image.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/label.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/popup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/progressbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/radio.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/scroller.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/slider.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/spinner.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/table.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/tv_3.0/widget/view.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/attribute/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/attribute/type.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/element/configuration.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/element/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/element/variation.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/bg.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/box.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/button.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/check.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/ctxpopup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/datetime.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/entry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/genlist.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/grid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/image.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/index.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/label.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/list.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/map.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/popup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/progressbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/radio.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/scroller.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/slider.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/spinner.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/table.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/view.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/attribute/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/attribute/type.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/element/configuration.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/element/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/element/variation.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/bg.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/box.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/button.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/check.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/ctxpopup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/datetime.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/entry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/genlist.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/grid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/image.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/index.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/label.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/list.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/map.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/popup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/progressbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/radio.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/scroller.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/slider.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/table.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/view.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/attribute/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/attribute/type.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/element/configuration.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/element/group.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/element/variation.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/bg.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/box.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/button.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/check.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/ctxpopup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/datetime.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/entry.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/genlist.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/grid.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/image.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/index.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/label.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/layout.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/list.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/map.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/popup.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/progressbar.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/radio.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/scroller.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/slider.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/table.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/view.xsd [new file with mode: 0644]
org.tizen.efluibuilder/res/xsl/render_script.xsl [new file with mode: 0644]
org.tizen.efluibuilder/res/xsl/template.xsl [new file with mode: 0644]
org.tizen.efluibuilder/src/edjResourceSyncManager/DirectoryWatchService.java [new file with mode: 0644]
org.tizen.efluibuilder/src/edjResourceSyncManager/EdjResourceChangedEvent.java [new file with mode: 0644]
org.tizen.efluibuilder/src/edjResourceSyncManager/EdjResourceSyncManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/edjResourceSyncManager/FileDuplicator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/edjResourceSyncManager/IEdjResourceChangeListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/edjResourceSyncManager/IWatchServiceListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/edjResourceSyncManager/ResourceChangedEvent.java [new file with mode: 0644]
org.tizen.efluibuilder/src/edjResourceSyncManager/ResourceChangedObserver.java [new file with mode: 0644]
org.tizen.efluibuilder/src/edjResourceSyncManager/ResourceFileDuplicator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/graphicalDataManager/ComponentGraphicalData.java [new file with mode: 0644]
org.tizen.efluibuilder/src/graphicalDataManager/GraphicalDataChangedEvent.java [new file with mode: 0644]
org.tizen.efluibuilder/src/graphicalDataManager/GraphicalDataInitializeFailedException.java [new file with mode: 0644]
org.tizen.efluibuilder/src/graphicalDataManager/GraphicalDataManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/graphicalDataManager/IGraphicalDataChangedListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/graphicalDataManager/ScreenDataRealizer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/BuilderConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/BuilderPlugin.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AddEmptyViewAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionBottom.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionHCenter.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionHDistribute.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionLeft.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionRight.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionTop.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionVCenter.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionVDistribute.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartRetargetAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ChangePartSelectionAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/CopyPartAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/CutPartAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/DeletePartAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/MatchSizeAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/Messages.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/Messages.properties [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/MoveAbsolutePartAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PartAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PartBoundSet.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PastePartAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PastePartColorAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectChildPartAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectNextSiblingPartAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectParentPartAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectPreviousSiblingPartAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SetStartupViewAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/StoryboardAutoLayoutAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderBackAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderBackwardAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderFrontAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderFrontwardAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/CommandUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/ComponentCopyData.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/CopyPartCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/WidgetRelation.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/AbstractTemplate.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/ComponentTemplate.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/DataBindingTemplate.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/ITemplate.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/RMResource.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/RMResourceTemplate.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/ResourceTemplateProperty.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/SnippetTemplate.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/ComponentEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/ContainerEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignConnectionEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignEditPartFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignRootEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignStoryboardPolylineConnection.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/ViewEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/CellManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/VirtualLayer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/directedit/ComponentCellEditorLocator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/directedit/ComponentDirectEditManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/directedit/ComponentNameCellEditorValidator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ActionRunnableLable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/CommonFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/CommonRectangleFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ComponentFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ContainerFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/DocFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/IActionTriggerable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/PolygonFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ViewFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ViewTitleFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/border/ContainerSelectionBorder.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/border/WidgetSelectionBorder.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/handles/CustomResizeHandle.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/BlockLayer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/CustomLayerConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/FeedbackLayer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/OutlineLayer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ComponentDataBindingEditPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ComponentDirectEditPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ComponentDoubleClickEditPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ContentContainerOutlineFeedbackPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/CustomSnapFeedbackPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/DesignConnectionEndpointEditPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/DesignSelectionEditPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/DesignerSelectionEditPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/FitSingleViewPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ItemOutlineFeedbackPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/OpenEdcEditorPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/OutlineFeedbackPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/BoxChildResizablePolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/BoxLayoutPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/CommonChildResizablePolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/CommonLayoutPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ContentLayoutPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/DesignEditorUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/EditPolicyConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/GridChildResizablePolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/GridLayoutPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PanePlaceholderOutlineFeedbackPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PanesChildResizablePolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PanesLayoutPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PlaceholderOutlineFeedbackPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/TableChildResizablePolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/TableLayoutPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/TablePlaceholderOutlineFeedbackPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewChildResizablePolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewLayoutPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewMovePolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewTemplateLayoutPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/requests/DesignCreateRequest.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignCreationTool.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignDragEditPartsTracker.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignDragViewEditPartTracker.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignEditDomain.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignMarqueeDragTracker.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignPanningTool.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignRootMarqueeDragTracker.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignSelectionTool.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/ConnectionCreateListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/ConnectionCreater.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignEventDelegator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignStoryboardRouter.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignStoryboardUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignViewer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignViewerMouseListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/IScalableViewer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/SBMetaData.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/modules/RendererManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/AppManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/PropertiesLoader.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/PropertiesLoaderTest.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/jaxb/ObjectFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/jaxb/Properties.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/jaxb/ViewModel.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/AddPartCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/ChangeOrderPartCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/DisableUndoCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/EMFCommandAdapter.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/RemovePartCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/SetPropertyPartCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/loader/jaxb/ObjectFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/loader/jaxb/Properties.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/loader/jaxb/ViewModel.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ComponentPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ConfigurationPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/DataBindingPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/DocumentPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/EventPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/EventType.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/IPartChangedListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/MScreenPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/Part.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/PartMutation.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/PartObserver.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/PartType.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/VariationPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ViewPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ViewType.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ViewsPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/Constants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/RenderDataGenerator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/RenderDataGeneratorException.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/AttributeTable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/ElementTable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/LayoutReverseConverterTable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/ValueTable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/ISnippet.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/ISnippetManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/Snippet.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/SnippetException.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/SnippetLoader.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/SnippetManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/ComponentDescriptor.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/ComponentValidator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/DBPartUnmarshaller.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/IDGenerator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/LayoutSchemaConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/ModelConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/PartMarshaller.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/PartUnmarshaller.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/PartUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/IScreenConfigurationSelectionChangedListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MScreenQualifierManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MsConfiguratorWizard.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MsConfiguratorWizardFirstPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MscreenConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MscreenMessage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MscreenMessage.properties [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/ScreenConfiguration.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/TableContainInfo.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/rm/AutoCompleteTextUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/rm/IRMWrapper.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/rm/ResourceManagerUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/nl/BuilderMessages.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/nl/BuilderMessages.properties [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/CodeGenerator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/CodeGeneratorConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/CodeGeneratorUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/Messages.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/messages.properties [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/gef/policies/NodeComponentEditPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/gef/policies/NodeGraphicalNodeEditPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/SelectionManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/SelectionProvider.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/SelectionProviderAdapter.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/actions/ActionConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/contextmenu/CommonContextMenu.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/CombineEditorPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/EditorConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/EditorsSelectionSynchronizer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/IProjectResourceFileChangeListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/KeyHandler.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/Messages.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/Messages.properties [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MouseWheelZoomHandler.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MultiPageEditorPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MultiPageEditorSite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MultiPageSelectionProvider.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ZoomUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/AbstractEditorAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/AbstractPaletteAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/DeleteSnippetAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/ExportSnippetAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/ImportSnippetAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/NewSnippetAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditCommandStack.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditor.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorActionBarContributor.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorCombinedTemplateCreationEntry.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorContextMenu.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorContextMenuItemManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorException.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorLayout.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/Messages.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/Messages.properties [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/DesignEditorDropTargetListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/OutlineDropTargetListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/TemplateTransferDropTargetListener2.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/TemplateTransferDropTargetManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/dnd/TemplateTransferDragSourceListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/PaletteColorUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/PaletteSelectionTool.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/ToolbarDropdownContributionItem.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/ColumnsLayout.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DetailedLabelFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DrawerEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DrawerFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DropShadowButtonBorder.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/EditPartTipHelper.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/GroupEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/IPaletteStackEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/OverlayScrollPaneLayout.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PaletteContainerFlowLayout.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PaletteScrollBar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PaletteStackEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PinFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PinnablePaletteStackEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PinnablePaletteStackFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/RaisedBorder.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/SeparatorBorder.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/SeparatorEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/SliderPaletteEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/TemplateEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/ToolEntryEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/ToolbarEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/CombinedTemplateCreationEntry.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/ConnectionCreationToolEntry.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/CreationToolEntry.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/MarqueeToolEntry.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteContainer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteDrawer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteEntry.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteGroup.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteRoot.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteSeparator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteStack.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteTemplateEntry.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteToolbar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PanningSelectionToolEntry.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/SelectionToolEntry.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/ToolEntry.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/package.html [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ruler/DesignEditorRulerComposite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/actions/SetActivePaletteToolAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/ChangeIconSizeAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/CustomizeAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/DefaultPaletteViewerPreferences.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/FlyoutPaletteComposite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/LayoutAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteContextMenuProvider.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteCustomizer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteEditPartFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteMessages.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteViewer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteViewerPreferences.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteViewerProvider.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PinDrawerAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/SettingsAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/TizenEditDomain.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/DefaultEntryPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/DrawerEntryPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/EntryPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/EntryPageContainer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteContainerFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteCustomizationAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteCustomizerDialog.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteDrawerFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteEntryFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteGroupFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteLabelProvider.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteSeparatorFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteSettingsDialog.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteStackFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteTreeProvider.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/IPinnableEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/PaletteAnimator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/PaletteEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/PaletteToolbarLayout.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/messages.properties [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/package.html [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/parts/PaletteViewerKeyHandler.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/parts/package.html [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/views/palette/PalettePage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/views/palette/PaletteView.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/views/palette/PaletteViewerPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/ContextMenu.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/DesignEditorPaletteViewer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/DesignEditorPaletteViewerProvider.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/KeyHandler.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/PaletteConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/PaletteRootEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/PaletteTemplateTransferDragSourceListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/internal/ArrowButton.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignEditorRulerEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignEditorRulerEditPartFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignEditorRulerFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignerGuide.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignerRuler.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignerRulerProvider.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/commands/CreateGuideCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/commands/DeleteGuideCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/commands/MoveGuideCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/DOM2PartAdapter.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/DOMChangeInfo.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/DataBindingModelListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/NotificationWatchDog.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditor.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditorComposite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditorUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditorWatchdog.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/PreviewComposite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/PreviewViewer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/editparts/PreviewEditPartFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/editparts/PreviewRootEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/editparts/UIComponentEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/DeviceImageFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/ImageFigureConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/PreviewImageFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/ProfileFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/UIComponentFigure.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/policies/PreviewSelectionPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/LayoutSchemaProvider.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/LayoutValidator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/Messages.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/NonSchemaBasedLayoutValidator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/SchemaURIResolver.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/ValidationInfo.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/messages.properties [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/AbstractToolbar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/DesignEditorToolbar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/EditorModeToolbar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/IZoomToolbar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/PreviewToolbar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ScreenDesignToolbar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ScreenPreviewToolbar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/StoryboardAutoLayoutToolbar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ToolBarConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ToolbarUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ViewNavigationToolbar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ZoomControlToolbar.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/resources/ColorResources.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/resources/FontResources.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/resources/ImageResources.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/Activator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingDnDManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingView.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataModelTreeItemTransfer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/TreeItemTransfer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddDataModelAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddDataModelItemAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddDataSourceAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddModelDropDownAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/CollapseAllAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/EditDataSourceAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RemoveBindingInfoAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RemoveDataModelAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RemoveDataSourceAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RenameDataModelAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RenameDataSourceAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/SetModelTargetAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/ShowBindingInfoAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/CallHistorySubPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/ContactSubPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/DataBindingFilterDialog.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/Helper.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/RemoteCallSubPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/SetModelTargetDialog.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/SetSourcePage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/SourceDialogSubPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/StaticSubPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingData.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingDataSet.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingDataSetEvent.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingObject.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/DataBindingPartProperty.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/IBindingDataSetListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/TreeItemData.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/WidgetDataSourceBindingView.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/ConfigureDataModelCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/ConfigureDataSourceCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/DataBindingCommandAdapter.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/DataBindingCommandFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/DataBindingPropertyPartCommand.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/BuilderConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/DataBindingHelper.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/Helper.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/ResourceManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/Messages.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/Messages.properties [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineConstants.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineContextMenu.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineEditPartFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineEditPolicy.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlinePage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeTransfer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeTransferDragListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeTransferDropListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeViewer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineViewEditPart.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineAbstractAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineCreateTemplateAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineNewViewCtxPopupAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineNewViewPopupAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineNewViewTemplateAction.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/CategoryComposite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/ConstraintsUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/EdjeControlUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/EventDelegater.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/FoldingComposite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PartControlUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesConstant.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesModelProvider.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesPageComposite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesUIController.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertyViewModelSet.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/AbstractEventComposite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/EventComposite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/EventHandlerComposite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/EventHandlerUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/HandlerCodeManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/HandlerCodeWriter.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/HandlerNameValidator.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/IHandlerCodeWriter.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/CheckScaleEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ColorData.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ColorListEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ColorPickerEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ComboEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/DoubleEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/Editable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EditableCreationFactory.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EditableEvent.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EditableUtil.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EmptyEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/GroupEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/IGroupEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/IValueChangeListener.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ImageEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/IntegerEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ItemAddEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/LayoutResourceEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/NoContentEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/RMTextEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/RadioEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ResourceEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ScaleEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/StyleEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextEditor.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextResourceEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextStyleEditable.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/UserColorData.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ViewsComboEditable.java [new file with mode: 0755]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/ComponentDesignerExecuter.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleEDJManager.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleEditDialog.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleEditMethod.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleInfo.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleInputDialog.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScale.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScaleData.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScaleDefaultRenderer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScaleRenderer.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/UIBLabel.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/newfile/EdcFileWizard.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/AbstractWizard.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/AbstractWizardPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewSnippetDialogPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewSnippetWizardMessages.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewSnippetWizardMessages.properties [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewComposite.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizard.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizardFirstPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizardMessages.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizardMessages.properties [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizard.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizardFirstPage.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizardMessages.java [new file with mode: 0644]
org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizardMessages.properties [new file with mode: 0644]
package/build.linux [new file with mode: 0755]
package/changelog [new file with mode: 0644]
package/pkginfo.manifest [new file with mode: 0644]
script/boilerplate.txt [new file with mode: 0644]
script/check-boilerplate.sh [new file with mode: 0755]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..acee03f
--- /dev/null
@@ -0,0 +1,2 @@
+bin
+*.class
diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..02f6e1c
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,7 @@
+Dongjo Hwang <dongjo.hwang@samsung.com>
+Gyeongmin Ju <gyeongmin.ju@samsung.com>                
+ByoungChang Son <sonbc121.son@samsung.com>             
+Wonjune Choi <wonjune.choi@samsung.com>                
+Jeonghwan Kim <jeonghwan0613@samsung.com>              
+Jaeyeol Lee <jaeyeol148.lee@samsung.com>               
+Hyeonsu Seo <hyeonsu.seo@samsung.com>          
diff --git a/LICENSE.APLv2 b/LICENSE.APLv2
new file mode 100644 (file)
index 0000000..9fc6203
--- /dev/null
@@ -0,0 +1,204 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+
diff --git a/LICENSE.EPL b/LICENSE.EPL
new file mode 100644 (file)
index 0000000..3d967ae
--- /dev/null
@@ -0,0 +1,70 @@
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program;
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of the Program.
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
\ No newline at end of file
diff --git a/NOTICE b/NOTICE
new file mode 100644 (file)
index 0000000..2605c69
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,9 @@
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Apache License, Version 2.
+Please, see the LICENSE.APLv2 file for Apache License terms and conditions.
+
+gson.jar licensed under Apache License, Version 2.
+Please, see LICENSE.APLv2 file for Apache License, Version 2 terms and conditions.
+
+nebula.widgets.gallery_0.6.0.201307092147.jar licensed under Eclipse Public License, Version 1.0
+Please, see LICENSE.EPL file for Eclipse Public License, Version 1.0 terms and conditions.
diff --git a/builder/build.properties.clean b/builder/build.properties.clean
new file mode 100644 (file)
index 0000000..b345bb7
--- /dev/null
@@ -0,0 +1,259 @@
+###############################################################################
+# Copyright (c) 2003, 2006 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+#####################
+# Parameters describing how and where to execute the build.
+# Typical users need only update the following properties:
+#    baseLocation - where things you are building against are installed
+#    bootclasspath - The base jars to compile against (typicaly rt.jar)
+#    configs - the list of {os, ws, arch} configurations to build.  
+#
+# Of course any of the settings here can be overridden by spec'ing 
+# them on the command line (e.g., -DbaseLocation=d:/eclipse
+
+#The type of the top level element we are building,  generally "feature"
+topLevelElementType=feature
+#The id of the top level element we are building
+topLevelElementId=org.tizen.efluibuilder.feature
+
+############# PRODUCT/PACKAGING CONTROL #############
+#runPackager=true
+
+#Set the name of the archive that will result from the product build.
+#archiveNamePrefix=
+
+# The prefix that will be used in the generated archive.
+archivePrefix="Do not touch here."
+
+# The location underwhich all of the build output will be collected.
+collectingFolder=${archivePrefix}
+
+# The list of {os, ws, arch} configurations to build.  This 
+# value is a '&' separated list of ',' separate triples.  For example, 
+#     configs=win32,win32,x86 & linux,motif,x86
+# By default the value is *,*,*
+configs="Do not touch here."
+#configs=win32, win32, x86 & \
+#      win32,win32,x86_64 & \
+#      win32,win32,wpf & \
+#      linux, gtk, ppc & \
+#      linux, gtk, x86 & \
+#      linux, gtk, x86_64 & \
+#      linux, motif, x86 & \
+#      solaris, motif, sparc & \
+#      solaris, gtk, sparc & \
+#      aix, motif, ppc & \
+#      hpux, motif, ia64_32 & \
+#      macosx, carbon, ppc & \
+#      macosx, carbon, x86 & \
+#      macosx, cocoa, ppc & \
+#      macosx, cocoa, x86 & \
+#      macosx, cocoa, x86_64
+
+# By default PDE creates one archive (result) per entry listed in the configs property.
+# Setting this value to true will cause PDE to only create one output containing all 
+# artifacts for all the platforms listed in the configs property.
+# To control the output format for the group, add a "group, group, group - <format>" entry to the
+# archivesFormat. 
+#groupConfigurations=true
+
+#The format of the archive. By default a zip is created using antZip.
+#The list can only contain the configuration for which the desired format is different than zip.
+#archivesFormat=win32, win32, x86 - antZip& \
+#      linux, gtk, ppc - antZip &\
+#    linux, gtk, x86 - antZip& \
+#      linux, gtk, x86_64 - antZip& \
+# linux, motif, x86 - antZip& \
+#      solaris, motif, sparc - antZip& \
+#      solaris, gtk, sparc - antZip& \
+#      aix, motif, ppc - antZip& \
+#      hpux, motif, PA_RISC - antZip& \
+#      macosx, carbon, ppc - antZip
+
+#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles.
+allowBinaryCycles=true
+
+#Sort bundles depenedencies across all features instead of just within a given feature.
+#flattenDependencies = true
+
+#Parallel compilation, requires flattenedDependencies=true
+#parallelCompilation=true
+#parallelThreadCount=
+#parallelThreadsPerProcessor=
+       
+#Set to true if you want the output to be ready for an update jar (no site.xml generated)
+#outputUpdateJars = false
+
+#Set to true for Jnlp generation
+#codebase should be a URL that will be used as the root of all relative URLs in the output.
+#generateJnlp=false
+#jnlp.codebase=<codebase url>
+#jnlp.j2se=<j2se version>
+#jnlp.locale=<a locale>
+#jnlp.generateOfflineAllowed=true or false generate <offlineAllowed/> attribute in the generated features
+#jnlp.configs=${configs}                       #uncomment to filter the content of the generated jnlp files based on the configuration being built
+
+#Set to true if you want to sign jars
+#signJars=false
+#sign.alias=<alias>
+#sign.keystore=<keystore location>
+#sign.storepass=<keystore password>
+#sign.keypass=<key password>
+
+#Arguments to send to the zip executable
+#zipargs=
+
+#Arguments to send to the tar executable
+#tarargs=
+
+#Control the creation of a file containing the version included in each configuration - on by default 
+#generateVersionsLists=false
+
+############## BUILD NAMING CONTROL ################
+# The directory into which the build elements are fetched and where
+# the build takes place.
+buildDirectory="Do not touch here"
+
+# Type of build.  Used in naming the build output.  Typically this value is
+# one of I, N, M, S, ...
+buildType="Do not touch here"
+
+# ID of the build.  Used in naming the build output.
+buildId="Do not touch here"
+
+# Label for the build.  Used in naming the build output
+buildLabel=${buildType}.${buildId}
+
+# Timestamp for the build.  Used in naming the build output
+timestamp=007
+
+#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde.
+#The value will only be applied to plugin or features indicating build.properties, qualifier = context 
+#forceContextQualifier=<the value for the qualifier>
+
+#Enable / disable the generation of a suffix for the features that use .qualifier. 
+#The generated suffix is computed according to the content of the feature   
+#generateFeatureVersionSuffix=true
+
+############# BASE CONTROL #############
+# Settings for the base Eclipse components and Java class libraries 
+# against which you are building.
+# Base location for anything the build needs to compile against.  For example,
+# in most RCP app or a plug-in,  the baseLocation should be the location of a previously
+# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack.
+
+base="Do not touch here"
+baseLocation="Do not touch here"
+
+
+#Folder containing repositories whose content is needed to compile against
+#repoBaseLocation=${base}/repos
+#Folder where the content of the repositories from ${repoBaseLocation} will be made available as a form suitable to be compiled against
+#transformedRepoLocation=${base}/transformedRepos
+
+#Os/Ws/Arch/nl of the eclipse specified by baseLocation
+baseos=linux
+basews=gtk
+basearch=x86
+
+#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built
+filteredDependencyCheck=false
+
+#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
+resolution.devMode=false
+
+#pluginPath is a list of locations in which to find plugins and features.  This list is separated by the platform file separator (; or :)
+#a location is one of:  
+#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo
+#- a directory that contains a /plugins or /features subdirectory
+#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml
+#pluginPath=
+
+skipBase=true
+eclipseURL=<url for eclipse download site>
+eclipseBuildId=<Id of Eclipse build to get>
+eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip
+
+
+############# MAP FILE CONTROL ################
+# This section defines CVS tags to use when fetching the map files from the repository.
+# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml
+
+skipMaps=true
+mapsRepo=:pserver:anonymous@example.com/path/to/repo
+mapsRoot=path/to/maps
+mapsCheckoutTag=HEAD
+
+#tagMaps=true
+mapsTagTag=v${buildId}
+
+
+############ REPOSITORY CONTROL ###############
+# This section defines properties parameterizing the repositories where plugins, fragments
+# bundles and features are being obtained from. 
+
+# The tags to use when fetching elements to build.
+# By default thebuilder will use whatever is in the maps.  
+# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the 
+# overriding value
+# For example fetchTag=CVS=HEAD, SVN=v20050101
+# fetchTag=HEAD
+skipFetch=true
+
+
+############# P2 OPTIONS ##############
+#p2.gathering = true
+#p2.compress=true
+
+############# JAVA COMPILER OPTIONS ##############
+# The location of the Java jars to compile against.  Typically the rt.jar for your JDK/JRE
+#bootclasspath=${java.home}/lib/rt.jar
+
+# specific JRE locations to compile against. These values are used to compile bundles specifying a 
+# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
+#CDC-1.0/Foundation-1.0= /path/to/rt.jar
+#CDC-1.1/Foundation-1.1=
+#OSGi/Minimum-1.0=
+#OSGi/Minimum-1.1=
+#JRE-1.1=
+#J2SE-1.2=
+#J2SE-1.3=
+#J2SE-1.4=
+#J2SE-1.5=
+#JavaSE-1.6=
+#PersonalJava-1.1=
+#PersonalJava-1.2=
+#CDC-1.0/PersonalBasis-1.0=
+#CDC-1.0/PersonalJava-1.0=
+#CDC-1.1/PersonalBasis-1.1=
+#CDC-1.1/PersonalJava-1.1=
+
+# Specify the output format of the compiler log when eclipse jdt is used
+logExtension=.log
+
+# Whether or not to include debug info in the output jars
+javacDebugInfo=true 
+
+# Whether or not to fail the build if there are compiler errors
+javacFailOnError=true
+
+# Enable or disable verbose mode of the compiler
+javacVerbose=false
+
+# Extra arguments for the compiler. These are specific to the java compiler being used.
+#compilerArg=
+
+# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
+javacSource=1.8
+
+# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
+javacTarget=1.8
+
+
diff --git a/builder/customTargets.xml b/builder/customTargets.xml
new file mode 100644 (file)
index 0000000..6a42e92
--- /dev/null
@@ -0,0 +1,187 @@
+<project name="Build specific targets and properties" default="noDefault">
+
+       <!-- ===================================================================== -->
+       <!-- Run a given ${target} on all elements being built -->
+       <!-- Add on <ant> task for each top level element being built. -->
+       <!-- ===================================================================== -->
+       <available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml"/>
+       <property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml"/>
+
+       <import file="${allElementsFile}" />
+       <target name="allElements">
+               <ant antfile="${genericTargets}" target="${target}">
+                       <property name="type" value="${topLevelElementType}"/>
+                       <property name="id" value="${topLevelElementId}"/>
+               </ant>
+       </target>
+
+       <target
+               name="assemble.${topLevelElementId}.linux.gtk.x86">
+               <ant antfile="{$assembleScriptName}" dir="${buildDirectory}"/>
+       </target>
+       <target
+               name="assemble.${topLevelElementId}.win32.win32.x86">
+               <ant antfile="{$assembleScriptName}" dir="${buildDirectory}"/>
+       </target>
+       
+       <!-- ===================================================================== -->
+       <!-- ===================================================================== -->
+       <target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
+               <get src="${eclipseBaseURL}" dest="${buildDirectory}/../temp-base.zip" />
+               <unzip dest="${base}" overwrite="true" src="${buildDirectory}/../temp-base.zip" />
+       </target>
+
+       <target name="checkLocalBase">
+               <available file="${base}" property="skipBase" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Check out map files from correct repository -->
+       <!-- Replace values for mapsCheckoutTag as desired. -->
+       <!-- ===================================================================== -->
+       <target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
+               <property name="mapsCheckoutTag" value="HEAD" />
+               <cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
+       </target>
+
+       <target name="checkLocalMaps">
+               <available property="skipMaps" file="${buildDirectory}/maps" />
+       </target>
+
+       <target name="tagMapFiles" if="tagMaps">
+               <cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" />
+       </target>
+
+       <!-- ===================================================================== -->
+
+       <target name="clean" unless="noclean">
+               <antcall target="allElements">
+                       <param name="target" value="cleanElement" />
+               </antcall>
+       </target>
+
+       <target name="gatherLogs">
+               <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
+               <antcall target="allElements">
+                       <param name="target" value="gatherLogs" />
+               </antcall>
+               <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
+                       <fileset dir="${buildDirectory}/features">
+                               <include name="**/*.log.zip" />
+                       </fileset>
+               </unzip>
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before setup -->
+       <!-- ===================================================================== -->
+       <target name="preSetup">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after setup but before starting the build proper -->
+       <!-- ===================================================================== -->
+       <target name="postSetup">
+               <antcall target="getBaseComponents" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before fetching the build elements -->
+       <!-- ===================================================================== -->
+       <target name="preFetch">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after fetching the build elements -->
+       <!-- ===================================================================== -->
+       <target name="postFetch">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before the repositories are being processed -->
+       <!-- ===================================================================== -->
+       <target name="preProcessRepos">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after the repositories have been processed -->
+       <!-- ===================================================================== -->
+       <target name="postProcessRepos">
+       </target>
+       
+       <!-- ===================================================================== -->
+       <!-- Steps to do before generating the build scripts. -->
+       <!-- ===================================================================== -->
+       <target name="preGenerate">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after generating the build scripts. -->
+       <!-- ===================================================================== -->
+       <target name="postGenerate">
+               <antcall target="clean" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running the build.xmls for the elements being built. -->
+       <!-- ===================================================================== -->
+       <target name="preProcess">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after running the build.xmls for the elements being built. -->
+       <!-- ===================================================================== -->
+       <target name="postProcess">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running assemble. -->
+       <!-- ===================================================================== -->
+       <target name="preAssemble">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after  running assemble. -->
+       <!-- ===================================================================== -->
+       <target name="postAssemble">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running package. -->
+       <!-- ===================================================================== -->
+       <target name="prePackage">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after  running package. -->
+       <!-- ===================================================================== -->
+       <target name="postPackage">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after the build is done. -->
+       <!-- ===================================================================== -->
+       <target name="postBuild">
+               <antcall target="gatherLogs" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do to test the build results -->
+       <!-- ===================================================================== -->
+       <target name="test">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do to publish the build results -->
+       <!-- ===================================================================== -->
+       <target name="publish">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Default target                                                        -->
+       <!-- ===================================================================== -->
+       <target name="noDefault">
+               <echo message="You must specify a target when invoking this file" />
+       </target>
+
+</project>
diff --git a/config/Chagall_conventions.xml b/config/Chagall_conventions.xml
new file mode 100644 (file)
index 0000000..4c8a062
--- /dev/null
@@ -0,0 +1,291 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<profiles version="12">
+<profile kind="CodeFormatterProfile" name="Chagall Conventions" version="12">
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="2"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="160"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="16"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="100"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="18"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+</profile>
+</profiles>
diff --git a/demo-27-03-2017/databinding_filter_demo.ogv b/demo-27-03-2017/databinding_filter_demo.ogv
new file mode 100644 (file)
index 0000000..f261b18
Binary files /dev/null and b/demo-27-03-2017/databinding_filter_demo.ogv differ
diff --git a/org.tizen.efluibuilder.codegenerator/.classpath b/org.tizen.efluibuilder.codegenerator/.classpath
new file mode 100644 (file)
index 0000000..1fa3e68
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.efluibuilder.codegenerator/.project b/org.tizen.efluibuilder.codegenerator/.project
new file mode 100644 (file)
index 0000000..004b7ea
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.efluibuilder.codegenerator</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.efluibuilder.codegenerator/.settings/org.eclipse.jdt.core.prefs b/org.tizen.efluibuilder.codegenerator/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..da318c2
--- /dev/null
@@ -0,0 +1,90 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
diff --git a/org.tizen.efluibuilder.codegenerator/META-INF/MANIFEST.MF b/org.tizen.efluibuilder.codegenerator/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..ea3d13f
--- /dev/null
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.efluibuilder.codegenerator
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.tizen.efluibuilder.codegenerator.Activator
+Require-Bundle: org.eclipse.ui;bundle-version="3.105.0",
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.tizen.common,
+ org.tizen.efluibuilder.common
+Bundle-ActivationPolicy: lazy
+Export-Package: org.tizen.efluibuilder.codegenerator,
+ org.tizen.efluibuilder.codegenerator.event
+Bundle-Vendor: %Bundle-Vendor
diff --git a/org.tizen.efluibuilder.codegenerator/OSGI-INF/l10n/bundle.properties b/org.tizen.efluibuilder.codegenerator/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..5475439
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for org.tizen.efluibuilder.codegenerator
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen EFL UI Builder Codegenerator
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/build.properties b/org.tizen.efluibuilder.codegenerator/build.properties
new file mode 100644 (file)
index 0000000..0f0f7cc
--- /dev/null
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               res/,\
+               OSGI-INF/
+src.excludes = test/
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_common_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_common_header.xsl
new file mode 100644 (file)
index 0000000..1663888
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="databinding_children_count" select="count(//dataBinding//*)" />
+               <xsl:if test="$databinding_children_count>0">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_UIB_DATABINDING_COMMON_H_
+#define MANAGED_INC_UIB_DATABINDING_COMMON_H_
+
+#include "g_inc_uib.h"
+#include "stdlib.h"
+#include "dlog.h"
+#include <json-glib/json-glib.h>
+#include <libxml2/libxml/tree.h>
+
+typedef enum {
+       text, foreach, binding_type_end_proxy
+} widget_binding_type;
+
+typedef enum {
+       uib_label,
+       uib_list,
+       uib_hoversel,
+       uib_hoverselitem,
+       uib_genlist,
+       uib_button,
+       uib_checkbox,
+       uib_listitem,
+       uib_radio,
+       uib_flipselector,
+       uib_flipselectoritem,
+       uib_widget_list_end_proxy
+} widget_type;
+
+typedef enum {
+       UIB_XML, UIB_JSON
+} UIB_DATASOURCE_CONTENT_TYPE;
+
+typedef void (*Databinding_callback)(Evas_Object* widget,
+               char* binding_element_path, widget_binding_type binding_type,
+               void** root_element, UIB_DATASOURCE_CONTENT_TYPE ds_content_type);
+typedef void (*SetWidgetElementValue_callback)(Evas_Object* widget,
+               widget_binding_type binding_type, char* value_data);
+
+typedef struct {
+       bool is_init;
+       Databinding_callback binding_cb;
+} widget_handler_st;
+
+char* get_json_data_from_builder(JsonBuilder*);
+char* get_json_data_from_node(JsonNode*);
+char* trim_quotes(char*);
+bool data_contacts_common_disconnect();
+bool data_contacts_common_connect();
+char* get_xml_data_from_node(xmlDocPtr);
+xmlDocPtr convert_json_to_xml(JsonNode*);
+
+/**
+ *
+ * @brief Bind data value to specified widget based on
+ *
+ * @remark
+ *
+ * @param[in] widget The widget on which databinding will be performed
+ * @param[in] binding_element_path The JSON path to extract data element(s) from JSON tree
+ * @param[in] binding_type The type of binding to be performed performed
+ * @param[in] root_element The root node of JSON from where data needs to be extracted
+ * @param[in] pre_db_cb The callback of type Databinding_callback to be called before value is set on widget. Can be used to reset or preserve old values
+ * @param[in] databind_cb The callback of SetWidgetElementValue_callback type to be used for setting data value onto widget
+ * @param[in] post_db_cb The callback of type Databinding_callback to be called after value is set on widget. Can be used to render updated widget elements
+ * @param[in] ds_content_type The datasource content type which calls respective parser for the attached data content
+ */
+void bind_data(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               Databinding_callback pre_db_cb,
+               SetWidgetElementValue_callback databind_cb,
+               Databinding_callback post_db_cb,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type);
+#endif
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_common_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_common_source.xsl
new file mode 100644 (file)
index 0000000..af7f264
--- /dev/null
@@ -0,0 +1,372 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="databinding_children_count" select="count(//dataBinding//*)" />
+               <xsl:if test="$databinding_children_count>0">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include "uib_databinding_common.h"
+#include <contacts_service.h>
+#include <contacts_errors.h>
+#include <libxml2/libxml/parser.h>
+#include <libxml2/libxml/xpath.h>
+
+static void db_json_content_handler(Evas_Object*, char*, widget_binding_type,
+               JsonNode *, Databinding_callback, SetWidgetElementValue_callback,
+               Databinding_callback, UIB_DATASOURCE_CONTENT_TYPE);
+
+static void db_xml_content_handler(Evas_Object*, char*, widget_binding_type,
+               xmlDocPtr, Databinding_callback, SetWidgetElementValue_callback,
+               Databinding_callback, UIB_DATASOURCE_CONTENT_TYPE);
+
+static bool processNode(xmlNodePtr, JsonReader*, JsonNodeType);
+
+char* get_json_data_from_builder(JsonBuilder* jsonBuilder) {
+       //Verify generated Json
+       JsonGenerator* jsonGenerator = json_generator_new();
+       JsonNode* rootNode = json_builder_get_root(jsonBuilder);
+       json_generator_set_root(jsonGenerator, rootNode);
+       json_generator_set_pretty(jsonGenerator, false);
+       char* json_string = json_generator_to_data(jsonGenerator, NULL);
+       //json_to_string(json_builder_get_root(jsonBuilder),true);
+       dlog_print(DLOG_INFO, LOG_TAG, "print generated json %s", json_string);
+       g_object_unref(rootNode);
+       g_object_unref(jsonGenerator);
+       return json_string;
+}
+
+char* get_json_data_from_node(JsonNode* rootNode) {
+       //Verify generated Json
+       char* json_string = NULL;
+       if (rootNode != NULL) {
+               JsonGenerator* jsonGenerator = json_generator_new();
+               json_generator_set_root(jsonGenerator, rootNode);
+               json_generator_set_pretty(jsonGenerator, false);
+               json_string = json_generator_to_data(jsonGenerator, NULL);
+               //json_to_string(json_builder_get_root(jsonBuilder),true);
+               dlog_print(DLOG_INFO, LOG_TAG, "print generated json %s", json_string);
+               g_object_unref(jsonGenerator);
+       }
+       return json_string;
+}
+
+char* get_xml_data_from_node(xmlDocPtr rootNode) {
+       //Verify generated Json
+       char* xml_string = NULL;
+       int size;
+       xmlDocDumpFormatMemory(rootNode, &xml_string, &size, 1);
+       return xml_string;
+}
+
+char* trim_quotes(char* str) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s trim quotes for %s", __func__, str);
+       if (str != NULL) {
+               unsigned int len = strlen(str);
+               if (len == 0) {
+                       return str;
+               }
+               int begin = 0, end = len - 1;
+               if (str[0] == '"')
+                       begin = 1;
+               if (str[end] == '"')
+                       end--;
+               if ((begin != 0) || (end != len - 1)) {
+                       int length = end + 1;
+                       int j = 0;
+                       for (int i = begin; i < length; ++i) {
+                               str[j++] = str[i];
+                       }
+                       str[j] = '\0';
+               }
+       }
+       dlog_print(DLOG_DEBUG, LOG_TAG,
+                       "%s trimmed string after removing quotes %s", __func__, str);
+       return str;
+}
+
+/**
+ * @brief Function connects to the contacts database.
+ * @return This function returns 'true' if the function succeeds,
+ * otherwise 'false' is returned.
+ */
+bool data_contacts_common_connect() {
+       int ret = contacts_connect();
+       if (ret != CONTACTS_ERROR_NONE)
+               dlog_print(DLOG_ERROR, LOG_TAG, "contacts_connect() failed. Err= %d.",
+                               ret);
+
+       return (ret == CONTACTS_ERROR_NONE);
+}
+
+/**
+ * @brief Function disconnects from the contacts database.
+ * @return This function returns 'true' if the function succeeds,
+ * otherwise 'false' is returned.
+ */
+bool data_contacts_common_disconnect() {
+       int ret = contacts_disconnect();
+       if (ret != CONTACTS_ERROR_NONE)
+               dlog_print(DLOG_ERROR, LOG_TAG,
+                               "contacts_disconnect() failed. Err= %d.", ret);
+
+       return (ret == CONTACTS_ERROR_NONE);
+}
+
+void bind_data(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               Databinding_callback pre_db_cb,
+               SetWidgetElementValue_callback databind_cb,
+               Databinding_callback post_db_cb,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (root_element == NULL)
+               return;
+
+       xmlDocPtr docPtr = (xmlDocPtr) root_element[0];
+       db_xml_content_handler(widget, binding_element_path, binding_type, docPtr,
+                       pre_db_cb, databind_cb, post_db_cb, ds_content_type);
+}
+
+static void db_json_content_handler(Evas_Object* widget,
+               char* binding_element_path, widget_binding_type binding_type,
+               JsonNode * rootNode, Databinding_callback pre_db_cb,
+               SetWidgetElementValue_callback databind_cb,
+               Databinding_callback post_db_cb,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+
+       JsonParser *parser = json_parser_new();
+       char* json_data = get_json_data_from_node(rootNode);
+       if (json_parser_load_from_data(parser, json_data, strlen(json_data),
+       NULL)) {
+
+               JsonNode *result;
+               JsonPath *path = json_path_new();
+               json_path_compile(path, binding_element_path, NULL);
+               result = json_path_match(path, json_parser_get_root(parser));
+
+               //TODO: Remove from generated code
+               //get_json_data_from_node(result);
+               if (pre_db_cb != NULL) {
+                       pre_db_cb(widget, binding_element_path, binding_type, &rootNode,
+                                       ds_content_type);
+               }
+               JsonArray* resultArray = json_node_get_array(result);
+               if (databind_cb != NULL) {
+                       if (binding_type == foreach) {
+                               for (int i = 0; i < json_array_get_length(resultArray); ++i) {
+                                       JsonNode* element = json_array_get_element(resultArray, i);
+                                       char* element_data = trim_quotes(
+                                                       get_json_data_from_node(element));
+                                       databind_cb(widget, binding_type, element_data);
+                                       g_free(element_data);
+                               }
+                       } else if (binding_type == text) {
+                               JsonNode* element = json_array_get_element(resultArray, 0);
+                               char* element_data = trim_quotes(
+                                               get_json_data_from_node(element));
+                               databind_cb(widget, binding_type, element_data);
+                               g_free(element_data);
+                       }
+               }
+               g_object_unref(path);
+               //Frees up memory allocated to element & resultArray as well
+               json_node_free(result);
+       }
+       g_free(json_data);
+       g_object_unref(parser);
+       if (post_db_cb != NULL) {
+               post_db_cb(widget, binding_element_path, binding_type, &rootNode,
+                               ds_content_type);
+       }
+}
+
+static void db_xml_content_handler(Evas_Object* widget,
+               char* binding_element_path, widget_binding_type binding_type,
+               xmlDocPtr docPtr, Databinding_callback pre_db_cb,
+               SetWidgetElementValue_callback databind_cb,
+               Databinding_callback post_db_cb,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       xmlXPathContextPtr context;
+       xmlXPathObjectPtr result;
+       xmlNodeSetPtr nodeSet;
+       char * xml_data = get_xml_data_from_node(docPtr);
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - Received xml doc %s", __func__,
+                       xml_data);
+       xmlFree(xml_data);
+
+       context = xmlXPathNewContext(docPtr);
+       if (context == NULL) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "%s - %s", __func__,
+                               "Error found in xmlXPathNewContext");
+       }
+       result = xmlXPathEvalExpression((const xmlChar*) binding_element_path,
+                       context);
+       xmlXPathFreeContext(context);
+       if (result == NULL) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "%s - %s", __func__,
+                               "Error found in xmlXPathEvalExpression");
+               return;
+       }
+       if (xmlXPathNodeSetIsEmpty(result->nodesetval)) {
+               xmlXPathFreeObject(result);
+               dlog_print(DLOG_DEBUG, LOG_TAG, "%s - %s", __func__,
+                               "No result found after xpath evaluation");
+               return;
+       }
+       if (pre_db_cb != NULL) {
+               pre_db_cb(widget, binding_element_path, binding_type, &docPtr,
+                               ds_content_type);
+       }
+
+       nodeSet = result->nodesetval;
+       if (binding_type == foreach) {
+               for (int i = 0; i < nodeSet->nodeNr; i++) {
+                       char* element_data = trim_quotes(
+                                       xmlNodeListGetString(docPtr,
+                                                       nodeSet->nodeTab[i]->xmlChildrenNode, 1));
+                       databind_cb(widget, binding_type, element_data);
+                       xmlFree(element_data);
+               }
+       } else if (binding_type == text) {
+               char* element_data = trim_quotes(
+                               xmlNodeListGetString(docPtr,
+                                       nodeSet->nodeTab[0]->xmlChildrenNode, 1));
+               databind_cb(widget, binding_type, element_data);
+               xmlFree(element_data);
+       }
+       xmlXPathFreeObject(result);
+
+       if (post_db_cb != NULL) {
+               post_db_cb(widget, binding_element_path, binding_type, &docPtr,
+                               ds_content_type);
+       }
+}
+
+xmlDocPtr convert_json_to_xml(JsonNode* root_node) {
+       //Begin xml document
+       xmlDocPtr datasource_xmlDoc = xmlNewDoc(BAD_CAST "1.0");
+
+       JsonReader* reader = json_reader_new(root_node);
+
+       xmlNodePtr xml_root_node = xmlNewNode(NULL, BAD_CAST "root");
+       xmlDocSetRootElement(datasource_xmlDoc, xml_root_node);
+
+       processNode(xml_root_node, reader, JSON_NODE_OBJECT);
+
+       g_object_unref(reader);
+
+       return datasource_xmlDoc;
+}
+
+static bool processNode(xmlNodePtr parentXMLNodePtr, JsonReader* reader, JsonNodeType parentNodeType) {
+
+       if (json_reader_is_array(reader)) {
+               const gchar* mem_name = json_reader_get_member_name(reader);
+               gchar* member_name = (gchar*) malloc(sizeof(gchar*) * strlen(mem_name));
+               strcpy(member_name, mem_name);
+               int nElements = json_reader_count_elements(reader);
+               for (int i = 0; i < nElements; ++i) {
+
+                       if (!json_reader_read_element(reader, i)) {
+                               const GError * error = json_reader_get_error(reader);
+                               dlog_print(DLOG_ERROR, LOG_TAG, "%s - %s", __func__,
+                                               error->message);
+                               return FALSE;
+                       }
+
+                       if (json_reader_is_object(reader)) {
+                               xmlNodePtr obj_arr_xml_node_ptr = xmlNewChild(parentXMLNodePtr, NULL,
+                                               (const xmlChar*) member_name, NULL);
+                               if (!processNode(obj_arr_xml_node_ptr, reader, JSON_NODE_ARRAY)) {
+                                       return FALSE;
+                               }
+                       } else {
+                               JsonNode* node = json_reader_get_value(reader);
+                               if (node == NULL) {
+                                       const GError * error = json_reader_get_error(reader);
+                                       if (error != NULL) {
+                                               dlog_print(DLOG_ERROR, LOG_TAG, "%s - %s", __func__,
+                                                               error->message);
+                                       }
+                                       return FALSE;
+                               }
+                               char * element_data = trim_quotes(get_json_data_from_node(node));
+                               xmlNewTextChild(parentXMLNodePtr, NULL, (const xmlChar*) member_name,
+                                               (const xmlChar*) element_data);
+                       }
+                       json_reader_end_element(reader);
+               }
+               free(member_name);
+
+       } else if (json_reader_is_object(reader)) {
+               const gchar* member_name = json_reader_get_member_name(reader);
+               xmlNodePtr obj_node_ptr = NULL;
+               if ((member_name == NULL) || (parentNodeType == JSON_NODE_ARRAY)) {
+                       //It's the root object, therefore using passed root node as parent
+                       obj_node_ptr = parentXMLNodePtr;
+               } else {
+                       obj_node_ptr = xmlNewChild(parentXMLNodePtr, NULL,
+                                       (const xmlChar*) member_name, NULL);
+               }
+               int nMembers = json_reader_count_members(reader);
+               gchar ** member_list = json_reader_list_members(reader);
+               for (int i = 0; i < nMembers; ++i) {
+                       if (!json_reader_read_member(reader, member_list[i])) {
+                               const GError * error = json_reader_get_error(reader);
+                               dlog_print(DLOG_ERROR, LOG_TAG, "%s - %s", __func__,
+                                               error->message);
+                               return FALSE;
+                       }
+                       if (!processNode(obj_node_ptr, reader, JSON_NODE_OBJECT)) {
+                               return FALSE;
+                       }
+                       json_reader_end_member(reader);
+               }
+
+       } else if (json_reader_is_value(reader)) {
+               const gchar* member_name = json_reader_get_member_name(reader);
+               JsonNode* node = json_reader_get_value(reader);
+               if (node == NULL) {
+                       const GError * error = json_reader_get_error(reader);
+                       if (error != NULL) {
+                               dlog_print(DLOG_ERROR, LOG_TAG, "%s - %s", __func__,
+                                               error->message);
+                       }
+                       return FALSE;
+               }
+               char * element_data = trim_quotes(get_json_data_from_node(node));
+               xmlNewTextChild(parentXMLNodePtr, NULL, (const xmlChar*) member_name,
+                               (const xmlChar*) element_data);
+       } else {
+               //ERROR state
+               const GError * error = json_reader_get_error(reader);
+               dlog_print(DLOG_ERROR, LOG_TAG, "%s - %s", __func__, error->message);
+               return FALSE;
+       }
+       return TRUE;
+}
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodel_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodel_header.xsl
new file mode 100644 (file)
index 0000000..572ebe3
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:param name="datamodel_id"></xsl:param>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Ignore empty datamodels or datamodels tied to empty datasource -->
+               <xsl:if
+                       test="//dataBinding//dataModel[@modelName=$datamodel_id][@dataSource != ''][@modelType != 'Empty']">
+                       <xsl:apply-templates
+                               select="//dataBinding//dataModel[@modelName=$datamodel_id]" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataModel">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+]]>
+</xsl:text>
+
+               <xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
+               <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
+               <xsl:variable name="capital_datamodel_id"
+                       select="translate( $datamodel_id, $smallcase, $uppercase)" />
+               <xsl:value-of
+                       select="concat('#ifndef MANAGED_INC_DATABINDING_UIB_',$capital_datamodel_id,'_DATAMODEL_H_',$newline,'#define MANAGED_INC_DATABINDING_UIB_',$capital_datamodel_id,'_DATAMODEL_H_',$newline)" />
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[#include "uib_datamodels.h"
+#include "uib_datasources.h"
+]]>
+</xsl:text>
+               <xsl:value-of
+                       select="concat('uib_datamodel_context* get_',$datamodel_id,'_datamodel_context();',$newline )" />
+               <xsl:value-of
+                       select="concat('void cleanup_',$datamodel_id,'_datamodel();',$newline )" />
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[
+#endif
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodel_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodel_source.xsl
new file mode 100644 (file)
index 0000000..ad376ac
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:param name="datamodel_id"></xsl:param>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Ignore empty datamodels or datamodels tied to empty datasource -->
+               <xsl:if
+                       test="//dataBinding//dataModel[@modelName=$datamodel_id][@dataSource != ''][@modelType != 'Empty']">
+                       <xsl:apply-templates
+                               select="//dataBinding//dataModel[@modelName=$datamodel_id]" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataModel">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#include "uib_datasources.h"
+]]>
+</xsl:text>
+               <xsl:variable name="datasource_id" select="@dataSource" />
+               <xsl:value-of
+                       select="concat('#include &quot;uib_',$datamodel_id,'_datamodel.h&quot;',$newline)" />
+               <xsl:value-of
+                       select="concat('uib_datamodel_context* ',$datamodel_id,'_datamodel_context = NULL;',$newline,$newline)" />
+
+               <!-- uib_datamodel_context* get_model0_datamodel_context() -->
+               <xsl:value-of
+                       select="concat('uib_datamodel_context* get_',$datamodel_id,'_datamodel_context() {',$newline,
+                                       $tab,'if (',$datamodel_id,'_datamodel_context == NULL) {',$newline,
+                                       $tab,$tab,$datamodel_id,'_datamodel_context = (uib_datamodel_context*) malloc(sizeof(uib_datamodel_context));',$newline,
+                                       $tab,$tab,$datamodel_id,'_datamodel_context->datasource = uib_datasource_manager_get_instance()->get_datasource_instance(&quot;',$datasource_id,'&quot;);',$newline,
+                                       $tab,$tab,$datamodel_id,'_datamodel_context->root_element = ',$datamodel_id,'_datamodel_context->datasource->root_element;',$newline,
+                                       $tab,$tab,$datamodel_id,'_datamodel_context->dataModelName = &quot;',$datamodel_id,'&quot;;',$newline,
+                                       $tab,'}',$newline,
+                                       $tab,'return ',$datamodel_id,'_datamodel_context;',$newline,
+                                       '}',$newline)" />
+
+               <!-- void cleanup_model0_datamodel() -->
+               <xsl:value-of
+                       select="concat('void cleanup_',$datamodel_id,'_datamodel() {',$newline,
+                                       $tab,'free(',$datamodel_id,'_datamodel_context);',$newline,
+                                       '}',$newline)" />
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodels_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodels_header.xsl
new file mode 100644 (file)
index 0000000..7e23259
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Ignore empty datamodels or datamodels tied to empty datasource -->
+               <xsl:variable name="datamodel_count"
+                       select="count(//dataBinding//dataModel[@dataSource !=''][@modelType != 'Empty'])" />
+               <xsl:if test="$datamodel_count>0">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#ifndef MANAGED_INC_UIB_DATAMODELS_H_
+#define MANAGED_INC_UIB_DATAMODELS_H_
+#include "uib_databinding_common.h"
+#include "uib_datasources.h"
+
+typedef struct {
+       void** root_element;
+       uib_datasource_instance* datasource;
+       char* dataModelName;
+} uib_datamodel_context;
+
+typedef struct {
+       bool _is_init;
+       uib_datamodel_context* (*get_datamodel_context)(const char*);
+       void (*register_attached_datasource_update_cb)(void (*)());
+       void (*free_all_datamodels)();
+} uib_datamodels_st;
+
+uib_datamodels_st* uib_datamodels_get_instance();
+
+#endif
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodels_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_datamodels_source.xsl
new file mode 100644 (file)
index 0000000..5e5322b
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Ignore empty datamodels or datamodels tied to empty datasource -->
+               <xsl:variable name="datamodel_count"
+                       select="count(//dataBinding//dataModel[@dataSource !=''][@modelType != 'Empty'])" />
+               <xsl:if test="$datamodel_count>0">
+                       <xsl:call-template name="uib_common_datamodels_source" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template name="uib_common_datamodels_source">
+
+               <!-- BEGIN : OUTPUT -->
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#include "uib_datamodels.h"
+]]></xsl:text>
+               <!-- Include other datamodels header #include "uib_dm0_datamodel.h" -->
+               <xsl:for-each
+                       select="//dataBinding/dataModel[@dataSource !=''][@modelType != 'Empty']">
+                       <xsl:variable name="datamodel_id" select="@modelName" />
+                       <xsl:value-of
+                               select="concat('#include &quot;uib_',$datamodel_id,'_datamodel.h&quot;',$newline)" />
+               </xsl:for-each>
+
+               <xsl:text>
+<![CDATA[static uib_datamodels_st g_uib_datamodels;
+
+uib_datamodel_context* get_datamodel_context(const char* dataModelName) {
+       uib_datamodel_context* datamodel_context = NULL;
+]]>
+</xsl:text>
+
+               <xsl:for-each
+                       select="//dataBinding/dataModel[@dataSource !=''][@modelType != 'Empty']">
+                       <xsl:variable name="datamodel_id" select="@modelName" />
+                       <xsl:value-of
+                               select="concat($tab,'if(!strcmp(dataModelName, &quot;',$datamodel_id,'&quot;)){',$newline,
+                               $tab,$tab,'datamodel_context=get_',$datamodel_id,'_datamodel_context();',$newline,$tab,'}else')" />
+               </xsl:for-each>
+               <xsl:value-of select="concat('{',$newline,$tab,'}',$newline )" />
+
+               <xsl:value-of select="concat($newline,$tab,'return datamodel_context;' )" />
+               <xsl:value-of select="concat($newline,'}',$newline)" />
+
+               <xsl:value-of select="concat('void cleanup_datamodels() {',$newline )" />
+               <xsl:for-each
+                       select="//dataBinding/dataModel[@dataSource !=''][@modelType != 'Empty']">
+                       <xsl:variable name="datamodel_id" select="@modelName" />
+                       <xsl:value-of
+                               select="concat($tab,'cleanup_',$datamodel_id,'_datamodel();',$newline)" />
+               </xsl:for-each>
+               <xsl:value-of select="concat('}', $newline)" />
+
+               <!-- void register_attached_datasource_update_cb(const char* dataModelName, 
+                       void (*func_ptr)()) -->
+               <xsl:value-of
+                       select="concat($newline,'void register_attached_datasource_update_cb(void (*callback)()) {',$newline,
+        $tab,'uib_datasource_manager_get_instance()->register_datasource_update_cb(callback);',$newline)" />
+               <xsl:value-of select="concat('}',$newline )" />
+               <xsl:text>
+<![CDATA[uib_datamodels_st* uib_datamodels_get_instance() {
+       if (!g_uib_datamodels._is_init) {
+               g_uib_datamodels._is_init = true;
+               g_uib_datamodels.free_all_datamodels = &cleanup_datamodels;
+               g_uib_datamodels.get_datamodel_context = &get_datamodel_context;
+               g_uib_datamodels.register_attached_datasource_update_cb =
+                       &register_attached_datasource_update_cb;
+       }
+       return &g_uib_datamodels;
+}
+]]>            
+               </xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_datasource_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_datasource_header.xsl
new file mode 100644 (file)
index 0000000..b9ed487
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:param name="datasource_id"></xsl:param>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Ignore empty type datasource -->
+               <xsl:if
+                       test="//dataBinding//dataSource[@dataSource=$datasource_id][@modelType != 'Empty']">
+                       <xsl:apply-templates
+                               select="//dataBinding//dataSource[@dataSource=$datasource_id]" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataSource">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+]]>
+</xsl:text>
+               <xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
+               <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
+               <xsl:variable name="capital_datasource_id"
+                       select="translate( $datasource_id, $smallcase, $uppercase)"/>
+               <xsl:value-of
+                       select="concat('#ifndef MANAGED_INC_DATABINDING_UIB_',$capital_datasource_id,'_DATASOURCE_H_',$newline,
+                       '#define MANAGED_INC_DATABINDING_UIB_',$capital_datasource_id,'_DATASOURCE_H_',$newline)" />
+               <xsl:value-of
+                       select="concat('#include &quot;uib_datasources.h&quot;', $newline)" />  
+               <xsl:value-of
+                       select="concat('uib_datasource_instance* get_',$datasource_id,'_dataSource_handle();', $newline)" />
+               <xsl:value-of
+                       select="concat('void cleanup_',$datasource_id,'_datasource();',$newline)" />
+               <xsl:value-of select="concat('#endif', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
+
+
+
+
+
+
+
+
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_datasource_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_datasource_source.xsl
new file mode 100644 (file)
index 0000000..6fcc5a1
--- /dev/null
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:param name="datasource_id"></xsl:param>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+       <xsl:variable name="apos">'</xsl:variable>
+       <xsl:template match="/">
+               <!-- Ignore empty type datasource -->
+               <xsl:if
+                       test="//dataBinding//dataSource[@dataSource=$datasource_id][@modelType != 'Empty']">
+                       <xsl:apply-templates
+                               select="//dataBinding//dataSource[@dataSource=$datasource_id]" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataSource">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+]]>
+</xsl:text>
+
+               <xsl:variable name="datasource_type" select="@modelType" />
+               <xsl:variable name="enum_datasource_type">
+                       <xsl:choose>
+                               <xsl:when test="$datasource_type='static'">
+                                       <xsl:value-of select="'static_source'" />
+                               </xsl:when>
+                               <xsl:when test="$datasource_type='calendar'">
+                                       <xsl:value-of select="'calendar_API'" />
+                               </xsl:when>
+                               <xsl:when test="$datasource_type='call_history'">
+                                       <xsl:value-of select="'call_history_API'" />
+                               </xsl:when>
+                               <xsl:when test="$datasource_type='contacts'">
+                                       <xsl:value-of select="'contacts_API'" />
+                               </xsl:when>
+                               <xsl:when test="$datasource_type='remote'">
+                                       <xsl:value-of select="'remote_API'" />
+                               </xsl:when>
+                               <xsl:otherwise />
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:variable name="datasource_content_type" select="@sourceType" />
+               <xsl:variable name="enum_datasource_content_type">
+                       <xsl:choose>
+                               <xsl:when test="$datasource_content_type='json'">
+                                       <xsl:value-of select="'UIB_JSON'" />
+                               </xsl:when>
+                               <xsl:when test="$datasource_content_type='xml'">
+                                       <xsl:value-of select="'UIB_XML'" />
+                               </xsl:when>
+                               <xsl:otherwise />
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:value-of
+                       select="concat('#include &quot;uib_',$datasource_id,'_datasource.h&quot;',$newline)" />
+               <xsl:value-of
+                       select="concat('#include &quot;uib_datasource_handler_',$datasource_type,'.h&quot;',$newline)" />
+
+               <xsl:value-of
+                       select="concat($newline,'static uib_datasource_instance* ',$datasource_id,'_datasource;',$newline)" />
+               <xsl:if test="$datasource_type='remote'">
+                       <xsl:value-of
+                               select="concat($newline,'static remote_ds_s* ds;',$newline,$newline)" />
+               </xsl:if>
+
+               <!-- static void prepare_datasource() -->
+               <xsl:value-of select="concat('static void prepare_datasource() {',$newline)" />
+
+               <!-- Add remote datasource population logic -->
+               <xsl:if test="$datasource_type='remote'">
+                       <xsl:call-template name="remote_datasource_populate">
+                               <xsl:with-param name="enum_datasource_content_type" select="$enum_datasource_content_type" />
+                       </xsl:call-template>
+               </xsl:if>
+
+               <xsl:value-of
+                       select="concat($tab,$datasource_id,'_datasource = (uib_datasource_instance*) malloc(sizeof(uib_datasource_instance));',$newline)" />
+
+               <xsl:value-of
+                       select="concat($tab,$datasource_id,'_datasource->datasource_interface = uib_datasource_manager_get_instance()->get_datasource_interface_for_datasource_type(',$enum_datasource_type,');',$newline,
+                               $tab,$datasource_id,'_datasource->name = &quot;',$datasource_id,'&quot;;',$newline,
+                               $tab,$datasource_id,'_datasource->ds_content_type = ',$enum_datasource_content_type,';',$newline,
+                               $tab,$datasource_id,'_datasource->root_element = ',$datasource_id,'_datasource->datasource_interface->get_datasource_root_element();')" />
+
+               <!-- Add static datasource population logic -->
+               <xsl:if
+                       test="($datasource_type='static') and ($datasource_content_type='json')">
+                       <xsl:call-template name="static_json_datasource_populate" />
+               </xsl:if>
+               <xsl:if
+                       test="($datasource_type='static') and ($datasource_content_type='xml')">
+                       <xsl:call-template name="static_xml_datasource_populate" />
+               </xsl:if>
+
+               <xsl:value-of select="concat($newline,'}',$newline,$newline)" />
+               <xsl:value-of
+                       select="concat('uib_datasource_instance* get_',$datasource_id,'_dataSource_handle() {',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'if (',$datasource_id,'_datasource == NULL) {',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,$tab,'prepare_datasource();',$newline,$tab,'}',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'return ',$datasource_id,'_datasource;',$newline,'}',$newline)" />
+
+               <!-- void cleanup_source0_datasource() -->
+               <xsl:value-of
+                       select="concat($newline,'void cleanup_',$datasource_id,'_datasource() {',$newline,
+                                       $tab,'free(',$datasource_id,'_datasource->root_element[0]);',$newline,
+                                       $tab,$datasource_id,'_datasource->root_element[0] = NULL;',$newline,
+                                       $tab,'free(',$datasource_id,'_datasource);',$newline)" />
+               <xsl:if test="$datasource_type='remote'">
+                       <xsl:value-of
+                               select="concat($tab,'eina_lock_free(&amp;ds->mutex);',$newline,
+                                       $tab,'free(ds);',$newline)" />
+               </xsl:if>
+               <xsl:value-of select="concat('}',$newline )" />
+       </xsl:template>
+       <xsl:template name="static_json_datasource_populate">
+               <xsl:value-of
+                       select="concat($newline,$tab,'//Begin root node',$newline,
+                       $tab,'JsonBuilder* jsonBuilder = json_builder_new();',$newline,
+                       $tab,'jsonBuilder = json_builder_begin_object(jsonBuilder);',$newline,$newline)"></xsl:value-of>
+
+               <xsl:call-template name="json_observable_object">
+                       <xsl:with-param name="indent" select="concat($tab, $tab)"/>
+               </xsl:call-template>
+
+               <xsl:value-of
+                       select="concat($tab,'//End root node',$newline,
+                       $tab,'jsonBuilder = json_builder_end_object(jsonBuilder);',$newline,$newline,
+                       $tab,'char *json_data = get_json_data_from_builder(jsonBuilder);',$newline,
+                       $tab,'JsonParser *parser = json_parser_new();',$newline,
+                       $tab,'json_parser_load_from_data(parser,json_data,strlen(json_data),NULL);',$newline,$newline,
+                       $tab, $datasource_id, '_datasource->root_element[0] = convert_json_to_xml(json_parser_get_root(parser));',$newline,
+                       $tab,'g_object_unref(jsonBuilder);',$newline,
+                       $tab,'g_object_unref(parser);',$newline)" />
+
+       </xsl:template>
+       <xsl:template name="json_observable_object">
+               <xsl:param name="indent"></xsl:param>
+               <!-- Check for object/array type -->
+               <xsl:for-each select="./observableObject">
+                       <xsl:variable name="type" select="@type"></xsl:variable>
+                       <xsl:variable name="name" select="@name"></xsl:variable>
+                       <xsl:variable name="value" select="@value"></xsl:variable>
+                       <xsl:variable name="parentType" select="../@type"></xsl:variable>
+                       <xsl:choose>
+                               <xsl:when test="$type='Array'">
+                                       <xsl:value-of
+                                               select="concat($indent,'//Start array',$newline,
+                                               $indent,'jsonBuilder = json_builder_set_member_name(jsonBuilder,&quot;',$name,'&quot;);',$newline,
+                        $indent,'jsonBuilder = json_builder_begin_array(jsonBuilder);',$newline)" />
+                                       <xsl:call-template name="json_observable_object">
+                                               <xsl:with-param name="indent" select="concat($indent,$tab )"></xsl:with-param>
+                                       </xsl:call-template>
+                                       <xsl:value-of
+                                               select="concat($indent,'//End array',$newline,
+                                               $indent,'jsonBuilder = json_builder_end_array(jsonBuilder);',$newline)" />
+                               </xsl:when>
+                               <xsl:when test="$type='Object'">
+                                       <xsl:value-of select="concat($indent,'//Start object',$newline)" />
+                                       <xsl:if test="not($parentType) or ($parentType != 'Array')">
+                                               <xsl:value-of
+                                                       select="concat($indent,'jsonBuilder = json_builder_set_member_name(jsonBuilder,&quot;',$name,'&quot;);',$newline)" />
+                                       </xsl:if>
+                                       <xsl:value-of
+                                               select="concat($indent,'jsonBuilder = json_builder_begin_object(jsonBuilder);',$newline)" />
+                                       <xsl:call-template name="json_observable_object">
+                                               <xsl:with-param name="indent" select="concat($indent,$tab )" />
+                                       </xsl:call-template>
+                                       <xsl:value-of
+                                               select="concat($indent,'//End object',$newline,
+                                               $indent,'jsonBuilder = json_builder_end_object(jsonBuilder);',$newline)" />
+                               </xsl:when>
+                               <xsl:when test="$type='Number'">
+                                       <xsl:if test="not($parentType) or ($parentType != 'Array')">
+                                               <xsl:value-of
+                                                       select="concat($indent,'jsonBuilder = json_builder_set_member_name(jsonBuilder,&quot;',$name,'&quot;);',$newline)" />
+                                       </xsl:if>
+                                       <xsl:value-of
+                                               select="concat($indent,'jsonBuilder = json_builder_add_int_value(jsonBuilder,',$value,');',$newline)" />
+                               </xsl:when>
+                               <xsl:when test="$type='String'">
+                                       <xsl:if test="not($parentType) or ($parentType != 'Array')">
+                                               <xsl:value-of
+                                                       select="concat($indent,'jsonBuilder = json_builder_set_member_name(jsonBuilder,&quot;',$name,'&quot;);',$newline)" />
+                                       </xsl:if>
+                                       <xsl:value-of
+                                               select="concat($indent,'jsonBuilder = json_builder_add_string_value(jsonBuilder,&quot;',$value,'&quot;);',$newline)" />
+                               </xsl:when>
+                               <xsl:when test="$type = 'Boolean'">
+                                       <xsl:if test="not($parentType) or ($parentType != 'Array')">
+                                               <xsl:value-of
+                                                       select="concat($indent,'jsonBuilder = json_builder_set_member_name(jsonBuilder,&quot;',$name,'&quot;);',$newline)" />
+                                       </xsl:if>
+                                       <xsl:value-of
+                                               select="concat($indent,'jsonBuilder = json_builder_add_boolean_value(jsonBuilder,',$value,');',$newline)" />
+                               </xsl:when>
+                               <xsl:when test="$type = 'Index'"> <!-- Index is child of Array node -->
+                                       <!-- <xsl:value-of select="concat($indent,'jsonBuilder = json_builder_set_member_name(jsonBuilder,&quot;',$name,'&quot;);',$newline)" 
+                                               /> -->
+                                       <xsl:value-of
+                                               select="concat($indent,'jsonBuilder = json_builder_add_string_value(jsonBuilder,&quot;',$value,'&quot;);',$newline)" />
+                               </xsl:when>
+                               <xsl:when test="$type = 'IndexObject'"> <!-- IndexObject is child object of Array node -->
+                                       <xsl:value-of select="concat($indent,'//Start object',$newline)" />
+                                       <xsl:if test="not($parentType) or ($parentType != 'Array')">
+                                               <xsl:value-of
+                                                       select="concat($indent,'jsonBuilder = json_builder_set_member_name(jsonBuilder,&quot;',$name,'&quot;);',$newline)" />
+                                       </xsl:if>
+                                       <xsl:value-of
+                                               select="concat($indent,'jsonBuilder = json_builder_begin_object(jsonBuilder);',$newline)" />
+                                       <xsl:call-template name="json_observable_object">
+                                               <xsl:with-param name="indent" select="concat($indent,$tab )" />
+                                       </xsl:call-template>
+                                       <xsl:value-of
+                                               select="concat($indent,'//End object',$newline,
+                                               $indent,'jsonBuilder = json_builder_end_object(jsonBuilder);',$newline)" />
+                               </xsl:when>
+                               <xsl:otherwise />
+                       </xsl:choose>
+               </xsl:for-each>
+       </xsl:template>
+       <xsl:template name="static_xml_datasource_populate">
+               <xsl:value-of
+                       select="concat($newline,$tab,'//Initialize xml data',$newline,
+                       $tab,'char xml_data[] = &quot;',translate(@jsonData,'&quot;',$apos),'&quot;;',$newline,
+                       $tab,'xmlDocPtr parsedXMLDoc = xmlReadMemory(xml_data,',$newline,
+                       $tab,'strlen(xml_data), NULL, NULL, 0);',$newline,
+                       $tab,'if (parsedXMLDoc != NULL) {',$newline,
+                   $tab,$tab,$datasource_id,'_datasource->root_element[0] = parsedXMLDoc;',$newline,
+                   $tab,'}',$newline)" />
+       </xsl:template>
+       <xsl:template name="remote_datasource_populate">
+               <xsl:param name="enum_datasource_content_type" />
+               <xsl:value-of
+                       select="concat($newline,$tab,'//Begin remote datasource definition',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'ds = (remote_ds_s *)malloc(sizeof(remote_ds_s));',$newline)" />
+               <xsl:choose>
+                       <xsl:when test=" not(@query)">
+                               <xsl:value-of
+                                       select="concat($tab,'char* url = &quot;',@url,'&quot; ;',$newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of
+                                       select="concat($tab,'char* url = &quot;',@url,'?',@query,'&quot; ;',$newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:value-of
+                       select="concat($tab,'strcpy(ds->url, url);//curl_easy_escape(ds->curl,url,strlen(url))',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'ds->response_data = (char*)malloc(1*sizeof(char));',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'strcpy(ds->response_data,&quot;&quot;);',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'ds->prev_response_data = (char*)malloc(1*sizeof(char));',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'strcpy(ds->prev_response_data,&quot;&quot;);',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'ds->polling_interval = ',@pollingInterval,'; //in ms',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'ds->timeout_ms = ',@timeout,'L; //in ms',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'ds->source_name = &quot;',$datasource_id,'&quot;;',$newline)" />
+               <xsl:value-of select="concat($tab,'ds->thread_running = false;',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'ds->content_type = ',$enum_datasource_content_type,';',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'eina_lock_new(&amp;ds->mutex);',$newline,$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'set_remote_datasource(ds);',$newline,$newline)" />
+       </xsl:template>
+</xsl:stylesheet>
+
+
+
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_datasources_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_datasources_header.xsl
new file mode 100644 (file)
index 0000000..233a215
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+       <xsl:variable name="datasource_count" select="count(//dataBinding//dataSource[@modelType != 'Empty'])" />
+       <xsl:if test="$datasource_count>0">
+               <xsl:apply-templates select="//dataBinding" />
+       </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_UIB_DATASOURCES_H_
+#define MANAGED_INC_UIB_DATASOURCES_H_
+
+#include "uib_databinding_common.h"
+
+enum UIB_DATASOURCE_TYPE {
+       static_source, contacts_API, call_history_API, calendar_API, remote_API, end_datasource_type_marker
+};
+
+typedef struct {
+       bool _is_init;
+       enum UIB_DATASOURCE_TYPE ds_type;
+       void** (*get_datasource_root_element)();
+       void (*register_datasource_update_callback)(void (*)());
+       void (*cleanup_datasource)();
+} uib_datasource_interface;
+
+typedef struct {
+       char * name;
+       uib_datasource_interface* datasource_interface;
+       void** root_element;
+       UIB_DATASOURCE_CONTENT_TYPE ds_content_type;
+} uib_datasource_instance;
+
+typedef struct {
+       bool _is_init;
+       uib_datasource_instance* (*get_datasource_instance)(const char*);
+       void (*register_datasource_update_cb)(void (*)());
+       uib_datasource_interface* (*get_datasource_interface_for_datasource_type)(
+                       enum UIB_DATASOURCE_TYPE);
+       void (*free_all_datasources)();
+} uib_datasource_manager_st;
+
+uib_datasource_manager_st* uib_datasource_manager_get_instance();
+
+#endif
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_datasources_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_datasources_source.xsl
new file mode 100644 (file)
index 0000000..f9b2852
--- /dev/null
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="datasource_count"
+                       select="count(//dataBinding//dataSource[@modelType != 'Empty'])" />
+               <xsl:if test="$datasource_count>0">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#include "uib_datasources.h"
+]]></xsl:text>
+               <!-- Include other datasources header #include "uib_ds0_datasource.h" -->
+               <xsl:for-each
+                       select="//dataBinding/dataSource[@modelType != 'Empty']">
+                       <xsl:variable name="datasource_id" select="@dataSource" />
+                       <xsl:value-of
+                               select="concat('#include &quot;uib_',$datasource_id,'_datasource.h&quot;',$newline)" />
+               </xsl:for-each>
+               <!-- Include datasources headers #include "uib_datasource_contacts.h" -->
+               <xsl:if test="//dataSource[@modelType='contacts']">
+                       <xsl:value-of
+                               select="concat('#include &quot;uib_datasource_handler_contacts.h&quot;',$newline )"></xsl:value-of>
+               </xsl:if>
+               <xsl:if test="//dataSource[@modelType='static']">
+                       <xsl:value-of
+                               select="concat('#include &quot;uib_datasource_handler_static.h&quot;',$newline )"></xsl:value-of>
+               </xsl:if>
+               <xsl:if test="//dataSource[@modelType='call_history']">
+                       <xsl:value-of
+                               select="concat('#include &quot;uib_datasource_handler_call_history.h&quot;',$newline )"></xsl:value-of>
+               </xsl:if>
+               <xsl:if test="//dataSource[@modelType='remote']">
+                       <xsl:value-of
+                               select="concat('#include &quot;uib_datasource_handler_remote.h&quot;',$newline )"></xsl:value-of>
+               </xsl:if>
+               <xsl:text>
+<![CDATA[static uib_datasource_manager_st g_uib_datasource_manager;
+
+static uib_datasource_interface* get_datasource_interface_for_datasource_type(enum UIB_DATASOURCE_TYPE);
+
+static uib_datasource_instance* get_datasource_instance(const char* datasource_name) {
+uib_datasource_instance* datasource_handle = NULL;
+]]>
+</xsl:text>
+
+               <xsl:for-each
+                       select="//dataBinding/dataSource[@modelType != 'Empty']">
+                       <xsl:variable name="datasource_id" select="@dataSource" />
+                       <xsl:value-of
+                               select="concat($tab,'if(!strcmp(datasource_name, &quot;',$datasource_id,'&quot;)){',$newline,
+                               $tab,$tab,'datasource_handle = get_',$datasource_id,'_dataSource_handle();',$newline,$tab,'}else')" />
+               </xsl:for-each>
+               <xsl:value-of select="concat('{',$newline,$tab,'}',$newline )"></xsl:value-of>
+               <xsl:value-of select="concat($newline,$tab,'return datasource_handle;' )"></xsl:value-of>
+               <xsl:value-of select="concat($newline,'}',$newline)" />
+
+
+               <!-- void cleanup_datasource_interfaces() -->
+               <xsl:call-template name="cleanup_datasource_interfaces"/>
+
+               <!-- void register_datasource_update_cb(void 
+                       (*ds_update_cb)()) -->
+                       <xsl:text><![CDATA[
+static void register_datasource_update_cb(void (*callback)()) {
+       uib_datasource_interface* datasource_interface = NULL;
+       enum UIB_DATASOURCE_TYPE ds_type = static_source;
+       for (; ds_type < end_datasource_type_marker; ++ds_type) {
+               datasource_interface = get_datasource_interface_for_datasource_type(
+                               ds_type);
+               if (datasource_interface != NULL)
+                       datasource_interface->register_datasource_update_callback(callback);
+       }
+}
+]]>
+</xsl:text>
+               <!-- static void** fetch_root_data_element_from_datasource_interface() -->
+               <xsl:call-template name="get_datasource_interface_for_datasource_type" />
+
+               <!-- void cleanup_datasources() -->
+               <xsl:call-template name="cleanup_datasources" />
+
+               <xsl:text>
+<![CDATA[
+uib_datasource_manager_st* uib_datasource_manager_get_instance() {
+       if (!g_uib_datasource_manager._is_init) {
+               g_uib_datasource_manager._is_init = true;
+               g_uib_datasource_manager.free_all_datasources = &cleanup_datasources;
+               g_uib_datasource_manager.get_datasource_instance = &get_datasource_instance;
+               g_uib_datasource_manager.register_datasource_update_cb =
+                               &register_datasource_update_cb;
+               g_uib_datasource_manager.get_datasource_interface_for_datasource_type =
+                               &get_datasource_interface_for_datasource_type;
+       }
+       return &g_uib_datasource_manager;
+}
+]]>
+</xsl:text>
+       </xsl:template>
+
+       <xsl:template name="register_datasource_update_cb">
+               <xsl:value-of
+                       select="concat('static void register_datasource_update_cb(uib_datasource_instance* datasource, void (*func_ptr)()) {',$newline,
+                       $tab,'uib_datasource_interface* datasource_interface = NULL;',$newline)" />
+               <xsl:if test="//dataBinding/dataSource[@modelType='static']">
+                       <xsl:value-of
+                               select="concat($tab,'if (datasource->datasource_interface->ds_type == static_source) {',$newline,
+                       $tab,$tab,'datasource_interface = uib_static_datasource_get_instance();',$newline,
+                       $tab,'} else ')" />
+               </xsl:if>
+               <xsl:if test="//dataBinding/dataSource[@modelType='contacts']">
+                       <xsl:value-of
+                               select="concat($tab,'if (datasource->datasource_interface->ds_type == contacts_API) {',$newline,
+                       $tab,$tab,'datasource_interface = uib_contacts_datasource_get_instance();',$newline,
+                       $tab,'} else ')" />
+               </xsl:if>
+               <xsl:if test="//dataBinding/dataSource[@modelType='call_history']">
+                       <xsl:value-of
+                               select="concat($tab,'if (datasource->datasource_interface->ds_type == call_history_API) {',$newline,
+                       $tab,$tab,'datasource_interface = uib_call_history_datasource_get_instance();',$newline,
+                       $tab,'} else ')" />
+               </xsl:if>
+               <xsl:if test="//dataBinding/dataSource[@modelType='remote']">
+                       <xsl:value-of
+                               select="concat($tab,'if (datasource->datasource_interface->ds_type == remote_API) {',$newline,
+                       $tab,$tab,'datasource_interface = uib_remote_datasource_get_instance();',$newline,
+                       $tab,'} else ')" />
+               </xsl:if>
+               <xsl:value-of select="concat( '{', $newline, $tab, '}',$newline)" />
+               <xsl:value-of
+                       select="concat('if(datasource_interface != NULL)',$newline,
+                       $tab,$tab,'datasource_interface->register_datasource_update_callback(func_ptr);',$newline)" />
+               <xsl:value-of select="concat('}',$newline)" />
+       </xsl:template>
+
+       <xsl:template name="get_datasource_interface_for_datasource_type">
+               <xsl:value-of
+                       select="concat('static uib_datasource_interface* get_datasource_interface_for_datasource_type(enum UIB_DATASOURCE_TYPE ds_type) {',$newline,
+                       $tab,'uib_datasource_interface* datasource_interface = NULL;',$newline)" />
+               <xsl:if test="//dataBinding/dataSource[@modelType='static']">
+                       <xsl:value-of
+                               select="concat($tab,'if (ds_type == static_source) {',$newline,
+                       $tab,$tab,'datasource_interface = uib_static_datasource_get_instance();',$newline,
+                       $tab,'} else ')" />
+               </xsl:if>
+               <xsl:if test="//dataBinding/dataSource[@modelType='contacts']">
+                       <xsl:value-of
+                               select="concat($tab,'if (ds_type == contacts_API) {',$newline,
+                       $tab,$tab,'datasource_interface = uib_contacts_datasource_get_instance();',$newline,
+                       $tab,'} else ')" />
+               </xsl:if>
+               <xsl:if test="//dataBinding/dataSource[@modelType='call_history']">
+                       <xsl:value-of
+                               select="concat($tab,'if (ds_type == call_history_API) {',$newline,
+                       $tab,$tab,'datasource_interface = uib_call_history_datasource_get_instance();',$newline,
+                       $tab,'} else ')" />
+               </xsl:if>
+               <xsl:if test="//dataBinding/dataSource[@modelType='remote']">
+                       <xsl:value-of
+                               select="concat($tab,'if (ds_type == remote_API) {',$newline,
+                       $tab,$tab,'datasource_interface = uib_remote_datasource_get_instance();',$newline,
+                       $tab,'} else ')" />
+               </xsl:if>
+               <xsl:value-of select="concat( '{', $newline, $tab, '}',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'return datasource_interface;',$newline)" />
+               <xsl:value-of select="concat('}',$newline)" />
+       </xsl:template>
+
+       <xsl:template name="cleanup_datasources">
+               <xsl:value-of
+                       select="concat($newline,'static void cleanup_datasources() {',$newline)" />
+               <xsl:for-each
+                       select="//dataBinding/dataSource[@modelType != 'Empty']">
+                       <xsl:variable name="datasource_id" select="@dataSource" />
+                       <xsl:value-of
+                               select="concat($tab,'cleanup_',$datasource_id,'_datasource();',$newline)" />
+               </xsl:for-each>
+               <xsl:value-of
+                       select="concat($tab,'cleanup_datasource_interfaces();',$newline)" />
+               <xsl:value-of select="concat('}',$newline)" />
+       </xsl:template>
+       
+       <xsl:template name="cleanup_datasource_interfaces">
+       <xsl:value-of
+                       select="concat($newline,'static void cleanup_datasource_interfaces(){',$newline)" />
+               <xsl:if test="//dataBinding/dataSource[@modelType='contacts']">
+                       <xsl:value-of
+                               select="concat($tab,'uib_contacts_datasource_get_instance()->cleanup_datasource();',$newline )"></xsl:value-of>
+               </xsl:if>
+               <xsl:if test="//dataBinding/dataSource[@modelType='static']">
+                       <xsl:value-of select="concat($tab,'uib_static_datasource_get_instance()->cleanup_datasource();',$newline )"></xsl:value-of>
+               </xsl:if>
+               <xsl:if test="//dataBinding/dataSource[@modelType='call_history']">
+                       <xsl:value-of select="concat($tab,'uib_call_history_datasource_get_instance()->cleanup_datasource();',$newline )"></xsl:value-of>
+               </xsl:if>
+               <xsl:if test="//dataBinding/dataSource[@modelType='remote']">
+                       <xsl:value-of select="concat($tab,'uib_remote_datasource_get_instance()->cleanup_datasource();',$newline )"></xsl:value-of>
+               </xsl:if>
+               <xsl:value-of select="concat($newline,'}',$newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_call_history_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_call_history_header.xsl
new file mode 100644 (file)
index 0000000..c84bcd2
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Apply following template only once if contacts type datasource is found -->
+               <xsl:variable name="contacts_datasource_count"
+                       select="count(//dataBinding//dataSource[@modelType='call_history'])" />
+               <xsl:if test="$contacts_datasource_count>0">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_UIB_DATASOURCE_CALL_HISTORY_H_
+#define MANAGED_INC_UIB_DATASOURCE_CALL_HISTORY_H_
+
+// For more info, consult contacts API documentation available at https://developer.tizen.org/dev-guide/2.3.1/org.tizen.native.mobile.apireference/group__CAPI__SOCIAL__CONTACTS__SVC__MODULE.html
+
+#include "uib_datasources.h"
+
+uib_datasource_interface* uib_call_history_datasource_get_instance();
+#endif
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_call_history_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_call_history_source.xsl
new file mode 100644 (file)
index 0000000..874091a
--- /dev/null
@@ -0,0 +1,505 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Apply following template only once if call_history type datasource is found -->
+               <xsl:if test="//dataBinding/dataSource[@modelType='call_history']">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include "uib_datasource_handler_call_history.h"
+#include <contacts_types.h>
+#include <contacts_views.h>
+#include <contacts_errors.h>
+#include <contacts_record.h>
+#include <contacts_list.h>
+#include <contacts_filter.h>
+#include <contacts_query.h>
+#include <contacts_db.h>
+#include <libxml2/libxml/tree.h>
+
+#define MAX_NUM_LENGTH 12
+
+static xmlDocPtr* callHistoryDatasourceRootNode = NULL;
+static uib_datasource_interface g_uib_call_history_datasource;
+static bool isRefreshCallbackRegistered = false;
+static bool is_callhistory_update_databinding_cb_registered = false;
+
+static void (*refresh_databinding_cb)();
+static void populate_call_log_entries(xmlNodePtr);
+static xmlDocPtr prepare_datasource_XML_tree();
+static void refresh_call_history_datasource(const char * const, void*);
+static void initialize_call_history_datasource();
+static xmlNodePtr getRemotePartyDetails(xmlNodePtr, int);
+static void convertToDateFormat(int, char *);
+static void getCallLogType(contacts_phone_log_type_e, char**, char**);
+static void getFeatureDetails(xmlNodePtr, int);
+
+static void cleanup_datasource() {
+       data_contacts_common_disconnect();
+       if (isRefreshCallbackRegistered) {
+               isRefreshCallbackRegistered = false;
+               //Un-register callback functions to be invoked when a record changes.
+               contacts_db_remove_changed_cb(_contacts_phone_log._uri,
+                               refresh_call_history_datasource, NULL);
+               contacts_db_remove_changed_cb(_contacts_person_phone_log._uri,
+                               refresh_call_history_datasource, NULL);
+       }
+       if (callHistoryDatasourceRootNode != NULL
+                       && callHistoryDatasourceRootNode[0] != NULL) {
+               xmlFreeDoc(callHistoryDatasourceRootNode[0]);
+               callHistoryDatasourceRootNode = NULL;
+       }
+       is_callhistory_update_databinding_cb_registered = false;
+}
+
+static bool populate_call_history_records() {
+       if (callHistoryDatasourceRootNode == NULL) {
+               callHistoryDatasourceRootNode = (xmlDocPtr*) malloc(sizeof(xmlDocPtr));
+               if (!data_contacts_common_connect())
+                       return false;
+       }
+       callHistoryDatasourceRootNode[0] = prepare_datasource_XML_tree();
+       return true;
+}
+
+/*
+ * {
+ *
+ *  "callhistory":{
+ *       "length":2,
+ *       "entries":[
+ *           {
+ *                             "uid":"123",
+ *                             "type":"TEL",
+ *                             "features":[
+ *                             ],
+ *                             "remoteParties":[
+ *                                     {
+ *                                             "remoteParty":"",
+ *                                             "personId":"3"
+ *                                     }
+ *                             ],
+ *                             "startTime":"22/03/2001",
+ *                             "duration":100,
+ *                             "direction":"DIALED"
+ *                     }
+ *             ]
+ *     }
+ * }
+ *
+ *     <?xml version="1.0" encoding="UTF-8" ?>
+ *     <callhistory>
+ *     <length>2</length>
+ *     <entries>
+ *             <uid>123</uid>
+ *             <type>TEL</type>
+ *             <remoteParties>
+ *                     <remoteParty></remoteParty>
+ *                     <personId>3</personId>
+ *             </remoteParties>
+ *             <startTime>22/03/2001</startTime>
+ *             <duration>100</duration>
+ *             <direction>DIALED</direction>
+ *     </entries>
+ *     </callhistory>
+ *
+ */
+
+static xmlDocPtr prepare_datasource_XML_tree() {
+
+       int call_log_count = 0;
+       int error_code;
+
+       //Begin xml document
+       xmlDocPtr datasource_xmlDoc = xmlNewDoc(BAD_CAST "1.0");
+
+       error_code = contacts_db_get_count(_contacts_phone_log._uri,
+                       &call_log_count);
+       if (error_code != CONTACTS_ERROR_NONE) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "contacts_db_get_count() failed: %d",
+                               error_code);
+
+       } else {
+               //Start CallHistory root node
+               xmlNodePtr callhistory_root_node = xmlNewNode(NULL,
+               BAD_CAST "callhistory");
+               xmlDocSetRootElement(datasource_xmlDoc, callhistory_root_node);
+
+               //Accomodate 32 bit int highest value
+               char* call_log_count_str = (char*) malloc(
+               MAX_NUM_LENGTH * sizeof(char));
+               snprintf(call_log_count_str, MAX_NUM_LENGTH, "%d", call_log_count);
+               xmlNewChild(callhistory_root_node, NULL, (const xmlChar*) "length",
+                               (xmlChar*) call_log_count_str);
+               free(call_log_count_str);
+
+               xmlNodePtr entriesNode = xmlNewChild(callhistory_root_node, NULL,
+                               (const xmlChar*) "entries", NULL);
+
+               populate_call_log_entries(entriesNode);
+       }
+
+       //Verify generated xml
+       //get_xml_data_from_node(datasource_xmlDoc);
+
+       return datasource_xmlDoc;
+}
+
+static void getCallLogType(contacts_phone_log_type_e log_type,
+               char** call_log_type_str, char** direction) {
+
+       switch (log_type) {
+       case 0/*CONTACTS_PLOG_TYPE_NONE*/:
+               *call_log_type_str = "";
+               break;
+       case 1/*CONTACTS_PLOG_TYPE_VOICE_INCOMING*/:
+               *call_log_type_str = "Incoming call";
+               *direction = "INCOMING";
+               break;
+       case 2/*CONTACTS_PLOG_TYPE_VOICE_OUTGOING*/:
+               *call_log_type_str = "Outgoing call";
+               *direction = "DIALED";
+               break;
+       case 3/*CONTACTS_PLOG_TYPE_VIDEO_INCOMING*/:
+               *call_log_type_str = "Incoming video call";
+               *direction = "INCOMING";
+               break;
+       case 4/*CONTACTS_PLOG_TYPE_VIDEO_OUTGOING*/:
+               *call_log_type_str = "Outgoing video call";
+               *direction = "DIALED";
+               break;
+       case 5/*CONTACTS_PLOG_TYPE_VOICE_INCOMING_UNSEEN*/:
+               *call_log_type_str = "Not confirmed missed call";
+               *direction = "INCOMING";
+               break;
+       case 6/*CONTACTS_PLOG_TYPE_VOICE_INCOMING_SEEN*/:
+               *call_log_type_str = "Confirmed missed call";
+               *direction = "INCOMING";
+               break;
+       case 7/*CONTACTS_PLOG_TYPE_VIDEO_INCOMING_UNSEEN*/:
+               *call_log_type_str = "Not confirmed missed video call";
+               *direction = "INCOMING";
+               break;
+       case 8/*CONTACTS_PLOG_TYPE_VIDEO_INCOMING_SEEN*/:
+               *call_log_type_str = "Confirmed missed video call";
+               *direction = "INCOMING";
+               break;
+       case 9/*CONTACTS_PLOG_TYPE_VOICE_REJECT*/:
+               *call_log_type_str = "Rejected call";
+               *direction = "INCOMING";
+               break;
+       case 10/*CONTACTS_PLOG_TYPE_VIDEO_REJECT*/:
+               *call_log_type_str = "Rejected video call";
+               *direction = "INCOMING";
+               break;
+       case 11/*CONTACTS_PLOG_TYPE_VOICE_BLOCKED*/:
+               *call_log_type_str = "Blocked call";
+               *direction = "INCOMING";
+               break;
+       case 12/*CONTACTS_PLOG_TYPE_VIDEO_BLOCKED*/:
+               *call_log_type_str = "Blocked video call";
+               *direction = "INCOMING";
+               break;
+       case 101/*CONTACTS_PLOG_TYPE_MMS_INCOMING*/:
+               *call_log_type_str = "Incoming MMS";
+               *direction = "INCOMING";
+               break;
+       case 102/*CONTACTS_PLOG_TYPE_MMS_OUTGOING*/:
+               *call_log_type_str = "Outgoing MMS";
+               *direction = "DIALED";
+               break;
+       case 103/*CONTACTS_PLOG_TYPE_SMS_INCOMING*/:
+               *call_log_type_str = "Incoming SMS";
+               *direction = "INCOMING";
+               break;
+       case 104/*CONTACTS_PLOG_TYPE_SMS_OUTGOING*/:
+               *call_log_type_str = "Outgoing SMS";
+               *direction = "DIALED";
+               break;
+       case 105/*CONTACTS_PLOG_TYPE_SMS_BLOCKED*/:
+               *call_log_type_str = "Blocked SMS";
+               *direction = "INCOMING";
+               break;
+       case 106/*CONTACTS_PLOG_TYPE_MMS_BLOCKED*/:
+               *call_log_type_str = "Blocked MMS";
+               *direction = "INCOMING";
+               break;
+       case 201/*CONTACTS_PLOG_TYPE_EMAIL_RECEIVED*/:
+               *call_log_type_str = "Received email";
+               *direction = "INCOMING";
+               break;
+       case 202/*CONTACTS_PLOG_TYPE_EMAIL_SENT*/:
+               *call_log_type_str = "Sent email";
+               *direction = "DIALED";
+               break;
+       default:
+               *call_log_type_str = "";
+               *direction = "";
+               break;
+       }
+}
+/*
+ *{
+ *     "uid":"123",
+ *     "type":"TEL",
+ *     "features":[
+ *     ],
+ *     "remoteParties":[
+ *             {
+ *                     "remoteParty":"",
+ *                     "personId":"3"
+ *             }
+ *     ],
+ *     "startTime":"22/03/2001",
+ *     "duration":100,
+ *     "direction":"DIALED"
+ *}
+
+ *     <uid>123</uid>
+ *     <type>TEL</type>
+ *     <remoteParties>
+ *             <remoteParty></remoteParty>
+ *             <personId>3</personId>
+ *     </remoteParties>
+ *     <startTime>22/03/2001</startTime>
+ *     <duration>100</duration>
+ *     <direction>DIALED</direction>
+ */
+static void populate_call_log_entries(xmlNodePtr entriesXMLNode) {
+       contacts_list_h call_history_list = NULL;
+       contacts_record_h call_log_record = NULL;
+
+       int error_code;
+       error_code = contacts_list_create(&call_history_list);
+       if (error_code != CONTACTS_ERROR_NONE) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "contacts_list_create() failed: %d",
+                               error_code);
+               return;
+       }
+
+       //first get call history list
+       error_code = contacts_db_get_all_records(_contacts_phone_log._uri, 0, 0,
+                       &call_history_list);
+       if (error_code != CONTACTS_ERROR_NONE) {
+               dlog_print(DLOG_ERROR, LOG_TAG,
+                               "contacts_db_get_all_records() failed: %d", error_code);
+               return;
+       }
+       char* startTime = (char*) malloc(100 * sizeof(char));
+       int uid;
+       contacts_phone_log_type_e log_type;
+       char* type;
+       int unixTimestamp;
+       int duration;
+       char* direction;
+       while (contacts_list_get_current_record_p(call_history_list,
+                       &call_log_record) == CONTACTS_ERROR_NONE) {
+               if (call_log_record != NULL) {
+                       contacts_record_get_int(call_log_record,
+                                       _contacts_phone_log.log_time, &unixTimestamp);
+                       convertToDateFormat(unixTimestamp, startTime);
+
+                       contacts_record_get_int(call_log_record,
+                                       _contacts_phone_log.log_type, &log_type);
+                       getCallLogType(log_type, &type, &direction);
+
+                       contacts_record_get_int(call_log_record,
+                                       _contacts_phone_log.extra_data1, &duration);
+
+                       contacts_record_get_int(call_log_record, _contacts_phone_log.id,
+                                       &uid);
+
+                       //Accomodate 32 bit int highest value
+                       char* uid_str = (char*) malloc(MAX_NUM_LENGTH * sizeof(char));
+                       snprintf(uid_str, MAX_NUM_LENGTH, "%d", uid);
+                       xmlNewChild(entriesXMLNode, NULL, (const xmlChar*) "uid",
+                                       (xmlChar*) uid_str);
+                       free(uid_str);
+
+                       xmlNewChild(entriesXMLNode, NULL, (const xmlChar*) "type",
+                                       (xmlChar*) type);
+
+                       xmlNewChild(entriesXMLNode, NULL, (const xmlChar*) "startTime",
+                                       (xmlChar*) startTime);
+
+                       //Accomodate 32 bit int highest value
+                       char* duration_str = (char*) malloc(MAX_NUM_LENGTH * sizeof(char));
+                       snprintf(duration_str, MAX_NUM_LENGTH, "%d", duration);
+                       xmlNewChild(entriesXMLNode, NULL, (const xmlChar*) "uid",
+                                       (xmlChar*) duration_str);
+                       free(duration_str);
+
+                       xmlNewChild(entriesXMLNode, NULL, (const xmlChar*) "direction",
+                                       (xmlChar*) direction);
+
+                       xmlNodePtr remotePartiesNode = xmlNewChild(entriesXMLNode, NULL,
+                                       (const xmlChar*) "remoteParties", NULL);
+                       getRemotePartyDetails(remotePartiesNode, uid);
+
+                       //TODO Look for features data
+                       xmlNodePtr featuresNode = xmlNewChild(entriesXMLNode, NULL,
+                                       (const xmlChar*) "features", NULL);
+                       getFeatureDetails(featuresNode, uid);
+
+               }
+               error_code = contacts_list_next(call_history_list);
+               if (error_code != CONTACTS_ERROR_NONE)
+                       break;
+       }
+       free(startTime);
+       contacts_list_destroy(call_history_list, true);
+}
+
+/*
+ *  {
+ *             "remoteParty":"",
+ *             "personId":"3"
+ *     }
+ *
+ *     <remoteParty>buzz</remoteParty>
+ *     <personId>3</personId>
+ */
+static xmlNodePtr getRemotePartyDetails(xmlNodePtr remotePartiesXMLNode,
+               int callLogId) {
+       contacts_record_h call_log_record = NULL;
+
+       int personId;
+       char * remoteParty = NULL;
+       int error_code;
+
+       //query for all contacts with this address_book_id
+       contacts_filter_h filter = NULL;
+       contacts_list_h call_history_list = NULL;
+       contacts_query_h query = NULL;
+
+       error_code = contacts_list_create(&call_history_list);
+       if (error_code != CONTACTS_ERROR_NONE) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "contacts_list_create() failed: %d",
+                               error_code);
+               return remotePartiesXMLNode;
+       }
+
+       contacts_filter_create(_contacts_person_phone_log._uri, &filter);
+       contacts_filter_add_int(filter, _contacts_person_phone_log.log_id,
+                       CONTACTS_MATCH_EQUAL, callLogId);
+
+       contacts_query_create(_contacts_person_phone_log._uri, &query);
+       contacts_query_set_filter(query, filter);
+
+       contacts_db_get_records_with_query(query, 0, 0, &call_history_list);
+
+       do {
+               contacts_list_get_current_record_p(call_history_list, &call_log_record);
+               if (call_log_record != NULL) {
+                       contacts_record_get_str(call_log_record,
+                                       _contacts_person_phone_log.display_name, &remoteParty);
+                       contacts_record_get_int(call_log_record,
+                                       _contacts_person_phone_log.person_id, &personId);
+
+                       xmlNewChild(remotePartiesXMLNode, NULL,
+                                       (const xmlChar*) "remoteParty", (xmlChar*) remoteParty);
+
+                       //Accomodate 32 bit int highest value
+                       char* personId_str = (char*) malloc(MAX_NUM_LENGTH * sizeof(char));
+                       snprintf(personId_str, MAX_NUM_LENGTH, "%d", personId);
+                       xmlNewChild(remotePartiesXMLNode, NULL, (const xmlChar*) "personId",
+                                       (xmlChar*) personId_str);
+                       free(personId_str);
+               }
+       } while (CONTACTS_ERROR_NONE == contacts_list_next(call_history_list));
+
+       contacts_query_destroy(query);
+       contacts_filter_destroy(filter);
+       contacts_list_destroy(call_history_list, true);
+
+       return remotePartiesXMLNode;
+}
+
+static void getFeatureDetails(xmlNodePtr jsonBuilder, int callLogId) {
+
+}
+
+static void convertToDateFormat(int unixTimestamp, char* startTime) {
+
+       struct tm ts;
+       // Format time "ddd dd/mm/yyyy hh:mm:ss"
+       ts = *localtime(&unixTimestamp);
+       strftime(startTime, 100, "%a %d/%m/%Y %H:%M:%S", &ts);
+}
+
+static void** get_datasource_root_element() {
+       if (callHistoryDatasourceRootNode == NULL) {
+               initialize_call_history_datasource();
+       }
+       return callHistoryDatasourceRootNode;
+}
+
+static void initialize_call_history_datasource() {
+       populate_call_history_records();
+
+       if (!isRefreshCallbackRegistered) {
+               isRefreshCallbackRegistered = true;
+               //Register callback functions to be invoked when a record changes.
+               contacts_db_add_changed_cb(_contacts_phone_log._uri,
+                               refresh_call_history_datasource, _contacts_phone_log._uri);
+               contacts_db_add_changed_cb(_contacts_person_phone_log._uri,
+                               refresh_call_history_datasource,
+                               _contacts_person_phone_log._uri);
+       }
+}
+
+static void refresh_call_history_datasource(const char * const view_uri,
+               void* user_data) {
+       xmlDocPtr oldContactsRootNode = callHistoryDatasourceRootNode[0];
+       initialize_call_history_datasource();
+       if ((refresh_databinding_cb != NULL)
+                       && (is_callhistory_update_databinding_cb_registered)) {
+               (*refresh_databinding_cb)();
+       }
+       xmlFreeDoc(oldContactsRootNode);
+}
+
+static void register_datasource_update_callback(void (*func_ptr)()) {
+       if (!is_callhistory_update_databinding_cb_registered) {
+               refresh_databinding_cb = func_ptr;
+               is_callhistory_update_databinding_cb_registered = true;
+       }
+}
+
+uib_datasource_interface* uib_call_history_datasource_get_instance() {
+       if (!g_uib_call_history_datasource._is_init) {
+               g_uib_call_history_datasource._is_init = true;
+               g_uib_call_history_datasource.ds_type = call_history_API;
+               g_uib_call_history_datasource.get_datasource_root_element =
+                               &get_datasource_root_element;
+               g_uib_call_history_datasource.register_datasource_update_callback =
+                               &register_datasource_update_callback;
+               g_uib_call_history_datasource.cleanup_datasource = &cleanup_datasource;
+       }
+       return &g_uib_call_history_datasource;
+}
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_contacts_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_contacts_header.xsl
new file mode 100644 (file)
index 0000000..5cde286
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Apply following template only once if contacts type datasource is found -->
+               <xsl:variable name="contacts_datasource_count"
+                       select="count(//dataBinding//dataSource[@modelType='contacts'])" />
+               <xsl:if test="$contacts_datasource_count>0">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_UIB_DATASOURCE_CONTACTS_H_
+#define MANAGED_INC_UIB_DATASOURCE_CONTACTS_H_
+
+// For more info, consult contacts API documentation available at https://developer.tizen.org/dev-guide/2.3.1/org.tizen.native.mobile.apireference/group__CAPI__SOCIAL__CONTACTS__SVC__MODULE.html
+
+#include "uib_datasources.h"
+
+uib_datasource_interface* uib_contacts_datasource_get_instance();
+#endif
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_contacts_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_contacts_source.xsl
new file mode 100644 (file)
index 0000000..e816565
--- /dev/null
@@ -0,0 +1,877 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Apply following template only once if contacts type datasource is found -->
+               <xsl:variable name="contacts_datasource_count"
+                       select="count(//dataBinding//dataSource[@modelType='contacts'])" />
+               <xsl:if test="$contacts_datasource_count>0">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include "uib_datasource_handler_contacts.h"
+#include "contacts_types.h"
+#include "contacts_db.h"
+#include "contacts_filter.h"
+#include "contacts_list.h"
+#include "contacts_query.h"
+#include "contacts_record.h"
+#include "contacts_errors.h"
+#include "contacts_views.h"
+#include "contacts_service.h"
+#include <json-glib/json-glib.h>
+#include <json-glib/json-builder.h>
+#include <json-glib/json-generator.h>
+
+#define MAX_NUM_LENGTH 12
+
+static uib_datasource_interface g_uib_contacts_datasource;
+static xmlDocPtr* contactsRootNode = NULL;
+static bool is_contacts_update_databinding_cb_registered = false;
+static bool isRefreshCallbackRegistered;
+
+static void (*refresh_databinding_cb)();
+static xmlDocPtr prepare_datasource_xml_tree();
+static void prepare_adressbook_filtered_contacts_list(xmlNodePtr, int);
+static void get_name_object_details(xmlNodePtr, contacts_record_h*);
+static void get_phone_numbers_details(xmlNodePtr, contacts_record_h*);
+static void get_addresses_details(xmlNodePtr, contacts_record_h*);
+static void get_anniversaries_details(xmlNodePtr, contacts_record_h*);
+static void get_emails_details(xmlNodePtr, contacts_record_h*);
+static void get_organizations_details(xmlNodePtr, contacts_record_h*);
+static void get_urls_details(xmlNodePtr, contacts_record_h*);
+static void refresh_contacts_datasource(const char*, void*);
+
+static bool populate_contact_records() {
+       if (contactsRootNode == NULL) {
+               contactsRootNode = (xmlDocPtr*) malloc(sizeof(xmlDocPtr));
+               if (!data_contacts_common_connect())
+                       return false;
+       }
+       contactsRootNode[0] = prepare_datasource_xml_tree();
+       return true;
+}
+
+static void initialize_contacts_datasource() {
+       populate_contact_records();
+
+       if (!isRefreshCallbackRegistered) {
+               isRefreshCallbackRegistered = true;
+               //Register callback functions to be invoked when a record changes.
+               contacts_db_add_changed_cb(_contacts_address_book._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_add_changed_cb(_contacts_contact._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_add_changed_cb(_contacts_contact_number._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_add_changed_cb(_contacts_contact_email._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_add_changed_cb(_contacts_address._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_add_changed_cb(_contacts_url._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_add_changed_cb(_contacts_company._uri,
+                               refresh_contacts_datasource, NULL);
+       }
+}
+
+static xmlDocPtr prepare_datasource_xml_tree() {
+       contacts_list_h addressbook_list = NULL;
+       contacts_record_h address_record = NULL;
+
+       //first get address books
+       int ret = contacts_db_get_all_records(_contacts_address_book._uri, 0, 0,
+                       &addressbook_list);
+
+       //Begin xml document
+       xmlDocPtr datasource_xmlDoc = xmlNewDoc(BAD_CAST "1.0");
+
+       //Start AddressBooks root node
+       xmlNodePtr addressbooks_root_node = xmlNewNode(NULL,
+       BAD_CAST "addressbooks");
+       xmlDocSetRootElement(datasource_xmlDoc, addressbooks_root_node);
+
+       //Iterate list of addressBooks
+       do {
+               contacts_list_get_current_record_p(addressbook_list, &address_record);
+               if (NULL == address_record)
+                       break;
+               char *name = NULL;
+               bool readOnly = false;
+               int id;
+               int mode;
+
+               contacts_record_get_int(address_record, _contacts_address_book.mode,
+                               &mode);
+               readOnly = (mode == CONTACTS_ADDRESS_BOOK_MODE_READONLY);
+               contacts_record_get_int(address_record,
+                               _contacts_address_book.account_id, &id);
+               contacts_record_get_str(address_record, _contacts_address_book.name,
+                               &name);
+
+               //Set id name & mode property of addressbooks property
+
+               //Accomodate 32 bit int highest value
+               char* addressbookId_str = (char*) malloc(MAX_NUM_LENGTH * sizeof(char));
+               snprintf(addressbookId_str, MAX_NUM_LENGTH, "%d", id);
+               xmlNewChild(addressbooks_root_node, NULL, (const xmlChar*) "id",
+                               (xmlChar*) addressbookId_str);
+               free(addressbookId_str);
+
+               xmlNewChild(addressbooks_root_node, NULL, (const xmlChar*) "name",
+                               (xmlChar*) name);
+
+               char* isReadOnlyStr = "false";
+               if (readOnly) {
+                       isReadOnlyStr = "true";
+               }
+               xmlNewChild(addressbooks_root_node, NULL, (const xmlChar*) "readOnly",
+                               (xmlChar*) isReadOnlyStr);
+
+               prepare_adressbook_filtered_contacts_list(addressbooks_root_node, id);
+
+       } while (CONTACTS_ERROR_NONE == contacts_list_next(addressbook_list));
+
+       ret = contacts_list_destroy(addressbook_list, true);
+       if (ret != 0) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "Failed to delete addressbook_list %d",
+                               &ret);
+       }
+       return datasource_xmlDoc;
+}
+
+static void prepare_adressbook_filtered_contacts_list(
+               xmlNodePtr parent_addressbooks_root_node, int addressBookId) {
+
+       //query for all contacts with this address_book_id
+       contacts_filter_h filter = NULL;
+       contacts_list_h contacts_list = NULL;
+       contacts_query_h query = NULL;
+
+       contacts_filter_create(_contacts_contact._uri, &filter);
+       contacts_filter_add_int(filter, _contacts_contact.address_book_id,
+                       CONTACTS_MATCH_EQUAL, addressBookId);
+
+       contacts_query_create(_contacts_contact._uri, &query);
+       contacts_query_set_filter(query, filter);
+
+       contacts_db_get_records_with_query(query, 0, 0, &contacts_list);
+       contacts_record_h contacts_record = NULL;
+
+       int id;
+       do {
+               contacts_list_get_current_record_p(contacts_list, &contacts_record);
+               if (contacts_record != NULL) {
+                       contacts_record_get_int(contacts_record, _contacts_contact.id, &id);
+
+                       //Add contacts array element to addressbooks
+                       xmlNodePtr contacts_node = xmlNewChild(
+                                       parent_addressbooks_root_node, NULL,
+                                       (const xmlChar*) "contacts", NULL);
+
+                       //Start populating contact elements
+
+                       //Accomodate 32 bit int highest value
+                       char* contact_id_str = (char*) malloc(
+                       MAX_NUM_LENGTH * sizeof(char));
+                       snprintf(contact_id_str, MAX_NUM_LENGTH, "%d", id);
+                       xmlNewChild(contacts_node, NULL, (const xmlChar*) "id",
+                                       (xmlChar*) contact_id_str);
+                       free(contact_id_str);
+
+                       //Get name object details
+                       get_name_object_details(contacts_node, &contacts_record);
+
+                       //Get phoneNumbers details
+                       get_phone_numbers_details(contacts_node, &contacts_record);
+
+                       //Get addresses details
+                       get_addresses_details(contacts_node, &contacts_record);
+
+                       //Get anniversaries details
+                       get_anniversaries_details(contacts_node, &contacts_record);
+
+                       //Get emails details
+                       get_emails_details(contacts_node, &contacts_record);
+
+                       //Get organizations details
+                       get_organizations_details(contacts_node, &contacts_record);
+
+                       //Get Urls details
+                       get_urls_details(contacts_node, &contacts_record);
+
+               }
+
+       } while (CONTACTS_ERROR_NONE == contacts_list_next(contacts_list));
+
+       int ret = contacts_list_destroy(contacts_list, true);
+       if (ret != 0) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "Failed to delete contacts_list %d",
+                               &ret);
+       }
+       contacts_query_destroy(query);
+       contacts_filter_destroy(filter);
+
+}
+
+static void get_name_object_details(xmlNodePtr parent_contact_node,
+               contacts_record_h* contacts_record) {
+       char * displayName = NULL;
+       char * phoneticName = NULL;
+       char * firstName, *lastname, *middleName, *phoneticFirstName,
+                       *phoneticLastName, *phoneticMiddleName, *prefix, *suffix;
+       char * nickName = NULL;
+
+       contacts_list_h nickname_list = NULL;
+
+       int ret = contacts_list_create(&nickname_list);
+       if (ret != 0) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create nickname_list %d",
+                               &ret);
+               return;
+       }
+
+       contacts_record_h name_record = NULL;
+
+       contacts_record_h nickname_record = NULL;
+
+       if (contacts_record_get_child_record_at_p((*contacts_record),
+                       _contacts_contact.name, 0, &name_record) != 0) {
+               return;
+       }
+
+       contacts_record_clone_child_record_list((*contacts_record),
+                       _contacts_contact.nickname, &nickname_list);
+
+       contacts_record_get_str(*contacts_record, _contacts_contact.display_name,
+                       &displayName);
+       contacts_record_get_str(name_record, _contacts_name.first, &firstName);
+       contacts_record_get_str(name_record, _contacts_name.last, &lastname);
+       contacts_record_get_str(name_record, _contacts_name.addition, &middleName);
+       contacts_record_get_str(name_record, _contacts_name.suffix, &suffix);
+       contacts_record_get_str(name_record, _contacts_name.prefix, &prefix);
+       contacts_record_get_str(name_record, _contacts_name.phonetic_first,
+                       &phoneticFirstName);
+       contacts_record_get_str(name_record, _contacts_name.phonetic_middle,
+                       &phoneticMiddleName);
+       contacts_record_get_str(name_record, _contacts_name.phonetic_last,
+                       &phoneticLastName);
+
+       if (phoneticFirstName != NULL && phoneticMiddleName != NULL
+                       && phoneticLastName != NULL) {
+               phoneticName = (char*) malloc(
+                               (strlen(phoneticFirstName) + strlen(phoneticMiddleName)
+                                               + strlen(phoneticLastName) + 10) * sizeof(char));
+               strcpy(phoneticName, (const char*) phoneticFirstName);
+               strcat(phoneticName, (const char*) phoneticMiddleName);
+               strcat(phoneticName, (const char*) phoneticLastName);
+       }
+
+       //Begin contact.name object
+       xmlNodePtr name_node = xmlNewChild(parent_contact_node, NULL,
+                       (const xmlChar*) "name", NULL);
+
+       xmlNewChild(name_node, NULL, (const xmlChar*) "displayName",
+                       (xmlChar*) displayName);
+
+       xmlNewChild(name_node, NULL, (const xmlChar*) "firstName",
+                       (xmlChar*) firstName);
+
+       xmlNewChild(name_node, NULL, (const xmlChar*) "lastname",
+                       (xmlChar*) lastname);
+
+       xmlNewChild(name_node, NULL, (const xmlChar*) "middleName",
+                       (xmlChar*) middleName);
+
+       xmlNewChild(name_node, NULL, (const xmlChar*) "phoneticFirstName",
+                       (xmlChar*) phoneticFirstName);
+
+       xmlNewChild(name_node, NULL, (const xmlChar*) "phoneticLastName",
+                       (xmlChar*) phoneticLastName);
+
+       xmlNewChild(name_node, NULL, (const xmlChar*) "phoneticMiddleName",
+                       (xmlChar*) phoneticMiddleName);
+
+       xmlNewChild(name_node, NULL, (const xmlChar*) "phoneticName",
+                       (xmlChar*) phoneticName);
+
+       xmlNewChild(name_node, NULL, (const xmlChar*) "prefix", (xmlChar*) prefix);
+
+       xmlNewChild(name_node, NULL, (const xmlChar*) "suffix", (xmlChar*) suffix);
+
+       do {
+
+               if (!contacts_list_get_current_record_p(nickname_list,
+                               &nickname_record)) {
+                       contacts_record_get_str(nickname_record, _contacts_nickname.name,
+                                       &nickName);
+                       xmlNewChild(name_node, NULL, (const xmlChar*) "nickNames",
+                                       (xmlChar*) nickName);
+               }
+       } while (CONTACTS_ERROR_NONE == contacts_list_next(nickname_list));
+
+       contacts_list_destroy(nickname_list, true);
+
+}
+
+/**
+ * phoneNumbers:[
+ *                                     isDefault:"Boolean",
+ *                                     label:"",
+ *                                     number:"",
+ *                                     types:[]
+ *                             ]
+ */
+static void get_phone_numbers_details(xmlNodePtr parent_contact_node,
+               contacts_record_h* contacts_record) {
+
+       contacts_list_h phoneNumber_list = NULL;
+       int ret = contacts_list_create(&phoneNumber_list);
+       if (ret != 0) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create phoneNumber_list %d",
+                               &ret);
+               return;
+       }
+
+       contacts_record_h phoneNumber_record = NULL;
+
+       int count;
+       contacts_record_get_child_record_count((*contacts_record),
+                       _contacts_contact.number, &count);
+
+       contacts_record_clone_child_record_list((*contacts_record),
+                       _contacts_contact.number, &phoneNumber_list);
+
+       do {
+
+               if (!contacts_list_get_current_record_p(phoneNumber_list,
+                               &phoneNumber_record)) {
+                       bool isDefault;
+                       char* label = NULL;
+                       char* number = NULL;
+                       int type;
+
+                       contacts_record_get_bool(phoneNumber_record,
+                                       _contacts_contact_number.is_default, &isDefault);
+
+                       contacts_record_get_str(phoneNumber_record,
+                                       _contacts_contact_number.label, &label);
+
+                       contacts_record_get_str(phoneNumber_record,
+                                       _contacts_contact_number.number, &number);
+
+                       xmlNodePtr phoneNumbers_node = xmlNewChild(parent_contact_node,
+                       NULL, (const xmlChar*) "phoneNumbers", NULL);
+
+                       char * isDefaultStr = "false";
+                       if (isDefault) {
+                               isDefaultStr = "true";
+                       }
+                       xmlNewChild(phoneNumbers_node, NULL,
+                                       (const xmlChar*) "phoneNumbers", (xmlChar*) isDefaultStr);
+
+                       xmlNewChild(phoneNumbers_node, NULL,
+                                       (const xmlChar*) "phoneNumbers", (xmlChar*) label);
+
+                       xmlNewChild(phoneNumbers_node, NULL,
+                                       (const xmlChar*) "phoneNumbers", (xmlChar*) number);
+
+                       contacts_record_get_int(phoneNumber_record,
+                                       _contacts_contact_number.type, &type);
+                       for (int i = 0; i < 31; ++i) {
+                               if ((type & 1 << i)) {
+                                       //Accomodate 32 bit int highest value
+                                       char* typeStr = (char*) malloc(
+                                       MAX_NUM_LENGTH * sizeof(char));
+                                       snprintf(typeStr, MAX_NUM_LENGTH, "%d", 1 << i);
+                                       xmlNewChild(phoneNumbers_node, NULL,
+                                                       (const xmlChar*) "types", (xmlChar*) typeStr);
+                                       free(typeStr);
+                               }
+                               if (type == 0) {
+                                       xmlNewChild(phoneNumbers_node, NULL,
+                                                       (const xmlChar*) "types", (xmlChar*) "0");
+                                       break;
+                               }
+                       }
+               }
+
+       } while (CONTACTS_ERROR_NONE == contacts_list_next(phoneNumber_list));
+
+       contacts_list_destroy(phoneNumber_list, true);
+}
+
+/**
+ *                             addresses:[
+ *                                 additionalInformation:"String",
+ *                                     city:"String",
+ *                                     country:"String",
+ *                                     isDefault:"Boolean",
+ *                                     label:"String",
+ *                                     postalCode:"String",
+ *                                     region:"String",
+ *                                     streetAddress:"String",
+ *                                     types:[
+ *                                     ]
+ *                             ]
+ */
+//TODO: Check correct record to map to
+static void get_addresses_details(xmlNodePtr parent_contacts_node,
+               contacts_record_h* contacts_record) {
+       int address_num;
+
+       contacts_record_get_child_record_count(*contacts_record,
+                       _contacts_contact.address, &address_num);
+       contacts_record_h address_record = NULL;
+
+       for (int i = 0; i < address_num; i++) {
+
+               char * additionalInformation = NULL, *city = NULL, *country = NULL,
+                               *label = NULL, *postalCode = NULL, *region = NULL,
+                               *streetAddress =
+                               NULL;
+               bool isDefault = false;
+               int type;
+
+               contacts_record_get_child_record_at_p(*contacts_record,
+                               _contacts_contact.address, i, &address_record);
+               if (address_record != NULL) {
+                       contacts_record_get_bool(address_record,
+                                       _contacts_contact_number.is_default, &isDefault);
+
+                       contacts_record_get_str(address_record, _contacts_address.label,
+                                       &label);
+
+                       contacts_record_get_str(address_record, _contacts_address.country,
+                                       &country);
+
+                       contacts_record_get_str(address_record, _contacts_address.country,
+                                       &country);
+
+                       contacts_record_get_str(address_record, _contacts_address.street,
+                                       &streetAddress);
+
+                       contacts_record_get_str(address_record, _contacts_address.region,
+                                       &region);
+
+                       contacts_record_get_str(address_record,
+                                       _contacts_address.postal_code, &postalCode);
+
+                       contacts_record_get_str(address_record, _contacts_address.extended,
+                                       &additionalInformation);
+
+                       //TODO: For now locality is mapped to city. Look for accurate field to map to.
+                       contacts_record_get_str(address_record, _contacts_address.locality,
+                                       &city);
+
+                       contacts_record_get_int(address_record, _contacts_address.type,
+                                       &type);
+
+                       xmlNodePtr addresses_node = xmlNewChild(parent_contacts_node, NULL,
+                                       (const xmlChar*) "addresses", NULL);
+
+                       contacts_record_get_child_record_at_p(*contacts_record,
+                                       _contacts_contact.address, i, &address_record);
+
+                       xmlNewChild(addresses_node, NULL, (const xmlChar*) "addresses",
+                                       (xmlChar*) additionalInformation);
+
+                       xmlNewChild(addresses_node, NULL, (const xmlChar*) "city",
+                                       (xmlChar*) city);
+
+                       xmlNewChild(addresses_node, NULL, (const xmlChar*) "country",
+                                       (xmlChar*) country);
+
+                       char * isDefaultStr = "false";
+                       if (isDefault) {
+                               isDefaultStr = "true";
+                       }
+                       xmlNewChild(addresses_node, NULL, (const xmlChar *) "isDefault",
+                                       (xmlChar*) isDefaultStr);
+
+                       xmlNewChild(addresses_node, NULL, (const xmlChar*) "label",
+                                       (xmlChar*) label);
+
+                       xmlNewChild(addresses_node, NULL, (const xmlChar*) "postalCode",
+                                       (xmlChar*) postalCode);
+
+                       xmlNewChild(addresses_node, NULL, (const xmlChar*) "region",
+                                       (xmlChar*) region);
+
+                       xmlNewChild(addresses_node, NULL, (const xmlChar*) "streetAddress",
+                                       (xmlChar*) streetAddress);
+
+                       contacts_record_get_int(address_record, _contacts_address.type,
+                                       &type);
+                       //Only bits from 0 to 6 is used by contacts_address_type_e
+                       for (int i = 0; i < 7; ++i) {
+
+                               if ((type & 1 << i)) {
+                                       char* typesStr = (char*) malloc(
+                                       MAX_NUM_LENGTH * sizeof(char));
+                                       snprintf(typesStr, MAX_NUM_LENGTH, "%d", 1 << i);
+                                       xmlNewChild(addresses_node, NULL, (const xmlChar*) "types",
+                                                       (xmlChar*) typesStr);
+                                       free(typesStr);
+                               }
+                               if (type == 0) {
+                                       xmlNewChild(addresses_node, NULL, (const xmlChar*) "types",
+                                                       (xmlChar*) "0");
+                                       break;
+                               }
+                       }
+               }
+       }
+
+}
+
+/**
+ *                             anniversaries:[
+ *                                     date:"String",
+ *                                     label:"String"
+ *                             ]
+ */
+static void get_anniversaries_details(xmlNodePtr parent_contacts_node,
+               contacts_record_h* contacts_record) {
+       int anniversary_num;
+
+       contacts_record_get_child_record_count(*contacts_record,
+                       _contacts_contact.event, &anniversary_num);
+       contacts_record_h anniversary_record = NULL;
+
+       for (int i = 0; i < anniversary_num; i++) {
+               //TODO: Handle calendar type for date conversion as well
+               char * label = NULL;
+               int date;
+
+               contacts_record_get_child_record_at_p(*contacts_record,
+                               _contacts_contact.event, i, &anniversary_record);
+               if (anniversary_record != NULL) {
+                       contacts_record_get_int(anniversary_record, _contacts_event.date,
+                                       &date);
+
+                       contacts_record_get_str(anniversary_record, _contacts_event.label,
+                                       &label);
+
+                       xmlNodePtr anniversaries_node = xmlNewChild(parent_contacts_node,
+                       NULL, (const xmlChar*) "anniversaries", NULL);
+
+                       contacts_record_get_child_record_at_p(*contacts_record,
+                                       _contacts_contact.event, i, &anniversary_record);
+
+                       char* dateStr = (char*) malloc(
+                       MAX_NUM_LENGTH * sizeof(char));
+                       snprintf(dateStr, MAX_NUM_LENGTH, "%d", date);
+                       xmlNewChild(anniversaries_node, NULL, (const xmlChar*) "date",
+                                       (xmlChar*) dateStr);
+                       free(dateStr);
+
+                       xmlNewChild(anniversaries_node, NULL, (const xmlChar*) "label",
+                                       (xmlChar*) label);
+               }
+       }
+}
+
+/**
+ *                             emails:[
+ *                                     email:"String",
+ *                                     isDefault:"Boolean",
+ *                                     label:"String",
+ *                                     types:[]
+ *                             ],
+ */
+static void get_emails_details(xmlNodePtr parent_contacts_node,
+               contacts_record_h* contacts_record) {
+       int emails_num;
+
+       contacts_record_get_child_record_count(*contacts_record,
+                       _contacts_contact.email, &emails_num);
+       contacts_record_h email_record = NULL;
+
+       for (int i = 0; i < emails_num; i++) {
+
+               char * email = NULL, *label = NULL;
+               bool isDefault = false;
+
+               int type;
+
+               contacts_record_get_child_record_at_p(*contacts_record,
+                               _contacts_contact.email, i, &email_record);
+               if (email_record != NULL) {
+                       contacts_record_get_str(email_record, _contacts_contact_email.label,
+                                       &label);
+                       contacts_record_get_str(email_record, _contacts_contact_email.email,
+                                       &email);
+
+                       xmlNodePtr email_node = xmlNewChild(parent_contacts_node, NULL,
+                                       (const xmlChar*) "emails", NULL);
+
+                       char * isDefaultStr = "false";
+                       if (isDefault) {
+                               isDefaultStr = "true";
+                       }
+                       xmlNewChild(email_node, NULL, (const xmlChar*) "isDefault",
+                                       (xmlChar*) isDefaultStr);
+
+                       xmlNewChild(email_node, NULL, (const xmlChar*) "email",
+                                       (xmlChar*) email);
+
+                       xmlNewChild(email_node, NULL, (const xmlChar*) "label",
+                                       (xmlChar*) label);
+
+                       contacts_record_get_int(email_record, _contacts_email.type, &type);
+                       //Only bits from 0 to 4 is used by contacts_email_type_e
+                       for (int i = 0; i < 4; ++i) {
+
+                               if ((type & 1 << i)) {
+                                       char* typesStr = (char*) malloc(
+                                       MAX_NUM_LENGTH * sizeof(char));
+                                       snprintf(typesStr, MAX_NUM_LENGTH, "%d", 1 << i);
+                                       xmlNewChild(email_node, NULL, (const xmlChar*) "types",
+                                                       (xmlChar*) typesStr);
+                                       free(typesStr);
+                               }
+                               if (type == 0) {
+                                       xmlNewChild(email_node, NULL, (const xmlChar*) "types",
+                                                       (xmlChar*) "0");
+                                       break;
+                               }
+                       }
+               }
+       }
+}
+
+static void get_organizations_details(xmlNodePtr parent_contact_node,
+               contacts_record_h* contacts_record) {
+       int orgs_num;
+
+       contacts_record_get_child_record_count(*contacts_record,
+                       _contacts_contact.company, &orgs_num);
+       contacts_record_h org_record = NULL;
+
+       for (int i = 0; i < orgs_num; i++) {
+
+               char * description = NULL, *assistant = NULL, *label = NULL,
+                               *department =
+                               NULL, *location = NULL, *logoURI = NULL, *name = NULL,
+                               *phoneticName = NULL, *role = NULL, *title = NULL;
+
+               int type;
+
+               contacts_record_get_child_record_at_p(*contacts_record,
+                               _contacts_contact.company, i, &org_record);
+               if (org_record != NULL) {
+
+                       contacts_record_get_str(org_record, _contacts_company.label,
+                                       &label);
+
+                       contacts_record_get_str(org_record,
+                                       _contacts_company.assistant_name, &assistant);
+
+                       contacts_record_get_str(org_record, _contacts_company.department,
+                                       &department);
+
+                       contacts_record_get_str(org_record, _contacts_company.description,
+                                       &description);
+
+                       contacts_record_get_str(org_record, _contacts_company.location,
+                                       &location);
+
+                       contacts_record_get_str(org_record, _contacts_company.logo,
+                                       &logoURI);
+
+                       contacts_record_get_str(org_record, _contacts_company.name, &name);
+
+                       contacts_record_get_str(org_record, _contacts_company.phonetic_name,
+                                       &phoneticName);
+
+                       contacts_record_get_str(org_record, _contacts_company.role, &role);
+
+                       contacts_record_get_str(org_record, _contacts_company.job_title,
+                                       &title);
+
+                       contacts_record_get_int(org_record, _contacts_company.type, &type);
+
+                       xmlNodePtr organization_node = xmlNewChild(parent_contact_node,
+                       NULL, (const xmlChar*) "organizations", NULL);
+
+
+                       contacts_record_get_child_record_at_p(*contacts_record,
+                                       _contacts_contact.url, i, &org_record);
+
+                       xmlNewChild(organization_node, NULL, (const xmlChar*) "name",
+                                       (xmlChar*) name);
+
+                       xmlNewChild(organization_node, NULL, (const xmlChar*) "logoURI",
+                                       (xmlChar*) logoURI);
+
+                       xmlNewChild(organization_node, NULL, (const xmlChar*) "description",
+                                       (xmlChar*) description);
+
+                       xmlNewChild(organization_node, NULL, (const xmlChar*) "assistant",
+                                       (xmlChar*) assistant);
+
+                       xmlNewChild(organization_node, NULL, (const xmlChar*) "department",
+                                       (xmlChar*) department);
+
+                       xmlNewChild(organization_node, NULL, (const xmlChar*) "location",
+                                       (xmlChar*) location);
+
+                       xmlNewChild(organization_node, NULL,
+                                       (const xmlChar*) "phoneticName", (xmlChar*) phoneticName);
+
+                       xmlNewChild(organization_node, NULL, (const xmlChar*) "role",
+                                       (xmlChar*) role);
+
+                       xmlNewChild(organization_node, NULL, (const xmlChar*) "title",
+                                       (xmlChar*) title);
+
+                       char* typeStr = (char*) malloc(
+                       MAX_NUM_LENGTH * sizeof(char));
+                       snprintf(typeStr, MAX_NUM_LENGTH, "%d", type);
+                       xmlNewChild(organization_node, NULL, (const xmlChar*) "type",
+                                       (xmlChar*) typeStr);
+                       free(typeStr);
+
+                       xmlNewChild(organization_node, NULL, (const xmlChar*) "label",
+                                       (xmlChar*) label);
+               }
+       }
+}
+
+/**
+ *                             urls:[
+ *                                     label:"",
+ *                                     type:"",
+ *                                     url:""
+ *                             ]
+ */
+static void get_urls_details(xmlNodePtr parent_contact_node,
+               contacts_record_h* contacts_record) {
+       int urls_num;
+
+       contacts_record_get_child_record_count(*contacts_record,
+                       _contacts_contact.url, &urls_num);
+       contacts_record_h url_record = NULL;
+
+       for (int i = 0; i < urls_num; i++) {
+
+               char * url = NULL, *label = NULL;
+
+               int type;
+
+               contacts_record_get_str(url_record, _contacts_url.label, &label);
+
+               contacts_record_get_str(url_record, _contacts_url.url, &url);
+
+               contacts_record_get_int(url_record, _contacts_url.type, &type);
+               contacts_record_get_child_record_at_p(*contacts_record,
+                               _contacts_contact.url, i, &url_record);
+               if (url_record != NULL) {
+
+                       xmlNodePtr url_node = xmlNewChild(parent_contact_node, NULL,
+                                       (const xmlChar*) "urls",
+                                       NULL);
+
+                       xmlNewChild(url_node, NULL, (const xmlChar*) "url", (xmlChar*) url);
+
+                       char* typeStr = (char*) malloc(
+                       MAX_NUM_LENGTH * sizeof(char));
+                       snprintf(typeStr, MAX_NUM_LENGTH, "%d", type);
+                       xmlNewChild(url_node, NULL, (const xmlChar*) "type",
+                                       (xmlChar*) typeStr);
+                       free(typeStr);
+
+                       xmlNewChild(url_node, NULL, (const xmlChar*) "label",
+                                       (xmlChar*) label);
+               }
+       }
+}
+
+static void cleanup_datasource() {
+       data_contacts_common_disconnect();
+       if (isRefreshCallbackRegistered) {
+               isRefreshCallbackRegistered = false;
+               //Un-register callback functions to be invoked when a record changes.
+               contacts_db_remove_changed_cb(_contacts_address_book._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_remove_changed_cb(_contacts_contact._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_remove_changed_cb(_contacts_contact_number._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_remove_changed_cb(_contacts_contact_email._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_remove_changed_cb(_contacts_address._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_remove_changed_cb(_contacts_url._uri,
+                               refresh_contacts_datasource, NULL);
+               contacts_db_remove_changed_cb(_contacts_company._uri,
+                               refresh_contacts_datasource, NULL);
+       }
+       if (contactsRootNode != NULL && contactsRootNode[0] != NULL) {
+               xmlFreeDoc(contactsRootNode[0]);
+               contactsRootNode = NULL;
+       }
+       is_contacts_update_databinding_cb_registered = false;
+}
+
+static void register_refresh_callback(void (*func_ptr)()) {
+       if (!is_contacts_update_databinding_cb_registered) {
+               refresh_databinding_cb = func_ptr;
+               is_contacts_update_databinding_cb_registered = true;
+       }
+}
+
+static void** get_datasource_root_element() {
+       if (contactsRootNode == NULL) {
+               initialize_contacts_datasource();
+       }
+       return contactsRootNode;
+}
+
+static void refresh_contacts_datasource(const char* view_uri, void* user_data) {
+       xmlDocPtr oldContactsRootNode = contactsRootNode[0];
+       initialize_contacts_datasource();
+       if ((refresh_databinding_cb != NULL)
+                       && (is_contacts_update_databinding_cb_registered)) {
+               (*refresh_databinding_cb)();
+       }
+       xmlFreeDoc(oldContactsRootNode);
+}
+
+uib_datasource_interface* uib_contacts_datasource_get_instance() {
+       if (!g_uib_contacts_datasource._is_init) {
+               g_uib_contacts_datasource._is_init = true;
+               g_uib_contacts_datasource.ds_type = contacts_API;
+               g_uib_contacts_datasource.get_datasource_root_element =
+                               &get_datasource_root_element;
+               g_uib_contacts_datasource.register_datasource_update_callback =
+                               &register_refresh_callback;
+               g_uib_contacts_datasource.cleanup_datasource = &cleanup_datasource;
+       }
+       return &g_uib_contacts_datasource;
+}
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_remote_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_remote_header.xsl
new file mode 100644 (file)
index 0000000..6e119bb
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Apply following template only once if contacts type datasource is found -->
+               <xsl:variable name="remote_datasource_count"
+                       select="count(//dataBinding//dataSource[@modelType='remote'])" />
+               <xsl:if test="$remote_datasource_count>0">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[
+/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_UIB_DATASOURCE_REMOTE_H_
+#define MANAGED_INC_UIB_DATASOURCE_REMOTE_H_
+
+#include <curl/curl.h>
+#include "uib_datasources.h"
+
+
+#define BUFFER_SIZE 1024
+#define MAX_ALLOWED_SOURCES 20
+
+typedef struct {
+    Ecore_Thread *thread;
+    CURL *curl;
+    char url[BUFFER_SIZE];
+    double curl_filesize;
+    char filesize_buffer[BUFFER_SIZE];
+
+    Eina_Lock mutex;
+    bool downloading;
+    bool cancel_requested;
+    bool global_cleanup_needed;
+    bool cleanup_done;
+    bool exiting;
+    bool thread_running;
+
+    char filename[BUFFER_SIZE];
+    char filename_without_path[BUFFER_SIZE];
+    FILE *stream;
+    char *response_data;
+    char *prev_response_data;
+    int internal_storage_id;
+
+    int polling_interval;
+    long timeout_ms;
+    char *source_name;
+    int registry_id;
+    Ecore_Poller *poller;
+    UIB_DATASOURCE_CONTENT_TYPE content_type;
+} remote_ds_s;
+
+uib_datasource_interface* uib_remote_datasource_get_instance();
+void set_remote_datasource(remote_ds_s *);
+
+#endif
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_remote_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_remote_source.xsl
new file mode 100644 (file)
index 0000000..b57d4e6
--- /dev/null
@@ -0,0 +1,537 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Apply following template only once if contacts type datasource is found -->
+               <xsl:variable name="remote_datasource_count"
+                       select="count(//dataBinding//dataSource[@modelType='remote'])" />
+               <xsl:if test="$remote_datasource_count>0">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include "uib_datasource_handler_remote.h"
+#include <json-glib/json-glib.h>
+#include <json-glib/json-builder.h>
+#include <json-glib/json-generator.h>
+
+static uib_datasource_interface g_uib_remote_datasource;
+static xmlDocPtr* remoteDatasourceRootNode = NULL;
+
+static bool is_remote_datasource_update_databinding_cb_registered = false;
+static bool isRefreshCallbackRegistered[MAX_ALLOWED_SOURCES];
+static remote_ds_s *current_ds = NULL;
+static remote_ds_s *registered_sources[MAX_ALLOWED_SOURCES];
+static int registered_source_count = 0;
+
+static size_t curl_write_cb(void *, size_t, size_t, void *);
+static void (*refresh_databinding_cb)();
+static JsonNode* prepare_datasource_tree();
+static void refresh_remote_datasource(xmlDocPtr, remote_ds_s*);
+static size_t curl_header_cb(void *, size_t, size_t, void *);
+int curl_progress_cb(void *, double, double, double, double);
+static Eina_Bool remotesource_call_job(void *);
+bool parse_json_data(remote_ds_s*, xmlDocPtr*);
+bool parse_xml_data(remote_ds_s*, xmlDocPtr*);
+
+static bool populate_remote_records() {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Entering %s - ", __func__);
+       if (remoteDatasourceRootNode == NULL) {
+               remoteDatasourceRootNode = (xmlDocPtr*) malloc(
+                               sizeof(xmlDocPtr) * MAX_ALLOWED_SOURCES);
+               for (int i = 0; i < MAX_ALLOWED_SOURCES; ++i) {
+                       remoteDatasourceRootNode[i] = NULL;
+               }
+       }
+
+       JsonNode * datasource_root_node = prepare_datasource_tree();
+       remoteDatasourceRootNode[current_ds->registry_id] = convert_json_to_xml(
+                       datasource_root_node);
+       json_node_free(datasource_root_node);
+       dlog_print(DLOG_INFO, LOG_TAG, "%s - remote_source name %s rootnode %d",
+                       __func__, current_ds->source_name,
+                       remoteDatasourceRootNode[current_ds->registry_id]);
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Exiting %s - ", __func__);
+       return true;
+}
+
+static void initialize_remote_datasource() {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Entering %s - %s", __func__,
+                       current_ds->source_name);
+       populate_remote_records();
+
+       if (!isRefreshCallbackRegistered[current_ds->registry_id]) {
+               isRefreshCallbackRegistered[current_ds->registry_id] = true;
+               //Register callback functions to be invoked when a record changes.
+               //Poller is not enabled if polling_interval is set to -1
+               if (current_ds->polling_interval != -1) {
+                       current_ds->poller = ecore_poller_add(ECORE_POLLER_CORE,
+                                       (current_ds->polling_interval / 1000),
+                                       remotesource_call_job, current_ds);     //Or use ecore_timer for accurate timer. Though this one takes care of power conservation as well
+                       ecore_poller_poll_interval_set(ECORE_POLLER_CORE, 1);
+                       if (current_ds->poller == NULL) {
+                               dlog_print(DLOG_ERROR, LOG_TAG,
+                                               "%s poller creation failed for remote datasource - %s",
+                                               __func__, current_ds->source_name);
+                       } else {
+                               dlog_print(DLOG_INFO, LOG_TAG,
+                                               "%s poller creation succeeded for remote datasource - %s",
+                                               __func__, current_ds->source_name);
+                       }
+               }
+       }
+}
+
+void curl_cleanup(remote_ds_s *ds) {
+       if (ds == NULL) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "cleanup(): ad is NULL");
+               return;
+       }
+
+       if (ds->cleanup_done)
+               return;
+
+       if (ds->curl != NULL) {
+               curl_easy_cleanup(ds->curl);
+               dlog_print(DLOG_DEBUG, LOG_TAG, "curl_easy_cleanup(curl_handler)");
+       } else
+               dlog_print(DLOG_DEBUG, LOG_TAG, "cleanup(): curl_handler is NULL");
+
+       ds->cleanup_done = true;
+}
+
+static void download_thread(void *data, Ecore_Thread *thread) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Enter %s - ", __func__);
+       CURL *curl;
+       remote_ds_s *this_ds = (remote_ds_s*) data;
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - curl url%s", __func__, this_ds->url);
+
+       // Start a libcurl easy session
+       curl = curl_easy_init();
+       this_ds->curl = curl;
+       dlog_print(DLOG_DEBUG, LOG_TAG, "curl_easy_init()");
+       this_ds->downloading = true;
+       this_ds->thread_running = true;
+       this_ds->cleanup_done = false;
+       //Reset response_data
+       strcpy(this_ds->response_data, "");
+       // Downloading header
+       if (curl) {
+               // Set options for a curl easy handle
+               CURLcode error_code = curl_easy_setopt(curl, CURLOPT_URL, this_ds->url);
+               dlog_print(DLOG_DEBUG, LOG_TAG,
+                               "curl_easy_setopt(curl, CURLOPT_URL, this_ds->url): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+
+               error_code = curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
+               dlog_print(DLOG_DEBUG, LOG_TAG,
+                               "curl_easy_setopt(curl, CURLOPT_FILETIME, 1L): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+
+               error_code = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+               dlog_print(DLOG_DEBUG, LOG_TAG,
+                               "curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+
+               error_code = curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION,
+                               curl_header_cb);
+               dlog_print(DLOG_DEBUG, LOG_TAG,
+                               "curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_cb): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+
+               // Enable the built-in progress meter
+               error_code = curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
+               dlog_print(DLOG_DEBUG, LOG_TAG,
+                               "curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+
+               // Set the progress callback
+               error_code = curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION,
+                               curl_progress_cb);
+               dlog_print(DLOG_DEBUG, LOG_TAG,
+                               "curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_cb): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+
+               // Set progress callback data
+               error_code = curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, this_ds);
+               dlog_print(DLOG_DEBUG, LOG_TAG,
+                               "curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, this_ds): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+
+               // Set options for a curl easy handle
+               error_code = curl_easy_setopt(curl, CURLOPT_WRITEDATA, this_ds);
+               dlog_print(DLOG_DEBUG, LOG_TAG,
+                               "curl_easy_setopt(curl, CURLOPT_WRITEDATA, this_ds): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+
+               error_code = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
+                               curl_write_cb);
+               dlog_print(DLOG_DEBUG, LOG_TAG,
+                               "curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+
+               // Set timeout option for curl easy handle
+               error_code = curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS,
+                               this_ds->timeout_ms);
+               dlog_print(DLOG_DEBUG, LOG_TAG,
+                               "curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, this_ds): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+
+               // Disable SSL verify for curl call
+               error_code = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
+               dlog_print(DLOG_DEBUG, LOG_TAG,
+                               "curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+
+               // Perform a blocking file transfer
+               error_code = curl_easy_perform(curl);
+               dlog_print(DLOG_DEBUG, LOG_TAG, "curl_easy_perform(curl): %s (%d)",
+                               curl_easy_strerror(error_code), error_code);
+               if (error_code == CURLE_ABORTED_BY_CALLBACK) {
+                       curl_cleanup(this_ds);
+                       this_ds->downloading = false;
+                       return;
+               } else if (error_code != CURLE_OK) {
+                       curl_cleanup(this_ds);
+                       this_ds->downloading = false;
+                       dlog_print(DLOG_DEBUG, LOG_TAG, "curl error: %s (%d)\n",
+                                       curl_easy_strerror(error_code), error_code);
+                       return;
+               }
+       } else {
+               dlog_print(DLOG_ERROR, LOG_TAG, "curl initialization failed.");
+       }
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Exit %s - %s", __func__);
+}
+
+static void thread_end_cleanup(remote_ds_s *ds) {
+       ds->downloading = false;
+       ds->thread_running = false;
+       curl_cleanup(ds);
+       dlog_print(DLOG_DEBUG, LOG_TAG, "thread_end_cleanup(): freeing lock");
+       eina_lock_release(&ds->mutex);
+}
+
+static void download_thread_cancel_cb(void *data, Ecore_Thread *thread) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Entering %s - ", __func__);
+
+       if (data == NULL) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "data is NULL");
+               return;
+       }
+
+       remote_ds_s *ds = (remote_ds_s *) data;
+       thread_end_cleanup(ds);
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Exiting %s - ", __func__);
+}
+
+bool parse_json_data(remote_ds_s* ds, xmlDocPtr* rootNode) {
+       JsonParser* parser = json_parser_new();
+       bool is_data_parsing_successfull = false;
+       GError* error = NULL;
+       if (!json_parser_load_from_data(parser, ds->response_data,
+                       strlen(ds->response_data), &error)) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "JSON parser error:%s", error->message);
+               g_error_free(error);
+       } else {
+               JsonNode* response_root_node = json_node_copy(
+                               json_parser_get_root(parser));
+               *rootNode = convert_json_to_xml(response_root_node);
+               json_node_free(response_root_node);
+               g_object_unref(parser);
+               is_data_parsing_successfull = true;
+       }
+       return is_data_parsing_successfull;
+}
+
+bool parse_xml_data(remote_ds_s* ds, xmlDocPtr* rootNode) {
+       bool is_data_parsing_successfull = false;
+       xmlDocPtr parsedXMLDoc = xmlReadMemory(ds->response_data,
+                       strlen(ds->response_data), NULL, NULL, 0);
+       if (parsedXMLDoc != NULL) {
+               is_data_parsing_successfull = true;
+               *rootNode = parsedXMLDoc;
+       } else {
+               dlog_print(DLOG_ERROR, LOG_TAG, "XML parser error:");
+       }
+       return is_data_parsing_successfull;
+}
+
+static void download_thread_end_cb(void *data, Ecore_Thread *thread) {
+       remote_ds_s *ds = (remote_ds_s *) data;
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Entering %s - for ", __func__,
+                       ds->source_name);
+
+       if (data == NULL) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "%s - received curl data is NULL",
+                               __func__);
+               return;
+       }
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s data received - %s", __func__,
+                       ds->response_data);
+       if (strcmp(ds->response_data, ds->prev_response_data) != 0) {
+               dlog_print(DLOG_INFO, LOG_TAG, "%s New response data received for %s",
+                               __func__, ds->source_name);
+               xmlDocPtr rootNode = NULL;
+               bool is_data_parsed = false;
+               if (ds->content_type == UIB_JSON) {
+                       is_data_parsed = parse_json_data(ds, &rootNode);
+               } else if (ds->content_type == UIB_XML) {
+                       is_data_parsed = parse_xml_data(ds, &rootNode);
+               }
+               if (is_data_parsed) {
+                       //Copy this response for comparison
+                       ds->prev_response_data = realloc(ds->prev_response_data,
+                                       strlen(ds->response_data));
+                       if (ds->prev_response_data == NULL) {
+                               /* out of memory! */
+                               dlog_print(DLOG_ERROR, LOG_TAG,
+                                               "%s not enough memory (realloc returned NULL) for response caching\n");
+
+                       } else {
+                               memcpy(ds->prev_response_data, ds->response_data,
+                                               strlen(ds->response_data) * sizeof(char));
+                       }
+                       //get_json_data_from_node(rootNode);
+                       refresh_remote_datasource(rootNode, ds);
+               }
+       } else {
+               dlog_print(DLOG_INFO, LOG_TAG,
+                               "%s Received same response. Skipping databinding refresh for %s",
+                               __func__, ds->source_name);
+       }
+       ds->downloading = false;
+       thread_end_cleanup(ds);
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Exiting %s - for ", __func__,
+                       ds->source_name);
+}
+
+static void download_feedback_cb(void *data, Ecore_Thread *thread,
+               void *msg_data) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "feedback received");
+}
+
+static Eina_Bool remotesource_call_job(void * datasource) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - for datasource %s", __func__,
+                       ((remote_ds_s*) datasource)->source_name);
+       remote_ds_s * this_ds = (remote_ds_s *) datasource;
+       if (this_ds->thread_running == false) {
+               dlog_print(DLOG_DEBUG, LOG_TAG, "%s: taking lock", __func__);
+               eina_lock_take(&this_ds->mutex);
+               dlog_print(DLOG_DEBUG, LOG_TAG, "%s:: lock taken", __func__);
+               this_ds->thread = ecore_thread_feedback_run(download_thread,
+                               download_feedback_cb, download_thread_end_cb,
+                               download_thread_cancel_cb, this_ds, EINA_FALSE);
+               if (this_ds->thread != NULL) {
+                       dlog_print(DLOG_DEBUG, LOG_TAG,
+                                       "%s - new curl thread started for %s", __func__,
+                                       this_ds->source_name);
+               } else {
+                       dlog_print(DLOG_ERROR, LOG_TAG,
+                                       "%s - thread creation failed for %s", __func__,
+                                       this_ds->source_name);
+               }
+
+       } else {
+               dlog_print(DLOG_INFO, LOG_TAG,
+                               "%s - another curl thread running for %s", __func__,
+                               this_ds->source_name);
+       }
+
+       return ECORE_CALLBACK_RENEW;
+}
+
+static JsonNode* prepare_datasource_tree() {
+
+       remotesource_call_job(current_ds);
+
+       return json_node_new(JSON_NODE_OBJECT);
+}
+
+static size_t curl_write_cb(void *buffer, size_t size, size_t nitems,
+               void *data) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Entering %s - ", __func__);
+       if (!data) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "%s received curl data is NULL",
+                               __func__);
+               return 0;
+       }
+       remote_ds_s * this_ds = (remote_ds_s *) data;
+       size_t realsize = size * nitems;
+       int existing_len = strlen(this_ds->response_data);
+       size_t existing_size = existing_len * sizeof(char);
+
+       char * received_response = (char*) malloc(existing_size + 1);
+       strcpy(received_response, this_ds->response_data);
+
+       this_ds->response_data = realloc(this_ds->response_data,
+                       existing_size + realsize + 1);
+       if (this_ds->response_data == NULL) {
+               /* out of memory! */
+               dlog_print(DLOG_ERROR, LOG_TAG,
+                               "not enough memory (realloc returned NULL)\n");
+               return 0;
+       }
+       strcpy(this_ds->response_data, received_response);
+       free(received_response);
+       memcpy(&(this_ds->response_data[existing_len]), buffer, realsize);
+       this_ds->response_data[existing_size + realsize] = '\0';
+
+       dlog_print(DLOG_DEBUG, LOG_TAG, "new chunk");
+
+       this_ds->downloading = false;
+
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Exiting %s - ", __func__);
+
+       return realsize;
+}
+
+int curl_progress_cb(void *data, double dltotal, double dlnow, double ultotal,
+               double ulnow) {
+       if (!data) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "data is NULL");
+               return 0;
+       }
+
+       double progress = dlnow / dltotal;
+       char str_buffer[BUFFER_SIZE];
+
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s progress: dlnow - %d dltotal - %d",
+                       __func__, (int) dlnow, (int) dltotal);
+// Check whether the progress is 100%
+       if (dlnow == dltotal) {
+               //this_ds->downloading = false;
+       } else {
+               snprintf(str_buffer, BUFFER_SIZE, "Download progress: %d%%",
+                               (int) (progress * 100));
+       }
+// Continue downloading
+       return 0;
+}
+
+static size_t curl_header_cb(void *ptr, size_t size, size_t nitems, void *data) {
+       char buffer[(size * nitems) + 1];   // +1 for NULL-termination
+
+       snprintf(buffer, sizeof(buffer), "%s", (char *) ptr);
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Header: %s", buffer);
+
+       return size * nitems;
+}
+
+void set_remote_datasource(remote_ds_s *this_ds) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Entering %s - for datasource %s", __func__,
+                       this_ds->source_name);
+       current_ds = this_ds;
+       bool already_registered = false;
+       for (int i = 0; i < registered_source_count; ++i) {
+               if (!strcmp(this_ds->source_name, registered_sources[i]->source_name)) {
+                       already_registered = true;
+                       break;
+               }
+       }
+       if (!already_registered && registered_source_count < MAX_ALLOWED_SOURCES) {
+               this_ds->registry_id = registered_source_count;
+               registered_sources[registered_source_count++] = this_ds;
+       }
+       dlog_print(DLOG_DEBUG, LOG_TAG,
+                       "Exiting %s - for datasource %s with registry id : %d", __func__,
+                       this_ds->source_name, this_ds->registry_id);
+}
+
+static void cleanup_datasource() {
+
+       is_remote_datasource_update_databinding_cb_registered = false;
+
+    //Delete pollers and cleanup datasource
+       for (int i = 0; i < registered_source_count; ++i) {
+               isRefreshCallbackRegistered[i] = false;
+               ecore_poller_del(registered_sources[i]->poller);
+               curl_cleanup(registered_sources[i]);
+
+               if (remoteDatasourceRootNode != NULL
+                               && remoteDatasourceRootNode[i] != NULL) {
+                       xmlFreeDoc(remoteDatasourceRootNode[i]);
+               }
+       }
+       free(remoteDatasourceRootNode);
+       remoteDatasourceRootNode = NULL;
+       curl_global_cleanup();
+}
+
+static void register_refresh_callback(void (*func_ptr)()) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (!is_remote_datasource_update_databinding_cb_registered) {
+               refresh_databinding_cb = func_ptr;
+               is_remote_datasource_update_databinding_cb_registered = true;
+       }
+}
+
+static void** get_datasource_root_element() {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Entering %s - for current datasource %s",
+                       __func__, current_ds->source_name);
+       if ((remoteDatasourceRootNode == NULL)
+                       || (remoteDatasourceRootNode[current_ds->registry_id] == NULL)) {
+               initialize_remote_datasource();
+       }
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Exiting %s - for current datasource %s",
+                       __func__, current_ds->source_name);
+       return &remoteDatasourceRootNode[current_ds->registry_id];
+}
+
+static void refresh_remote_datasource(xmlDocPtr rootNode, remote_ds_s * ds) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Entering %s - for %s", __func__,
+                       ds->source_name);
+       xmlDocPtr oldRemoteRootNode = remoteDatasourceRootNode[ds->registry_id];
+       remoteDatasourceRootNode[ds->registry_id] = rootNode;
+       if ((refresh_databinding_cb != NULL)
+                       && (is_remote_datasource_update_databinding_cb_registered)) {
+               (*refresh_databinding_cb)();
+       }
+       if (oldRemoteRootNode != NULL) {
+               xmlFreeDoc(oldRemoteRootNode);
+       }
+       dlog_print(DLOG_DEBUG, LOG_TAG, "Exiting %s - for %s", __func__,
+                       ds->source_name);
+}
+
+uib_datasource_interface* uib_remote_datasource_get_instance() {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (!g_uib_remote_datasource._is_init) {
+               g_uib_remote_datasource._is_init = true;
+               g_uib_remote_datasource.ds_type = remote_API;
+               g_uib_remote_datasource.get_datasource_root_element =
+                               &get_datasource_root_element;
+               g_uib_remote_datasource.register_datasource_update_callback =
+                               &register_refresh_callback;
+               g_uib_remote_datasource.cleanup_datasource = &cleanup_datasource;
+               CURLcode error_code = curl_global_init(CURL_GLOBAL_ALL);
+               if (CURLE_OK != error_code) {
+                       dlog_print(DLOG_ERROR, LOG_TAG, "%s cURL initialization failed: %s",
+                                       __func__, curl_easy_strerror(error_code));
+               }
+       }
+       return &g_uib_remote_datasource;
+}
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_static_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_static_header.xsl
new file mode 100644 (file)
index 0000000..9eb252f
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Apply following template only once if static type datasource is found -->
+               <xsl:variable name="static_datasource_count"
+                       select="count(//dataBinding//dataSource[@modelType='static'])" />
+               <xsl:if test="$static_datasource_count>0">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_DATABINDING_UIB_DATASOURCE_STATIC_H_
+#define MANAGED_INC_DATABINDING_UIB_DATASOURCE_STATIC_H_
+
+#include "uib_datasources.h"
+
+uib_datasource_interface* uib_static_datasource_get_instance();
+
+#endif
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_static_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_ds_handler_static_source.xsl
new file mode 100644 (file)
index 0000000..9ef46ae
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <!-- Apply following template only once if static type datasource is found -->
+               <xsl:variable name="static_datasource_count"
+                       select="count(//dataBinding//dataSource[@modelType='static'])" />
+               <xsl:if test="$static_datasource_count>0">
+                       <xsl:apply-templates select="//dataBinding" />
+               </xsl:if>
+
+       </xsl:template>
+
+       <xsl:template match="dataBinding">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include "uib_datasource_handler_static.h"
+#include <json-glib/json-glib.h>
+
+static xmlDocPtr* staticDatasourceRootNode = NULL;
+
+static uib_datasource_interface g_uib_static_datasource;
+
+static void cleanup_datasource() {
+
+}
+
+void** get_datasource_root_element() {
+
+       staticDatasourceRootNode = (xmlDocPtr*)malloc(sizeof(xmlDocPtr));
+
+       return staticDatasourceRootNode;
+}
+
+static void register_datasource_update_callback(void (*func_ptr)()) {
+       //Empty as static source is immutable
+}
+
+uib_datasource_interface* uib_static_datasource_get_instance() {
+       if (!g_uib_static_datasource._is_init) {
+               g_uib_static_datasource._is_init = true;
+               g_uib_static_datasource.ds_type = static_source;
+               g_uib_static_datasource.get_datasource_root_element =
+                               &get_datasource_root_element;
+               g_uib_static_datasource.register_datasource_update_callback =
+                               &register_datasource_update_callback;
+               g_uib_static_datasource.cleanup_datasource = &cleanup_datasource;
+       }
+       return &g_uib_static_datasource;
+}
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_manager_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_manager_header.xsl
new file mode 100644 (file)
index 0000000..28aba92
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//*[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_UIB_DB_MANAGER_H_
+#define MANAGED_INC_UIB_DB_MANAGER_H_
+#include <string.h>
+#include "uib_views_binding.h"
+#include "uib_databinding_common.h"
+#include "databinding/uib_widget_handler_hoverselitem.h"
+#include "databinding/uib_widget_handler_hoversel.h"
+#include "databinding/uib_widget_handler_button.h"
+#include "databinding/uib_widget_handler_checkbox.h"
+#include "databinding/uib_widget_handler_label.h"
+#include "databinding/uib_widget_handler_list.h"
+#include "databinding/uib_widget_handler_listitem.h"
+#include "databinding/uib_widget_handler_radio.h"
+#include "uib_views.h"]]>
+</xsl:text>
+               <!-- #include "databinding/uib_widget_handler_hoversel.h" -->
+               <xsl:call-template name="widget_handler_header_include" />
+               <!-- #include "uib_view1_binding.h" -->
+               <xsl:call-template name="views_binding_header_include" />
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[typedef struct {
+       bool _is_init;
+       void (*perform_databinding)(uib_view_context* );
+       void (*free_all_databinding_resources)();
+} uib_databinding_manager_st;
+
+uib_databinding_manager_st* uib_databinding_manager_get_instance();
+#endif
+]]>
+</xsl:text>
+       </xsl:template>
+       <xsl:template name="views_binding_header_include">
+               <xsl:for-each select="/document/views/view">
+                       <xsl:variable name="view_name" select="@id" />
+                       <xsl:variable name="view_data_bind_count" select="count(.//*[@data_bind != ''])" />
+                       <xsl:if test="$view_data_bind_count>0">
+                               <xsl:value-of
+                                       select="concat('#include &quot;uib_',$view_name,'_bindings.h&quot;',$newline)" />
+                       </xsl:if>
+               </xsl:for-each>
+       </xsl:template>
+       <xsl:template name="widget_handler_header_include">
+                       <xsl:if test="count(.//hoverselitem[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat('#include &quot;databinding/uib_widget_handler_hoverselitem.h&quot;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//hoversel[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat('#include &quot;databinding/uib_widget_handler_hoversel.h&quot;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//list[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat('#include &quot;databinding/uib_widget_handler_list.h&quot;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//listitem[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat('#include &quot;databinding/uib_widget_handler_listitem.h&quot;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//button[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat('#include &quot;databinding/uib_widget_handler_button.h&quot;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//check[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat('#include &quot;databinding/uib_widget_handler_checkbox.h&quot;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//label[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat('#include &quot;databinding/uib_widget_handler_label.h&quot;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//radio[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat('#include &quot;databinding/uib_widget_handler_radio.h&quot;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//flipselector[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat('#include &quot;databinding/uib_widget_handler_flipselector.h&quot;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//flipselectoritem[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat('#include &quot;databinding/uib_widget_handler_flipselectoritem.h&quot;',$newline)" />
+                       </xsl:if>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_manager_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_manager_source.xsl
new file mode 100644 (file)
index 0000000..933f498
--- /dev/null
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//*[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#include "uib_db_manager.h"
+#include "uib_datasources.h"
+#include "uib_datamodels.h"
+]]>
+</xsl:text>
+
+
+               <xsl:value-of select="$newline" />
+               <xsl:value-of
+                       select="concat('static uib_databinding_manager_st g_uib_databinding_manager;',$newline)" />
+               <xsl:value-of
+                       select="concat('static uib_binding_info** view_bindings = NULL;',$newline)" />
+               <xsl:value-of select="concat('static int binding_count;',$newline)"></xsl:value-of>
+               <xsl:value-of
+                       select="concat('static uib_view_context* currentViewContext = NULL;',$newline)" />
+
+
+               <xsl:value-of select="$newline" />
+
+               <xsl:value-of
+                       select="concat('static void extract_binding_info_from_view_context(const uib_view_context* vc) {',$newline,$tab )" />
+               <xsl:for-each select="//view">
+                       <xsl:variable name="viewId" select="@id" />
+                       <xsl:variable name="view_data_bind_count" select="count(.//*[@data_bind != ''])" />
+                       <xsl:if test="$view_data_bind_count>0"><!-- Consider this view only if it has some widget 
+                                       with data binding -->
+                               <xsl:value-of
+                                       select="concat('if(!strcmp(vc->view_name, &quot;',$viewId,'&quot;)) {',$newline,
+                               $tab,$tab,'set_',$viewId,'_view_context((uib_',$viewId,'_view_context*)vc);',$newline,
+                               $tab,$tab,'view_bindings = get_',$viewId,'_binding_info();',$newline,
+                               $tab,$tab,'binding_count = get_',$viewId,'_binding_count();',$newline,
+                               $tab,'} else ')" /> <!-- $tab,$tab,$viewId,'Context = (uib_',$viewId,'_view_context*) vc;',$newline, -->
+                       </xsl:if>
+               </xsl:for-each>
+
+               <xsl:value-of select="concat('{',$newline,$tab,'}',$newline )"></xsl:value-of>
+               <xsl:value-of select="concat('}',$newline)"></xsl:value-of>
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[
+static void get_widget_handler(uib_binding_info *binding_info,
+               widget_handler_st **widget_handler) {
+               dlog_print(DLOG_DEBUG, LOG_TAG, "%s - for %d", __func__, binding_info->widgetType);
+       switch (binding_info->widgetType) {
+]]>
+</xsl:text>
+                       <xsl:if test="count(.//hoverselitem[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat($tab,'case uib_hoverselitem:',$newline,
+                                       $tab,$tab,'*widget_handler = hoverselitem_widget_handler_get_instance();',$newline,
+                                       $tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//hoversel[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat($tab,'case uib_hoversel:',$newline,
+                                       $tab,$tab,'*widget_handler = hoversel_widget_handler_get_instance();',$newline,
+                                       $tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//list[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat($tab,'case uib_list:',$newline,
+                                       $tab,$tab,'*widget_handler = list_widget_handler_get_instance();',$newline,
+                                       $tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//listitem[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat($tab,'case uib_listitem:',$newline,
+                                       $tab,$tab,'*widget_handler = listitem_widget_handler_get_instance();',$newline,
+                                       $tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//button[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat($tab,'case uib_button:',$newline,
+                                       $tab,$tab,'*widget_handler = button_widget_handler_get_instance();',$newline,
+                                       $tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//check[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat($tab,'case uib_checkbox:',$newline,
+                                       $tab,$tab,'*widget_handler = checkbox_widget_handler_get_instance();',$newline,
+                                       $tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//label[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat($tab,'case uib_label:',$newline,
+                                       $tab,$tab,'*widget_handler = label_widget_handler_get_instance();',$newline,
+                                       $tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//radio[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat($tab,'case uib_radio:',$newline,
+                                       $tab,$tab,'*widget_handler = radio_widget_handler_get_instance();',$newline,
+                                       $tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//flipselector[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat($tab,'case uib_flipselector:',$newline,
+                                       $tab,$tab,'*widget_handler = flipselector_widget_handler_get_instance();',$newline,
+                                       $tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//flipselectoritem[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat($tab,'case uib_flipselectoritem:',$newline,
+                                       $tab,$tab,'*widget_handler = flipselectoritem_widget_handler_get_instance();',$newline,
+                                       $tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+                       <xsl:if test="count(.//genlist[@data_bind != ''])>0">
+                               <xsl:value-of
+                                       select="concat($tab,'case uib_genlist:',$newline,
+                                       $tab,$tab,'//*widget_handler = genlist_widget_handler_get_instance();',$newline,
+                                       $tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+<xsl:text disable-output-escaping="yes">
+<![CDATA[      default:
+               break;
+       }
+}
+
+/**
+ * Iterates through all bindings for current view, and performs binding
+ */
+void perform_databinding(uib_view_context* vc) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+
+       currentViewContext = vc;
+       //Extract bindingInfo from this view context
+       extract_binding_info_from_view_context(vc);
+
+       for (int i = 0; i < binding_count; ++i) {
+               if (view_bindings[i] != NULL) {
+
+                       if (view_bindings[i]->dataModelContext) {
+                               widget_handler_st *widget_handler = NULL;
+
+                               Databinding_callback binding_cb = NULL;
+
+                               get_widget_handler(view_bindings[i], &widget_handler);
+                               if (widget_handler != NULL) {
+                                       binding_cb = widget_handler->binding_cb;
+                                       if (binding_cb != NULL) {
+                                               binding_cb(view_bindings[i]->widget,
+                                                               view_bindings[i]->binding_element_path,
+                                                               view_bindings[i]->binding_type,
+                                                               view_bindings[i]->dataModelContext->root_element,
+                                                               view_bindings[i]->dataModelContext->datasource->ds_content_type);
+                                       }
+                               }
+                       }
+               }
+       }
+}
+
+
+static void refresh_databinding(){
+       dlog_print(DLOG_DEBUG,LOG_TAG,"%s - ",__func__);
+       perform_databinding(currentViewContext);
+}
+
+static void register_refresh_databinding_callback_to_bound_datamodels() {
+       uib_datamodels_get_instance()->register_attached_datasource_update_cb(
+                       &refresh_databinding);
+}
+
+static void cleanup_databinding() {
+       dlog_print(DLOG_DEBUG,LOG_TAG,"%s - ",__func__);
+       uib_databindings_get_instance()->free_all_databindings();
+       uib_datamodels_get_instance()->free_all_datamodels();
+       uib_datasource_manager_get_instance()->free_all_datasources();
+}
+
+uib_databinding_manager_st* uib_databinding_manager_get_instance() {
+       if (!g_uib_databinding_manager._is_init) {
+               g_uib_databinding_manager._is_init = true;
+               register_refresh_databinding_callback_to_bound_datamodels();
+               g_uib_databinding_manager.free_all_databinding_resources =
+                               &cleanup_databinding;
+               g_uib_databinding_manager.perform_databinding = &perform_databinding;
+       }
+       return &g_uib_databinding_manager;
+}
+]]>
+</xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_view_bindings_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_view_bindings_header.xsl
new file mode 100644 (file)
index 0000000..57d58db
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+       <xsl:param name="current_view_name" />
+       <xsl:variable name="data_bind_count"
+               select="count(//views//view[@id=$current_view_name]//*[@data_bind != ''])" />
+       <xsl:variable name="databinding_done">
+               <xsl:choose>
+                       <xsl:when test="$data_bind_count>0">
+                               <xsl:value-of select="'yes'" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="'no'" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views//view[@id=$current_view_name]" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="view">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+]]>
+</xsl:text>
+               <xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
+               <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
+               <xsl:variable name="capital_current_view_name"
+                       select="translate( $current_view_name, $smallcase, $uppercase)"></xsl:variable>
+               <xsl:value-of
+                       select="concat('#ifndef MANAGED_INC_UIB_',$capital_current_view_name,'_BINDINGS_H_',$newline,'#define MANAGED_INC_UIB_',$capital_current_view_name,'_BINDINGS_H_',$newline)" />
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[
+#include "uib_views_binding.h"
+#include "uib_databinding_common.h"
+]]>
+</xsl:text>
+
+               <xsl:value-of
+                       select="concat('#include &quot;uib_',$current_view_name,'_view.h&quot;',$newline)" />
+
+               <!-- <xsl:text disable-output-escaping="yes"> <![CDATA[uib_binding_info** 
+                       add_binding_info();]]></xsl:text> -->
+               <xsl:value-of
+                       select="concat($newline,'uib_binding_info** get_',$current_view_name,'_binding_info();',$newline)" />
+               <xsl:value-of
+                       select="concat($newline,'int get_',$current_view_name,'_binding_count();',$newline)" />
+
+               <xsl:value-of
+                       select="concat('void set_',$current_view_name,'_view_context(uib_',$current_view_name,'_view_context* arg_view_context);',$newline)" />
+               <xsl:value-of
+                       select="concat('void cleanup_',$current_view_name,'_binding();')" />
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[
+#endif
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_view_bindings_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_view_bindings_source.xsl
new file mode 100644 (file)
index 0000000..24bd402
--- /dev/null
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+       <xsl:variable name="bindings"
+               select="concat($current_view_name,'_bindings')" />
+       <xsl:variable name="context" select="concat($current_view_name,'_context')" />
+       <xsl:param name="current_view_name" />
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count"
+                       select="count(//views//view[@id=$current_view_name]//*[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views//view[@id=$current_view_name]" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="view">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+]]>
+</xsl:text>
+
+               <xsl:value-of
+                       select="concat('#include &quot;uib_',$current_view_name,'_bindings.h&quot;',$newline)" />
+
+               <xsl:value-of
+                       select="concat('static uib_binding_info** ',$bindings,' = NULL;',$newline )"></xsl:value-of>
+
+               <xsl:value-of
+                       select="concat('static int ',$current_view_name,'_binding_count;',$newline )"></xsl:value-of>
+
+               <xsl:value-of
+                       select="concat('uib_',$current_view_name,'_view_context* ',$context,';',$newline)" />
+               <!-- uib_binding_info** add_binding_info() definition starts -->
+               <xsl:text>
+<![CDATA[static uib_binding_info** add_binding_info() { 
+]]>
+</xsl:text>
+               <xsl:value-of select="concat($tab,'uib_binding_info** bi = NULL;',$newline)" />
+               <xsl:value-of select="concat($newline,$tab,'int count = 0;',$newline)" />
+               <xsl:variable name="view_data_bind_count" select="count(.//*[@data_bind != ''])" />
+               <xsl:value-of
+                       select="concat($tab,$current_view_name,'_binding_count = ',$view_data_bind_count,';',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'bi = (uib_binding_info**) malloc(sizeof(uib_binding_info*) * ',$current_view_name,'_binding_count);',$newline,$newline)" />
+               <xsl:call-template name="generate_binding_info" />
+               <xsl:text><![CDATA[     return bi; 
+}
+]]>
+</xsl:text>
+               <!-- Ends -->
+               <!-- uib_binding_info** get_view1_binding_info() definition starts -->
+               <xsl:value-of
+                       select="concat('uib_binding_info** get_',$current_view_name,'_binding_info() {',$newline)" />
+               <xsl:value-of
+                       select="concat($tab,'if (',$bindings,' == NULL) {',$newline,
+                               $tab,$tab,$bindings,' = add_binding_info();',$newline,
+                               $tab,'}',$newline,
+                               $tab,'return ',$bindings,';',$newline,
+                               '}',$newline)" />
+
+               <!-- Ends -->
+               <!-- int get_',$current_view_name,'_binding_count(); -->
+               <xsl:value-of
+                       select="concat($newline,'int get_',$current_view_name,'_binding_count(){',$newline,
+                       $tab,'return ',$current_view_name,'_binding_count;',$newline,
+                       '}',$newline)" />
+               <!-- Ends -->
+               <!-- void update_view_context_refs() -->
+               <xsl:value-of
+                       select="concat('static void update_view_context_refs() {',$newline)" />
+               <xsl:call-template name="generate_update_view_context_refs" />
+               <xsl:value-of select="concat('}',$newline)"></xsl:value-of>
+               <!-- Ends -->
+               <!-- void set_view1_view_context(uib_view1_view_context* arg_view_context) 
+                       definition starts -->
+               <xsl:value-of
+                       select="concat('void set_',$current_view_name,'_view_context(uib_',$current_view_name,'_view_context* arg_view_context){',$newline,
+                               $tab,$context,' = arg_view_context;',$newline,
+                               $tab,'update_view_context_refs();',$newline,
+                               '}')" />
+               <xsl:value-of
+                       select="concat($newline,'void cleanup_',$current_view_name,'_binding() {',$newline,
+                       $tab,'for (int i = 0; i &lt; ',$current_view_name,'_binding_count; ++i) {',$newline,
+                       $tab,$tab,'free(',$current_view_name,'_bindings[i]);',$newline,
+                       $tab,'}',$newline,
+                       $tab,'free(',$current_view_name,'_bindings);',$newline,
+                       $tab,$current_view_name,'_bindings = NULL;',$newline,
+                       '}',$newline)" />
+               <!-- Ends -->
+       </xsl:template>
+       <xsl:template name="generate_binding_info">
+               <xsl:for-each select=".//*[@data_bind !='']">
+                       <xsl:variable name="data_bind_data" select="normalize-space(./@data_bind)" />
+
+                       <xsl:variable name="binding_info_count" select="position()" />
+                       <xsl:variable name="binding_type"
+                               select="substring-before($data_bind_data,':' )" />
+                       <xsl:variable name="binding_element_path"
+                               select="concat('/',substring-after(substring-after($data_bind_data,':'),'/'))" />
+                       <xsl:variable name="datamodel_name"
+                               select="normalize-space(substring-before(substring-after($data_bind_data,':'),'/'))"></xsl:variable>
+                       <xsl:variable name="widget_id" select="./@id" />
+
+                       <!-- Read data bound widget type -->
+                       <xsl:variable name="widget_type" select="local-name()"/>
+                       <xsl:variable name="widget_type_enum">
+                               <xsl:choose>
+                                       <xsl:when test="local-name() = 'list'">
+                                               <xsl:value-of select="'uib_list'" />
+                                       </xsl:when>
+                                       <xsl:when test="local-name() = 'listitem'">
+                                               <xsl:value-of select="'uib_listitem'" />
+                                       </xsl:when>
+                                       <xsl:when test="local-name() = 'label'">
+                                               <xsl:value-of select="'uib_label'" />
+                                       </xsl:when>
+                                       <xsl:when test="local-name() = 'hoversel'">
+                                               <xsl:value-of select="'uib_hoversel'" />
+                                       </xsl:when>
+                                       <xsl:when test="local-name() = 'hoverselitem'">
+                                               <xsl:value-of select="'uib_hoverselitem'" />
+                                       </xsl:when>
+                                       <xsl:when test="local-name() = 'button'">
+                                               <xsl:value-of select="'uib_button'" />
+                                       </xsl:when>
+                                       <xsl:when test="local-name() = 'check'">
+                                               <xsl:value-of select="'uib_checkbox'" />
+                                       </xsl:when>
+                                       <xsl:when test="local-name() = 'radio'">
+                                               <xsl:value-of select="'uib_radio'" />
+                                       </xsl:when>
+                                       <xsl:when test="local-name() = 'flipselector'">
+                                               <xsl:value-of select="'uib_flipselector'" />
+                                       </xsl:when>
+                                       <xsl:when test="local-name() = 'flipselectoritem'">
+                                               <xsl:value-of select="'uib_flipselectoritem'" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                       <xsl:value-of select="uib_other" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:variable>
+
+                       <xsl:value-of
+                               select="concat($tab,'uib_datamodel_context* datamodel_context_binding_info',$binding_info_count,' = uib_datamodels_get_instance()->get_datamodel_context(&quot;',$datamodel_name,'&quot;);',$newline,
+                                       $tab,'uib_binding_info* binding_info',$binding_info_count,' = (uib_binding_info *) malloc( sizeof(uib_binding_info));',$newline,
+                                       $tab,'binding_info',$binding_info_count,'->widget = ',$context,'->',$widget_id,';',$newline,
+                                       $tab,'binding_info',$binding_info_count,'->binding_type = uib_databindings_get_instance()->get_binding_type(&quot;',$binding_type,'&quot;);',$newline,
+                                       $tab,'binding_info',$binding_info_count,'->dataModelContext = datamodel_context_binding_info',$binding_info_count,';',$newline,
+                                       $tab,'binding_info',$binding_info_count,'->binding_element_path = &quot;',$binding_element_path,'&quot;;',$newline,
+                                       $tab,'binding_info',$binding_info_count,'->widgetType = ',$widget_type_enum,';',$newline,
+                                       $tab,'bi[count++] = binding_info',$binding_info_count,';',$newline,$newline)" />
+
+               </xsl:for-each>
+       </xsl:template>
+       <xsl:template name="generate_update_view_context_refs">
+               <xsl:value-of
+                       select="concat($tab,'if (',$bindings,' == NULL) {',$newline,
+                               $tab,$tab,$bindings,' = add_binding_info();',$newline,
+                               $tab,'} else {',$newline,
+                               $tab,$tab,'int count = 0;',$newline)" />
+               <xsl:for-each select=".//*[@data_bind != '']">
+                       <xsl:variable name="widget_id" select="./@id"></xsl:variable>
+                       <xsl:value-of
+                               select="concat($tab,$tab,$bindings,'[count++]->widget = ',$context,'->',$widget_id,';',$newline)" />
+               </xsl:for-each>
+               <xsl:value-of select="concat($tab,'}',$newline )" />
+       </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_views_binding_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_views_binding_header.xsl
new file mode 100644 (file)
index 0000000..26a42d7
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//*[@data_bind != ''])" />
+<!--           <xsl:value-of select="concat('data_bind-count ', $data_bind_count)"/> -->
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+
+#ifndef MANAGED_INC_DATABINDING_UIB_VIEWS_BINDING_H_
+#define MANAGED_INC_DATABINDING_UIB_VIEWS_BINDING_H_
+#include "uib_datamodels.h"
+#include "g_inc_uib.h"
+#include <ctype.h>
+
+typedef struct {
+
+       Evas_Object* widget;
+       char* widgetPropertyId;
+       widget_type widgetType;
+       //Dot-separated path to bound element in data model
+       char* binding_element_path;
+       widget_binding_type binding_type;
+       uib_datamodel_context* dataModelContext;
+
+} uib_binding_info;
+
+typedef struct {
+       bool _is_init;
+       widget_binding_type (*get_binding_type)(const char* );
+       void (*free_all_databindings)();
+} uib_databindings_st;
+
+uib_databindings_st* uib_databindings_get_instance();
+#endif 
+]]>
+</xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
+
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_views_binding_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_views_binding_source.xsl
new file mode 100644 (file)
index 0000000..3f6b8e3
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//*[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+#include "uib_views_binding.h"
+]]>
+</xsl:text>
+               <xsl:for-each select="/document/views/view">
+                       <xsl:variable name="view_data_bind_count" select="count(.//*[@data_bind!=''])" />
+                       <xsl:if test="$view_data_bind_count>0">
+                               <xsl:variable name="view_id" select="@id" />
+                               <xsl:value-of
+                                       select="concat('#include &quot;uib_',$view_id,'_bindings.h&quot;',$newline)" />
+                       </xsl:if>
+               </xsl:for-each>
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[static uib_databindings_st g_uib_databindings;
+
+static char* str_lower(const char* const str) {
+       int i = 0;
+       char* strLower = (char*) malloc((strlen(str) + 1) * sizeof(char));
+       while (str[i] != '\0') {
+               strLower[i] = tolower(str[i]);
+               ++i;
+       }
+       strLower[i]='\0';
+       return strLower;
+}
+
+widget_binding_type get_binding_type(const char * str_binding_type) {
+       widget_binding_type binding_type =text;
+       char * formatted_binding_type = str_lower(str_binding_type);
+       if (!strcmp(formatted_binding_type, "foreach")) {
+               binding_type= foreach;
+       }
+       free(formatted_binding_type);
+       return binding_type;
+}
+
+void cleanup_databindings() {
+]]>
+</xsl:text>
+               <xsl:for-each select="/document/views/view">
+                       <xsl:variable name="view_data_bind_count" select="count(.//*[@data_bind!=''])" />
+                       <xsl:if test="$view_data_bind_count>0">
+                               <xsl:variable name="view_id" select="@id" />
+                               <xsl:value-of
+                                       select="concat($tab,'cleanup_',$view_id,'_binding();',$newline)" />
+                       </xsl:if>
+               </xsl:for-each>
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[}
+
+uib_databindings_st* uib_databindings_get_instance() {
+       if (!g_uib_databindings._is_init) {
+               g_uib_databindings._is_init = true;
+               g_uib_databindings.free_all_databindings = &cleanup_databindings;
+               g_uib_databindings.get_binding_type = &get_binding_type;
+       }
+       return &g_uib_databindings;
+}
+]]>
+</xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_button_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_button_header.xsl
new file mode 100644 (file)
index 0000000..5ae4d87
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//button[@data_bind != ''])" />
+<!--           <xsl:value-of select="concat('data_bind-count ', $data_bind_count)"/> -->
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_BUTTON_H_
+#define MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_BUTTON_H_
+
+#include "uib_databinding_common.h"
+
+widget_handler_st* button_widget_handler_get_instance();
+
+#endif
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_button_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_button_source.xsl
new file mode 100644 (file)
index 0000000..f7f47d4
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//button[@data_bind != ''])" />
+<!--           <xsl:value-of select="concat('data_bind-count ', $data_bind_count)"/> -->
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include <uib_widget_handler_button.h>
+#include <elm_object.h>
+
+static widget_handler_st button_widget_handler;
+
+static void pre_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               //Do nothing
+       }
+}
+
+static void post_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               // Show the button
+               evas_object_show(widget);
+       }
+}
+
+static void bind_data_callback(Evas_Object* widget,
+               widget_binding_type binding_type, char* value_data) {
+       if (binding_type == text) {
+               elm_object_text_set(widget, _UIB_LOCALE(value_data));
+       }
+}
+
+static void binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (root_element == NULL) {
+               return;
+       }
+       bind_data(widget, binding_element_path, binding_type, root_element,
+                       pre_binding_cb, bind_data_callback, post_binding_cb,
+                       ds_content_type);
+}
+
+widget_handler_st* button_widget_handler_get_instance() {
+       if (button_widget_handler.is_init == false) {
+               button_widget_handler.is_init = true;
+               button_widget_handler.binding_cb = &binding_cb;
+       }
+       return &button_widget_handler;
+}
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_checkbox_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_checkbox_header.xsl
new file mode 100644 (file)
index 0000000..67d1414
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//check[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_CHECKBOX_H_
+#define MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_CHECKBOX_H_
+
+#include "uib_databinding_common.h"
+
+widget_handler_st* checkbox_widget_handler_get_instance();
+
+#endif
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
+
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_checkbox_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_checkbox_source.xsl
new file mode 100644 (file)
index 0000000..ed40b04
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//check[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include <uib_widget_handler_checkbox.h>
+#include <elm_object.h>
+
+static widget_handler_st checkbox_widget_handler;
+
+static void pre_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               //Do nothing
+       }
+}
+
+static void bind_data_callback(Evas_Object* widget,
+               widget_binding_type binding_type, char* value_data) {
+       if (binding_type == text) {
+               elm_object_text_set(widget, _UIB_LOCALE(value_data));
+       }
+}
+
+static void post_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               // Show the label
+               evas_object_show(widget);
+       }
+}
+
+static void binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (root_element == NULL) {
+               return;
+       }
+       bind_data(widget, binding_element_path, binding_type, root_element,
+                       pre_binding_cb, bind_data_callback, post_binding_cb,
+                       ds_content_type);
+}
+
+widget_handler_st* checkbox_widget_handler_get_instance() {
+       if (checkbox_widget_handler.is_init == false) {
+               checkbox_widget_handler.is_init = true;
+               checkbox_widget_handler.binding_cb = &binding_cb;
+       }
+       return &checkbox_widget_handler;
+}
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
+
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselector_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselector_header.xsl
new file mode 100644 (file)
index 0000000..2d0e21a
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//flipselector[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_FLIPSELECTOR_H_
+#define MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_FLIPSELECTOR_H_
+
+#include "uib_databinding_common.h"
+
+widget_handler_st* flipselector_widget_handler_get_instance();
+
+#endif
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselector_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselector_source.xsl
new file mode 100644 (file)
index 0000000..8d93854
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//flipselector[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include <uib_widget_handler_flipselector.h>
+#include <elm_object.h>
+
+static widget_handler_st flipselector_widget_handler;
+
+static void pre_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               //Do nothing
+       }
+}
+
+static void bind_data_callback(Evas_Object* widget,
+               widget_binding_type binding_type, char* value_data) {
+       if (binding_type == foreach) {
+               elm_flipselector_item_append(widget, _UIB_LOCALE(value_data),
+               NULL, NULL);
+       }
+}
+
+static void post_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == foreach) {
+               // Show the label
+               evas_object_show(widget);
+       }
+}
+
+static void binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (root_element == NULL) {
+               return;
+       }
+       bind_data(widget, binding_element_path, binding_type, root_element,
+                       pre_binding_cb, bind_data_callback, post_binding_cb,
+                       ds_content_type);
+}
+
+widget_handler_st* flipselector_widget_handler_get_instance() {
+       if (flipselector_widget_handler.is_init == false) {
+               flipselector_widget_handler.is_init = true;
+               flipselector_widget_handler.binding_cb = &binding_cb;
+       }
+       return &flipselector_widget_handler;
+}
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
+
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselectoritem_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselectoritem_header.xsl
new file mode 100644 (file)
index 0000000..98e9b96
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//flipselectoritem[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_FLIPSELECTORITEM_H_
+#define MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_FLIPSELECTORITEM_H_
+
+#include "uib_databinding_common.h"
+
+widget_handler_st* flipselectoritem_widget_handler_get_instance();
+
+#endif
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselectoritem_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_flipselectoritem_source.xsl
new file mode 100644 (file)
index 0000000..23832cc
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//flipselectoritem[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include <uib_widget_handler_flipselectoritem.h>
+#include <elm_object.h>
+
+static widget_handler_st flipselectoritem_widget_handler;
+
+static void pre_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               //Do nothing
+       }
+}
+
+static void bind_data_callback(Evas_Object* widget,
+               widget_binding_type binding_type, char* value_data) {
+       if (binding_type == text) {
+               elm_object_item_text_set(widget, _UIB_LOCALE(value_data));
+       }
+}
+
+static void post_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               // Show the label
+               evas_object_show(widget);
+       }
+}
+
+static void binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (root_element == NULL) {
+               return;
+       }
+       bind_data(widget, binding_element_path, binding_type, root_element,
+                       pre_binding_cb, bind_data_callback, post_binding_cb,
+                       ds_content_type);
+}
+
+widget_handler_st* flipselectoritem_widget_handler_get_instance() {
+       if (flipselectoritem_widget_handler.is_init == false) {
+               flipselectoritem_widget_handler.is_init = true;
+               flipselectoritem_widget_handler.binding_cb = &binding_cb;
+       }
+       return &flipselectoritem_widget_handler;
+}
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
+
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoversel_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoversel_header.xsl
new file mode 100644 (file)
index 0000000..287f8d4
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//hoversel[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_HOVERSEL_H_
+#define MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_HOVERSEL_H_
+
+#include "uib_databinding_common.h"
+#include <elm_hoversel.eo.legacy.h>
+
+widget_handler_st* hoversel_widget_handler_get_instance();
+
+#endif
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
+
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoversel_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoversel_source.xsl
new file mode 100644 (file)
index 0000000..9bdd80e
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//hoversel[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include <uib_widget_handler_hoversel.h>
+
+static widget_handler_st hoversel_widget_handler;
+
+static void pre_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == foreach) {
+               //Clear all hoversel Items
+               elm_hoversel_clear(widget);
+       }
+}
+
+static void post_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == foreach) {
+               //Do Nothing
+       }
+}
+
+static void bind_data_callback(Evas_Object* widget,
+               widget_binding_type binding_type, char* value_data) {
+       if (binding_type == foreach) {
+               elm_hoversel_item_add(widget, _UIB_LOCALE(value_data),
+               NULL, ELM_ICON_NONE, NULL, NULL);
+       }
+}
+
+static void binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (root_element == NULL) {
+               return;
+       }
+       bind_data(widget, binding_element_path, binding_type, root_element,
+                       pre_binding_cb, bind_data_callback, post_binding_cb,
+                       ds_content_type);
+}
+
+widget_handler_st* hoversel_widget_handler_get_instance() {
+       if (hoversel_widget_handler.is_init == false) {
+               hoversel_widget_handler.is_init = true;
+               hoversel_widget_handler.binding_cb = &binding_cb;
+
+       }
+       return &hoversel_widget_handler;
+}
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoverselitem_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoverselitem_header.xsl
new file mode 100644 (file)
index 0000000..3d01248
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//hoverselitem[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_HOVERSELITEM_H_
+#define MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_HOVERSELITEM_H_
+
+#include "uib_databinding_common.h"
+#include <elm_object_item.h>
+#include <elm_hoversel_item.eo.legacy.h>
+
+widget_handler_st* hoverselitem_widget_handler_get_instance();
+
+#endif
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
+
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoverselitem_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_hoverselitem_source.xsl
new file mode 100644 (file)
index 0000000..7796200
--- /dev/null
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//hoverselitem[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#include <uib_widget_handler_hoverselitem.h>
+
+static widget_handler_st hoverselitem_widget_handler;
+
+static void pre_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               //Do nothing
+       }
+}
+
+static void bind_data_callback(Evas_Object* widget,
+               widget_binding_type binding_type, char* value_data) {
+       if (binding_type == text) {
+               elm_object_item_text_set(widget, _UIB_LOCALE(value_data));
+       }
+}
+
+static void post_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               // Show the hoverlistitem
+               evas_object_show(widget);
+       }
+}
+
+static void binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (root_element == NULL) {
+               return;
+       }
+       bind_data(widget, binding_element_path, binding_type, root_element,
+                       pre_binding_cb, bind_data_callback, post_binding_cb,
+                       ds_content_type);
+}
+
+widget_handler_st* hoverselitem_widget_handler_get_instance() {
+       if (hoverselitem_widget_handler.is_init == false) {
+               hoverselitem_widget_handler.is_init = true;
+               hoverselitem_widget_handler.binding_cb = &binding_cb;
+       }
+       return &hoverselitem_widget_handler;
+}
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
+
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_label_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_label_header.xsl
new file mode 100644 (file)
index 0000000..7106e34
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//label[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_LABEL_H_
+#define MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_LABEL_H_
+
+#include "uib_databinding_common.h"
+#include <elm_object.h>
+
+widget_handler_st* label_widget_handler_get_instance();
+
+#endif
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_label_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_label_source.xsl
new file mode 100644 (file)
index 0000000..eabc191
--- /dev/null
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//label[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include <uib_widget_handler_label.h>
+
+static widget_handler_st label_widget_handler;
+
+static void pre_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               //Do nothing
+       }
+}
+
+static void bind_data_callback(Evas_Object* widget,
+               widget_binding_type binding_type, char* value_data) {
+       if (binding_type == text) {
+               elm_object_text_set(widget, _UIB_LOCALE(value_data));
+       }
+}
+
+static void post_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               // Show the label
+               evas_object_show(widget);
+       }
+}
+
+static void binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (root_element == NULL) {
+               return;
+       }
+       bind_data(widget, binding_element_path, binding_type, root_element,
+                       pre_binding_cb, bind_data_callback, post_binding_cb,
+                       ds_content_type);
+}
+
+widget_handler_st* label_widget_handler_get_instance() {
+       if (label_widget_handler.is_init == false) {
+               label_widget_handler.is_init = true;
+               label_widget_handler.binding_cb = &binding_cb;
+       }
+       return &label_widget_handler;
+}
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_list_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_list_header.xsl
new file mode 100644 (file)
index 0000000..4f3ba28
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//list[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_LIST_H_
+#define MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_LIST_H_
+
+#include "uib_databinding_common.h"
+#include <elm_list.eo.legacy.h>
+
+widget_handler_st* list_widget_handler_get_instance();
+
+#endif
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_list_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_list_source.xsl
new file mode 100644 (file)
index 0000000..44e6d98
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//list[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include <uib_widget_handler_list.h>
+
+static widget_handler_st list_widget_handler;
+
+static void pre_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == foreach) {
+               //Clear all list Items
+               elm_list_clear(widget);
+       }
+}
+
+static void post_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == foreach) {
+               //show widget
+               elm_list_go(widget);
+       }
+}
+
+static void bind_data_callback(Evas_Object* widget,
+               widget_binding_type binding_type, char* value_data) {
+       if (binding_type == foreach) {
+               elm_list_item_append(widget, _UIB_LOCALE(value_data),
+               NULL, NULL, NULL, NULL);
+       }
+}
+
+static void binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (root_element == NULL) {
+               return;
+       }
+       bind_data(widget, binding_element_path, binding_type, root_element,
+                       pre_binding_cb, bind_data_callback, post_binding_cb,
+                       ds_content_type);
+}
+
+widget_handler_st* list_widget_handler_get_instance() {
+       if (list_widget_handler.is_init == false) {
+               list_widget_handler.is_init = true;
+               list_widget_handler.binding_cb = &binding_cb;
+       }
+       return &list_widget_handler;
+}
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_listitem_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_listitem_header.xsl
new file mode 100644 (file)
index 0000000..bdb3b36
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//listitem[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_LISTITEM_H_
+#define MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_LISTITEM_H_
+
+#include "uib_databinding_common.h"
+#include <elm_object_item.h>
+
+widget_handler_st* listitem_widget_handler_get_instance();
+
+#endif
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_listitem_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_listitem_source.xsl
new file mode 100644 (file)
index 0000000..6a2a3c5
--- /dev/null
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//listitem[@data_bind != ''])" />
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include <uib_widget_handler_listitem.h>
+
+static widget_handler_st listitem_widget_handler;
+
+static void pre_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               //Do nothing
+       }
+}
+
+static void bind_data_callback(Evas_Object* widget,
+               widget_binding_type binding_type, char* value_data) {
+       if (binding_type == text) {
+               elm_object_item_text_set(widget, _UIB_LOCALE(value_data));
+       }
+}
+
+static void post_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               // Show the label
+               evas_object_show(widget);
+       }
+}
+
+static void binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (root_element == NULL) {
+               return;
+       }
+       bind_data(widget, binding_element_path, binding_type, root_element,
+                       pre_binding_cb, bind_data_callback, post_binding_cb,
+                       ds_content_type);
+}
+
+widget_handler_st* listitem_widget_handler_get_instance() {
+       if (listitem_widget_handler.is_init == false) {
+               listitem_widget_handler.is_init = true;
+               listitem_widget_handler.binding_cb = &binding_cb;
+       }
+       return &listitem_widget_handler;
+}
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_radio_header.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_radio_header.xsl
new file mode 100644 (file)
index 0000000..9481b70
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//radio[@data_bind != ''])" />
+<!--           <xsl:value-of select="concat('data_bind-count ', $data_bind_count)"/> -->
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_RADIO_H_
+#define MANAGED_INC_DATABINDING_UIB_WIDGET_HANDLER_RADIO_H_
+
+#include "uib_databinding_common.h"
+
+widget_handler_st* radio_widget_handler_get_instance();
+
+#endif
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_radio_source.xsl b/org.tizen.efluibuilder.codegenerator/res/databinding/db_widget_handler_radio_source.xsl
new file mode 100644 (file)
index 0000000..4d0106f
--- /dev/null
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:variable name="data_bind_count" select="count(//radio[@data_bind != ''])" />
+<!--           <xsl:value-of select="concat('data_bind-count ', $data_bind_count)"/> -->
+               <xsl:variable name="databinding_done">
+                       <xsl:choose>
+                               <xsl:when test="$data_bind_count>0">
+                                       <xsl:value-of select="'yes'"></xsl:value-of>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="'no'"></xsl:value-of>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:variable>
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:apply-templates select="//views" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="views">
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+ * This file was generated by UI Builder.
+ * This file will be auto-generated each and everytime you save your project.
+ * Do not hand edit this file.
+ ********************************************************************************/
+
+#include <uib_widget_handler_radio.h>
+#include <elm_object.h>
+
+static widget_handler_st radio_widget_handler;
+
+static void pre_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               //Do nothing
+       }
+}
+
+static void post_binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (binding_type == text) {
+               // Show the radio
+               evas_object_show(widget);
+       }
+}
+
+static void bind_data_callback(Evas_Object* widget,
+               widget_binding_type binding_type, char* value_data) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - Setting value %s to radio's label", __func__, value_data);
+       if (binding_type == text) {
+               elm_object_text_set(widget, _UIB_LOCALE(value_data));
+       }
+}
+
+static void binding_cb(Evas_Object* widget, char* binding_element_path,
+               widget_binding_type binding_type, void** root_element,
+               UIB_DATASOURCE_CONTENT_TYPE ds_content_type) {
+       dlog_print(DLOG_DEBUG, LOG_TAG, "%s - ", __func__);
+       if (root_element == NULL) {
+               return;
+       }
+       bind_data(widget, binding_element_path, binding_type, root_element,
+                       pre_binding_cb, bind_data_callback, post_binding_cb,
+                       ds_content_type);
+}
+
+widget_handler_st* radio_widget_handler_get_instance() {
+       if (radio_widget_handler.is_init == false) {
+               radio_widget_handler.is_init = true;
+               radio_widget_handler.binding_cb = &binding_cb;
+       }
+       return &radio_widget_handler;
+}
+]]></xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/res/inc/g_inc_uib_header.xsl b/org.tizen.efluibuilder.codegenerator/res/inc/g_inc_uib_header.xsl
new file mode 100644 (file)
index 0000000..e5fbedd
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+       <xsl:param name="is_version_rm_support" />
+       <xsl:param name="is_widget_project" />
+       <xsl:template match="/">
+               <xsl:apply-templates select="//views">
+               </xsl:apply-templates>
+       </xsl:template>
+
+       <xsl:template match="views">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef G_INC_UIB_H_
+#define G_INC_UIB_H_
+
+#define DEF_USE_UIB_PROGRAM_MODEL_VER          (3)
+#define DEF_UIB_VIEW_MAX_NUM            (100)
+#define USE_USER_VIEW                                    "USE_USER_VIEW"
+
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$is_widget_project='true'">
+                               <xsl:text><![CDATA[
+#include <widget_app.h>
+#include <widget_app_efl.h>
+]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:text><![CDATA[
+]]></xsl:text>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+#include <Elementary.h>
+#include <efl_extension.h>
+#include <app.h>
+
+#include <elm_app.h>
+#include <system_info.h>
+#include <dlog.h>
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$is_version_rm_support='true'">
+                               <xsl:text><![CDATA[#include <appfw/app_resource_manager.h>]]></xsl:text>
+                       </xsl:when>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+#include "app_main.h"
+#include "uib_util.h"
+
+#endif /* G_INC_UIB_H_ */
+]]>
+</xsl:text>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/inc/uib_app_manager_header.xsl b/org.tizen.efluibuilder.codegenerator/res/inc/uib_app_manager_header.xsl
new file mode 100644 (file)
index 0000000..8eeeb8c
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:param name="is_widget_project" />
+       <xsl:template match="/">
+               <xsl:apply-templates select="//views">
+               </xsl:apply-templates>
+       </xsl:template>
+
+       <xsl:template match="views">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef UIB_APP_MANAGER_H_
+#define UIB_APP_MANAGER_H_
+
+#include "g_inc_uib.h"
+#include "uib_views.h"
+#include "app_main.h"
+
+
+typedef struct {
+       bool _is_init;
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$is_widget_project='true'">
+                               <xsl:text><![CDATA[     bool (*initialize)(widget_context_h context, int w, int y);]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:text><![CDATA[     bool (*initialize)();]]></xsl:text>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+       void (*prepare)();
+       void (*finalize)();
+       const uib_device_info_st* (*get_uib_device_info)();
+       int (*add_view_context)(uib_view_context*);
+       uib_view_context* (*find_view_context)(char*);
+       void (*free_all_view_context)();
+} uib_app_manager_st;
+
+uib_app_manager_st* uib_app_manager_get_instance();
+
+#endif /* UIB_APP_MANAGER_H_ */
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/inc/uib_util_header.xsl b/org.tizen.efluibuilder.codegenerator/res/inc/uib_util_header.xsl
new file mode 100644 (file)
index 0000000..2aba41e
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+       <xsl:param name="startup_view" />
+       <xsl:param name="profile" />
+       <xsl:param name="is_version_rm_support" />
+       <xsl:template match="/">
+               <xsl:call-template name="uib_util_header" />
+       </xsl:template>
+
+       <xsl:template name="uib_util_header">
+
+               <!-- BEGIN : OUTPUT -->
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[
+/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef UIB_UTIL_H_
+#define UIB_UTIL_H_
+
+#include "g_inc_uib.h"
+#include "uib_views.h"
+
+#ifdef ENABLE_UIB_DELOG
+       #define UIB_DLOG(log_type, log_tag, fmt,...) dlog_print(log_type, log_tag, fmt, ##__VA_ARGS__)
+#else
+       #define UIB_DLOG(log_type, log_tag, fmt,...)
+#endif /* ENABLE_FILE_LOG_TRACE */
+
+#ifdef  LOG_TAG
+#undef  LOG_TAG
+#endif
+//#define LOG_TAG APP_NAME
+#define LOG_TAG "UIB_APP"
+]]></xsl:text>
+
+               <xsl:choose>
+                       <xsl:when test="$is_version_rm_support='true'">
+                               <xsl:text><![CDATA[
+typedef app_resource_e _APP_RESOURCE_E; // RM]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:text><![CDATA[
+typedef int _APP_RESOURCE_E;  // RM]]></xsl:text>
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:text><![CDATA[
+typedef enum {
+       e_rotation_unknown=-1,
+       e_rotation_default,
+       e_rotation_fullSensor = e_rotation_default,
+       e_rotation_noSensor,
+       e_rotation_onlyPortrait,
+       e_rotation_onlyLandscape,
+       e_rotation_max_num,
+} rotation_e;
+
+typedef enum {
+       e_resolution_unknown=-1,]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$profile='mobile'">
+                               <xsl:text><![CDATA[
+       e_resolution_WVGA,
+       e_resolution_qHD,
+       e_resolution_HD,]]></xsl:text>
+                       </xsl:when>
+                       <xsl:when test="$profile='wearable'">
+                               <xsl:text><![CDATA[
+       e_resolution_SQUARE_320x320,
+       e_resolution_SQUARE_360x480,]]></xsl:text>
+                       </xsl:when>
+                       <xsl:when test="$profile='wearable-circle'">
+                               <xsl:text><![CDATA[
+       e_resolution_CIRCLE_360x360,]]></xsl:text>
+                       </xsl:when>
+                       <xsl:when test="$profile='tv'">
+                               <xsl:text><![CDATA[
+       e_resolution_HD,
+       e_resolution_FHD,]]></xsl:text>
+                       </xsl:when>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+       e_resolution_max_num,
+} resolution_e;
+
+typedef enum {
+       e_orient_unknown=-1,
+       e_orientation_default,
+       e_orientation_port=e_orientation_default,
+       e_orientation_land,
+       e_orientation_max_num,
+} orientation_e;
+
+typedef enum {
+       e_ctxpopup_position_unknown=-1,
+       e_ctxpopup_position_default,
+       e_ctxpopup_position_user_input,
+} ctxpopup_position_e;
+
+#define DEF_SENSOR_ARRAY_ONLY_PORT             { 0, 180 }
+#define DEF_SENSOR_ARRAY_ONLY_LAND             { 90, 270 }
+#define DEF_SENSOR_ARRAY_FULL                                  { 0, 90, 180, 270 }
+#define DEF_SENSOR_ARRAY_NO                                    { 0 }
+
+typedef struct {
+       int w;
+       int h;
+       int dpi;
+       char profile_name[128];
+       double base_scale;
+       resolution_e resolution_type;
+} uib_device_info_st;
+
+#define DEF_UIB_ORIENT_TYPE(e_orientation) ((e_orientation==APP_DEVICE_ORIENTATION_0||e_orientation==APP_DEVICE_ORIENTATION_180)? e_orientation_port:e_orientation_land)
+
+void uib_util_rotation_set(Evas_Object *win, rotation_e e_rotation_type);
+
+resolution_e uib_util_get_resolution_type(int w, int h);
+int uib_util_get_device_info(uib_device_info_st* uib_device_info);
+Elm_Object_Item* uib_util_push_view(char *view_name);
+uib_popup_context* uib_create_popup(char *popup_name);
+uib_popup_context* uib_create_ctxpopup(char *popup_name, ctxpopup_position_e position, Evas_Object *obj, Evas_Coord input_x, Evas_Coord input_y);
+char* uib_util_get_current_config_name();
+
+void uib_util_widget_hide_on_grid(Evas_Object* grid_evas_obj, Evas_Object* evas_sub_obj);
+
+/**
+ * @brief Gets the localized translation for the specified string.
+ *
+ * @details If a translation is not found in the localization file(.po file), @a message is returned.
+ *
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @remarks Do not free the returned value.
+ *
+ * @param[in] message The string to be translated
+ * @return  The localized translation for the given @a message on success,
+ *          otherwise the given @a message
+ */
+char* uib_util_rm_get_locale_string(char* src_string);
+#define _UIB_LOCALE(msg) uib_util_rm_get_locale_string(msg)
+
+/**
+ * @brief Convert resource ID to path name
+ *
+ * @remarks If resource manager is not created yet,
+ *                     app_resource_manager_init() will be invoked automatically.
+ *                     Caller should free the returned pointer.
+ * @param[in] type Resource type @see app_resource_e
+ * @param[in] id Resource ID
+ * @param[out] path The name of requested resource on success, otherwise NULL
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #APP_RESOURCE_ERROR_NONE Successful
+ * @retval #APP_RESOURCE_ERROR_INVALID_PARAMETER Invalid Parameter
+ * @retval #APP_RESOURCE_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #APP_RESOURCE_ERROR_IO_ERROR Internal I/O Error or failed to find valid resource
+ * @see        app_resource_manager_init()
+ */
+int uib_util_rm_get_resource_path(_APP_RESOURCE_E e_resource_type, const char* resource_path_in, char** resource_path_out);
+]]></xsl:text>
+               <xsl:if test="$profile='tv'">
+                       <xsl:value-of select="concat($newline, 'void uib_util_win_alpha_set(Evas_Object *data, Eina_Bool enabled);')" />
+               </xsl:if>
+               <xsl:text><![CDATA[
+
+#endif /* UIB_UTIL_H_ */
+]]></xsl:text>
+
+
+               <!-- END : OUTPUT -->
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/inc/uib_view_header.xsl b/org.tizen.efluibuilder.codegenerator/res/inc/uib_view_header.xsl
new file mode 100644 (file)
index 0000000..367cba0
--- /dev/null
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:param name="current_view_name" />
+       <xsl:param name="profile" />
+
+       <xsl:template match="/">
+               <xsl:apply-templates select="//view">
+               </xsl:apply-templates>
+       </xsl:template>
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+       <xsl:template name="uib_view_header">
+
+               <!-- Parameter -->
+               <xsl:param name="view_name" />
+               <xsl:param name="view_type" />
+               <xsl:param name="path" />
+               <xsl:param name="current_view_position" />
+
+               <!-- Variables -->
+               <xsl:variable name="view_context_name">
+                       <xsl:call-template name="get_view_context_name">
+                               <xsl:with-param name="view_name" select="$view_name" />
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:variable name="view_name_macro">
+                       <xsl:call-template name="convert_uppercase">
+                               <xsl:with-param name="text" select="concat('UIB_', $view_name, '_VIEW_H_')" />
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:variable name="view_control_context_name">
+                       <xsl:call-template name="get_view_control_context_name">
+                               <xsl:with-param name="view_name" select="$view_name" />
+                       </xsl:call-template>
+               </xsl:variable>
+
+               <!-- BEGIN : OUTPUT -->
+               <xsl:value-of select="concat($newline, '#ifndef ', $view_name_macro, $newline)" />
+               <xsl:value-of select="concat('#define ', $view_name_macro, $newline)" />
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[
+#include "g_inc_uib.h"
+#include "uib_views.h"
+
+/**
+* view context definitions
+*/
+]]>
+</xsl:text>
+               <!-- <xsl:value-of select="$newline" /> -->
+               <xsl:value-of select="concat('typedef struct _', $view_context_name, ' {')" />
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[
+       /* parent evas_object which was parameter of create function */
+       Evas_Object *parent;
+       /* root container UI Component of this view */
+       Evas_Object *root_container;
+       /* view class name */
+       const char *view_name;
+       /* indicator state of this view */
+       int indicator_state;
+       /* This is view type. 'true' is user view, otherwise a UI Builder's view. */
+       bool is_user_view;
+       /* control context to control this view */]]>
+</xsl:text>
+               <xsl:value-of select="concat( $tab, 'struct _', $view_control_context_name, ' *cc;', $newline, $newline)" />
+               <xsl:value-of select="concat( $tab, '/* UI Components in this view */', $newline)" />
+
+               <xsl:for-each select="descendant::*">
+                       <xsl:variable name="widget_name" select="@id" />
+                       <xsl:variable name="element" select="name()" />
+                       <xsl:choose>
+                               <xsl:when test="$element='event'" />
+                               <xsl:when test="$element='variation'" />
+                               <xsl:when test="contains($element,'item')">
+                                       <xsl:value-of select="concat($tab, 'Elm_Object_Item *', $widget_name, ';', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($tab, 'Evas_Object *', $widget_name, ';', $newline)" />
+                                       <xsl:if test="$profile='wearable-circle'">
+                                               <xsl:value-of select="concat($tab, 'Evas_Object *circle_object_', $widget_name, ';', $newline)" />
+                                       </xsl:if>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:for-each>
+
+               <xsl:value-of select="concat( '} ', $view_context_name, ';', $newline)" />
+               <xsl:value-of select="$newline" />
+
+               <xsl:if test="@type='popup'">
+                       <xsl:for-each select="./*">
+                               <xsl:value-of select="concat( 'typedef ', $view_context_name, ' uib_', @id, '_context ;', $newline)" />
+                       </xsl:for-each>
+               </xsl:if>
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[
+/**
+* @brief       Create a new view then return view context of that view.
+*                      You can delete view using evas_object_del(vc->evas_object) like other EFL evas objects.
+*/]]></xsl:text>
+
+
+               <xsl:value-of select="$newline" />
+               <xsl:value-of select="concat( 'uib_view_context *uib_view_', $view_name, '_create(Evas_Object *parent, void *create_callback_param);', $newline)" />
+               <xsl:value-of select="concat( 'uib_view_context *uib_view_', $view_name, '_destroy(Evas_Object *parent, void *create_callback_param);', $newline)" />
+               <xsl:value-of select="$newline" />
+
+
+               <!-- create mscreen view func -->
+               <xsl:for-each select="/document/mscreen/configuration">
+                       <xsl:variable name="configuration_type" select="@type" />
+                       <xsl:variable name="configuration_id" select="@id" />
+                       <xsl:variable name="configuration_resolution" select="@device" />
+                       <xsl:variable name="configuration_orientation" select="@orientation" />
+                       <xsl:choose>
+                               <xsl:when test="$configuration_type='common'">
+                                       <xsl:value-of select="concat('void uib_',$view_name,'_config_',$configuration_resolution,'_',$configuration_orientation,'();',$newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:for-each select="/document/views/view[$current_view_position]//variation[$configuration_id = @config_ref]">
+                                               <xsl:if test="position()='1'">
+                                                       <xsl:value-of select="concat('void uib_',$view_name,'_config_',$configuration_resolution,'_',$configuration_orientation,'();',$newline)" />
+                                               </xsl:if>
+                                       </xsl:for-each>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:for-each>
+               <!-- Storyboard_START -->
+               <xsl:for-each select="descendant::*">
+                       <xsl:variable name="element" select="name()" />
+                       <xsl:variable name="widget_name" select="@id" />
+                       <xsl:if test="$element='event'">
+                               <xsl:if test="string-length(@onuib_view_create)=0">
+                                       <xsl:if test="string-length(@connection_wrapper)!=0">
+                                               <xsl:variable name="function">
+                                                       <xsl:value-of select="@function_name" />
+                                               </xsl:variable>
+                                               <xsl:value-of select="concat('void ',$function,'(uib_',$view_name,'_view_context *vc, Evas_Object *obj, void *event_info);',$newline)" />
+                                               <xsl:value-of
+                                                       select="concat('void ',$function,'_post(void* param, uib_',$view_name,'_view_context *vc, Evas_Object *obj, void *event_info);',$newline)" />
+                                       </xsl:if>
+                               </xsl:if>
+                       </xsl:if>
+               </xsl:for-each>
+               <!-- Storyboard_END -->
+
+               <xsl:value-of select="concat('#endif /* ', $view_name_macro, ' */', $newline)" />
+               <!-- END : OUTPUT -->
+
+       </xsl:template>
+
+       <xsl:template name="convert_into_EFL_structure_naming">
+               <xsl:param name="text" />
+               <xsl:choose>
+                       <xsl:when test="contains($text, '_')">
+                               <!-- <xsl:call-template name="convert_first_char_uppercase"> <xsl:with-param name="text" select="concat(substring-before($text,'_'), '_')" /> </xsl:call-template> -->
+                               <xsl:value-of select="concat(substring-before($text,'_'), '_')" />
+                               <xsl:call-template name="convert_into_EFL_structure_naming">
+                                       <xsl:with-param name="text" select="substring-after($text,'_')" />
+                               </xsl:call-template>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <!-- <xsl:call-template name="convert_first_char_uppercase"> <xsl:with-param name="text" select="$text" /> </xsl:call-template> -->
+                               <xsl:value-of select="$text" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <!-- VIEW::get_view_context_name -->
+       <xsl:template name="get_view_context_name">
+               <xsl:param name="view_name" />
+
+               <xsl:text>uib_</xsl:text>
+               <xsl:call-template name="convert_into_EFL_structure_naming">
+                       <xsl:with-param name="text" select="$view_name" />
+               </xsl:call-template>
+               <xsl:text>_view_context</xsl:text>
+       </xsl:template>
+
+       <!-- VIEW::get_view_control_context_name -->
+       <xsl:template name="get_view_control_context_name">
+               <xsl:param name="view_name" />
+
+               <xsl:text>uib_</xsl:text>
+               <xsl:call-template name="convert_into_EFL_structure_naming">
+                       <xsl:with-param name="text" select="$view_name" />
+               </xsl:call-template>
+               <xsl:text>_control_context</xsl:text>
+       </xsl:template>
+
+       <!-- ::convert_uppercase -->
+       <xsl:template name="convert_uppercase">
+               <xsl:param name="text" />
+               <xsl:value-of select="translate($text,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" />
+       </xsl:template>
+
+
+
+
+       <xsl:template name="writing_code_for_current_view">
+               <!-- Parameter -->
+               <xsl:param name="view_name" />
+               <xsl:param name="view_type" />
+
+               <xsl:choose>
+                       <xsl:when test="$current_view_name=$view_name">
+                               <xsl:text>
+/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+                               </xsl:text>
+
+
+                               <xsl:variable name="current_view_position" select="position()" />
+
+                               <xsl:call-template name="uib_view_header">
+                                       <!-- <xsl:with-param name="view_name" select="$view_name" /> -->
+                                       <xsl:with-param name="view_name" select="@id" />
+                                       <xsl:with-param name="view_type" select="name(.)" />
+                                       <xsl:with-param name="current_view_position" select="$current_view_position" />
+                               </xsl:call-template>
+                       </xsl:when>
+               </xsl:choose>
+       </xsl:template>
+
+
+
+
+       <xsl:template match="view">
+               <xsl:call-template name="writing_code_for_current_view">
+                       <xsl:with-param name="view_name" select="@id" />
+                       <xsl:with-param name="view_type" select="name(.)" />
+               </xsl:call-template>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/inc/uib_view_manager_header.xsl b/org.tizen.efluibuilder.codegenerator/res/inc/uib_view_manager_header.xsl
new file mode 100644 (file)
index 0000000..49ed02f
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:apply-templates select="//views">
+               </xsl:apply-templates>
+       </xsl:template>
+
+       <xsl:template match="views">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef UIB_VIEW_MANAGER_H_
+#define UIB_VIEW_MANAGER_H_
+
+#include "g_inc_uib.h"
+
+typedef struct {
+       bool _is_init;
+       int (*add_view_context)(uib_view_context*);
+       uib_view_context* (*find_view_context)(char*);
+       void (*free_all_view_context)();
+} uib_view_manager_st;
+
+uib_view_manager_st* uib_view_manager_get_instance();
+
+#endif /* UIB_VIEW_MANAGER_H_ */
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/inc/uib_views_header.xsl b/org.tizen.efluibuilder.codegenerator/res/inc/uib_views_header.xsl
new file mode 100644 (file)
index 0000000..eacfee2
--- /dev/null
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+       <xsl:param name="startup_view" />
+       <xsl:param name="profile" />
+       <xsl:param name="is_widget_project" />
+       <xsl:template match="/">
+               <xsl:call-template name="uib_views_header" />
+       </xsl:template>
+
+       <xsl:template name="uib_views_header">
+
+               <!-- BEGIN : OUTPUT -->
+               <xsl:text disable-output-escaping="yes"><![CDATA[
+/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef UIB_VIEWS_H_
+#define UIB_VIEWS_H_
+
+#include "g_inc_uib.h"
+
+#define        KEY_VIEW_CONTEXT        "uib,view,context"
+#define        KEY_VIEW_CREATE         "uib,view,create"
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"
+#define        KEY_VIEW_VC_SAVE        "uib,view,vc_save"
+#define        KEY_WM_ROTATION_CHANGED "wm,rotation,changed"
+
+#define        VIEWS_CONFIG_NAME_NONE  "none"
+
+typedef struct {
+       Evas_Object * win;
+       Evas_Object * bg;
+       Evas_Object * conformant;       // This object can be box type in tv profile
+       Evas_Object * app_naviframe;]]></xsl:text>
+               <xsl:if test="$profile='wearable-circle'">
+                       <xsl:value-of select="concat($newline, $tab, 'Eext_Circle_Surface * circle_surface;')" />
+               </xsl:if>
+               <xsl:text><![CDATA[
+} window_obj;
+
+typedef struct _uib_view_context {
+       Evas_Object*    parent;
+       Evas_Object*    root_container;
+       const char*     view_name;
+       int             indicator_state;
+       bool            is_user_view;
+} uib_view_context;
+
+typedef struct _uib_user_views_st {
+       const char*     view_name;
+       void (*draw_user_view_cb)(window_obj* win_obj, uib_view_context* vc);
+} uib_user_views_st;
+
+typedef uib_view_context uib_popup_context;
+
+typedef struct {
+       bool is_init;
+
+       void (*uib_view_target_config_portrait)();
+       void (*uib_view_target_config_landscape)();
+
+       void (*set_startup_view_name)(const char* startup_view_name);
+       uib_view_context* (*create_startup_view)();
+       uib_view_context* (*create_user_view)(char*);
+
+       void (*set_targeted_view)(uib_view_context* vc);
+       int (*add_user_views) (char* user_view_name, void (*draw_user_view_cb)(window_obj* win_obj, uib_view_context* vc));
+       int (*get_total_hit_num)(uib_view_context* vc);
+       int (*find_user_view_idx)(char* view_name);
+
+       void (*uib_views_orientation_handler)(int);
+       void (*uib_views_current_view_redraw) ();
+       char* (*get_current_config_name) ();
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$is_widget_project='true'">
+                               <xsl:text><![CDATA[     window_obj* (*create_window_obj)(widget_context_h context, int w, int y);]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:text><![CDATA[     window_obj* (*create_window_obj)();]]></xsl:text>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+       window_obj* (*get_window_obj)();
+       Evas_Object* (*get_window)();
+       Evas_Object* (*get_conformant)();
+       void (*destroy_window_obj)();
+} uib_views_st;
+
+/**
+ * Set the member using strdup() or malloc() because it will be deleted by free().
+ */
+ typedef struct _uib_genlist_item
+{
+       char * label;
+       char * sub_label;
+       char * icon_path;
+       char * icon_standard;
+       char * end_icon_path;
+       char * end_icon_standard;
+} uib_genlist_item;
+
+/**
+* @brief Call a callback on view creation
+* @param[in] vc view context
+* @param[in] obj The root container widget of this view
+* @param[in] event_info pointer to an event specific struct or information to pass to the callback functions registered on this event
+*/
+void uib_views_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;
+
+/**
+* @brief Call a callback on view termination
+* @param[in] vc view context
+* @param[in] obj The root container widget of this view
+* @param[in] event_info pointer to an event specific struct or information to pass to the callback functions registered on this event
+*/
+void uib_views_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;
+
+
+/**
+* @brief Ctxpopup will be dismissed and deleted when the back key event occurs
+* @param[in] data user data
+* @param[in] obj target object
+* @param[in] event_info event information
+*/
+void uib_ctxpopup_back_callback(void *data, Evas_Object *obj, void *event_info) ;
+
+void win_destroy(window_obj *win_obj);
+
+Evas_Object* get_window();
+Evas_Object* get_conformant();
+
+uib_views_st* uib_views_get_instance();
+
+/**
+ * @brief Create Item for genlist
+ * @param[in]   genlist            item container
+ * @param[in]   style              item style
+ * @param[in]   label              item label
+ * @param[in]   sub_label          item sub label
+ * @param[in]   icon_path          resource path such as location of the image
+ * @param[in]   icon_standard      standard icon name
+ * @param[in]   end_icon_path      resource path such as location of the image
+ * @param[in]   end_icon_standard  standard icon name
+ * @param[in]   parent             parent item used in tree item type
+ * @param[in]   type               item type: tree, group, none
+ * @param[in]   func               callback function to be called when item is selected
+ * @param[in]   data               data to be transferred to the callback function
+ * @returns created item
+ */
+Elm_Object_Item* create_genlist_item(Evas_Object* genlist, const char* style, const char* label, const char* sub_label, const char* icon_path, const char* icon_standard, const char* end_icon_path, const char* end_icon_standard, Elm_Object_Item* parent, Elm_Genlist_Item_Type type, Evas_Smart_Cb func, void* data);
+
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$profile='mobile' or $profile='tv'">
+                               <xsl:text><![CDATA[
+/**
+* Set the member using strdup() or malloc() because it will be deleted by free().
+*/
+typedef struct _uib_gengrid_item
+{
+char * label;
+char * icon_path;
+} uib_gengrid_item;
+
+/**
+ * @brief Create Item for multibuttonentry
+ * @param[in]   multibuttonentry     item container
+ * @param[in]   label    item label
+ * @param[in]   func     callback function to be called when item is selected
+ * @param[in]   data     data to be transferred to the callback function
+ * @returns created item
+ */
+Elm_Object_Item* create_multibuttonentry_item(Evas_Object* multibuttonentry, const char* label, Evas_Smart_Cb func, void* data);
+
+/**
+ * @brief Create Item for gengrid
+ * @param[in]   gengrid     item container
+ * @param[in]   style    item style
+ * @param[in]   label    item label
+ * @param[in]   path     resource path such as location of the image
+ * @param[in]   func     callback function to be called when item is selected
+ * @param[in]   data     data to be transferred to the callback function
+ * @returns created item
+ */
+Elm_Object_Item* create_gengrid_item(Evas_Object* gengrid, const char* style, const char* label, const char* path, Evas_Smart_Cb func, void* data);
+]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:text><![CDATA[
+]]></xsl:text>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+
+#endif /* UIB_VIEWS_H_ */
+
+]]>
+</xsl:text>
+               <!-- END : OUTPUT -->
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/inc/uib_views_inc_header.xsl b/org.tizen.efluibuilder.codegenerator/res/inc/uib_views_inc_header.xsl
new file mode 100644 (file)
index 0000000..21537ca
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:apply-templates select="//views">
+               </xsl:apply-templates>
+       </xsl:template>
+
+       <xsl:template match="views">
+
+               <xsl:text>
+/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#ifndef UIB_VIEWS_INC_H_
+#define UIB_VIEWS_INC_H_
+
+</xsl:text>
+               <xsl:for-each select="view">
+                       <xsl:value-of select="concat('#include &quot;uib_', @id, '_view.h&quot;', $newline)" />
+               </xsl:for-each>
+               <xsl:text>
+#endif /* UIB_VIEWS_INC_H_ */
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/inc/view_data_header.xsl b/org.tizen.efluibuilder.codegenerator/res/inc/view_data_header.xsl
new file mode 100644 (file)
index 0000000..60f7819
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+       <xsl:template match="/">
+               <xsl:apply-templates select="//views">
+               </xsl:apply-templates>
+       </xsl:template>
+       <xsl:template match="views">
+               <xsl:text>
+<![CDATA[
+#ifndef __VIEW_DATA_H__
+#define __VIEW_DATA_H__
+
+#include <Elementary.h>
+#include "uib_views.h"
+
+/**
+ * @brief Forward declaration of model
+ */
+typedef struct _uib_view_data {
+       Evas_Object* win;
+]]>
+</xsl:text>
+               <xsl:for-each select="view">
+                       <xsl:value-of select="concat($tab,'uib_view_context* ', @id, ';', $newline)" />
+               </xsl:for-each>
+               <xsl:text><![CDATA[} uib_view_data;
+
+static uib_view_data* view_data;
+
+uib_view_data* get_uib_view_data();
+
+#endif /* __VIEW_DATA_H__ */
+]]>
+</xsl:text>
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/background.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/background.xsl
new file mode 100644 (file)
index 0000000..0ea59c5
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+       <xsl:template match="bg">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation2">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+2" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, ' = elm_bg_add(', 'vc->' ,$parent, ');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@src) != 0">
+                       <xsl:variable name="escapedSrc">
+                               <xsl:call-template name="escapeStr">
+                                       <xsl:with-param name="str" select="@src" />
+                               </xsl:call-template>
+                       </xsl:variable>
+                       <xsl:value-of select="concat($indentation1, 'char *resource_path = NULL;', $newline)" />
+                       <xsl:choose>
+                               <xsl:when test="$is_version_rm_support='true'">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'uib_util_rm_get_resource_path(APP_RESOURCE_TYPE_IMAGE, &quot;', $escapedSrc, '&quot;, &amp;resource_path);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'uib_util_rm_get_resource_path(-1, &quot;', $escapedSrc, '&quot;, &amp;resource_path);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       <xsl:value-of select="concat($indentation1, 'elm_bg_file_set(vc->', @id, ', resource_path, NULL);', $newline)" />
+                       <xsl:value-of select="concat($indentation1, 'if(resource_path) {', $newline)" />
+                       <xsl:value-of select="concat($indentation2, 'free(resource_path);', $newline)" />
+                       <xsl:value-of select="concat($indentation1, '}', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@option) != 0">
+                       <xsl:variable name="rconv_key" select="concat('option', ':', @option)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($rconv_value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_bg_option_set(vc->', @id, ', (Elm_Bg_Option)', $rconv_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_bg_option_set(vc->', @id, ', ', @option, ');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@color) != 0">
+                       <xsl:value-of select="concat($indentation1, 'int hexValue = strtol(&quot;', @color, '&quot;+1, NULL, 16);', $newline)" />
+                       <xsl:value-of disable-output-escaping="yes" select="concat($indentation1, 'int r = (hexValue', '&amp;', '0xFF0000)', '&gt;&gt;', '16;', $newline)" />
+                       <xsl:value-of disable-output-escaping="yes" select="concat($indentation1, 'int g = (hexValue', '&amp;', '0xFF00)', '&gt;&gt;', '8;', $newline)" />
+                       <xsl:value-of disable-output-escaping="yes" select="concat($indentation1, 'int b = (hexValue', '&amp;', '0xFF);', $newline)" />
+                       <xsl:value-of select="concat($indentation1, 'elm_bg_color_set(vc->', @id, ', r, g, b);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/box.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/box.xsl
new file mode 100644 (file)
index 0000000..48e4965
--- /dev/null
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="*" mode="box.pack">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:if test="@id != ''">
+                       <xsl:value-of select="concat($indentation,'elm_box_pack_end(vc->',$parent,', vc->',@id,');')" />
+                       <xsl:value-of select="$newline" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="box">
+               <xsl:param name="parent" />
+               <xsl:param name="fromView" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="profile" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="$fromView = 'true'">
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_box_add(parent);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->root_container = vc->', @id, ';')" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:if test="string-length($fromView) = 0">
+                                       <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                                       <xsl:value-of select="concat($indentation1,'vc->', @id, ' = elm_box_add(vc->', $parent, ');', $newline)" />
+                                       <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               </xsl:if>
+                               <xsl:value-of select="$indentation" />
+                               <xsl:value-of select="concat('if(vc->', @id, ') {')" />
+                               <xsl:value-of select="$newline" />
+                               <xsl:value-of select="$indentation1" />
+                               <!-- Check efl api for component transparency -->
+                               <xsl:choose>
+                                       <xsl:when test="@transparency='true'">
+                                               <xsl:value-of select="concat('elm_win_alpha_set(vc->', @id, ', EINA_TRUE);')" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat('elm_win_alpha_set(vc->', @id, ', EINA_FALSE);')" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                               <xsl:value-of select="$newline" />
+                               <xsl:value-of select="$indentation1" />
+
+                               <xsl:choose>
+                                       <xsl:when test="@homogeneous='true'">
+                                               <xsl:value-of select="concat('elm_box_homogeneous_set(vc->', @id, ', EINA_TRUE);')" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat('elm_box_homogeneous_set(vc->', @id, ', EINA_FALSE);')" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                               <xsl:value-of select="$newline" />
+                               <xsl:value-of select="$indentation1" />
+
+                               <xsl:choose>
+                                       <xsl:when test="@direction='horizontal'">
+                                               <xsl:value-of select="concat('elm_box_horizontal_set(vc->', @id, ', EINA_TRUE);')" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat('elm_box_horizontal_set(vc->', @id, ', EINA_FALSE);')" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                               <xsl:value-of select="$newline" />
+                               <xsl:value-of select="concat($indentation1, 'elm_box_padding_set(vc->', @id, ',', @padding_h, ',', @padding_v,');', $newline)" />
+                               <xsl:call-template name="size_hint_align_set">
+                                       <xsl:with-param name="align_h" select="@align_h" />
+                                       <xsl:with-param name="align_v" select="@align_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:value-of select="$newline" />
+
+                               <xsl:call-template name="size_hint_weight_set">
+                                       <xsl:with-param name="weight_h" select="@weight_h" />
+                                       <xsl:with-param name="weight_v" select="@weight_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:value-of select="$newline" />
+
+                               <xsl:apply-templates select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                                       <xsl:with-param name="profile" select="$profile" />
+                               </xsl:apply-templates>
+
+                               <xsl:apply-templates mode="box.pack" select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                               </xsl:apply-templates>
+
+                               <xsl:if test="@disable = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:if>
+                               <xsl:apply-templates mode="visible" select="current()">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                               </xsl:apply-templates>
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/button.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/button.xsl
new file mode 100644 (file)
index 0000000..3cfdc57
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="*" mode="button.content.set">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name()='event'" />
+                       <xsl:when test="name()='icon'">
+                               <xsl:value-of select="concat($indentation, 'elm_object_part_content_set(vc->', $parent, ',', '&quot;', 'icon', '&quot;, ','vc->' ,@id, ');', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="button">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1,'vc->', @id, ' = elm_button_add(vc->', $parent, ');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+               <xsl:value-of select="concat($indentation, 'if (vc->', @id, ') {', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@text) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_text_set(vc->', @id, ',_UIB_LOCALE(', '&quot;', @text, '&quot;', '));', $newline)" />
+               </xsl:if>
+
+               <xsl:call-template name="style">
+                       <xsl:with-param name="style" select="@style" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="colors">
+                       <xsl:with-param name="colors" select="@colors" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+                       <xsl:with-param name="widgettype"/>
+               </xsl:call-template>
+
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates mode="button.content.set" select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+
+
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/calendar.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/calendar.xsl
new file mode 100644 (file)
index 0000000..9f91dd9
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="calendar">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1,'vc->', @id, ' = elm_calendar_add(vc->', $parent, ');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'if (vc->', @id, ') {', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:choose>
+                       <xsl:when test="string-length(@min_year) = 0 and string-length(@max_year) = 0 " />
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1, 'elm_calendar_min_max_year_set(vc->', @id, ', ', @min_year, ', ', @max_year, ');', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:if test="string-length(@select_mode) != 0">
+                       <xsl:variable name="rconv_key" select="concat('calendar:select_mode', ':', @select_mode)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($rconv_value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_calendar_select_mode_set(vc->', @id, ', (Elm_Calendar_Select_Mode)' ,$rconv_value,');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_calendar_select_mode_set(vc->', @id, ', ' ,@select_mode,');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:if test="string-length(@interval) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_calendar_interval_set(vc->', @id, ', ', @interval, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/check.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/check.xsl
new file mode 100644 (file)
index 0000000..770e528
--- /dev/null
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="*" mode="check.content.set">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name()='event'" />
+                       <xsl:when test="name()='icon'">
+                               <xsl:value-of select="concat($indentation, 'elm_object_part_content_set(vc->', $parent, ',', '&quot;', 'icon', '&quot;, ','vc->' ,@id, ');', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="check">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1,'vc->', @id, ' = elm_check_add(vc->', $parent, ');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@text) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_text_set(vc->', @id, ',_UIB_LOCALE(', '&quot;', @text, '&quot;', '));', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates mode="check.content.set" select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+
+               <!-- Style have to be in front of disable -->
+               <xsl:call-template name="style">
+                       <xsl:with-param name="style" select="@style" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <!-- Don't fix order. After set disable, have to set state -->
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@state) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@state = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_check_state_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_check_state_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/circledatetime.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/circledatetime.xsl
new file mode 100644 (file)
index 0000000..09a2632
--- /dev/null
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="circledatetime">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1,'vc->', @id, ' = elm_datetime_add(vc->', $parent, ');', $newline)" />
+               <xsl:value-of
+                       select="concat($indentation1, 'vc->circle_object_', @id, '= eext_circle_object_datetime_add(vc->', @id, ', uib_views_get_instance()->get_window_obj()->circle_surface);', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'eext_rotary_object_event_activated_set(vc->circle_object_', @id, ', EINA_TRUE);', $newline)" />
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:if test="string-length(@style) != 0">
+                       <xsl:call-template name="style">
+                               <xsl:with-param name="style" select="@style" />
+                               <xsl:with-param name="indentation" select="$indentation1" />
+                               <xsl:with-param name="id" select="@id" />
+                       </xsl:call-template>
+                       <xsl:choose>
+                               <xsl:when test="@style='date_layout'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y/ %I:%M %p&quot;);', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="@style='time_layout'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y/ %I:%M %p&quot;);', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="@style='time_layout_24hr'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y/ %H:%M %p&quot;);', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="@style='datepicker/circle'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y%I:%M%p&quot;);', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="@style='timepicker/circle'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y%I:%M%p&quot;);', $newline)" />
+                               </xsl:when>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:choose>
+                       <xsl:when test="string-length(@year) = 0 and string-length(@month) = 0 and string-length(@date) = 0 and string-length(@hour) = 0 and string-length(@minute) = 0">
+                       </xsl:when>
+                       <xsl:otherwise>
+
+                               <xsl:value-of select="concat($indentation1, 'time_t local_time = time(NULL);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'struct tm ', @id, ';', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'struct tm *', @id, '_info = localtime(&amp;local_time);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, @id , ' = *', @id, '_info;', $newline)" />
+                               <xsl:if test="string-length(@year) != 0">
+                                       <xsl:value-of select="concat($indentation1, @id, '.tm_year = ', @year, '-1900;', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@month) != 0">
+                                       <xsl:value-of select="concat($indentation1, @id, '.tm_mon = ', @month, '-1;', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@date) != 0">
+                                       <xsl:value-of select="concat($indentation1, @id, '.tm_mday = ', @date, ';', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@hour) != 0">
+                                       <xsl:value-of select="concat($indentation1, @id, '.tm_hour = ', @hour, ';', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@minute) != 0">
+                                       <xsl:value-of select="concat($indentation1, @id, '.tm_min = ', @minute, ';', $newline)" />
+                               </xsl:if>
+                               <xsl:value-of select="concat($indentation1, 'elm_datetime_value_set(vc->' , @id, ', &amp;' , @id, ');', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="disable">
+                       <xsl:with-param name="disable" select="@disable" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/circlegenlist.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/circlegenlist.xsl
new file mode 100644 (file)
index 0000000..86e3db8
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="circlegenlist">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1,'vc->', @id, ' = elm_genlist_add(vc->', $parent, ');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->circle_object_', @id, ') {', $newline)" />
+               <xsl:value-of
+                       select="concat($indentation1, 'vc->circle_object_', @id, '= eext_circle_object_genlist_add(vc->', @id, ', uib_views_get_instance()->get_window_obj()->circle_surface);', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'eext_rotary_object_event_activated_set(vc->circle_object_', @id, ', EINA_TRUE);', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@item_size_w) != 0 and string-length(@item_size_h) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_gengrid_item_size_set(vc->', @id, ',', @item_size_w, ',' , @item_size_h,');', $newline)" />
+               </xsl:if>
+
+               <xsl:if test="string-length(@homogeneous) != 0">
+                       <xsl:if test="@homogeneous = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_genlist_homogeneous_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:if>
+                       <xsl:if test="@homogeneous = 'false'">
+                               <xsl:value-of select="concat($indentation1, 'elm_genlist_homogeneous_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:if>
+               </xsl:if>
+
+               <xsl:if test="string-length(@select_mode) != 0"><!-- default: true -->
+                       <xsl:variable name="rconv_key" select="concat('select_mode', ':', @select_mode)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($rconv_value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_genlist_select_mode_set(vc->', @id, ', (Elm_Object_Select_Mode)' ,$rconv_value,');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_genlist_select_mode_set(vc->', @id, ', ' ,@select_mode,');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:if test="string-length(@scrollbar_h) != 0 and string-length(@scrollbar_v) != 0">
+                       <xsl:variable name="scrollbar_h_key" select="concat('scrollbar_h', ':', @scrollbar_h)" />
+                       <xsl:variable name="scrollbar_h_value" select="exslt:node-set($value_map)//entry[@key=$scrollbar_h_key]" />
+                       <xsl:variable name="scrollbar_v_key" select="concat('scrollbar_v', ':', @scrollbar_v)" />
+                       <xsl:variable name="scrollbar_v_value" select="exslt:node-set($value_map)//entry[@key=$scrollbar_v_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) !=0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) !=0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) =0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', ', @scrollbar_v, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) =0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', ', @scrollbar_v, ');', $newline)" />
+                               </xsl:when>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:value-of select="concat($indentation1, 'initialize_circle_genlist_class(' , '&#34;', @item_style, '&#34;', ');', $newline)" />
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+               </xsl:apply-templates>
+
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/circlegenlistitem.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/circlegenlistitem.xsl
new file mode 100644 (file)
index 0000000..3ec1c36
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="genlistitem">
+               <xsl:param name="parent" />
+               <xsl:param name="listParent" />
+               <xsl:param name="indentation" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:value-of
+                       select="concat($indentation, 'vc->', @id, '= create_circle_genlist_item(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;), _UIB_LOCALE(&quot;', @sub_text, '&quot;), &quot;', @image_path, '&quot;,', '&quot;', @standard_icon, '&quot;, &quot;', @end_image_path, '&quot;,', '&quot;', @end_standard_icon, '&quot;, ')" />
+               <xsl:choose>
+                       <xsl:when test="string-length($listParent) = 0">
+                               <xsl:value-of select="concat('NULL', ', ')" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat('vc->', $listParent, ', ')" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:value-of select="concat('&quot;', @item_style, '&quot;, ')" />
+               <xsl:variable name="callback">
+                       <xsl:apply-templates select="event" mode="item_event">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="view" select="./ancestor::view/@id" />
+                               <!-- Storyboard_START -->
+                               <xsl:with-param name="target" select="event/@target" />
+                               <!-- Storyboard_END -->
+                       </xsl:apply-templates>
+               </xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="string-length($callback) != 0">
+                               <xsl:value-of select="concat('(Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat( 'NULL, NULL);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="$parent" />
+                       <xsl:with-param name="listParent" select="@id" />
+                       <xsl:with-param name="indentation" select="$indentation" />
+               </xsl:apply-templates>
+               <xsl:if test="string-length(@selected) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@selected = 'true'">
+                                       <xsl:value-of select="concat($indentation, 'elm_genlist_item_selected_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation, 'elm_genlist_item_selected_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/circleprogressbar.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/circleprogressbar.xsl
new file mode 100644 (file)
index 0000000..44d3abc
--- /dev/null
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="*" mode="circleprogressbar.content.set">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name()='event'" />
+                       <xsl:when test="name()='icon'">
+                               <xsl:value-of select="concat($indentation, 'elm_object_part_content_set(vc->', $parent, ',', '&quot;', 'icon', '&quot;, ','vc->' ,@id, ');', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="circleprogressbar">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of
+                       select="concat($indentation1,'vc->', @id, ' = eext_circle_object_progressbar_add(vc->',$parent,', uib_views_get_instance()->get_window_obj()->circle_surface);', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation,'if (vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'eext_rotary_object_event_activated_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="style">
+                       <xsl:with-param name="style" select="@style" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <!-- <xsl:if test="string-length(@text) != 0"> <xsl:value-of select="concat($indentation1, 'elm_object_text_set(vc->', @id, ',_UIB_LOCALE(', '&quot;', @text, '&quot;', 
+                       '));', $newline)" /> </xsl:if> -->
+               <xsl:if test="string-length(@direction) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@direction = 'horizontal'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_horizontal_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@pulse) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@pulse = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_pulse_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_pulse_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:if test="string-length(@min) != 0 and string-length(@max) != 0">
+                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_value_min_max_set(vc->', @id, ',', @min, ',', @max, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:if test="string-length(@value) != 0">
+                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_value_set(vc->', @id, ',', @value, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:if test="string-length(@span_size) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_span_size_set(vc->', @id, ',', @span_size, ');', $newline)" />
+               </xsl:if>
+               <!-- <xsl:if test="string-length(@format) != 0"> <xsl:value-of select="concat($indentation1, 'elm_progressbar_unit_format_set(vc->', @id, ',', '&quot;', @format, 
+                       '&quot;', ');', $newline)" /> </xsl:if> -->
+               <xsl:if test="string-length(@inverted) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@inverted = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_inverted_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1,'elm_progressbar_inverted_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates mode="circleprogressbar.content.set" select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/circlescroller.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/circlescroller.xsl
new file mode 100644 (file)
index 0000000..764b0b7
--- /dev/null
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="*" mode="circlescroller.content.set">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name()='variation'" />
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation, 'elm_object_content_set(vc->', $parent,',','vc->',@id,');', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="circlescroller">
+               <xsl:param name="parent" />
+               <xsl:param name="fromView" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="$fromView = 'true'">
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1,'vc->', @id, ' = elm_scroller_add(parent);', $newline)" />
+                               <xsl:value-of
+                                       select="concat($indentation1, 'vc->circle_object_', @id, '= eext_circle_object_scroller_add(vc->', @id, ', uib_views_get_instance()->get_window_obj()->circle_surface);', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               <xsl:value-of select="concat($indentation, 'eext_rotary_object_event_activated_set(vc->circle_object_', @id, ', EINA_TRUE);', $newline)" />
+
+                               <xsl:value-of select="concat($indentation, 'vc->root_container = vc->', @id, ';', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:if test="string-length($fromView) = 0">
+                                       <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                                       <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_scroller_add(vc->',$parent,');', $newline)" />
+                                       <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               </xsl:if>
+
+                               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+                               <xsl:call-template name="size_hint_align_set">
+                                       <xsl:with-param name="align_h" select="@align_h" />
+                                       <xsl:with-param name="align_v" select="@align_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+                               <xsl:call-template name="size_hint_weight_set">
+                                       <xsl:with-param name="weight_h" select="@weight_h" />
+                                       <xsl:with-param name="weight_v" select="@weight_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+                               <xsl:param name="content_min_w">
+                                       <xsl:call-template name="eina_bool">
+                                               <xsl:with-param name="bool" select="@content_min_w" />
+                                       </xsl:call-template>
+                               </xsl:param>
+                               <xsl:param name="content_min_h">
+                                       <xsl:call-template name="eina_bool">
+                                               <xsl:with-param name="bool" select="@content_min_h" />
+                                       </xsl:call-template>
+                               </xsl:param>
+                               <xsl:value-of select="concat($indentation1, 'elm_scroller_content_min_limit(vc->', @id, ', ', $content_min_w, ', ', $content_min_h , '); ', $newline)" />
+
+                               <xsl:if test="string-length(@scrollbar_h) != 0 and string-length(@scrollbar_v) != 0">
+                                       <xsl:variable name="scrollbar_h_key" select="concat('scrollbar_h', ':', @scrollbar_h)" />
+                                       <xsl:variable name="scrollbar_h_value" select="exslt:node-set($value_map)//entry[@key=$scrollbar_h_key]" />
+                                       <xsl:variable name="scrollbar_v_key" select="concat('scrollbar_v', ':', @scrollbar_v)" />
+                                       <xsl:variable name="scrollbar_v_value" select="exslt:node-set($value_map)//entry[@key=$scrollbar_v_key]" />
+                                       <xsl:choose>
+                                               <xsl:when test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) !=0">
+                                                       <xsl:value-of
+                                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                                               </xsl:when>
+                                               <xsl:when test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) !=0">
+                                                       <xsl:value-of
+                                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                                               </xsl:when>
+                                               <xsl:when test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) =0">
+                                                       <xsl:value-of
+                                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', ', @scrollbar_v, ');', $newline)" />
+                                               </xsl:when>
+                                               <xsl:when test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) =0">
+                                                       <xsl:value-of select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', ', @scrollbar_v, ');', $newline)" />
+                                               </xsl:when>
+                                       </xsl:choose>
+                               </xsl:if>
+
+                               <xsl:if test="string-length(@single_direction) != 0">
+                                       <xsl:choose>
+                                               <xsl:when test="string(number(@single_direction)) = 'NaN'">
+                                                       <xsl:value-of select="concat($indentation1, 'elm_scroller_single_direction_set(vc->', @id, ', ', @single_direction, ');', $newline)" />
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:value-of
+                                                               select="concat($indentation1, 'elm_scroller_single_direction_set(vc->', @id, ', (Elm_Scroller_Single_Direction)', @single_direction, ');', $newline)" />
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:if>
+
+                               <xsl:if test="string-length(@propagate_events) != 0">
+                                       <xsl:if test="@propagate_events = 'true'">
+                                               <xsl:value-of select="concat($indentation1, 'elm_scroller_propagate_events_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                                       </xsl:if>
+                                       <xsl:if test="@horizontal = 'false'">
+                                               <xsl:value-of select="concat($indentation1, 'elm_gengrid_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                                       </xsl:if>
+                               </xsl:if>
+
+                               <xsl:apply-templates select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                               </xsl:apply-templates>
+                               <xsl:apply-templates mode="circlescroller.content.set" select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                               </xsl:apply-templates>
+                               <xsl:apply-templates mode="visible" select="current()">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                               </xsl:apply-templates>
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/circleslider.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/circleslider.xsl
new file mode 100644 (file)
index 0000000..d132649
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="circleslider">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of
+                       select="concat($indentation1, 'vc->', @id, ' = eext_circle_object_slider_add(vc->',$parent,', uib_views_get_instance()->get_window_obj()->circle_surface);', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'eext_rotary_object_event_activated_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               <xsl:if test="string-length(@unit_format) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_slider_unit_format_set(vc->', @id, ',', '&quot;', @unit_format, '&quot;', ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@indicator_format) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_slider_indicator_format_set(vc->', @id, ',', '&quot;', @indicator_format, '&quot;', ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@span_size) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_slider_span_size_set(vc->', @id, ',', @span_size, ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="@direction = 'vertical'">
+                       <xsl:value-of select="concat($indentation1, 'elm_slider_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+               </xsl:if>
+
+               <xsl:call-template name="style">
+                       <xsl:with-param name="style" select="@style" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@min) != 0 and string-length(@max) != 0">
+                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_value_min_max_set(vc->', @id, ',', @min, ',', @max, ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@value) != 0">
+                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_value_set(vc->', @id, ',', @value, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:if test="@inverted = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_slider_inverted_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+
+               <xsl:if test="string-length(@step) != 0">
+                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_slider_step_set(vc->', @id, ',', @step, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:if test="@show-indicator = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_slider_indicator_show_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+
+
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/colorselector.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/colorselector.xsl
new file mode 100644 (file)
index 0000000..90a14f8
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="colorselector">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_colorselector_add(vc->',$parent,');')" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+               <xsl:value-of select="$newline" />
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@mode) != 0">
+                       <xsl:choose>
+                               <xsl:when test="string(number(@mode)) = 'NaN'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_colorselector_mode_set(vc->', @id, ', ', @mode, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_colorselector_mode_set(vc->', @id, ', (Elm_Colorselector_Mode)', @mode, ');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/ctxpopup.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/ctxpopup.xsl
new file mode 100644 (file)
index 0000000..0499f20
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:template match="ctxpopup" mode="ctxpopup.callback">
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'eext_object_event_callback_add(vc->', @id, ', EEXT_CALLBACK_BACK, uib_ctxpopup_back_callback, NULL);', $newline)" />
+       </xsl:template>
+
+       <xsl:template match="ctxpopup">
+               <xsl:param name="parent" />
+               <xsl:param name="fromView" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:choose>
+                       <xsl:when test="$fromView = 'true'">
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_ctxpopup_add(parent);', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               <xsl:value-of select="concat($indentation, 'vc->root_container = vc->', @id, ';', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:if test="string-length($fromView) = 0">
+                                       <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                                       <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_ctxpopup_add(parent);', $newline)" />
+                                       <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               </xsl:if>
+
+                               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+                               <xsl:call-template name="style">
+                                       <xsl:with-param name="style" select="@style" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+
+                               <xsl:if test="string-length(@direction) != 0">
+                                       <xsl:choose>
+                                               <xsl:when test="@direction='horizontal'">
+                                                       <xsl:value-of select="concat($indentation1, 'elm_ctxpopup_horizontal_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:value-of select="concat($indentation1, 'elm_ctxpopup_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:if>
+
+                               <xsl:apply-templates select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                               </xsl:apply-templates>
+
+                               <xsl:call-template name="size_hint_align_set">
+                                       <xsl:with-param name="align_h" select="@align_h" />
+                                       <xsl:with-param name="align_v" select="@align_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:value-of select="$newline" />
+
+                               <xsl:call-template name="size_hint_weight_set">
+                                       <xsl:with-param name="weight_h" select="@weight_h" />
+                                       <xsl:with-param name="weight_v" select="@weight_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:value-of select="$newline" />
+
+                               <xsl:call-template name="disable">
+                                       <xsl:with-param name="disable" select="@disable" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+                               <xsl:value-of
+                                       select="concat($indentation1, 'elm_ctxpopup_direction_priority_set(vc->', @id, ', ELM_CTXPOPUP_DIRECTION_DOWN, ELM_CTXPOPUP_DIRECTION_UP, ELM_CTXPOPUP_DIRECTION_LEFT, ELM_CTXPOPUP_DIRECTION_RIGHT);', $newline)" />
+
+                               <xsl:apply-templates mode="visible" select="current()">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                               </xsl:apply-templates>
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/ctxpopupitem.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/ctxpopupitem.xsl
new file mode 100644 (file)
index 0000000..2a8852a
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:template match="ctxpopupitem">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="indentation" select="$indentation" />
+                       <xsl:with-param name="parent" select="$parent" />
+               </xsl:apply-templates>
+
+               <xsl:variable name="callback">
+                       <xsl:apply-templates select="event" mode="item_event">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="view" select="./ancestor::view/@id" />
+                               <!-- Storyboard_START -->
+                               <xsl:with-param name="target" select="event/@target" />
+                               <!-- Storyboard_END -->
+                       </xsl:apply-templates>
+               </xsl:variable>
+               <xsl:variable name="icon">
+                       <xsl:apply-templates select="icon" mode="listitem_icon">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="view" select="./ancestor::view/@id" />
+                       </xsl:apply-templates>
+               </xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="string-length($callback) != 0 and string-length($icon) != 0">
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_ctxpopup_item_append(vc->', $parent, ', _UIB_LOCALE( &quot;', @label, '&quot;), ', $icon , ', (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_ctxpopup_item_append(vc->', $parent, ', _UIB_LOCALE( &quot;', @text, '&quot;), ', $icon , ', (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:when>
+                       <xsl:when test="string-length($callback) = 0 and string-length($icon) != 0">
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_ctxpopup_item_append(vc->', $parent, ', _UIB_LOCALE( &quot;', @label, '&quot;), ', $icon , ', NULL, NULL);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_ctxpopup_item_append(vc->', $parent, ', _UIB_LOCALE( &quot;', @text, '&quot;), ', $icon , ', NULL, NULL);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:when>
+                       <xsl:when test="string-length($callback) != 0 and string-length($icon) = 0">
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_ctxpopup_item_append(vc->', $parent, ', _UIB_LOCALE( &quot;', @label, '&quot;), ', 'NULL, (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_ctxpopup_item_append(vc->', $parent, ', _UIB_LOCALE( &quot;', @text, '&quot;), ', 'NULL, (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_ctxpopup_item_append(vc->', $parent, ', _UIB_LOCALE( &quot;', @label, '&quot;), ', 'NULL, NULL, NULL);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_ctxpopup_item_append(vc->', $parent, ', _UIB_LOCALE( &quot;', @text, '&quot;), ', 'NULL, NULL, NULL);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:otherwise>
+               </xsl:choose>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/datetime.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/datetime.xsl
new file mode 100644 (file)
index 0000000..a2b2c4e
--- /dev/null
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="datetime">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="profile" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_datetime_add(vc->',$parent,');', $newline)" />
+
+               <xsl:if test="$profile='wearable-circle'">
+                       <xsl:value-of
+                               select="concat($indentation1, 'vc->circle_object_', @id, '= eext_circle_object_datetime_add(vc->', @id, ', uib_views_get_instance()->get_window_obj()->circle_surface);', $newline)" />
+                       <xsl:value-of select="concat($indentation1, 'eext_rotary_object_event_activated_set(vc->circle_object_', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:if test="string-length(@style) != 0">
+                       <xsl:call-template name="style">
+                               <xsl:with-param name="style" select="@style" />
+                               <xsl:with-param name="indentation" select="$indentation1" />
+                               <xsl:with-param name="id" select="@id" />
+                       </xsl:call-template>
+                       <xsl:call-template name="colors">
+                               <xsl:with-param name="colors" select="@colors" />
+                               <xsl:with-param name="indentation" select="$indentation1" />
+                               <xsl:with-param name="id" select="@id" />
+                               <xsl:with-param name="widgettype" />
+                       </xsl:call-template>
+                       <xsl:choose>
+                               <xsl:when test="@style='default' or @style='date_layout'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y&quot;);', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="@style='time_layout'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y %I:%M %p&quot;);', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="@style='time_layout_24hr'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y %H:%M %p&quot;);', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="@style='datepicker/circle'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y%I:%M%p&quot;);', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="@style='timepicker/circle'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y%I:%M%p&quot;);', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="@style='datepicker_layout'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y%I:%M%p&quot;);', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="@style='timepicker_layout'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_datetime_format_set(vc->', @id, ',&quot;%d/%b/%Y%I:%M%p&quot;);', $newline)" />
+                               </xsl:when>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:choose>
+                       <xsl:when test="string-length(@year) = 0 and string-length(@month) = 0 and string-length(@date) = 0 and string-length(@hour) = 0 and string-length(@minute) = 0">
+                       </xsl:when>
+                       <xsl:otherwise>
+
+                               <xsl:value-of select="concat($indentation1, 'time_t local_time = time(NULL);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'struct tm ', @id, ';', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'struct tm *', @id, '_info = localtime(&amp;local_time);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, @id , ' = *', @id, '_info;', $newline)" />
+                               <xsl:if test="string-length(@year) != 0">
+                                       <xsl:value-of select="concat($indentation1, @id, '.tm_year = ', @year, '-1900;', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@month) != 0">
+                                       <xsl:value-of select="concat($indentation1, @id, '.tm_mon = ', @month, '-1;', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@date) != 0">
+                                       <xsl:value-of select="concat($indentation1, @id, '.tm_mday = ', @date, ';', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@hour) != 0">
+                                       <xsl:value-of select="concat($indentation1, @id, '.tm_hour = ', @hour, ';', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@minute) != 0">
+                                       <xsl:value-of select="concat($indentation1, @id, '.tm_min = ', @minute, ';', $newline)" />
+                               </xsl:if>
+                               <xsl:value-of select="concat($indentation1, 'elm_datetime_value_set(vc->' , @id, ', &amp;' , @id, ');', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="disable">
+                       <xsl:with-param name="disable" select="@disable" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/entry.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/entry.xsl
new file mode 100644 (file)
index 0000000..c8bc7a3
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+       <xsl:template match="entry">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation2">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+2" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_entry_add(vc->',$parent,');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+               <xsl:if test="string-length(@text) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_text_set(vc->', @id, ',_UIB_LOCALE(', '&quot;', @text, '&quot;', '));', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@single_line) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@single_line = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_entry_single_line_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_entry_single_line_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@password) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@password = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_entry_password_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_entry_password_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@editable) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@editable = 'false'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_entry_editable_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_entry_editable_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@context_menu) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@context_menu = 'false'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_entry_context_menu_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_entry_context_menu_disabled_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@scroll) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@scroll = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_entry_scrollable_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_entry_scrollable_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@src) != 0">
+                       <xsl:variable name="escapedSrc">
+                               <xsl:call-template name="escapeStr">
+                                       <xsl:with-param name="str" select="@src" />
+                               </xsl:call-template>
+                       </xsl:variable>
+                       <xsl:value-of select="concat($indentation1, 'char *resource_path = NULL;', $newline)" />
+                       <xsl:choose>
+                               <xsl:when test="$is_version_rm_support='true'">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'uib_util_rm_get_resource_path(APP_RESOURCE_TYPE_IMAGE, &quot;', $escapedSrc, '&quot;, &amp;resource_path);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'uib_util_rm_get_resource_path(-1, &quot;', $escapedSrc, '&quot;, &amp;resource_path);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       <xsl:choose>
+                               <xsl:when test="string-length(@file_text_format) != 0">
+                                       <xsl:variable name="rconv_key" select="concat('file_text_format', ':', @file_text_format)" />
+                                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                                       <xsl:choose>
+                                               <xsl:when test="string-length($rconv_value) != 0">
+                                                       <xsl:value-of select="concat($indentation1, 'elm_entry_file_set(vc->', @id, ', resource_path, (Elm_Text_Format)', $rconv_value, ');', $newline)" />
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:value-of select="concat($indentation1, 'elm_entry_file_set(vc->', @id, ', resource_path, @file_text_format);', $newline)" />
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_entry_file_set(vc->', @id, ', resource_path, ELM_TEXT_FORMAT_PLAIN_UTF8);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       <xsl:value-of select="concat($indentation1, 'if(resource_path) {', $newline)" />
+                       <xsl:value-of select="concat($indentation2, 'free(resource_path);', $newline)" />
+                       <xsl:value-of select="concat($indentation1, '}', $newline)" />
+                       <xsl:if test="string-length(@autosave) != 0">
+                               <xsl:choose>
+                                       <xsl:when test="@autosave = 'true'">
+                                               <xsl:value-of select="concat($indentation1, 'elm_entry_autosave_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat($indentation1, 'elm_entry_autosave_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:if>
+               </xsl:if>
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="disable">
+                       <xsl:with-param name="disable" select="@disable" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/flipselector.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/flipselector.xsl
new file mode 100644 (file)
index 0000000..31d4dd1
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:template match="flipselector">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_flipselector_add(vc->',$parent,');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="disable">
+                       <xsl:with-param name="disable" select="@disable" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/flipselectoritem.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/flipselectoritem.xsl
new file mode 100644 (file)
index 0000000..728794f
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:template match="flipselectoritem">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="indentation" select="$indentation" />
+                       <xsl:with-param name="parent" select="$parent" />
+               </xsl:apply-templates>
+               <xsl:choose>
+                       <xsl:when test="@label">
+                               <xsl:value-of
+                                       select="concat($indentation, 'vc->', @id, ' = elm_flipselector_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @label, '&quot;), ', 'NULL, NULL);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of
+                                       select="concat($indentation, 'vc->', @id, ' = elm_flipselector_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;), ', 'NULL, NULL);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:if test="string-length(@selected) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@selected = 'true'">
+                                       <xsl:value-of select="concat($indentation, 'elm_list_item_selected_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation, 'elm_list_item_selected_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/gengrid.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/gengrid.xsl
new file mode 100644 (file)
index 0000000..296837c
--- /dev/null
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+       <xsl:template match="gengrid">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_gengrid_add(vc->',$parent,');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@item_size_w) != 0 and string-length(@item_size_h) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_gengrid_item_size_set(vc->', @id, ',', @item_size_w, ',' , @item_size_h,');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@direction) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@direction='horizontal'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_gengrid_horizontal_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_gengrid_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@multi_select) != 0"><!-- default: true -->
+                       <xsl:if test="@multi_select = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_gengrid_multi_select_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:if>
+                       <xsl:if test="@multi_select = 'false'">
+                               <xsl:value-of select="concat($indentation1, 'elm_gengrid_multi_select_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:if>
+               </xsl:if>
+
+               <xsl:if test="string-length(@select_mode) != 0">
+                       <xsl:variable name="rconv_key" select="concat('select_mode', ':', @select_mode)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($rconv_value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_gengrid_select_mode_set(vc->', @id, ', (Elm_Object_Select_Mode)' ,$rconv_value,');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_genlist_select_mode_set(vc->', @id, ', ' ,@select_mode,');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:if test="string-length(@scrollbar_h) != 0 and string-length(@scrollbar_v) != 0">
+                       <xsl:variable name="scrollbar_h_key" select="concat('scrollbar_h', ':', @scrollbar_h)" />
+                       <xsl:variable name="scrollbar_h_value" select="exslt:node-set($value_map)//entry[@key=$scrollbar_h_key]" />
+                       <xsl:variable name="scrollbar_v_key" select="concat('scrollbar_v', ':', @scrollbar_v)" />
+                       <xsl:variable name="scrollbar_v_value" select="exslt:node-set($value_map)//entry[@key=$scrollbar_v_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) !=0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) !=0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) =0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', ', @scrollbar_v, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) =0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', ', @scrollbar_v, ');', $newline)" />
+                               </xsl:when>
+                       </xsl:choose>
+               </xsl:if>
+
+               <!-- TODO remove comments after check api -->
+               <!-- <xsl:if test="string-length(@scroll_loop) != 0"> <xsl:if test="@scroll_loop = 'true'"> <xsl:value-of select="concat($indentation1, 'elm_object_scroll_item_loop_enabled_set(vc->', 
+                       @id, ', EINA_TRUE);', $newline)" /> </xsl:if> <xsl:if test="@scroll_loop = 'false'"> <xsl:value-of select="concat($indentation1, 'elm_object_scroll_item_loop_enabled_set(vc->', 
+                       @id, ', EINA_FALSE);', $newline)" /> </xsl:if> </xsl:if> -->
+
+               <xsl:if test="string-length(@style) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_style_set(vc->' , @id, ',', '&#34;', @style, '&#34;', ');', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+               </xsl:apply-templates>
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/gengriditem.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/gengriditem.xsl
new file mode 100644 (file)
index 0000000..e642593
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+       <xsl:template match="gengriditem">
+               <xsl:param name="parent" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:variable name="escapedSrc">
+                       <xsl:call-template name="escapeStr">
+                               <xsl:with-param name="str" select="@src" />
+                       </xsl:call-template>
+               </xsl:variable>
+               <xsl:value-of
+                       select="concat($indentation, 'vc->', @id, '= create_gengrid_item(vc->', $parent, ', &quot;', @style, '&quot;', ', _UIB_LOCALE(&quot;', @text, '&quot;), ','&#34;', $escapedSrc, '&#34;,' )" />
+
+               <xsl:variable name="callback">
+                       <xsl:apply-templates select="event" mode="item_event">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="view" select="./ancestor::view/@id" />
+                               <!-- Storyboard_START -->
+                               <xsl:with-param name="target" select="event/@target" />
+                               <!-- Storyboard_END -->
+                       </xsl:apply-templates>
+               </xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="string-length($callback) != 0">
+                               <xsl:value-of select="concat(' (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat( ' NULL, NULL);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:call-template name="colors">
+                       <xsl:with-param name="colors" select="@colors" />
+                       <xsl:with-param name="indentation" select="$indentation" />
+                       <xsl:with-param name="id" select="@id" />
+                       <xsl:with-param name="widgettype" select="'widgetitem'" />
+               </xsl:call-template>
+               <!-- selection check -->
+               <xsl:if test="string-length(@selected) != 0"><!-- default: true -->
+                       <xsl:if test="@selected = 'true'">
+                               <xsl:value-of select="concat($indentation, 'elm_gengrid_item_selected_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:if>
+               </xsl:if>
+               <!-- disability check -->
+               <xsl:if test="string-length(@disabled) != 0"><!-- default: true -->
+                       <xsl:if test="@disabled = 'true'">
+                               <xsl:value-of select="concat($indentation, 'elm_object_item_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:if>
+               </xsl:if>
+               <xsl:if test="string-length(@align) != 0">
+                       <xsl:variable name="rconv_key" select="concat('gengrid:align', ':', @align)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:if test="string-length($rconv_value) != 0">
+                               <xsl:value-of select="concat($indentation, 'elm_gengrid_item_show(vc->', @id, ', ', $rconv_value, ');', $newline)" />
+                       </xsl:if>
+               </xsl:if>
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/genlist.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/genlist.xsl
new file mode 100644 (file)
index 0000000..6eed5bd
--- /dev/null
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="genlist">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_genlist_add(vc->',$parent,');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:if test="$profile='wearable-circle'">
+                       <xsl:value-of select="concat($indentation, 'if (!vc->circle_object_', @id, ') {', $newline)" />
+                       <xsl:value-of
+                               select="concat($indentation1, 'vc->circle_object_', @id, '= eext_circle_object_genlist_add(vc->', @id, ', uib_views_get_instance()->get_window_obj()->circle_surface);', $newline)" />
+                       <xsl:value-of select="concat($indentation1, 'eext_rotary_object_event_activated_set(vc->circle_object_', @id, ', EINA_TRUE);', $newline)" />
+                       <xsl:value-of select="concat($indentation,'}', $newline)" />
+               </xsl:if>
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@homogeneous) != 0">
+                       <xsl:if test="@homogeneous = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_genlist_homogeneous_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:if>
+                       <xsl:if test="@homogeneous = 'false'">
+                               <xsl:value-of select="concat($indentation1, 'elm_genlist_homogeneous_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:if>
+               </xsl:if>
+
+               <xsl:if test="string-length(@select_mode) != 0"><!-- default: true -->
+                       <xsl:variable name="rconv_key" select="concat('select_mode', ':', @select_mode)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($rconv_value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_genlist_select_mode_set(vc->', @id, ', (Elm_Object_Select_Mode)' ,$rconv_value,');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_genlist_select_mode_set(vc->', @id, ', ' ,@select_mode,');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:if test="string-length(@scrollbar_h) != 0 and string-length(@scrollbar_v) != 0">
+                       <xsl:variable name="scrollbar_h_key" select="concat('scrollbar_h', ':', @scrollbar_h)" />
+                       <xsl:variable name="scrollbar_h_value" select="exslt:node-set($value_map)//entry[@key=$scrollbar_h_key]" />
+                       <xsl:variable name="scrollbar_v_key" select="concat('scrollbar_v', ':', @scrollbar_v)" />
+                       <xsl:variable name="scrollbar_v_value" select="exslt:node-set($value_map)//entry[@key=$scrollbar_v_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) !=0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) !=0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) =0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', ', @scrollbar_v, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) =0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', ', @scrollbar_v, ');', $newline)" />
+                               </xsl:when>
+                       </xsl:choose>
+               </xsl:if>
+
+               <!-- TODO remove comments after check api -->
+               <!-- <xsl:if test="string-length(@scroll_loop) != 0"> <xsl:if test="@scroll_loop = 'true'"> <xsl:value-of select="concat($indentation1, 'elm_object_scroll_item_loop_enabled_set(vc->', 
+                       @id, ', EINA_TRUE);', $newline)" /> </xsl:if> <xsl:if test="@scroll_loop = 'false'"> <xsl:value-of select="concat($indentation1, 'elm_object_scroll_item_loop_enabled_set(vc->', 
+                       @id, ', EINA_FALSE);', $newline)" /> </xsl:if> </xsl:if> -->
+
+               <xsl:if test="string-length(@style) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_style_set(vc->' , @id, ',', '&#34;', @style, '&#34;', ');', $newline)" />
+               </xsl:if>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                       <xsl:with-param name="profile" select="$profile" />
+               </xsl:apply-templates>
+
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/genlistitem.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/genlistitem.xsl
new file mode 100644 (file)
index 0000000..fef19d5
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="genlistitem">
+               <xsl:param name="parent" />
+               <xsl:param name="listParent" />
+               <xsl:param name="indentation" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="profile" />
+
+               <xsl:value-of
+                       select="concat($indentation, 'vc->', @id, '= create_genlist_item(vc->', $parent, ', &quot;', @style, '&quot; , _UIB_LOCALE(&quot;', @text, '&quot;), _UIB_LOCALE(&quot;', @sub_text, '&quot;), &quot;', @image_path, '&quot;,', '&quot;', @standard_icon, '&quot;, &quot;', @end_image_path, '&quot;,', '&quot;', @end_standard_icon, '&quot;, ')" />
+
+               <xsl:choose>
+                       <xsl:when test="string-length($listParent) = 0">
+                               <xsl:value-of select="concat('NULL', ', ')" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat('vc->', $listParent, ', ')" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               
+               <xsl:value-of select="concat('ELM_GENLIST_ITEM_NONE, ')" />
+
+
+               <xsl:variable name="callback">
+                       <xsl:apply-templates select="event" mode="item_event">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="view" select="./ancestor::view/@id" />
+                               <!-- Storyboard_START -->
+                               <xsl:with-param name="target" select="event/@target" />
+                               <!-- Storyboard_END -->
+                       </xsl:apply-templates>
+               </xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="string-length($callback) != 0">
+                               <xsl:value-of select="concat('(Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat( 'NULL, NULL);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="$parent" />
+                       <xsl:with-param name="listParent" select="@id" />
+                       <xsl:with-param name="indentation" select="$indentation" />
+               </xsl:apply-templates>
+               <xsl:call-template name="colors">
+                       <xsl:with-param name="colors" select="@colors" />
+                       <xsl:with-param name="indentation" select="$indentation" />
+                       <xsl:with-param name="id" select="@id" />
+                       <xsl:with-param name="widgettype" select="'widgetitem'" />
+               </xsl:call-template>
+               <xsl:if test="string-length(@selected) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@selected = 'true'">
+                                       <xsl:value-of select="concat($indentation, 'elm_genlist_item_selected_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation, 'elm_genlist_item_selected_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@align) != 0">
+                       <xsl:variable name="rconv_key" select="concat('genlist:align', ':', @align)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:if test="string-length($rconv_value) != 0">
+                               <xsl:value-of select="concat($indentation, 'elm_genlist_item_show(vc->', @id, ', ', $rconv_value, ');', $newline)" />
+                       </xsl:if>
+               </xsl:if>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/grid.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/grid.xsl
new file mode 100644 (file)
index 0000000..ece4079
--- /dev/null
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="grid">
+               <xsl:param name="parent" />
+               <xsl:param name="fromView" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="profile" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:choose>
+                       <xsl:when test="$fromView = 'true'">
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_grid_add(parent);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->root_container = vc->', @id, ';', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:if test="string-length($fromView) = 0">
+                                       <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                                       <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_grid_add(vc->', $parent,');', $newline)" />
+                                       <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               </xsl:if>
+
+                               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'elm_grid_clear(vc->', @id, ', EINA_FALSE);', $newline)" />
+
+                               <xsl:call-template name="size_hint_align_set">
+                                       <xsl:with-param name="align_h" select="@align_h" />
+                                       <xsl:with-param name="align_v" select="@align_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+                               <xsl:call-template name="size_hint_weight_set">
+                                       <xsl:with-param name="weight_h" select="@weight_h" />
+                                       <xsl:with-param name="weight_v" select="@weight_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+                               <xsl:choose>
+                                       <xsl:when test="string-length(@vsize_w) != 0 and string-length(@vsize_h) != 0">
+                                               <xsl:value-of select="concat($indentation1, 'elm_grid_size_set(vc->', @id, ', ', @vsize_w, ', ', @vsize_h, ');', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat($indentation1, 'elm_grid_size_set(vc->', @id, ', ', '480', ', ', '800', ');', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+
+                               <xsl:apply-templates select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                                       <xsl:with-param name="profile" select="$profile" />
+                               </xsl:apply-templates>
+
+                               <xsl:apply-templates mode="grid_pack" select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                               </xsl:apply-templates>
+
+                               <xsl:if test="@disable = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:if>
+                               <xsl:apply-templates mode="visible" select="current()">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                               </xsl:apply-templates>
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="*" mode="grid_pack">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:variable name="widget_id" select="@id" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name()='variation'" />
+                       <xsl:otherwise>
+                               <xsl:choose>
+                                       <xsl:when test="count(./variation[@config_ref=$view_configuration_id]) > 0">
+                                               <xsl:for-each select="./variation[@config_ref=$view_configuration_id]">
+                                                       <xsl:value-of
+                                                               select="concat($indentation, 'elm_grid_pack(vc->', $parent, ', vc->', $widget_id, ', ', @pack_x, ', ', @pack_y, ', ', @pack_w, ', ', @pack_h, ');',                                     '&#xD;'
+                                                                               )" />
+                                               </xsl:for-each>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'elm_grid_pack(vc->', $parent, ', vc->', $widget_id, ', ', @pack_x, ', ', @pack_y, ', ', @pack_w, ', ', @pack_h, ');',                                     '&#xD;'
+                                                               )" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/hoversel.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/hoversel.xsl
new file mode 100644 (file)
index 0000000..689fb75
--- /dev/null
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="hoversel">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_hoversel_add(vc->',$parent,');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'Evas_Object *win = elm_object_top_widget_get(vc->',$parent,');',$newline)"/>
+               <xsl:value-of select="concat($indentation1,'elm_hoversel_hover_parent_set(vc->',@id,',win);',$newline)"/>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+               </xsl:apply-templates>
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@text) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_text_set(vc->', @id, ',_UIB_LOCALE(', '&quot;', @text, '&quot;', '));', $newline)" />
+               </xsl:if>
+
+               <xsl:call-template name="disable">
+                       <xsl:with-param name="disable" select="@disable" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/hoverselitem.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/hoverselitem.xsl
new file mode 100644 (file)
index 0000000..a304704
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+       <xsl:template match="hoverselitem">
+               <xsl:param name="parent" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level"
+                       select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:variable name="callback">
+                       <xsl:apply-templates select="event" mode="item_event">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="view" select="./ancestor::view/@id" />
+                               <!-- Storyboard_START -->
+                               <xsl:with-param name="target" select="event/@target" />
+                               <!-- Storyboard_END -->
+                       </xsl:apply-templates>
+               </xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="string-length($callback) != 0">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, '= elm_hoversel_item_add(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;)',', NULL, ELM_ICON_NONE, (Evas_Smart_Cb)', $callback, ', NULL);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, '= elm_hoversel_item_add(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;)',', NULL, ELM_ICON_NONE, NULL, NULL);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/icon.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/icon.xsl
new file mode 100644 (file)
index 0000000..b2bce2a
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:template match="icon">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation2">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+2" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, ' = elm_icon_add(','vc->' ,$parent, ');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+               <xsl:if test="string-length(@image-path) != 0">
+                       <xsl:variable name="escapedSrc">
+                               <xsl:call-template name="escapeStr">
+                                       <xsl:with-param name="str" select="@image-path" />
+                               </xsl:call-template>
+                       </xsl:variable>
+                       <xsl:value-of select="concat($indentation1, 'char *resource_path = NULL;', $newline)" />
+                       <xsl:choose>
+                               <xsl:when test="$is_version_rm_support='true'">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'uib_util_rm_get_resource_path(APP_RESOURCE_TYPE_IMAGE, &quot;', $escapedSrc, '&quot;, &amp;resource_path);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'uib_util_rm_get_resource_path(-1, &quot;', $escapedSrc, '&quot;, &amp;resource_path);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       <xsl:value-of select="concat($indentation1, 'elm_image_file_set(vc->', @id, ', resource_path, NULL);', $newline)" />
+                       <xsl:value-of select="concat($indentation1, 'if(resource_path) {', $newline)" />
+                       <xsl:value-of select="concat($indentation2, 'free(resource_path);', $newline)" />
+                       <xsl:value-of select="concat($indentation1, '}', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@standard) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_icon_standard_set(vc->', @id, ',', '&quot;', @standard, '&quot;', ');', $newline)" />
+                       <xsl:if test="string-length(@order-lookup) != 0">
+                               <xsl:choose>
+                                       <xsl:when test="string(number(@order-lookup))='NaN'">
+                                               <xsl:value-of select="concat($indentation1, 'elm_icon_order_lookup_set(vc->', @id, ', ', @order-lookup, ');', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat($indentation1, 'elm_icon_order_lookup_set(vc->', @id, ', (Elm_Icon_Lookup_Order)', @order-lookup, ');', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:if>
+               </xsl:if>
+
+               <xsl:choose>
+                       <xsl:when test="name(parent::node())='listitem'">
+                               <xsl:value-of select="concat($indentation1, 'evas_object_size_hint_aspect_set(vc->', @id, ', EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:call-template name="size_hint_align_set">
+                                       <xsl:with-param name="align_h" select="@align_h" />
+                                       <xsl:with-param name="align_v" select="@align_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:value-of select="$newline" />
+
+                               <xsl:call-template name="size_hint_weight_set">
+                                       <xsl:with-param name="weight_h" select="@weight_h" />
+                                       <xsl:with-param name="weight_v" select="@weight_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:value-of select="$newline" />
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+
+       <xsl:template match="icon" mode="listitem_icon">
+               <xsl:value-of select="concat('vc->', @id)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/image.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/image.xsl
new file mode 100644 (file)
index 0000000..0207d3b
--- /dev/null
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="image">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation2">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+2" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, ' = elm_image_add(','vc->' ,$parent, ');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+               <xsl:if test="string-length(@src) != 0">
+                       <xsl:variable name="escapedSrc">
+                               <xsl:call-template name="escapeStr">
+                                       <xsl:with-param name="str" select="@src" />
+                               </xsl:call-template>
+                       </xsl:variable>
+                       <xsl:value-of select="concat($indentation1, 'char *resource_path = NULL;', $newline)" />
+                       <xsl:choose>
+                               <xsl:when test="$is_version_rm_support='true'">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'uib_util_rm_get_resource_path(APP_RESOURCE_TYPE_IMAGE, &quot;', $escapedSrc, '&quot;, &amp;resource_path);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'uib_util_rm_get_resource_path(-1, &quot;', $escapedSrc, '&quot;, &amp;resource_path);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       <xsl:value-of select="concat($indentation1, 'elm_image_file_set(vc->', @id, ', resource_path, NULL);', $newline)" />
+                       <xsl:value-of select="concat($indentation1, 'if(resource_path) {', $newline)" />
+                       <xsl:value-of select="concat($indentation2, 'free(resource_path);', $newline)" />
+                       <xsl:value-of select="concat($indentation1, '}', $newline)" />
+               </xsl:if>
+               <xsl:choose>
+                       <xsl:when test="@smooth = 'false'">
+                               <xsl:value-of select="concat($indentation1, 'elm_image_smooth_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1, 'elm_image_smooth_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:choose>
+                       <xsl:when test="@no_scale = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_image_no_scale_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1, 'elm_image_no_scale_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:choose>
+                       <xsl:when test="@resizable_up = 'true' and @resizable-down = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_image_resizable_set(vc->', @id, ', EINA_TRUE, EINA_TRUE);', $newline)" />
+                       </xsl:when>
+                       <xsl:when test="@resizable_up = 'true' and @resizable-down = 'false'">
+                               <xsl:value-of select="concat($indentation1, 'elm_image_resizable_set(vc->', @id, ', EINA_TRUE, EINA_FALSE);', $newline)" />
+                       </xsl:when>
+                       <xsl:when test="@resizable_up = 'false' and @resizable-down = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_image_resizable_set(vc->', @id, ', EINA_FALSE, EINA_TRUE);', $newline)" />
+                       </xsl:when>
+                       <xsl:when test="@resizable_up = 'false' and @resizable-down = 'false'">
+                               <xsl:value-of select="concat($indentation1, 'elm_image_resizable_set(vc->', @id, ', EINA_FALSE, EINA_FALSE);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1, 'elm_image_resizable_set(vc->', @id, ', EINA_TRUE, EINA_TRUE);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:if test="string-length(@orient) != 0">
+                       <xsl:variable name="rconv_key" select="concat('image:orient', ':', @orient)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($rconv_value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_image_orient_set(vc->', @id, ', (Elm_Image_Orient)', $rconv_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_image_orient_set(vc->', @id, ', ', @orient, ');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:choose>
+                       <xsl:when test="@aspect_fixed = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_image_aspect_fixed_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1, 'elm_image_aspect_fixed_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:choose>
+                       <xsl:when test="@fill_outside = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_image_fill_outside_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1, 'elm_image_fill_outside_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:choose>
+                       <xsl:when test="@editable = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_image_editable_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1, 'elm_image_editable_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:if test="string-length(@prescale) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_image_prescale_set(vc->', @id, ', ', @prescale, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="disable">
+                       <xsl:with-param name="disable" select="@disable" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/index.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/index.xsl
new file mode 100644 (file)
index 0000000..42903de
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:template match="index">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name(parent::node())='view'">
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_index_add(parent);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->root_container = vc->', @id, ';', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_index_add(vc->', $parent, ');', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+               <xsl:choose>
+                       <xsl:when test="@autohide='false'">
+                               <xsl:value-of select="concat($indentation1 , 'elm_index_autohide_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1 , 'elm_index_autohide_disabled_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:choose>
+                       <xsl:when test="@indicator='false'">
+                               <xsl:value-of select="concat($indentation1 , 'elm_index_indicator_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1 , 'elm_index_indicator_disabled_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:call-template name="style">
+                       <xsl:with-param name="style" select="@style" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:choose>
+                       <xsl:when test="@horizontal='true'">
+                               <xsl:value-of select="concat($indentation1 , 'elm_index_horizontal_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1 , 'elm_index_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+
+               <xsl:call-template name="disable">
+                       <xsl:with-param name="disable" select="@disable" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:value-of select="concat($indentation1, 'elm_index_level_go(vc->', @id, ', 0);', $newline)" />
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/indexitem.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/indexitem.xsl
new file mode 100644 (file)
index 0000000..5964fc9
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="indexitem">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:variable name="callback">
+                       <xsl:apply-templates select="event" mode="item_event">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="view" select="./ancestor::view/@id" />
+                               <!-- Storyboard_START -->
+                               <xsl:with-param name="target" select="event/@target" />
+                               <!-- Storyboard_END -->
+                       </xsl:apply-templates>
+               </xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="string-length($callback) != 0">
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_index_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @label, '&quot;), (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_index_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;), (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_index_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @label, '&quot;), NULL, NULL);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_index_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;), NULL, NULL);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:if test="string-length(@selected) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@selected = 'true'">
+                                       <xsl:value-of select="concat($indentation, 'elm_index_item_selected_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation, 'elm_index_item_selected_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@disable) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@disable = 'true'">
+                                       <xsl:value-of select="concat($indentation, 'elm_object_item_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation, 'elm_object_item_disabled_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/label.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/label.xsl
new file mode 100644 (file)
index 0000000..d87fca1
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+       <xsl:template match="label">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, ' = elm_label_add(vc->', $parent, ');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@text) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_text_set(vc->', @id, ',_UIB_LOCALE(', '&quot;', @text, '&quot;', '));', $newline)" />
+               </xsl:if>
+
+               <xsl:call-template name="style">
+                       <xsl:with-param name="style" select="@style" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@line_wrap) != 0">
+                       <xsl:variable name="rconv_key" select="concat('line_wrap', ':', @line_wrap)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($rconv_value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_label_line_wrap_set(vc->', @id, ', (Elm_Wrap_Type)', $rconv_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_label_line_wrap_set(vc->', @id, ', ', @line_wrap, ');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@wrap_width) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_label_wrap_width_set(vc->', @id, ',', @wrap_width, ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@ellipsis) != 0">
+                       <xsl:if test="@ellipsis = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_label_ellipsis_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:if>
+                       <xsl:if test="@ellipsis = 'false'">
+                               <xsl:value-of select="concat($indentation1, 'elm_label_ellipsis_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:if>
+               </xsl:if>
+               <xsl:if test="string-length(@duration) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_label_slide_duration_set(vc->', @id, ',', @duration, ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/layout.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/layout.xsl
new file mode 100644 (file)
index 0000000..cdef1ba
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:template match="layout">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation2">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+2" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name(parent::node())='view'">
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_layout_add(parent);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->root_container = vc->', @id, ';', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_layout_add(vc->', $parent, ');', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:value-of select="$indentation" />
+               <xsl:value-of select="concat('if(vc->', @id, ') {')" />
+               <xsl:value-of select="$newline" />
+               <xsl:choose>
+                       <xsl:when test="string-length(@src) != 0">
+                               <xsl:variable name="escapedSrc">
+                                       <xsl:call-template name="escapeStr">
+                                               <xsl:with-param name="str" select="@src" />
+                                       </xsl:call-template>
+                               </xsl:variable>
+                               <!-- <xsl:variable name="file_path"> <xsl:choose> <xsl:when test="contains($escapedSrc, '.edc')"> <xsl:value-of select="substring-before($escapedSrc, '.edc')" 
+                                       /> <xsl:text>.edj</xsl:text> </xsl:when> <xsl:otherwise> <xsl:value-of select="$escapedSrc" /> </xsl:otherwise> </xsl:choose> </xsl:variable> -->
+                               <!-- <xsl:value-of select="concat($indentation1, 'char ', @id, '_resource_path[PATH_MAX] = {0, };', $newline)"/> -->
+                               <xsl:value-of select="concat($indentation1, 'char *resource_path = NULL;', $newline)" />
+                               <xsl:choose>
+                                       <xsl:when test="$is_version_rm_support='true'">
+                                               <xsl:value-of
+                                                       select="concat($indentation1, 'uib_util_rm_get_resource_path(APP_RESOURCE_TYPE_IMAGE, &quot;', $escapedSrc, '&quot;, &amp;resource_path);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat($indentation1, 'uib_util_rm_get_resource_path(-1, &quot;', $escapedSrc, '&quot;, &amp;resource_path);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                               <xsl:value-of select="concat($indentation1, 'elm_layout_file_set(vc->', @id, ', resource_path', ', &quot;', @group, '&quot;);')" />
+                               <xsl:value-of select="$newline" />
+                               <xsl:value-of select="concat($indentation1, 'if(resource_path) {', $newline)" />
+                               <xsl:value-of select="concat($indentation2, 'free(resource_path);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, '}', $newline)" />
+
+                               <!-- <xsl:value-of select="concat($indentation1 , 'app_get_resource(&quot;', $file_path, '&quot; , ', @id, '_resource_path, (int)PATH_MAX);', $newline)" /> <xsl:value-of 
+                                       select="concat($indentation1 , 'elm_layout_file_set(vc->', @id, ', ', @id, '_resource_path' , ', &quot;', @group, '&quot;);')" /> -->
+                               <xsl:value-of select="$newline" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/list.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/list.xsl
new file mode 100644 (file)
index 0000000..f0ba2a1
--- /dev/null
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="list">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_list_add(vc->',$parent,');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+               <xsl:if test="string-length(@mode) != 0">
+                       <xsl:variable name="rconv_key" select="concat('mode', ':', @mode)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($rconv_value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_list_mode_set(vc->', @id, ', (Elm_List_Mode)', $rconv_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_list_mode_set(vc->', @id, ', ', @mode, ');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@select_mode) != 0">
+                       <xsl:variable name="rconv_key" select="concat('select_mode', ':', @select_mode)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($rconv_value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_list_select_mode_set(vc->', @id, ', (Elm_Object_Select_Mode)', $rconv_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_list_select_mode_set(vc->', @id, ', ', @select_mode, ');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@multi_select) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@multi_select = 'true'">
+                                       <xsl:value-of select="concat($indentation1,'elm_list_multi_select_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_list_multi_select_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <!-- <xsl:if test="string-length(@multi_select_mode) != 0"> <xsl:value-of select="concat($indentation1,'elm_list_multi_select_mode_set(vc->', @id, ', (Elm_Object_Multi_Select_Mode)', 
+                       @multi_select_mode, ');', $newline)"/> </xsl:if> -->
+               <xsl:if test="string-length(@direction) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@direction = 'horizontal'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_list_horizontal_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_list_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@scrollbar_h) != 0 and string-length(@scrollbar_v) != 0">
+                       <xsl:variable name="scrollbar_h_key" select="concat('scrollbar_h', ':', @scrollbar_h)" />
+                       <xsl:variable name="scrollbar_h_value" select="exslt:node-set($value_map)//entry[@key=$scrollbar_h_key]" />
+                       <xsl:variable name="scrollbar_v_key" select="concat('scrollbar_v', ':', @scrollbar_v)" />
+                       <xsl:variable name="scrollbar_v_value" select="exslt:node-set($value_map)//entry[@key=$scrollbar_v_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) !=0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) !=0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) =0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', ', @scrollbar_v, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:when test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) =0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', ', @scrollbar_v, ');', $newline)" />
+                               </xsl:when>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+               </xsl:apply-templates>
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="disable">
+                       <xsl:with-param name="disable" select="@disable" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:value-of select="concat($indentation,'elm_list_go(vc->', @id, ');', $newline)" />
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/listitem.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/listitem.xsl
new file mode 100644 (file)
index 0000000..8b3e0eb
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="listitem">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="indentation" select="$indentation" />
+                       <xsl:with-param name="parent" select="$parent" />
+               </xsl:apply-templates>
+
+               <xsl:variable name="callback">
+                       <xsl:apply-templates select="event" mode="item_event">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="view" select="./ancestor::view/@id" />
+                               <!-- Storyboard_START -->
+                               <xsl:with-param name="target" select="event/@target" />
+                               <!-- Storyboard_END -->
+                       </xsl:apply-templates>
+               </xsl:variable>
+               <xsl:variable name="icon">
+                       <xsl:apply-templates select="icon" mode="listitem_icon">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="view" select="./ancestor::view/@id" />
+                       </xsl:apply-templates>
+               </xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="string-length($callback) != 0 and string-length($icon) != 0">
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_list_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @label, '&quot;), ', $icon , ', NULL, (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_list_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;), ', $icon , ', NULL, (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:when>
+                       <xsl:when test="string-length($callback) = 0 and string-length($icon) != 0">
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_list_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @label, '&quot;), ', $icon , ', NULL, NULL, NULL);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_list_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;), ', $icon , ', NULL, NULL, NULL);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:when>
+                       <xsl:when test="string-length($callback) != 0 and string-length($icon) = 0">
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_list_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @label, '&quot;), NULL, NULL, (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_list_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;), NULL, NULL, (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_list_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @label, '&quot;), NULL, NULL, NULL, NULL);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_list_item_append(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;), NULL, NULL, NULL, NULL);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:if test="string-length(@selected) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@selected = 'true'">
+                                       <xsl:value-of select="concat($indentation, 'elm_list_item_selected_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation, 'elm_list_item_selected_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@disable) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@disable = 'true'">
+                                       <xsl:value-of select="concat($indentation, 'elm_object_item_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation, 'elm_object_item_disabled_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/map.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/map.xsl
new file mode 100644 (file)
index 0000000..6a13a5f
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="*" mode="map.content.set">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name()='event'" />
+                       <xsl:when test="name()='icon'">
+                               <xsl:value-of select="concat($indentation, 'elm_object_part_content_set(vc->', $parent, ',', '&quot;', 'icon', '&quot;, ','vc->' ,@id, ');', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="map">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, ' = elm_map_add(vc->', $parent, ');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'if (vc->', @id, ') {', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@zoom_level) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_map_zoom_set(vc->', @id, ',', @zoom_level, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:if test="string-length(@longitude) != 0 and string-length(@latitude) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_map_region_show(vc->', @id, ',', @longitude, ',', @latitude, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates mode="map.content.set" select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/multibuttonentry.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/multibuttonentry.xsl
new file mode 100644 (file)
index 0000000..9907b69
--- /dev/null
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="multibuttonentry">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_multibuttonentry_add(vc->',$parent,');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@expanded) != 0"><!-- default: false -->
+                       <xsl:if test="@expanded = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_multibuttonentry_expanded_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:if>
+                       <xsl:if test="@expanded = 'false'">
+                               <xsl:value-of select="concat($indentation1, 'elm_multibuttonentry_expanded_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:if>
+               </xsl:if>
+               <xsl:if test="string-length(@editable) != 0"><!-- default: true -->
+                       <xsl:if test="@editable = 'true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_multibuttonentry_editable_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:if>
+                       <xsl:if test="@editable = 'false'">
+                               <xsl:value-of select="concat($indentation1, 'elm_multibuttonentry_editable_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:if>
+               </xsl:if>
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/multibuttonentryitem.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/multibuttonentryitem.xsl
new file mode 100644 (file)
index 0000000..dd3f02b
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="multibuttonentryitem">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="@label">
+                               <xsl:value-of select="concat($indentation, 'vc->', @id, '= create_multibuttonentry_item(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;), ' )" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation, 'vc->', @id, '= create_multibuttonentry_item(vc->', $parent, ', _UIB_LOCALE(&quot;', @text, '&quot;), ' )" />
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:variable name="callback">
+                       <xsl:apply-templates select="event" mode="item_event">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="view" select="./ancestor::view/@id" />
+                               <!-- Storyboard_START -->
+                               <xsl:with-param name="target" select="event/@target" />
+                               <!-- Storyboard_END -->
+                       </xsl:apply-templates>
+               </xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="string-length($callback) != 0">
+                               <xsl:value-of select="concat('(Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat( 'NULL, NULL);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/panel.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/panel.xsl
new file mode 100644 (file)
index 0000000..4e592c3
--- /dev/null
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="*" mode="panel.content.set">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name()='variation'" />
+                       <xsl:otherwise>
+                               <!-- <xsl:value-of select="concat($indentation, 'evas_object_show(vc->', @id,');', $newline)" /> -->
+                               <xsl:value-of select="concat($indentation,'elm_object_content_set(vc->', $parent,', ','vc->',@id,');', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="panel">
+               <xsl:param name="parent" />
+               <xsl:param name="fromView" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="profile" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:choose>
+                       <xsl:when test="$fromView = 'true'">
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_panel_add(parent);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->root_container = vc->', @id, ';', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:if test="string-length($fromView) = 0">
+                                       <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                                       <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_panel_add(vc->', $parent, ');', $newline)" />
+                                       <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               </xsl:if>
+                               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+                               <xsl:call-template name="size_hint_align_set">
+                                       <xsl:with-param name="align_h" select="@align_h" />
+                                       <xsl:with-param name="align_v" select="@align_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+                               <xsl:call-template name="size_hint_weight_set">
+                                       <xsl:with-param name="weight_h" select="@weight_h" />
+                                       <xsl:with-param name="weight_v" select="@weight_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+                               <xsl:if test="string-length(@orient) != 0">
+                                       <xsl:variable name="rconv_key" select="concat('panel:orient', ':', @orient)" />
+                                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                                       <xsl:choose>
+                                               <xsl:when test="string-length($rconv_value) != 0">
+                                                       <xsl:value-of select="concat($indentation1, 'elm_panel_orient_set(vc->', @id, ', ', $rconv_value, ');', $newline)" />
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:value-of select="concat($indentation1, 'elm_panel_orient_set(vc->', @id, ', ', @orient, ');', $newline)" />
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:if>
+
+                               <xsl:if test="string-length(@hidden) != 0">
+                                       <xsl:choose>
+                                               <xsl:when test="@hidden='true'">
+                                                       <xsl:value-of select="concat($indentation1,'elm_panel_hidden_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:if>
+
+                               <xsl:apply-templates select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                                       <xsl:with-param name="profile" select="$profile" />
+                               </xsl:apply-templates>
+
+                               <xsl:apply-templates mode="panel.content.set" select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                               </xsl:apply-templates>
+                               <xsl:if test="@disable = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:if>
+                               <xsl:apply-templates mode="visible" select="current()">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                               </xsl:apply-templates>
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/panes.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/panes.xsl
new file mode 100644 (file)
index 0000000..982722a
--- /dev/null
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:template match="*" mode="panes.pack">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:variable name="widget_id" select="@id" />
+               <xsl:choose>
+                       <xsl:when test="name()='variation'" />
+                       <xsl:otherwise>
+                               <xsl:choose>
+                                       <xsl:when test="count(./variation[@config_ref=$view_configuration_id]) > 0">
+                                               <xsl:for-each select="./variation[@config_ref=$view_configuration_id]">
+                                                       <xsl:choose>
+                                                               <xsl:when test="@pack='left'">
+                                                                       <xsl:value-of
+                                                                               select="concat($indentation, 'elm_object_part_content_set(vc->',
+                                                                                                                       $parent,
+                                                                                                                       ', &quot;left&quot;, vc->',
+                                                                                                                       $widget_id,
+                                                                                                                       ');',
+                                                                                                                       '&#xD;',
+                                                                                                                       $newline)" />
+                                                               </xsl:when>
+                                                               <xsl:otherwise>
+                                                                       <xsl:value-of
+                                                                               select="concat($indentation, 'elm_object_part_content_set(vc->',
+                                                                                                                       $parent,
+                                                                                                                       ', &quot;right&quot;, vc->',
+                                                                                                                       $widget_id,
+                                                                                                                       ');',
+                                                                                                                       '&#xD;',
+                                                                                                                       $newline)" />
+                                                               </xsl:otherwise>
+                                                       </xsl:choose>
+                                               </xsl:for-each>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:choose>
+                                                       <xsl:when test="@pack='left'">
+                                                               <xsl:value-of
+                                                                       select="concat($indentation, 'elm_object_part_content_set(vc->',
+                                                                                                               $parent,
+                                                                                                               ', &quot;left&quot;, vc->',
+                                                                                                               $widget_id,
+                                                                                                               ');',
+                                                                                                               '&#xD;',
+                                                                                                               $newline)" />
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <xsl:value-of
+                                                                       select="concat($indentation, 'elm_object_part_content_set(vc->',
+                                                                                                               $parent,
+                                                                                                               ', &quot;right&quot;, vc->',
+                                                                                                               $widget_id,
+                                                                                                               ');',
+                                                                                                               '&#xD;',
+                                                                                                               $newline)" />
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="panes">
+               <xsl:param name="parent" />
+               <xsl:param name="fromView" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="profile" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="$fromView = 'true'">
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_panes_add(parent);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->root_container = vc->', @id, ';', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:if test="string-length($fromView) = 0">
+                                       <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                                       <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_panes_add(vc->', $parent, ');', $newline)" />
+                                       <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               </xsl:if>
+
+                               <xsl:value-of select="$indentation" />
+                               <xsl:value-of select="concat('if(vc->', @id, ') {')" />
+                               <xsl:value-of select="$newline" />
+                               <xsl:value-of select="$indentation1" />
+                               <xsl:choose>
+                                       <xsl:when test="@direction='horizontal'">
+                                               <xsl:value-of select="concat('elm_panes_horizontal_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat('elm_panes_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                               <xsl:value-of select="$indentation1" />
+                               <xsl:choose>
+                                       <xsl:when test="@fixed='true'">
+                                               <xsl:value-of select="concat('elm_panes_fixed_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat('elm_panes_fixed_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+
+                               <xsl:value-of select="$indentation1" />
+                               <xsl:choose>
+                                       <xsl:when test="string-length(@right_size) != 0">
+                                               <xsl:value-of select="concat('elm_panes_content_right_size_set(vc->', @id, ', ', @right_size, ');', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat('elm_panes_content_right_size_set(vc->', @id, ', 0.50);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+
+                               <xsl:apply-templates select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                                       <xsl:with-param name="profile" select="$profile" />
+                               </xsl:apply-templates>
+
+                               <xsl:apply-templates mode="panes.pack" select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                               </xsl:apply-templates>
+
+                               <xsl:call-template name="size_hint_align_set">
+                                       <xsl:with-param name="align_h" select="@align_h" />
+                                       <xsl:with-param name="align_v" select="@align_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:value-of select="$newline" />
+
+                               <xsl:call-template name="size_hint_weight_set">
+                                       <xsl:with-param name="weight_h" select="@weight_h" />
+                                       <xsl:with-param name="weight_v" select="@weight_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:value-of select="$newline" />
+
+                               <xsl:call-template name="disable">
+                                       <xsl:with-param name="disable" select="@disable" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+                               <xsl:apply-templates mode="visible" select="current()">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                               </xsl:apply-templates>
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/popup.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/popup.xsl
new file mode 100644 (file)
index 0000000..cddb6e2
--- /dev/null
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:template match="popup" mode="popup.callback">
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'eext_object_event_callback_add(vc->', @id, ', EEXT_CALLBACK_BACK, eext_popup_back_cb, NULL);', $newline)" />
+       </xsl:template>
+
+       <xsl:template match="popup">
+               <xsl:param name="parent" />
+               <xsl:param name="fromView" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:choose>
+                       <xsl:when test="$fromView = 'true'">
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_popup_add(parent);', $newline)" />
+
+
+
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               <xsl:value-of select="concat($indentation, 'vc->root_container = vc->', @id, ';', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:if test="string-length($fromView) = 0">
+                                       <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                                       <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_popup_add(parent);', $newline)" />
+                                       <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               </xsl:if>
+
+                               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+                               <xsl:call-template name="style">
+                                       <xsl:with-param name="style" select="@style" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+                               <xsl:call-template name="colors">
+                                       <xsl:with-param name="colors" select="@colors" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                                       <xsl:with-param name="widgettype" />
+                               </xsl:call-template>
+
+                               <xsl:value-of select="concat($indentation1, 'elm_popup_align_set(vc->', @id, ', ELM_NOTIFY_ALIGN_FILL, 1.0);', $newline)" />
+
+                               <xsl:if test="string-length(@title) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_object_part_text_set(vc->', @id, ', &quot;title,text&quot;, &quot;', @title, '&quot;);', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@timeout) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_popup_timeout_set(vc->', @id, ', ', @timeout, ');', $newline)" />
+                               </xsl:if>
+
+
+                               <xsl:call-template name="size_hint_weight_set">
+                                       <xsl:with-param name="weight_h" select="@weight_h" />
+                                       <xsl:with-param name="weight_v" select="@weight_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+
+                               <xsl:apply-templates select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                               </xsl:apply-templates>
+
+                               <xsl:apply-templates mode="popup_pack" select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="height" select="@height" />
+                               </xsl:apply-templates>
+
+                               <xsl:if test="@disable = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:if>
+                               <xsl:apply-templates mode="visible" select="current()">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                               </xsl:apply-templates>
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="*" mode="popup_pack">
+               <xsl:param name="parent" />
+               <xsl:param name="height" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'evas_object_size_hint_min_set(vc->', @id, ', -1, ELM_SCALE_SIZE(', $height, '));',                                  '&#xD;'
+                                                                       )" />
+
+               <xsl:value-of select="concat($indentation, 'elm_object_content_set(vc->', $parent, ', vc->', @id, ');',                                         '&#xD;'
+                                                                       )" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/progressbar.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/progressbar.xsl
new file mode 100644 (file)
index 0000000..f19127e
--- /dev/null
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="*" mode="progressbar.content.set">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name()='event'" />
+                       <xsl:when test="name()='icon'">
+                               <xsl:value-of select="concat($indentation, 'elm_object_part_content_set(vc->', $parent, ',', '&quot;', 'icon', '&quot;, ','vc->' ,@id, ');', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="progressbar">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:choose>
+                       <xsl:when test="$profile='wearable-circle'">
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of
+                                       select="concat($indentation1,'vc->', @id, ' = eext_circle_object_progressbar_add(vc->',$parent,', uib_views_get_instance()->get_window_obj()->circle_surface);', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+                               <xsl:value-of select="concat($indentation,'if (vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'eext_rotary_object_event_activated_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation, 'vc->', @id, '= elm_progressbar_add(vc->',$parent,');', $newline)" />
+                               <xsl:value-of select="concat($indentation, 'if (vc->', @id, ') {', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="style">
+                       <xsl:with-param name="style" select="@style" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:call-template name="colors">
+                       <xsl:with-param name="colors" select="@colors" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+                       <xsl:with-param name="widgettype" />
+               </xsl:call-template>
+               <xsl:if test="string-length(@direction) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@direction = 'horizontal'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_horizontal_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:if test="string-length(@pulse) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@pulse = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_pulse_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_pulse_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:if test="string-length(@min) != 0 and string-length(@max) != 0">
+                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_value_min_max_set(vc->', @id, ',', @min, ',', @max, ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@value) != 0">
+                       <xsl:choose>
+                               <xsl:when test="$profile='wearable-circle'">
+                                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_value_set(vc->', @id, ',', @value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_value_set(vc->', @id, ',', @value, ');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:if test="string-length(@span_size) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_span_size_set(vc->', @id, ',', @span_size, ');', $newline)" />
+               </xsl:if>
+               <!-- <xsl:if test="string-length(@format) != 0"> <xsl:value-of select="concat($indentation1, 'elm_progressbar_unit_format_set(vc->', @id, ',', '&quot;', @format, 
+                       '&quot;', ');', $newline)" /> </xsl:if> -->
+               <xsl:if test="string-length(@inverted) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@inverted = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_progressbar_inverted_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1,'elm_progressbar_inverted_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates mode="progressbar.content.set" select="*">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+               </xsl:apply-templates>
+               
+               <xsl:if test="@disable = 'true'">
+            <xsl:choose>
+                <xsl:when test="$profile='wearable-circle'">
+                                <xsl:value-of select="concat($indentation1, 'eext_circle_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                </xsl:otherwise>
+            </xsl:choose>
+               </xsl:if>
+               
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/radio.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/radio.xsl
new file mode 100644 (file)
index 0000000..4245954
--- /dev/null
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="*" mode="radio.content.set">
+               <xsl:param name="parent" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name()='event'" />
+                       <xsl:when test="name()='icon'">
+                               <xsl:value-of select="concat($indentation, 'elm_object_part_content_set(vc->', $parent, ',', '&quot;', 'icon', '&quot;, ','vc->' ,@id, ');', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+       <xsl:template match="radio">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:variable name="firstRadioId" select="preceding-sibling::radio/@id" />
+               <xsl:if test="string-length($firstRadioId) = 0">
+                       <xsl:value-of select="concat($indentation, 'static int val;', $newline)" />
+               </xsl:if>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, ' = elm_radio_add(','vc->' ,$parent, ');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:if test="string-length(@text) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_text_set(vc->', @id, ',_UIB_LOCALE(', '&quot;', @text, '&quot;', '));', $newline)" />
+               </xsl:if>
+               <xsl:variable name="radioIndex" select="position()" />
+               <xsl:value-of select="concat($indentation1, 'elm_radio_state_value_set(vc->', @id, ',', @state_value , ');', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'elm_radio_value_pointer_set(vc->', @id, ',', '&amp;' , 'val);', $newline)" />
+               <xsl:if test="string-length($firstRadioId) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_radio_group_add(vc->',@id , ',', 'vc->', $firstRadioId, ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@value) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_radio_value_set(vc->', @id, ',', @value, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates mode="radio.content.set" select="*">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/scroller.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/scroller.xsl
new file mode 100644 (file)
index 0000000..58d4e55
--- /dev/null
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="*" mode="scroller.content.set">
+               <xsl:param name="parent" />
+               <xsl:param name="level"
+                       select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name()='variation'" />
+                       <xsl:otherwise>
+                               <xsl:value-of
+                                       select="concat($indentation, 'elm_object_content_set(vc->', $parent,',','vc->',@id,');', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="scroller">
+               <xsl:param name="parent" />
+               <xsl:param name="fromView" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="profile" />
+               <xsl:param name="level"
+                       select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="$fromView = 'true'">
+                               <xsl:value-of
+                                       select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of
+                                       select="concat($indentation1, 'vc->', @id, '= elm_scroller_add(parent);', $newline)" />
+                               <xsl:if test="$profile='wearable-circle'">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'vc->circle_object_', @id, '= eext_circle_object_scroller_add(vc->', @id, ', uib_views_get_instance()->get_window_obj()->circle_surface);', $newline)" />
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'eext_rotary_object_event_activated_set(vc->circle_object_', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:if>
+                               <xsl:value-of
+                                       select="concat($indentation1, 'vc->root_container = vc->', @id, ';', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:if test="string-length($fromView) = 0">
+                                       <xsl:value-of
+                                               select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'vc->', @id, '= elm_scroller_add(vc->',$parent,');', $newline)" />
+                                       <xsl:if test="$profile='wearable-circle'">
+                                               <xsl:value-of
+                                                       select="concat($indentation1, 'vc->circle_object_', @id, '= eext_circle_object_scroller_add(vc->', @id, ', uib_views_get_instance()->get_window_obj()->circle_surface);', $newline)" />
+                                               <xsl:value-of
+                                                       select="concat($indentation1, 'eext_rotary_object_event_activated_set(vc->circle_object_', @id, ', EINA_TRUE);', $newline)" />
+                                       </xsl:if>
+                                       <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               </xsl:if>
+
+                               <xsl:value-of
+                                       select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+                               <xsl:if test="string-length(@style) != 0">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'elm_object_style_set(vc->' , @id, ',', '&#34;', @style, '&#34;', ');', $newline)" />
+                               </xsl:if>
+                               <xsl:call-template name="colors">
+                                       <xsl:with-param name="colors" select="@colors" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                                       <xsl:with-param name="widgettype"/>
+                               </xsl:call-template>
+                               <xsl:call-template name="size_hint_align_set">
+                                       <xsl:with-param name="align_h" select="@align_h" />
+                                       <xsl:with-param name="align_v" select="@align_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+                               <xsl:call-template name="size_hint_weight_set">
+                                       <xsl:with-param name="weight_h" select="@weight_h" />
+                                       <xsl:with-param name="weight_v" select="@weight_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+
+                               <xsl:param name="content_min_w">
+                                       <xsl:call-template name="eina_bool">
+                                               <xsl:with-param name="bool" select="@content_min_w" />
+                                       </xsl:call-template>
+                               </xsl:param>
+                               <xsl:param name="content_min_h">
+                                       <xsl:call-template name="eina_bool">
+                                               <xsl:with-param name="bool" select="@content_min_h" />
+                                       </xsl:call-template>
+                               </xsl:param>
+
+                               <xsl:value-of
+                                       select="concat($indentation1, 'elm_scroller_content_min_limit(vc->', @id, ', ', $content_min_w, ', ', $content_min_h , '); ', $newline)" />
+
+                               <xsl:if
+                                       test="string-length(@scrollbar_h) != 0 and string-length(@scrollbar_v) != 0">
+                                       <xsl:variable name="scrollbar_h_key"
+                                               select="concat('scrollbar_h', ':', @scrollbar_h)" />
+                                       <xsl:variable name="scrollbar_h_value"
+                                               select="exslt:node-set($value_map)//entry[@key=$scrollbar_h_key]" />
+                                       <xsl:variable name="scrollbar_v_key"
+                                               select="concat('scrollbar_v', ':', @scrollbar_v)" />
+                                       <xsl:variable name="scrollbar_v_value"
+                                               select="exslt:node-set($value_map)//entry[@key=$scrollbar_v_key]" />
+                                       <xsl:choose>
+                                               <xsl:when
+                                                       test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) !=0">
+                                                       <xsl:value-of
+                                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                                               </xsl:when>
+                                               <xsl:when
+                                                       test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) !=0">
+                                                       <xsl:value-of
+                                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', (Elm_Scroller_Policy)', $scrollbar_v_value, ');', $newline)" />
+                                               </xsl:when>
+                                               <xsl:when
+                                                       test="string-length($scrollbar_h_value) != 0 and string-length($scrollbar_v_value) =0">
+                                                       <xsl:value-of
+                                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', (Elm_Scroller_Policy)', $scrollbar_h_value, ', ', @scrollbar_v, ');', $newline)" />
+                                               </xsl:when>
+                                               <xsl:when
+                                                       test="string-length($scrollbar_h_value) = 0 and string-length($scrollbar_v_value) =0">
+                                                       <xsl:value-of
+                                                               select="concat($indentation1, 'elm_scroller_policy_set(vc->', @id, ', ', @scrollbar_h, ', ', @scrollbar_v, ');', $newline)" />
+                                               </xsl:when>
+                                       </xsl:choose>
+                               </xsl:if>
+
+                               <xsl:if test="string-length(@single_direction) != 0">
+                                       <xsl:choose>
+                                               <xsl:when test="string(number(@single_direction)) = 'NaN'">
+                                                       <xsl:value-of
+                                                               select="concat($indentation1, 'elm_scroller_single_direction_set(vc->', @id, ', ', @single_direction, ');', $newline)" />
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:value-of
+                                                               select="concat($indentation1, 'elm_scroller_single_direction_set(vc->', @id, ', (Elm_Scroller_Single_Direction)', @single_direction, ');', $newline)" />
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:if>
+
+                               <xsl:if test="string-length(@propagate_events) != 0">
+                                       <xsl:if test="@propagate_events = 'true'">
+                                               <xsl:value-of
+                                                       select="concat($indentation1, 'elm_scroller_propagate_events_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                                       </xsl:if>
+                                       <xsl:if test="@horizontal = 'false'">
+                                               <xsl:value-of
+                                                       select="concat($indentation1, 'elm_gengrid_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                                       </xsl:if>
+                               </xsl:if>
+
+                               <xsl:apply-templates select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                                       <xsl:with-param name="profile" select="$profile" />
+                               </xsl:apply-templates>
+                               <xsl:apply-templates mode="scroller.content.set"
+                                       select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                               </xsl:apply-templates>
+                               <xsl:apply-templates mode="visible" select="current()">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                               </xsl:apply-templates>
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/slider.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/slider.xsl
new file mode 100644 (file)
index 0000000..d64edfc
--- /dev/null
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="slider">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="profile" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:choose>
+                       <xsl:when test="$profile='wearable-circle'">
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of
+                                       select="concat($indentation1, 'vc->', @id, ' = eext_circle_object_slider_add(vc->',$parent,', uib_views_get_instance()->get_window_obj()->circle_surface);', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'eext_rotary_object_event_activated_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               <xsl:if test="string-length(@unit_format) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_unit_format_set(vc->', @id, ',', '&quot;', @unit_format, '&quot;', ');', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@indicator_format) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_indicator_format_set(vc->', @id, ',', '&quot;', @indicator_format, '&quot;', ');', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@span_size) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_span_size_set(vc->', @id, ',', @span_size, ');', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="@direction = 'vertical'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:if>
+
+                               <xsl:call-template name="style">
+                                       <xsl:with-param name="style" select="@style" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:call-template name="colors">
+                                       <xsl:with-param name="colors" select="@colors" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                                       <xsl:with-param name="widgettype" />
+                               </xsl:call-template>
+                               <xsl:if test="string-length(@min) != 0 and string-length(@max) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_value_min_max_set(vc->', @id, ',', @min, ',', @max, ');', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_value_set(vc->', @id, ',', @value, ');', $newline)" />
+                               </xsl:if>
+
+                               <xsl:if test="@inverted = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_inverted_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:if>
+
+                               <xsl:if test="string-length(@step) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_slider_step_set(vc->', @id, ',', @step, ');', $newline)" />
+                               </xsl:if>
+
+                               <xsl:if test="@show-indicator = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_indicator_show_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="@disable = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'eext_circle_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:if>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_slider_add(vc->',$parent,');', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+                               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+                               <xsl:if test="string-length(@indicator_format) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_indicator_format_set(vc->', @id, ',', '&quot;', @indicator_format, '&quot;', ');', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="@direction = 'vertical'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_horizontal_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:if>
+
+                               <xsl:call-template name="style">
+                                       <xsl:with-param name="style" select="@style" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:call-template name="colors">
+                                       <xsl:with-param name="colors" select="@colors" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                                       <xsl:with-param name="widgettype" />
+                               </xsl:call-template>
+                               <xsl:if test="string-length(@min) != 0 and string-length(@max) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_min_max_set(vc->', @id, ',', @min, ',', @max, ');', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="string-length(@value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_value_set(vc->', @id, ',', @value, ');', $newline)" />
+                               </xsl:if>
+
+                               <xsl:if test="@inverted = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_inverted_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:if>
+
+                               <xsl:if test="string-length(@step) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_step_set(vc->', @id, ',', @step, ');', $newline)" />
+                               </xsl:if>
+
+                               <xsl:if test="@indicator = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_slider_indicator_show_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:if>
+                               <xsl:if test="@disable = 'true'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:if>
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/spinner.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/spinner.xsl
new file mode 100644 (file)
index 0000000..b576893
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="spinner">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_spinner_add(vc->',$parent,');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation,'if(vc->', @id, ') {', $newline)" />
+
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:call-template name="style">
+                       <xsl:with-param name="style" select="@style" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:call-template name="colors">
+                       <xsl:with-param name="colors" select="@colors" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+                       <xsl:with-param name="widgettype" />
+               </xsl:call-template>
+               <xsl:if test="string-length(@label_format) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_spinner_label_format_set(vc->', @id, ',', '&quot;', @label_format, '&quot;', ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@min) != 0 and string-length(@max) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_spinner_min_max_set(vc->', @id, ',', @min, ',', @max, ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@step) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_spinner_step_set(vc->', @id, ',', @step, ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@value) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_spinner_value_set(vc->', @id, ',', @value, ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="@wrap = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_spinner_wrap_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:if test="@editable = 'false'">
+                       <xsl:value-of select="concat($indentation1, 'elm_spinner_editable_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@interval) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_spinner_interval_set(vc->', @id, ',', @interval, ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@base) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_spinner_base_set(vc->', @id, ',', @base, ');', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@round) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_spinner_round_set(vc->', @id, ',', @round, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:if test="@disable = 'true'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/table.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/table.xsl
new file mode 100644 (file)
index 0000000..14b5d4f
--- /dev/null
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="*" mode="table.pack">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="profile" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:variable name="widget_id" select="@id" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="name()='variation'" />
+                       <xsl:otherwise>
+                               <xsl:choose>
+                                       <xsl:when test="count(./variation[@config_ref=$view_configuration_id]) > 0">
+                                               <xsl:for-each select="./variation[@config_ref=$view_configuration_id]">
+                                                       <xsl:value-of
+                                                               select="concat($indentation, 'elm_table_pack(vc->', $parent, ', vc->', $widget_id, ', ', @pack_col, ', ', @pack_row, ', ', @col_span, ', ', @row_span, ');',                                    '&#xD;'
+                                                                               )" />
+                                               </xsl:for-each>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'elm_table_pack(vc->', $parent, ', vc->', $widget_id, ', ', @pack_col, ', ', @pack_row, ', ', @col_span, ', ', @row_span, ');',                                    '&#xD;'
+                                                               )" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="table">
+               <xsl:param name="parent" />
+               <xsl:param name="fromView" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:choose>
+                       <xsl:when test="$fromView = 'true'">
+                               <xsl:call-template name="dup">
+                                       <xsl:with-param name="input" select="$indent" />
+                                       <xsl:with-param name="count" select="$level" />
+                               </xsl:call-template>
+                               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_table_add(parent);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'vc->root_container = vc->', @id, ';', $newline)" />
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:if test="string-length($fromView) = 0">
+                                       <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+                                       <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_table_add(vc->', $parent, ');', $newline)" />
+                                       <xsl:value-of select="concat($indentation,'}', $newline)" />
+                               </xsl:if>
+                               <xsl:value-of select="$indentation" />
+                               <xsl:value-of select="concat('if(vc->', @id, ') {')" />
+                               <xsl:value-of select="$newline" />
+                               <xsl:value-of select="concat($indentation1, 'Evas_Object *ph_', @id, ';', $newline)" />
+                               <xsl:value-of select="concat($indentation1, 'for (int i=0; i &lt;', @rows, '; i++) {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, $indent, 'for (int j=0; j &lt;', @cols, '; j++) {', $newline)" />
+                               <xsl:value-of select="concat($indentation1, $indent, $indent, 'ph_', @id, '= evas_object_rectangle_add(evas_object_evas_get(vc->', @id, '));', $newline)" />
+                               <xsl:value-of select="concat($indentation1, $indent, $indent, 'evas_object_size_hint_weight_set( ph_', @id, ', EVAS_HINT_EXPAND, EVAS_HINT_EXPAND );', $newline)" />
+                               <xsl:value-of select="concat($indentation1, $indent, $indent, 'evas_object_size_hint_align_set( ph_', @id, ', EVAS_HINT_FILL, EVAS_HINT_FILL );', $newline)" />
+                               <xsl:value-of select="concat($indentation1, $indent, $indent, 'evas_object_hide(ph_', @id, ');', $newline)" />
+                               <xsl:value-of select="concat($indentation1, $indent, $indent, 'elm_table_pack(vc->', @id, ', ph_', @id, ', j, i, 1, 1);', $newline)" />
+                               <xsl:value-of select="concat($indentation1, $indent, '}', $newline)" />
+                               <xsl:value-of select="concat($indentation1, '}', $newline)" />
+
+                               <xsl:choose>
+                                       <xsl:when test="@homogeneous='true'">
+                                               <xsl:value-of select="concat($indentation1, 'elm_table_homogeneous_set(vc->', @id, ', EINA_TRUE);')" />
+                                               <xsl:value-of select="$newline" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat($indentation1, 'elm_table_homogeneous_set(vc->', @id, ', EINA_FALSE);')" />
+                                               <xsl:value-of select="$newline" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                               <xsl:choose>
+                                       <xsl:when test="string-length(@padding_h) != 0 and string-length(@padding_v) != 0">
+                                               <xsl:value-of select="$indentation1" />
+                                               <xsl:value-of select="concat('elm_table_padding_set(vc->', @id, ',', @padding_h, ',', @padding_v, ');', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                       </xsl:otherwise>
+                               </xsl:choose>
+
+                               <xsl:call-template name="size_hint_align_set">
+                                       <xsl:with-param name="align_h" select="@align_h" />
+                                       <xsl:with-param name="align_v" select="@align_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:value-of select="$newline" />
+
+                               <xsl:call-template name="size_hint_weight_set">
+                                       <xsl:with-param name="weight_h" select="@weight_h" />
+                                       <xsl:with-param name="weight_v" select="@weight_v" />
+                                       <xsl:with-param name="indentation" select="$indentation1" />
+                                       <xsl:with-param name="id" select="@id" />
+                               </xsl:call-template>
+                               <xsl:value-of select="$newline" />
+
+                               <xsl:apply-templates select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                                       <xsl:with-param name="profile" select="$profile" />
+                               </xsl:apply-templates>
+
+                               <xsl:apply-templates mode="table.pack" select="*">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                               </xsl:apply-templates>
+
+                               <xsl:apply-templates mode="visible" select="current()">
+                                       <xsl:with-param name="parent" select="@id" />
+                                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                               </xsl:apply-templates>
+
+                               <xsl:value-of select="concat($indentation,'}', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/tizenPopup.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/tizenPopup.xsl
new file mode 100644 (file)
index 0000000..9ff81f0
--- /dev/null
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template name="popup.comment">
+               /*******************************************************************************
+               * This file was generated by UI Builder.
+               * This file will be auto-generated
+               each and everytime you save your project.
+               * Do not hand edit this file.
+               ********************************************************************************/
+       </xsl:template>
+       <xsl:template name="popup.include">
+               <xsl:value-of select="concat('&#35;', 'include ', '&#34;', 'app_main.h', '&#34;')" />
+               <xsl:value-of select="$newline" />
+               <xsl:value-of select="$newline" />
+       </xsl:template>
+
+       <xsl:template name="popup.eventhandler_declaration">
+               <xsl:param name="parent"></xsl:param>
+               <xsl:value-of select="concat('&#47;&#42;',' event handler declarations ','&#42;&#47;')" />
+
+               <xsl:value-of select="$newline" />
+               <xsl:apply-templates select="event/@*" mode="declaration">
+                       <xsl:with-param name="level">
+                               <xsl:value-of select="0" />
+                       </xsl:with-param>
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view" select="@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates select="*" mode="popup.event.declaration" />
+               <xsl:value-of select="$newline" />
+       </xsl:template>
+
+       <xsl:template match="*" mode="popup.event.declaration">
+               <xsl:apply-templates select="event/@*" mode="declaration">
+                       <xsl:with-param name="level">
+                               <xsl:value-of select="0" />
+                       </xsl:with-param>
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view" select="./ancestor::tizen.popup/@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates select="*" mode="popup.event.declaration" />
+       </xsl:template>
+
+       <xsl:template match="*" mode="popup.event.registration">
+               <xsl:apply-templates select="event/@*" mode="registration">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view" select="./ancestor::tizen.popup/@id" />
+               </xsl:apply-templates>
+
+               <xsl:apply-templates select="*" mode="popup.event.registration" />
+       </xsl:template>
+
+       <xsl:template name="popup.create_popup">
+               <xsl:param name="parent" />
+               <xsl:param name="viewName" />
+               <xsl:param name="indicator" />
+               <xsl:param name="level" />
+               <xsl:param name="indentation" />
+               <xsl:param name="indentation1" />
+
+               <xsl:value-of
+                       select="concat($indentation, 'uib_view_context','&#42;',' uib_', $parent, '_view_create(Evas_Object','&#42;',' parent, void','&#42;',' create_callback_param) {', $newline)" />
+
+               <xsl:if test="string-length(@indicator) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@indicator='false'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_win_indicator_mode_set(get_window(parent), ELM_WIN_INDICATOR_HIDE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_win_indicator_mode_set(get_window(parent), ELM_WIN_INDICATOR_SHOW);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:value-of select="concat($indentation1, 'uib_', $parent, '_view_context','&#42;',' vc = calloc(1, sizeof(uib_', $parent, '_view_context));', $newline)" />
+
+               <xsl:value-of select="concat($indentation1, 'vc->parent = parent;', $newline)" />
+
+               <xsl:value-of select="concat($indentation1, 'vc->view_name = &#34;', $viewName,'&#34;;', $newline)" />
+
+               <xsl:if test="string-length(@file) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_bg_file_set(', @id, ',', '&quot;', @file, '&quot;', ');', $newline)" />
+               </xsl:if>
+
+
+               <xsl:if test="string-length(@option) != 0">
+                       <xsl:choose>
+                               <xsl:when test="string(number(@option)) = 'NaN'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_bg_option_set(', @id, ', ', @option, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_bg_option_set(', @id, ', (Elm_Bg_Option)', @option, ');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+
+               <xsl:if test="string-length(@load_size_width) != 0 and string-length(@load_size_height) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_bg_load_size_set(', @id, ',', @load_size_width, ',', @load_size_height, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="fromView" select="'true'" />
+               </xsl:apply-templates>
+
+               <xsl:value-of select="concat($indentation1, '//bind event handler', $newline)" />
+               <!-- evas_object_smart_callback_add(vc->root_container, KEY_VIEW_CREATE, (Evas_Smart_Cb)on_<xsl:value-of select="$parent" />_create, vc); evas_object_smart_callback_add(vc->root_container, 
+                       KEY_VIEW_DESTROY, (Evas_Smart_Cb)on_<xsl:value-of select="$parent" />_destroy, vc); -->
+               <xsl:apply-templates select="event/@*" mode="registration">
+                       <xsl:with-param name="parent" select="'root_container'" />
+                       <xsl:with-param name="view" select="@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates select="*" mode="popup.event.registration" />
+
+               <xsl:value-of select="$newline" />
+               <xsl:value-of select="$newline" />
+               <xsl:value-of select="concat($indentation1, 'evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);', $newline)" />
+               <!-- evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc); uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), 
+                       vc->root_container, create_callback_param); <xsl:if test="string-length(*[1]/@id) != 0"> evas_object_show(vc-><xsl:value-of select="*[1]/@id" />); </xsl:if> -->
+               <xsl:value-of select="concat($indentation1, 'return (uib_view_context*)vc;', $newline)" />
+
+               <xsl:value-of select="concat($indentation, '}', $newline)" />
+       </xsl:template>
+
+       <xsl:template match="popup">
+               <xsl:param name="parent" />
+               <!-- FIXME -->
+               <xsl:param name="viewName" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:call-template name="popup.comment" />
+               <xsl:call-template name="popup.include" />
+               <xsl:call-template name="popup.eventhandler_declaration">
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:call-template>
+               <xsl:call-template name="popup.create_popup">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="level" select="$level" />
+                       <xsl:with-param name="indentation" select="$indentation" />
+                       <xsl:with-param name="indentation1" select="$indentation1" />
+                       <xsl:with-param name="viewName" select="@id" />
+                       <xsl:with-param name="indicator" select="@indicator" />
+                       <!-- FIXME <xsl:with-param name="viewName" select="@data-title" /> -->
+               </xsl:call-template>
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/toolbar.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/toolbar.xsl
new file mode 100644 (file)
index 0000000..6b46be7
--- /dev/null
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common">
+
+       <xsl:template match="toolbar">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:value-of select="concat($indentation, 'if (!vc->', @id, ') {', $newline)" />
+               <xsl:value-of select="concat($indentation1, 'vc->', @id, '= elm_toolbar_add(vc->', $parent, ');', $newline)" />
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+
+               <xsl:value-of select="concat($indentation, 'if(vc->', @id, ') {', $newline)" />
+
+               <xsl:if test="@style='navigationbar'">
+                       <xsl:value-of select="concat($indentation1, 'elm_object_style_set(vc->', @id, ', ','&#34;', @style,'&#34;', ');', $newline)" />
+               </xsl:if>
+
+               <xsl:choose>
+                       <xsl:when test="string-length(@shrink_mode) != 0 ">
+                               <xsl:variable name="rconv_key" select="concat('shrink_mode', ':', @shrink_mode)" />
+                               <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                               <xsl:choose>
+                                       <xsl:when test="string-length($rconv_value) != 0">
+                                               <xsl:value-of select="concat($indentation1, 'elm_toolbar_shrink_mode_set(vc->', @id, ', (Elm_Toolbar_Shrink_Mode)', $rconv_value, ');', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat($indentation1, 'elm_toolbar_shrink_mode_set(vc->', @id, ', ', @shrink_mode, ');', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1, 'elm_toolbar_shrink_mode_set(vc->', @id, ', ELM_TOOLBAR_SHRINK_NONE);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:if test="string-length(@select_mode) != 0 ">
+                       <xsl:variable name="rconv_key" select="concat('select_mode', ':', @select_mode)" />
+                       <xsl:variable name="rconv_value" select="exslt:node-set($value_map)//entry[@key=$rconv_key]" />
+                       <xsl:choose>
+                               <xsl:when test="string-length($rconv_value) != 0">
+                                       <xsl:value-of select="concat($indentation1, 'elm_toolbar_select_mode_set(vc->', @id, ', (Elm_Object_Select_Mode)', $rconv_value, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_toolbar_select_mode_set(vc->', @id, ', ', @select_mode, ');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:if test="string-length(@icon_size) != 0 ">
+                       <xsl:value-of select="concat($indentation1, 'elm_toolbar_icon_size_set(vc->', @id, ', ', @icon_size, ');', $newline)" />
+               </xsl:if>
+
+               <xsl:choose>
+                       <xsl:when test="@transverse_expand='true'">
+                               <xsl:value-of select="concat($indentation1, 'elm_toolbar_transverse_expanded_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="concat($indentation1, 'elm_toolbar_transverse_expanded_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:choose>
+                       <xsl:when test="@shrink_mode='1' or @shrink-mode='3' or @shrink-mode='4' ">
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:choose>
+                                       <xsl:when test="@homogeneous='true'">
+                                               <xsl:value-of select="concat($indentation1, 'elm_toolbar_homogeneous_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat($indentation1, 'elm_toolbar_homogeneous_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:if test="string-length(@align) != 0 ">
+                       <xsl:value-of select="concat($indentation1, 'elm_toolbar_align_set(vc->', @id, ', ', @align, ');', $newline)" />
+               </xsl:if>
+
+       
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+               </xsl:apply-templates>
+
+               <xsl:call-template name="size_hint_align_set">
+                       <xsl:with-param name="align_h" select="@align_h" />
+                       <xsl:with-param name="align_v" select="@align_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="size_hint_weight_set">
+                       <xsl:with-param name="weight_h" select="@weight_h" />
+                       <xsl:with-param name="weight_v" select="@weight_v" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+               <xsl:value-of select="$newline" />
+
+               <xsl:call-template name="disable">
+                       <xsl:with-param name="disable" select="@disable" />
+                       <xsl:with-param name="indentation" select="$indentation1" />
+                       <xsl:with-param name="id" select="@id" />
+               </xsl:call-template>
+
+               <xsl:apply-templates mode="visible" select="current()">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat($indentation,'}', $newline)" />
+       </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/toolbaritem.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/toolbaritem.xsl
new file mode 100644 (file)
index 0000000..d4b53ae
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template match="toolbaritem">
+               <xsl:param name="parent" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation2">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+2" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:variable name="callback">
+                       <xsl:apply-templates select="event" mode="item_event">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="view" select="./ancestor::view/@id" />
+                               <!-- Storyboard_START -->
+                               <xsl:with-param name="target" select="event/@target" />
+                               <!-- Storyboard_END -->
+                       </xsl:apply-templates>
+               </xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="string-length($callback) != 0">
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_toolbar_item_append(vc->', $parent, ', NULL, _UIB_LOCALE(&quot;', @label, '&quot;), (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_toolbar_item_append(vc->', $parent, ', NULL, _UIB_LOCALE(&quot;', @text, '&quot;), (Evas_Smart_Cb)', $callback, ', vc);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:choose>
+                                       <xsl:when test="@label">
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_toolbar_item_append(vc->', $parent, ', NULL, _UIB_LOCALE(&quot;', @label, '&quot;), NULL, NULL);', $newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat($indentation, 'vc->', @id, ' = elm_toolbar_item_append(vc->', $parent, ', NULL, _UIB_LOCALE(&quot;', @text, '&quot;), NULL, NULL);', $newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:if test="string-length(@src) != 0">
+                       <xsl:variable name="escapedSrc">
+                               <xsl:call-template name="escapeStr">
+                                       <xsl:with-param name="str" select="@src" />
+                               </xsl:call-template>
+                       </xsl:variable>
+                       <xsl:value-of select="concat($indentation, 'char *', @id, '_resource_path = NULL;', $newline)" />
+                       <xsl:choose>
+                               <xsl:when test="$is_version_rm_support='true'">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'uib_util_rm_get_resource_path(APP_RESOURCE_TYPE_IMAGE, &quot;', $escapedSrc, '&quot;, &amp;', @id, '_resource_path);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'uib_util_rm_get_resource_path(-1, &quot;', $escapedSrc, '&quot;, &amp;', @id, '_resource_path);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       <xsl:value-of select="concat($indentation, 'elm_toolbar_item_icon_set(vc->', @id, ', ', @id, '_resource_path);', $newline)" />
+                       <xsl:value-of select="concat($indentation, 'if(', @id, '_resource_path) {', $newline)" />
+                       <xsl:value-of select="concat($indentation1, 'free(', @id, '_resource_path);', $newline)" />
+                       <xsl:value-of select="concat($indentation, '}', $newline)" />
+               </xsl:if>
+               <xsl:if test="string-length(@selected) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@selected = 'true'">
+                                       <xsl:value-of select="concat($indentation, 'elm_toolbar_item_selected_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation, 'elm_toolbar_item_selected_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:if test="string-length(@disable) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@disable = 'true'">
+                                       <xsl:value-of select="concat($indentation, 'elm_object_item_disabled_set(vc->', @id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation, 'elm_object_item_disabled_set(vc->', @id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/components/view.xsl b/org.tizen.efluibuilder.codegenerator/res/src/components/view.xsl
new file mode 100644 (file)
index 0000000..3c1681f
--- /dev/null
@@ -0,0 +1,323 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <!-- databinding start -->
+       <xsl:variable name="data_bind_count"
+               select="count(//views//view[@id=$current_view_name]//*[@data_bind != ''])" />
+       <xsl:variable name="databinding_done">
+               <xsl:choose>
+                       <xsl:when test="$data_bind_count>0">
+                               <xsl:value-of select="'yes'" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="'no'" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:variable>
+       <!-- databinding stop -->
+       <xsl:template name="view.comment">
+               <xsl:text><![CDATA[
+/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+               ]]></xsl:text>
+       </xsl:template>
+       <xsl:template name="view.include">
+               <xsl:value-of select="concat('&#35;', 'include ', '&#34;', 'g_inc_uib.h', '&#34;', $newline)" />
+               <xsl:value-of select="concat('&#35;', 'include ', '&#34;', 'uib_views.h', '&#34;', $newline)" />
+               <xsl:value-of select="concat('&#35;', 'include ', '&#34;', 'uib_views_inc.h', '&#34;', $newline)" />
+               <xsl:value-of select="concat('&#35;', 'include ', '&#34;', 'uib_app_manager.h', '&#34;', $newline)" />
+               <!-- Databinding start -->
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:value-of
+                               select="concat('&#35;', 'include ', '&#34;', 'uib_db_manager.h', '&#34;', $newline)" />
+               </xsl:if>
+               <!-- Databinding stop -->
+               <xsl:value-of select="$newline" />
+               <xsl:value-of select="$newline" />
+       </xsl:template>
+
+       <xsl:template name="eventhandler_declaration">
+               <xsl:param name="parent"></xsl:param>
+               <xsl:value-of select="concat('&#47;&#42;',' event handler declarations ','&#42;&#47;')" />
+
+               <xsl:value-of select="$newline" />
+               <xsl:apply-templates select="event" mode="event.view.declaration">
+                       <xsl:with-param name="level">
+                               <xsl:value-of select="0" />
+                       </xsl:with-param>
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="view" select="@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates select="*" mode="event.declaration" />
+               <xsl:value-of select="$newline" />
+       </xsl:template>
+
+       <xsl:template match="*" mode="event.declaration">
+               <!-- Storyboard_START -->
+               <xsl:apply-templates select="event" mode="event.wrapper.declaration">
+                       <!-- Storyboard_END -->
+                       <xsl:with-param name="level">
+                               <xsl:value-of select="0" />
+                       </xsl:with-param>
+                       <xsl:with-param name="view" select="./ancestor::view/@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates select="*" mode="event.declaration" />
+       </xsl:template>
+
+       <xsl:template match="*" mode="event.registration">
+               <!-- Storyboard_START -->
+               <xsl:apply-templates select="event" mode="event.wrapper.registration">
+                       <xsl:with-param name="view" select="./ancestor::view/@id" />
+                       <xsl:with-param name="parent" select="@id" />
+               </xsl:apply-templates>
+               <!-- Storyboard_END -->
+               <xsl:apply-templates select="*" mode="event.registration" />
+       </xsl:template>
+
+       <xsl:template name="view.create_view">
+               <xsl:param name="parent" />
+               <xsl:param name="viewName" />
+               <xsl:param name="indicator" />
+               <xsl:param name="level" />
+               <xsl:param name="indentation" />
+               <xsl:param name="indentation1" />
+               <xsl:param name="indentation2" />
+               <xsl:param name="current_view_position" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="profile" />
+               <xsl:variable name="view_id" select="@id" />
+
+               <xsl:value-of
+                       select="concat($indentation, 'uib_view_context','&#42;',' uib_view_', $parent, '_create(Evas_Object','&#42;',' parent, void','&#42;',' create_callback_param) {', $newline)" />
+
+               <xsl:value-of select="concat($indentation1, 'uib_', $parent, '_view_context','&#42;',' vc = calloc(1, sizeof(uib_', $parent, '_view_context));', $newline)" />
+
+               <xsl:value-of select="concat($indentation1, 'vc->parent = parent;', $newline)" />
+
+               <xsl:value-of select="concat($indentation1, 'vc->view_name = &#34;', $viewName,'&#34;;', $newline)" />
+
+               <xsl:if test="string-length(@indicator) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@indicator='false'">
+                                       <xsl:value-of select="concat($indentation1, 'vc->indicator_state = ELM_WIN_INDICATOR_HIDE;', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'vc->indicator_state = ELM_WIN_INDICATOR_SHOW;', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:value-of select="concat($indentation1, 'vc->is_user_view = false;', $newline)" />
+
+               <xsl:value-of select="concat($indentation1, 'uib_app_manager_get_instance()->add_view_context((uib_view_context*)vc);', $newline)" />
+
+               <xsl:if test="string-length(@file) != 0">
+                       <xsl:value-of select="concat($indentation1, 'elm_bg_file_set(', @id, ',', '&quot;', @file, '&quot;', ');', $newline)" />
+               </xsl:if>
+
+
+               <xsl:if test="string-length(@option) != 0">
+                       <xsl:choose>
+                               <xsl:when test="string(number(@option))='NaN'">
+                                       <xsl:value-of select="concat($indentation1, 'elm_bg_option_set(', @id, ', ', @option, ');', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation1, 'elm_bg_option_set(', @id, ', (Elm_Bg_Option)', @option, ');', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+
+               <xsl:apply-templates select="*">
+                       <xsl:with-param name="parent" select="@id" />
+                       <xsl:with-param name="fromView" select="'true'" />
+                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                       <xsl:with-param name="profile" select="$profile" />
+               </xsl:apply-templates>
+
+               <xsl:value-of select="concat($indentation1, 'uib_views_get_instance()->set_targeted_view((uib_view_context*)vc);', $newline)" />
+               <xsl:value-of select="$newline" />
+
+               <xsl:value-of select="concat($indentation1, '//bind event handler', $newline)" />
+
+               <xsl:apply-templates select="event" mode="registration">
+                       <xsl:with-param name="parent" select="'root_container'" />
+                       <xsl:with-param name="view" select="@id" />
+               </xsl:apply-templates>
+               <xsl:apply-templates select="*" mode="event.registration" />
+
+               <xsl:value-of select="$newline" />
+               <xsl:value-of select="$newline" />
+               <xsl:value-of select="concat($indentation1, 'evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);', $newline)" />
+
+               <xsl:if test="string-length(@type) != 0">
+                       <xsl:choose>
+                               <xsl:when test="@type='view'">
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'uib_views_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);', $newline)" />
+                                       <xsl:value-of
+                                               select="concat($indentation1, 'evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_views_destroy_callback, vc);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:if test="count(/document/views/view[$current_view_position]/ctxpopup) > 0">
+                                               <xsl:for-each select="/document/views/view[$current_view_position]/ctxpopup">
+                                                       <xsl:apply-templates select="/document/views/view[$current_view_position]/ctxpopup" mode="ctxpopup.callback" />
+                                               </xsl:for-each>
+                                       </xsl:if>
+                                       <xsl:if test="count(/document/views/view[$current_view_position]/popup) > 0">
+                                               <xsl:for-each select="/document/views/view[$current_view_position]/popup">
+                                                       <xsl:apply-templates select="/document/views/view[$current_view_position]/popup" mode="popup.callback" />
+                                               </xsl:for-each>
+                                       </xsl:if>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+               <xsl:value-of select="$newline" />
+               <!-- Databinding start -->
+               <xsl:if test="$databinding_done='yes'">
+                       <xsl:value-of
+                               select="concat($indentation1, 'uib_databinding_manager_get_instance()->perform_databinding((uib_view_context*)vc);', $newline)" />
+                       <xsl:value-of select="$newline" />
+               </xsl:if>
+               <!-- Databinding stop -->
+
+               <xsl:value-of select="concat($indentation1, 'return (uib_view_context*)vc;', $newline)" />
+               <xsl:value-of select="concat($indentation, '}', $newline)" />
+
+               <!-- create mscreen view func -->
+               <xsl:for-each select="/document/mscreen/configuration">
+                       <xsl:variable name="configuration_type" select="@type" />
+                       <xsl:variable name="configuration_id" select="@id" />
+                       <xsl:variable name="configuration_resolution" select="@device" />
+                       <xsl:variable name="configuration_orientation" select="@orientation" />
+                       <xsl:choose>
+                               <xsl:when test="$configuration_type='common'">
+                                       <xsl:value-of select="concat('void uib_',$current_view_name,'_config_',$configuration_resolution,'_',$configuration_orientation,'() {',$newline)" />
+                                       <xsl:call-template name="writing_layout_code">
+                                               <xsl:with-param name="current_view_name" select="$current_view_name" />
+                                               <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                                               <xsl:with-param name="profile" select="$profile" />
+                                               <xsl:with-param name="current_view_position" select="$current_view_position" />
+                                               <xsl:with-param name="view_id" select="$view_id" />
+                                               <xsl:with-param name="view_configuration_id" select="$configuration_id" />
+                                               <xsl:with-param name="level" select="$level" />
+                                               <xsl:with-param name="indentation" select="$indentation" />
+                                               <xsl:with-param name="indentation1" select="$indentation1" />
+                                               <xsl:with-param name="indentation2" select="$indentation2" />
+                                       </xsl:call-template>
+
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:for-each select="/document/views/view[$current_view_position]//variation[$configuration_id = @config_ref]">
+                                               <xsl:if test="position()='1'">
+                                                       <xsl:value-of select="concat('void uib_',$current_view_name,'_config_',$configuration_resolution,'_',$configuration_orientation,'() {',$newline)" />
+                                                       <xsl:call-template name="writing_layout_code">
+                                                               <xsl:with-param name="current_view_name" select="$current_view_name" />
+                                                               <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                                                               <xsl:with-param name="profile" select="$profile" />
+                                                               <xsl:with-param name="current_view_position" select="$current_view_position" />
+                                                               <xsl:with-param name="view_id" select="$view_id" />
+                                                               <xsl:with-param name="view_configuration_id" select="$configuration_id" />
+                                                               <xsl:with-param name="level" select="$level" />
+                                                               <xsl:with-param name="indentation" select="$indentation" />
+                                                               <xsl:with-param name="indentation1" select="$indentation1" />
+                                                               <xsl:with-param name="indentation2" select="$indentation2" />
+                                                       </xsl:call-template>
+
+                                               </xsl:if>
+                                       </xsl:for-each>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:for-each>
+
+       </xsl:template>
+
+
+
+       <xsl:template name="writing_layout_code">
+               <!-- Parameter -->
+               <xsl:param name="current_view_name" />
+               <xsl:param name="is_version_rm_support" />
+               <xsl:param name="profile" />
+               <xsl:param name="current_view_position" />
+               <xsl:param name="view_id" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" />
+               <xsl:param name="indentation" />
+               <xsl:param name="indentation1" />
+               <xsl:param name="indentation2" />
+
+               <xsl:if test="count(/document/views/view[$current_view_position]/*) > 0">
+                       <xsl:value-of select="concat($indentation1,'uib_app_manager_st* uib_app_manager = uib_app_manager_get_instance();', $newline)" />
+                       <xsl:value-of
+                               select="concat($indentation1,'uib_',$current_view_name,'_view_context* vc = (uib_',$current_view_name,'_view_context*)uib_app_manager->find_view_context(','&#34;',$current_view_name,'&#34;',');',$newline)" />
+                       <xsl:value-of select="concat($indentation1,'if(!vc) {', $newline)" />
+                       <xsl:value-of select="concat($indentation2,'return;', $newline)" />
+                       <xsl:value-of select="concat($indentation1,'}', $newline)" />
+               </xsl:if>
+               <xsl:apply-templates select="/document/views/view[$current_view_position]/*">
+                       <xsl:with-param name="parent" select="$view_id" />
+                       <xsl:with-param name="fromView" select="'root_container'" />
+                       <xsl:with-param name="view_configuration_id" select="$view_configuration_id" />
+                       <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                       <xsl:with-param name="profile" select="$profile" />
+               </xsl:apply-templates>
+               <xsl:value-of select="concat('}', $newline, $newline)" />
+       </xsl:template>
+
+
+
+
+
+       <xsl:template match="view">
+               <xsl:if test="$current_view_name=@id">
+                       <xsl:variable name="current_view_position" select="position()" />
+                       <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+                       <xsl:param name="is_version_rm_support" />
+                       <xsl:param name="profile" />
+
+                       <xsl:param name="indentation">
+                               <xsl:call-template name="dup">
+                                       <xsl:with-param name="input" select="$indent" />
+                                       <xsl:with-param name="count" select="$level" />
+                               </xsl:call-template>
+                       </xsl:param>
+                       <xsl:param name="indentation1">
+                               <xsl:call-template name="dup">
+                                       <xsl:with-param name="input" select="$indent" />
+                                       <xsl:with-param name="count" select="$level+1" />
+                               </xsl:call-template>
+                       </xsl:param>
+                       <xsl:param name="indentation2">
+                               <xsl:call-template name="dup">
+                                       <xsl:with-param name="input" select="$indent" />
+                                       <xsl:with-param name="count" select="$level+2" />
+                               </xsl:call-template>
+                       </xsl:param>
+
+                       <xsl:call-template name="view.comment" />
+                       <xsl:call-template name="view.include" />
+                       <xsl:call-template name="eventhandler_declaration">
+                               <xsl:with-param name="parent" select="@id" />
+                       </xsl:call-template>
+                       <xsl:call-template name="view.create_view">
+                               <xsl:with-param name="parent" select="@id" />
+                               <xsl:with-param name="level" select="$level" />
+                               <xsl:with-param name="indentation" select="$indentation" />
+                               <xsl:with-param name="indentation1" select="$indentation1" />
+                               <xsl:with-param name="indentation2" select="$indentation2" />
+                               <xsl:with-param name="viewName" select="@id" />
+                               <xsl:with-param name="indicator" select="@indicator" />
+                               <xsl:with-param name="current_view_position" select="$current_view_position" />
+                               <xsl:with-param name="is_version_rm_support" select="$is_version_rm_support" />
+                               <xsl:with-param name="profile" select="$profile" />
+                       </xsl:call-template>
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="/">
+               <xsl:apply-templates select="//view">
+               </xsl:apply-templates>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/connection.xsl b/org.tizen.efluibuilder.codegenerator/res/src/connection.xsl
new file mode 100644 (file)
index 0000000..edf0355
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template name="view.comment">
+               <xsl:text><![CDATA[
+/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and every time you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+]]></xsl:text>
+       </xsl:template>
+    <xsl:param name="current_view_name"></xsl:param>
+    <xsl:template match="/">
+        <xsl:apply-templates select="/document/views/view[@id=$current_view_name]" />
+    </xsl:template>
+       <xsl:template name="view.connection.include">
+               <xsl:value-of select="concat('&#35;', 'include ', '&#34;', 'app_main.h', '&#34;')" />
+               <xsl:value-of select="$newline" />
+               <xsl:value-of select="concat('&#35;', 'include ', '&#34;', 'uib_views_inc.h', '&#34;')" />
+               <xsl:value-of select="$newline" />
+               <xsl:value-of select="$newline" />
+       </xsl:template>
+       <xsl:template name="view.connection.definition">
+               <xsl:apply-templates select="*" mode="event.definition" />
+       </xsl:template>
+
+       <xsl:template match="*" mode="event.definition">
+               <xsl:apply-templates select="event" />
+               <xsl:apply-templates select="*" mode="event.definition" />
+       </xsl:template>
+
+       <xsl:template match="event">
+               <xsl:apply-templates select="@*" mode="definition">
+                       <xsl:with-param name="view" select="./ancestor::view/@id" />
+                       <xsl:with-param name="title" select="@title" />
+                       <xsl:with-param name="target" select="@target" />
+               </xsl:apply-templates>
+       </xsl:template>
+
+       <xsl:template match="@*" mode="definition">
+               <xsl:param name="level">
+                       <xsl:value-of select="0" />
+               </xsl:param>
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:param name="view" />
+               <xsl:param name="title" />
+               <xsl:param name="target" />
+               <xsl:if test="starts-with(name(.), 'connection_wrapper')">
+                       <xsl:value-of select="concat($indentation, 'void ',  ., '(uib_' , $view, '_view_context *vc, Evas_Object *obj, void *event_info){', $newline)" />
+               </xsl:if>
+
+               <xsl:if test="string-length($target)!=0">
+                       <xsl:if test="starts-with(name(.), 'function_name')">
+                               <xsl:variable name="titleString">
+                                       <xsl:value-of select="concat('&quot;',$title,'&quot;')" />
+                               </xsl:variable>
+                               <xsl:variable name="targetString">
+                                       <xsl:value-of select="concat('&quot;',$target,'&quot;')" />
+                               </xsl:variable>
+                <xsl:variable name="viewType">
+                    <xsl:value-of select="//views/view[@id=$target]/@type" />
+                </xsl:variable>
+                <xsl:variable name="ctxType">
+                    <xsl:value-of select="boolean(//views/view[@id=$target]/ctxpopup)" />
+                </xsl:variable>
+                <xsl:variable name="firstParam">
+                       <xsl:choose>
+                           <xsl:when test="(($viewType = 'popup') and ($ctxType = 'true'))">
+                               <xsl:value-of select="'pc'" />
+                           </xsl:when>
+                           <xsl:when test="(($viewType = 'popup') and ($ctxType = 'false'))">
+                               <xsl:value-of select="'pc'" />
+                           </xsl:when>
+                           <xsl:otherwise>
+                               <xsl:value-of select="'navi_item'" />
+                           </xsl:otherwise>
+                       </xsl:choose>
+                </xsl:variable>
+                <xsl:value-of select="concat($indentation1,.,'(vc, ','obj, ','event_info);',$newline)" />
+                <xsl:choose>
+                    <xsl:when test="(($viewType = 'popup') and ($ctxType = 'true'))">
+                        <xsl:variable name="ctxPopupId">
+                            <xsl:value-of select="//views/view[@id=$target]/ctxpopup/@id" />
+                        </xsl:variable>
+                        <xsl:value-of select="concat($indentation1,'uib_popup_context* pc = uib_create_ctxpopup(&quot;',$ctxPopupId,'&quot; , e_ctxpopup_position_default, obj, ','0, ','0);',$newline)" />
+                    </xsl:when>
+                    <xsl:when test="(($viewType = 'popup') and ($ctxType = 'false'))">
+                        <xsl:variable name="popupId">
+                            <xsl:value-of select="//views/view[@id=$target]/popup/@id" />
+                        </xsl:variable>
+                        <xsl:value-of select="concat($indentation1,'uib_popup_context* pc = uib_create_popup(&quot;',$popupId,'&quot;);',$newline)" />
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="concat($indentation1,'Elm_Object_Item* navi_item = uib_util_push_view(',$targetString,');',$newline)" />
+                    </xsl:otherwise>
+                </xsl:choose>
+                <xsl:value-of select="concat($indentation1,.,'_post(', $firstParam, ', ','vc, ','obj, ','event_info);',$newline,'}',$newline)" />
+                       </xsl:if>
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="view">
+               <xsl:param name="view" />
+               <xsl:param name="level" select="count(./ancestor::*)" />
+               <xsl:param name="parent" />
+               <xsl:call-template name="view.comment" />
+               <xsl:call-template name="view.connection.include" />
+               <xsl:call-template name="view.connection.definition" />
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/uib_app_manager_source.xsl b/org.tizen.efluibuilder.codegenerator/res/src/uib_app_manager_source.xsl
new file mode 100644 (file)
index 0000000..3a69864
--- /dev/null
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:param name="is_widget_project" />
+
+       <xsl:template match="/">
+               <xsl:apply-templates select="//views">
+               </xsl:apply-templates>
+       </xsl:template>
+
+       <xsl:template match="views">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+#include "uib_app_manager.h"
+#include "uib_view_manager.h"
+
+
+static uib_app_manager_st g_uib_app_manager;
+uib_device_info_st g_uib_device_info;
+
+void prepare();
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$is_widget_project='true'">
+                               <xsl:text><![CDATA[
+bool initialize(widget_context_h context, int w, int h, char* use_user_view) {
+       memset(&g_uib_device_info, 0x00, sizeof(uib_device_info_st));
+       uib_util_get_device_info(&g_uib_device_info);
+       window_obj* win_obj = uib_views_get_instance()->create_window_obj(context, w, h);]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:text><![CDATA[
+bool initialize(char* use_user_view) {
+       memset(&g_uib_device_info, 0x00, sizeof(uib_device_info_st));
+       uib_util_get_device_info(&g_uib_device_info);
+       window_obj* win_obj = uib_views_get_instance()->create_window_obj();]]></xsl:text>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+    uib_util_rotation_set(win_obj->win, e_rotation_fullSensor);
+    if(use_user_view!=USE_USER_VIEW) {
+        prepare();
+    }
+    return (win_obj)? true : false;
+}
+
+void prepare() {
+       uib_view_context* vc = uib_views_get_instance()->create_startup_view();
+       window_obj* win_obj = uib_views_get_instance()->get_window_obj();
+       Evas_Object* nf = win_obj->app_naviframe;
+       Elm_Object_Item* nf_it = elm_naviframe_bottom_item_get(nf);
+
+       eext_object_event_callback_add(nf, EEXT_CALLBACK_BACK, nf_hw_back_cb, vc);
+       evas_object_show(nf);
+       elm_naviframe_item_pop_cb_set(nf_it, nf_root_it_pop_cb, win_obj->win);
+
+       elm_app_base_scale_set(g_uib_device_info.base_scale);
+       evas_object_smart_callback_add(win_obj->win, "delete,request", win_del_request_cb, NULL);
+}
+
+const uib_device_info_st* get_uib_device_info() {
+       return &g_uib_device_info;
+}
+
+uib_app_manager_st* uib_app_manager_get_instance() {
+       if(!g_uib_app_manager._is_init) {
+               g_uib_app_manager._is_init = true;
+               g_uib_app_manager.add_view_context = uib_view_manager_get_instance()->add_view_context;
+               g_uib_app_manager.find_view_context = uib_view_manager_get_instance()->find_view_context;
+               g_uib_app_manager.free_all_view_context = uib_view_manager_get_instance()->free_all_view_context;
+               g_uib_app_manager.initialize = initialize;
+               g_uib_app_manager.prepare = prepare;
+               g_uib_app_manager.get_uib_device_info = &get_uib_device_info;
+       }
+       return &g_uib_app_manager;
+}
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/uib_connection_source.xsl b/org.tizen.efluibuilder.codegenerator/res/src/uib_connection_source.xsl
new file mode 100644 (file)
index 0000000..570f166
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:output encoding="utf-8" indent="yes" method="text" />
+       <xsl:variable name="newline">
+               <xsl:text>&#xa;</xsl:text>
+       </xsl:variable>
+       <xsl:param name="indent" select="'&#x9;'" />
+       <xsl:include href="util/common.xsl" />
+       <xsl:include href="src/connection.xsl" />
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/uib_util_source.xsl b/org.tizen.efluibuilder.codegenerator/res/src/uib_util_source.xsl
new file mode 100644 (file)
index 0000000..b4eb7ec
--- /dev/null
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+       <xsl:param name="startup_view" />
+       <xsl:param name="profile" />
+       <xsl:param name="is_version_rm_support" />
+       <xsl:template match="/">
+               <xsl:call-template name="uib_util_source" />
+       </xsl:template>
+
+       <xsl:template name="uib_util_source">
+
+               <!-- BEGIN : OUTPUT -->
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[
+/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#include "app_main.h"
+#include "uib_util.h"
+#include "uib_views.h"
+#include "uib_views_inc.h"
+#include "uib_app_manager.h"
+
+#define RM_ANNOTATION_LOCALE "@locale/"
+#define RM_ANNOTATION_RESOURCE "@resource/"
+#define RM_ANNOTATION_LOCALE_LEN strlen(RM_ANNOTATION_LOCALE)
+#define RM_ANNOTATION_RESOURCE_LEN strlen(RM_ANNOTATION_RESOURCE)
+
+void uib_util_rotation_set(Evas_Object *win, rotation_e e_rotation_type) {
+       if(elm_win_wm_rotation_supported_get(win)) {
+               switch(e_rotation_type) {
+               case e_rotation_onlyPortrait: {
+                       int rots[] = DEF_SENSOR_ARRAY_ONLY_PORT;
+                       elm_win_wm_rotation_available_rotations_set(win, (const int*) (&rots), sizeof(rots)/sizeof(int));
+               }
+                       break;
+               case e_rotation_onlyLandscape: {
+                       int rots[] = DEF_SENSOR_ARRAY_ONLY_LAND;
+                       elm_win_wm_rotation_available_rotations_set(win, (const int*) (&rots), sizeof(rots)/sizeof(int));
+               }
+                       break;
+               case e_rotation_fullSensor: {
+                       int rots[] = DEF_SENSOR_ARRAY_FULL;
+                       elm_win_wm_rotation_available_rotations_set(win, (const int*) (&rots), sizeof(rots)/sizeof(int));
+               }
+                       break;
+               case e_rotation_noSensor: {
+                       int rots[] = DEF_SENSOR_ARRAY_NO;
+                       elm_win_wm_rotation_available_rotations_set(win, (const int*) (&rots), sizeof(rots)/sizeof(int));
+               }
+                 break;
+               default:
+                       break;
+               }
+       }
+}
+
+resolution_e uib_util_get_resolution_type(int w, int h) {]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$profile='mobile'">
+                               <xsl:text><![CDATA[
+       if((w==800 && h==480) || (w==480 && h==800))
+               return e_resolution_WVGA;
+       else if((w==960 && h==540) || (w==540 && h==960))
+               return e_resolution_qHD;
+       else if((w==1280 && h==720) || (w==720 && h==1280))
+               return e_resolution_HD;
+       else
+               return e_resolution_unknown;]]></xsl:text>
+                       </xsl:when>
+                       <xsl:when test="$profile='wearable'">
+                               <xsl:text><![CDATA[
+       if((w==320 && h==320))
+               return e_resolution_SQUARE_320x320;
+       else if((w==360 && h==480) || (w==480 && h==360))
+               return e_resolution_SQUARE_360x480;
+       else
+               return e_resolution_unknown;]]></xsl:text>
+                       </xsl:when>
+                       <xsl:when test="$profile='wearable-circle'">
+                               <xsl:text><![CDATA[
+       if((w==360 && h==360))
+               return e_resolution_CIRCLE_360x360;
+       else
+               return e_resolution_unknown;]]></xsl:text>
+                       </xsl:when>
+                       <xsl:when test="$profile='tv'">
+                               <xsl:text><![CDATA[
+       if((w==720 && h==1280) || (w==1280 && h==720))
+               return e_resolution_HD;
+       else if((w==1080 && h==1920) || (w==1920 && h==1080))
+               return e_resolution_FHD;
+       else
+               return e_resolution_unknown;]]></xsl:text>
+                       </xsl:when>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+}
+
+int uib_util_get_device_info(uib_device_info_st* uib_device_info ) {
+       if(!uib_device_info){
+               return -1;
+       }
+
+       strcpy(uib_device_info->profile_name, elm_config_profile_get());
+       system_info_get_platform_int("tizen.org/feature/screen.width", &uib_device_info->w);
+       system_info_get_platform_int("tizen.org/feature/screen.height", &uib_device_info->h);
+       system_info_get_platform_int("tizen.org/feature/screen.dpi", &uib_device_info->dpi);
+
+       double profile_factor = (!strcmp(uib_device_info->profile_name, "mobile"))? 0.7 : 0.4;
+       uib_device_info->base_scale = uib_device_info->dpi / 90 * profile_factor;
+
+       uib_device_info->resolution_type = uib_util_get_resolution_type(uib_device_info->w, uib_device_info->h);
+
+       return 0;
+}
+
+Elm_Object_Item* uib_util_push_view(char *view_name) {
+       Evas_Object* app_nf = uib_views_get_instance()->get_window_obj()->app_naviframe;
+       uib_view_context* vc=NULL;
+       ]]>
+       </xsl:text>
+               <xsl:for-each select="/document/views/view">
+                       <xsl:choose>
+                               <xsl:when test="position()=1">
+                                       <xsl:value-of select="concat('if(!strcmp(view_name,&quot;',@id,'&quot;)) {',$newline,$tab,$tab,'vc = uib_view_',@id,'_create(app_nf, NULL);',$newline,$tab,'}')" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of
+                                               select="concat(' else if(!strcmp(view_name,&quot;',@id,'&quot;)) {',$newline,$tab,$tab,'vc = uib_view_',@id,'_create(app_nf, NULL);',$newline,$tab,'}')" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:for-each>
+               <xsl:text><![CDATA[
+       else { // create user view
+               vc = uib_views_get_instance()->create_user_view(view_name);
+       }
+       if(!vc) {
+               return NULL;
+       }
+       Elm_Object_Item* elm_obj_item = elm_naviframe_item_push(app_nf, "", NULL, NULL, vc->root_container, NULL);
+       //TODO: Check for side-effects. This change prevents view refresh on naviframe popup
+       elm_naviframe_content_preserve_on_pop_set(app_nf, EINA_TRUE);
+       elm_naviframe_item_title_enabled_set (elm_obj_item, EINA_FALSE, EINA_FALSE);
+       return elm_obj_item;
+}
+
+uib_popup_context* uib_create_popup(char *popup_name) {
+       uib_popup_context* vc=NULL;]]>
+</xsl:text>
+       <xsl:if test="count(/document/views/view[@type='popup']) > 0">
+<xsl:text><![CDATA[
+       Evas_Object* app_nf = uib_views_get_instance()->get_window_obj()->app_naviframe;
+]]>
+       </xsl:text>
+               <xsl:for-each select="/document/views/view[@type='popup']">
+               <xsl:variable name="view_id" select="@id" />
+                       <xsl:for-each select="./*">
+                               <xsl:choose>
+                                       <xsl:when test="position()=1">
+                                               <xsl:value-of select="concat('if(!strcmp(popup_name,&quot;',@id,'&quot;)) {',$newline,$tab,$tab,'vc = uib_view_',$view_id,'_create(app_nf, NULL);',$newline,$tab,'}')" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of
+                                                       select="concat(' else if(!strcmp(popup_name,&quot;',@id,'&quot;)) {',$newline,$tab,$tab,'vc = uib_view_',$view_id,'_create(app_nf, NULL);',$newline,$tab,'}')" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:for-each>
+               </xsl:for-each>
+       </xsl:if>
+<xsl:text><![CDATA[
+       return vc;
+}
+
+uib_popup_context* uib_create_ctxpopup(char *popup_name, ctxpopup_position_e position, Evas_Object *obj, Evas_Coord input_x, Evas_Coord input_y) {
+       uib_popup_context* vc = uib_create_popup(popup_name);
+       if(vc == NULL) {
+               return NULL;
+       }
+       Evas_Coord x, y;
+       Evas_Coord obj_x, obj_y, obj_w, obj_h;
+
+       if(position == e_ctxpopup_position_default) {
+               if(obj == NULL) {
+                       return vc;
+               }
+               evas_object_geometry_get(obj, &obj_x, &obj_y, &obj_w, &obj_h);
+               x = obj_x + (obj_w/2);
+               y = obj_y + (obj_h/2);
+       } else {
+               x = input_x;
+               y = input_y;
+       }
+       evas_object_move(vc->root_container, x, y);
+       return vc;
+}
+
+char* uib_util_get_current_config_name() {
+       return uib_views_get_instance()->get_current_config_name();
+}
+
+void uib_util_widget_hide_on_grid(Evas_Object* grid_evas_obj, Evas_Object* evas_sub_obj) {
+       elm_grid_pack(grid_evas_obj, evas_sub_obj, -100, -100, 0, 0);
+}
+
+char* uib_util_rm_get_locale_string(char* src_string) {
+       char* locale_string=NULL;
+       if((src_string==NULL) || (strlen(src_string)<1)) {
+               return NULL;
+       }
+       if(!strncasecmp(RM_ANNOTATION_LOCALE, src_string, RM_ANNOTATION_LOCALE_LEN)) { // matching
+               locale_string = _(src_string+RM_ANNOTATION_LOCALE_LEN); // i18n_get_text
+       }
+       else {
+               locale_string = src_string;
+       }
+
+       return locale_string;
+}
+
+int uib_util_rm_get_resource_path(_APP_RESOURCE_E e_resource_type, const char* resource_path_in, char** resource_path_out) {
+       int ret=0;
+       if((resource_path_in==NULL) || (strlen(resource_path_in)<1)) {
+               return 0;
+       }
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$is_version_rm_support='true'">
+                               <xsl:text><![CDATA[
+       if(!strncasecmp(RM_ANNOTATION_RESOURCE, resource_path_in, RM_ANNOTATION_RESOURCE_LEN)) { // matching
+               ret = app_resource_manager_get(e_resource_type, resource_path_in+RM_ANNOTATION_RESOURCE_LEN, resource_path_out);
+       }
+       else {
+               char *res_path = app_get_resource_path();
+               int resource_path_out_size = strlen(resource_path_in)+strlen(res_path) + 1;
+               *resource_path_out = (char*) malloc(resource_path_out_size);
+               if (resource_path_out) {
+                       sprintf(*resource_path_out, "%s%s", res_path, resource_path_in);
+                       free(res_path);
+               }
+       }
+               ]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:text><![CDATA[
+       char *res_path = app_get_resource_path();
+       *resource_path_out = (char*) malloc(strlen(resource_path_in)+strlen(res_path)+64);
+       if (res_path) {
+               sprintf(*resource_path_out, "%s%s", res_path, resource_path_in);
+               free(res_path);
+       }
+               ]]></xsl:text>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+       return ret;
+}
+]]></xsl:text>
+
+               <xsl:if test="$profile='tv'">
+                       <xsl:text><![CDATA[
+void uib_util_win_alpha_set(Evas_Object *data, Eina_Bool enabled) {
+       Evas_Object *bg = evas_object_data_get(data, "bg");
+       if (enabled)
+               evas_object_hide(bg);
+       else
+               evas_object_show(bg);
+       elm_win_alpha_set(data, enabled);
+}
+       ]]></xsl:text>
+               </xsl:if>
+
+
+               <!-- END : OUTPUT -->
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/uib_view_manager_source.xsl b/org.tizen.efluibuilder.codegenerator/res/src/uib_view_manager_source.xsl
new file mode 100644 (file)
index 0000000..f3042a6
--- /dev/null
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+
+       <xsl:template match="/">
+               <xsl:apply-templates select="//views">
+               </xsl:apply-templates>
+       </xsl:template>
+
+       <xsl:template match="views">
+
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+#include "g_inc_uib.h"
+#include "uib_views.h"
+#include "uib_view_manager.h"
+#include "uib_app_manager.h"
+
+static uib_view_context* g_uib_view_context_list[DEF_UIB_VIEW_MAX_NUM];
+static int g_view_context_total_num=0;
+
+static uib_view_manager_st g_uib_view_manager;
+
+int add_view_context(uib_view_context* uib_view_context);
+uib_view_context* find_view_context(char* view_name);
+void free_all_view_context();
+
+uib_view_manager_st* uib_view_manager_get_instance() {
+       if(!g_uib_view_manager._is_init) {
+               g_uib_view_manager._is_init = true;
+               g_uib_view_manager.add_view_context = &add_view_context;
+               g_uib_view_manager.find_view_context = &find_view_context;
+               g_uib_view_manager.free_all_view_context = &free_all_view_context;
+       }
+       return &g_uib_view_manager;
+}
+
+static int find_view_index(const char* view_name) {
+       int i=0;
+
+       for(i=0; i < g_view_context_total_num; i++) {
+               if(!strcmp(view_name, g_uib_view_context_list[i]->view_name))
+                       return i;
+       }
+       return -1; // find failed
+}
+
+int add_view_context(uib_view_context* vc) {
+       // check conflict the view_name
+       if(uib_views_get_instance()->get_total_hit_num(vc) > 0) {
+               UIB_DLOG(DLOG_ERROR, LOG_TAG, "This view is already exists. Conflicted view name is '%s'\n", vc->view_name);
+               return -1;
+       }
+
+       int i = find_view_index(vc->view_name);
+
+       evas_object_data_set(vc->root_container, KEY_VIEW_VC_SAVE, vc);
+       if(i < 0) {
+               if(g_view_context_total_num < DEF_UIB_VIEW_MAX_NUM) {
+                       g_uib_view_context_list[g_view_context_total_num] = vc;
+                       g_view_context_total_num++;
+                       return 0;
+               }
+               else {
+                       UIB_DLOG(DLOG_ERROR, LOG_TAG, "It was failed to create the view. Too many views exist. '%d'\n", g_view_context_total_num);
+                       return -1;
+               }
+       }
+       else { // overwrite
+               g_uib_view_context_list[i] = vc;
+       }
+       return 0;
+}
+
+uib_view_context* find_view_context(char* view_name) {
+       int i=0;
+
+       for(i=0; i < g_view_context_total_num; i++) {
+               if(!strcmp(view_name, g_uib_view_context_list[i]->view_name)) {
+                       return g_uib_view_context_list[i];
+               }
+       }
+       return NULL; // find failed
+}
+
+void free_all_view_context() {
+       int i=0;
+
+       for(i=0; i < g_view_context_total_num; i++) {
+               if(g_uib_view_context_list[i])
+                       free(g_uib_view_context_list[i]);
+       }
+}
+]]>
+</xsl:text>
+
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/uib_view_source.xsl b/org.tizen.efluibuilder.codegenerator/res/src/uib_view_source.xsl
new file mode 100644 (file)
index 0000000..ce7c0e9
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:output encoding="utf-8" indent="yes" method="text" />
+       <xsl:variable name="newline">
+               <xsl:text>&#xa;</xsl:text>
+       </xsl:variable>
+       <xsl:param name="indent" select="'&#x9;'" />
+       <xsl:param name="current_view_name" />
+       <xsl:param name="is_version_rm_support" />
+       <xsl:param name="profile" />
+
+       <xsl:include href="util/common.xsl" />
+       <xsl:include href="util/rconvert.xsl" />
+       <xsl:include href="util/event.xsl" />
+       <xsl:include href="src/components/view.xsl" />
+       <xsl:include href="src/components/tizenPopup.xsl" />
+       <xsl:include href="src/components/scroller.xsl" />
+       <xsl:include href="src/components/panel.xsl" />
+       <xsl:include href="src/components/grid.xsl" />
+       <xsl:include href="src/components/button.xsl" />
+       <xsl:include href="src/components/background.xsl" />
+       <xsl:include href="src/components/check.xsl" />
+       <xsl:include href="src/components/colorselector.xsl" />
+       <xsl:include href="src/components/entry.xsl" />
+       <xsl:include href="src/components/label.xsl" />
+       <xsl:include href="src/components/radio.xsl" />
+       <xsl:include href="src/components/spinner.xsl" />
+       <xsl:include href="src/components/slider.xsl" />
+       <xsl:include href="src/components/progressbar.xsl" />
+       <xsl:include href="src/components/table.xsl" />
+       <xsl:include href="src/components/box.xsl" />
+       <xsl:include href="src/components/panes.xsl" />
+       <xsl:include href="src/components/layout.xsl" />
+       <xsl:include href="src/components/toolbar.xsl" />
+       <xsl:include href="src/components/toolbaritem.xsl" />
+       <xsl:include href="src/components/index.xsl" />
+       <xsl:include href="src/components/indexitem.xsl" />
+       <xsl:include href="src/components/multibuttonentry.xsl" />
+       <xsl:include href="src/components/multibuttonentryitem.xsl" />
+       <xsl:include href="src/components/gengrid.xsl" />
+       <xsl:include href="src/components/gengriditem.xsl" />
+       <xsl:include href="src/components/genlist.xsl" />
+       <xsl:include href="src/components/genlistitem.xsl" />
+       <xsl:include href="src/components/list.xsl" />
+       <xsl:include href="src/components/listitem.xsl" />
+       <xsl:include href="src/components/image.xsl" />
+       <xsl:include href="src/components/icon.xsl" />
+       <xsl:include href="src/components/datetime.xsl" />
+       <xsl:include href="src/components/calendar.xsl" />
+       <xsl:include href="src/components/popup.xsl" />
+       <xsl:include href="src/components/flipselector.xsl" />
+       <xsl:include href="src/components/flipselectoritem.xsl" />
+       <xsl:include href="src/components/map.xsl" />
+       <xsl:include href="src/components/ctxpopup.xsl" />
+       <xsl:include href="src/components/ctxpopupitem.xsl" />
+       <xsl:include href="src/components/hoversel.xsl" />
+       <xsl:include href="src/components/hoverselitem.xsl" />
+       <!-- <xsl:include href="widgets/circleprogressbar.xsl" /> -->
+       <!-- <xsl:include href="widgets/circleslider.xsl" /> -->
+       <!-- <xsl:include href="widgets/circledatetime.xsl" /> -->
+       <!-- <xsl:include href="widgets/circlegenlist.xsl" /> -->
+       <!-- <xsl:include href="widgets/circlegenlistitem.xsl" /> -->
+       <!-- <xsl:include href="widgets/circlescroller.xsl" /> -->
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/src/uib_views_source.xsl b/org.tizen.efluibuilder.codegenerator/res/src/uib_views_source.xsl
new file mode 100644 (file)
index 0000000..e70df88
--- /dev/null
@@ -0,0 +1,1152 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:variable name="newline">
+               <xsl:text>
+</xsl:text>
+       </xsl:variable>
+       <xsl:variable name="tab">
+               <xsl:text disable-output-escaping="yes">        </xsl:text>
+       </xsl:variable>
+       <xsl:param name="startup_view" />
+       <xsl:param name="profile" />
+       <xsl:param name="is_version_rm_support" />
+       <xsl:param name="is_widget_project" />
+       <xsl:param name="has_custom_theme" />
+       <xsl:param name="version" />
+
+       <xsl:variable name="common_resolution" select="/document/mscreen/configuration[@type = 'common']/@device" />
+       <xsl:variable name="common_orientation" select="/document/mscreen/configuration[@type = 'common']/@orientation" />
+       <xsl:variable name="common_id" select="/document/mscreen/configuration[@type = 'common']/@id" />
+       <xsl:variable name="common_name" select="/document/mscreen/configuration[@type = 'common']/@name" />
+
+       <xsl:template match="/">
+               <xsl:call-template name="uib_common_view_source" />
+       </xsl:template>
+
+       <xsl:template name="uib_common_view_source">
+
+               <!-- BEGIN : OUTPUT -->
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[/*******************************************************************************
+* This file was generated by UI Builder.
+* This file will be auto-generated each and everytime you save your project.
+* Do not hand edit this file.
+********************************************************************************/
+
+#include "g_inc_uib.h"
+
+#include "uib_views_inc.h"
+#include "uib_util.h"
+#include "uib_views.h"
+#include "uib_app_manager.h"
+
+#define ICON_MIN_SIZE 30
+#define DEF_STARTUP_VIEW_NAME ]]></xsl:text>
+               <xsl:value-of select="concat('&quot;',$startup_view,'&quot;')" />
+               <xsl:text disable-output-escaping="yes">
+<![CDATA[
+char* gpsz_startup_view_name = NULL;
+uib_user_views_st gst_uib_user_views[DEF_UIB_VIEW_MAX_NUM];
+int gi_user_views_total_num = 0;
+
+uib_views_st gst_uib_views;
+static window_obj* g_win_obj = NULL;
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$is_widget_project='true'">
+                               <xsl:text><![CDATA[window_obj* create_window_obj(widget_context_h context, int w, int y);]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:text><![CDATA[window_obj* create_window_obj();]]></xsl:text>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+window_obj* get_window_obj();
+void destroy_window_obj();
+
+char* get_current_config_name ();
+void uib_views_orientation_handler(int orient_status);
+uib_view_context* create_startup_view();
+void set_startup_view_name (const char* startup_view_name);
+void set_targeted_view(uib_view_context* vc);
+int add_user_views (char* user_view_name, void (*draw_user_view_cb)(window_obj* win_obj, uib_view_context* vc));
+uib_view_context* create_user_view (char* user_view_name);
+int find_user_view_idx(char* view_name);
+int get_total_hit_num(uib_view_context* vc);
+void uib_views_current_view_redraw();
+
+]]></xsl:text>
+               <xsl:for-each select="/document/views/view">
+                       <xsl:value-of
+                               select="concat('static void (*uib_',@id,'_config_delegate_portrait)();',$newline, 'static void (*uib_',@id,'_config_delegate_landscape)();',$newline,$newline)" />
+               </xsl:for-each>
+
+               <xsl:for-each select="/document/views/view">
+                       <xsl:variable name="configuration_id" select="@id" />
+                       <xsl:value-of select="concat('char* ','g_',@id,'_','config_name_portrait = NULL;',$newline)" />
+                       <xsl:value-of select="concat('char* ','g_',@id,'_','config_name_landscape = NULL;',$newline)" />
+               </xsl:for-each> <!-- update PM : get_current_configuration_name -->
+               <xsl:text><![CDATA[
+char* g_views_config_delegate_name_portrait=NULL;
+char* g_views_config_delegate_name_landscape=NULL;
+char* g_views_current_config_name=NULL;
+
+static uib_view_context* g_uib_saved_vc = NULL;
+static void push_to_stack_uib_vc(uib_view_context* push_vc);
+static void pop_from_stack_uib_vc(uib_view_context* pop_vc);
+
+static void uib_views_orientation_changed_cb(void*, Evas_Object*, void*);
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$profile='mobile' or $profile='tv'">
+                               <xsl:choose>
+                                       <xsl:when test="$version='2.3' or $version='2.3.1'">
+                                               <xsl:text><![CDATA[
+typedef enum _uib_gengrid_item_style_e{
+       UIB_GENGRID_ITEM_STYLE_UNKNOWN=-1,
+       UIB_GENGRID_ITEM_STYLE_DEFAULT,
+       UIB_GENGRID_ITEM_STYLE_ALBUM_PREVIEW,
+       UIB_GENGRID_ITEM_STYLE_BLOCK,
+       UIB_GENGRID_ITEM_STYLE_GROUP_INDEX,
+       UIB_GENGRID_ITEM_STYLE_DEFAULT_GRID,
+       UIB_GENGRID_ITEM_STYLE_DEFAULT_GRIDTEXT2,
+       UIB_GENGRID_ITEM_STYLE_DEFAULT_GRIDTEXT,
+       UIB_GENGRID_ITEM_STYLE_DEFAULT_STYLE,
+       UIB_GENGRID_ITEM_STYLE_SIZE
+} uib_gengrid_item_style_e;
+
+typedef enum _uib_genlist_item_style_e{
+       UIB_GENLIST_ITEM_STYLE_UNKNOWN=-1,
+       UIB_GENLIST_ITEM_STYLE_DEFAULT,
+       UIB_GENLIST_ITEM_STYLE_DEFAULT_STYLE,
+       UIB_GENLIST_ITEM_STYLE_DOUBLE_LABEL,
+       UIB_GENLIST_ITEM_STYLE_END_ICON,
+       UIB_GENLIST_ITEM_STYLE_FULL,
+       UIB_GENLIST_ITEM_STYLE_GROUPINDEX,
+       UIB_GENLIST_ITEM_STYLE_ONE_ICON,
+       UIB_GENLIST_ITEM_STYLE_ONE_MESSAGE,
+       UIB_GENLIST_ITEM_STYLE_SIZE,
+} uib_genlist_item_style_e;
+]]></xsl:text>
+                                       </xsl:when>
+                                       <xsl:when test="$version='2.4' or $version='3.0' or $version='4.0'">
+                                               <xsl:text><![CDATA[
+typedef enum _uib_gengrid_item_style_e{
+       UIB_GENGRID_ITEM_STYLE_UNKNOWN=-1,
+       UIB_GENGRID_ITEM_STYLE_DEFAULT,
+       UIB_GENGRID_ITEM_STYLE_TYPE1,
+       UIB_GENGRID_ITEM_STYLE_TYPE2,
+       UIB_GENGRID_ITEM_STYLE_SIZE
+} uib_gengrid_item_style_e;
+
+typedef enum _uib_genlist_item_style_e{
+       UIB_GENLIST_ITEM_STYLE_UNKNOWN=-1,
+       UIB_GENLIST_ITEM_STYLE_TYPE1,
+       UIB_GENLIST_ITEM_STYLE_TYPE2,
+       UIB_GENLIST_ITEM_STYLE_MULTILINE,
+       UIB_GENLIST_ITEM_STYLE_FULL,
+       UIB_GENLIST_ITEM_STYLE_GROUPINDEX,
+       UIB_GENLIST_ITEM_STYLE_GROUPINDEX_EXPANDABLE,
+       UIB_GENLIST_ITEM_STYLE_DEFAULT,
+       UIB_GENLIST_ITEM_STYLE_DOUBLE_LABEL,
+       UIB_GENLIST_ITEM_STYLE_ONE_ICON,
+       UIB_GENLIST_ITEM_STYLE_END_ICON,
+       UIB_GENLIST_ITEM_STYLE_SIZE
+} uib_genlist_item_style_e;
+]]></xsl:text>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:text><![CDATA[]]></xsl:text>
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                               <xsl:text><![CDATA[
+static Elm_Gengrid_Item_Class* _gic[UIB_GENGRID_ITEM_STYLE_SIZE];
+static void destory_gengrid_item_class();
+static uib_gengrid_item_style_e get_gengrid_item_style_e(const char* style);
+static Elm_Gengrid_Item_Class* get_gengrid_item_class(const char* style);
+static Elm_Gengrid_Item_Class* create_gengrid_item_class(const char* style);
+]]></xsl:text>
+                       </xsl:when>
+                       <xsl:when test="$profile='wearable'">
+                               <xsl:text><![CDATA[
+typedef enum _uib_genlist_item_style_e{
+       UIB_GENLIST_ITEM_STYLE_UNKNOWN=-1,
+       UIB_GENLIST_ITEM_STYLE_DEFAULT,
+       UIB_GENLIST_ITEM_STYLE_GROUPINDEX,
+       UIB_GENLIST_ITEM_STYLE_1TEXT,
+       UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON,
+       UIB_GENLIST_ITEM_STYLE_2TEXT,
+       UIB_GENLIST_ITEM_STYLE_2TEXT_1,
+       UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON_DIVIDER,
+       UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON_1,
+       UIB_GENLIST_ITEM_STYLE_2TEXT_1ICON_1,
+       UIB_GENLIST_ITEM_STYLE_NULTILINE_1TEXT,
+       UIB_GENLIST_ITEM_STYLE_NULTILINE_2TEXT,
+       UIB_GENLIST_ITEM_STYLE_SIZE
+} uib_genlist_item_style_e;
+]]></xsl:text>
+                       </xsl:when>
+                       <xsl:when test="$profile='wearable-circle'">
+                               <xsl:text><![CDATA[
+typedef enum _uib_genlist_item_style_e{
+       UIB_GENLIST_ITEM_STYLE_UNKNOWN=-1,
+       UIB_GENLIST_ITEM_STYLE_DEFAULT,
+       UIB_GENLIST_ITEM_STYLE_TITLE,
+       UIB_GENLIST_ITEM_STYLE_GROUPINDEX,
+       UIB_GENLIST_ITEM_STYLE_1TEXT,
+       UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON,
+       UIB_GENLIST_ITEM_STYLE_2TEXT,
+       UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON_DIVIDER,
+       UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON_1,
+       UIB_GENLIST_ITEM_STYLE_2TEXT_1ICON_1,
+       UIB_GENLIST_ITEM_STYLE_EDITFIELD,
+       UIB_GENLIST_ITEM_STYLE_SIZE
+} uib_genlist_item_style_e;
+]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise />
+               </xsl:choose>
+               <xsl:text><![CDATA[
+static Elm_Genlist_Item_Class* _gis[UIB_GENLIST_ITEM_STYLE_SIZE];
+static void destory_genlist_item_class();
+static uib_genlist_item_style_e get_genlist_item_style_e(const char* style);
+static Elm_Genlist_Item_Class* get_genlist_item_class(const char* style);
+static Elm_Genlist_Item_Class* create_genlist_item_class(const char* style);
+
+void uib_views_init() {
+       if(!gst_uib_views.is_init) {
+               gst_uib_views.is_init = true;
+               gst_uib_views.create_window_obj = &create_window_obj;
+               gst_uib_views.destroy_window_obj = &destroy_window_obj;
+               gst_uib_views.get_window_obj = &get_window_obj;
+               gst_uib_views.get_window = &get_window;
+               gst_uib_views.get_conformant = &get_conformant;
+               gst_uib_views.uib_views_current_view_redraw = &uib_views_current_view_redraw;
+               gst_uib_views.uib_views_orientation_handler = &uib_views_orientation_handler;
+               gst_uib_views.set_startup_view_name = &set_startup_view_name;
+               gst_uib_views.create_startup_view = &create_startup_view;
+               gst_uib_views.set_targeted_view = &set_targeted_view;
+               gst_uib_views.get_current_config_name = &get_current_config_name;
+               gst_uib_views.add_user_views = &add_user_views;
+               gst_uib_views.create_user_view = &create_user_view;
+               gst_uib_views.find_user_view_idx = &find_user_view_idx;
+               gst_uib_views.get_total_hit_num = &get_total_hit_num;
+
+               // check resoltuion type
+               const uib_device_info_st* uib_device_info = uib_app_manager_get_instance()->get_uib_device_info();
+               switch(uib_device_info->resolution_type) {
+]]></xsl:text>
+               <xsl:for-each select="/document/mscreen/configuration">
+                       <xsl:variable name="configuration_resolution" select="@device" />
+                       <xsl:variable name="configuration_id" select="/document/mscreen/configuration[@device=$configuration_resolution and @orientation='portrait']/@id" />
+                       <xsl:variable name="configuration_name" select="/document/mscreen/configuration[@device=$configuration_resolution and @orientation='portrait']/@name" /> <!-- update PM : get_current_configuration_name -->
+
+                       <xsl:if test="count(following-sibling::configuration[$configuration_resolution = @device]) = 0">
+                               <xsl:value-of select="concat($tab, $tab, 'case e_resolution_',$configuration_resolution,':',$newline)" />
+                               <xsl:for-each select="/document/views/view">
+                                       <xsl:variable name="view_id" select="@id" />
+                                       <xsl:variable name="view_position" select="position()" />
+
+                                       <xsl:if test="count(/document/mscreen//configuration[@device=$configuration_resolution and @orientation='portrait']) > 0">
+                                               <xsl:variable name="configuration_id" select="/document/mscreen/configuration[@device=$configuration_resolution and @orientation='portrait']/@id" />
+                                               <xsl:variable name="configuration_name" select="/document/mscreen/configuration[@device=$configuration_resolution and @orientation='portrait']/@name" />
+                                               <xsl:choose>
+                                                       <xsl:when test="(count(/document/views/view[$view_position]//variation[@config_ref=$configuration_id]) = 0)">
+                                                               <xsl:if test="$common_id = $configuration_id">
+                                                                       <xsl:value-of
+                                                                               select="concat($tab,$tab,$tab,'uib_',$view_id,'_config_delegate_portrait = &amp;uib_',$view_id,'_config_',$common_resolution,'_portrait;',$newline)" />
+                                                                       <xsl:value-of select="concat($tab,$tab,$tab,'g_',$view_id,'_config_name_portrait = ','&quot;',$common_name,'&quot;',';',$newline)" /> <!-- update PM : get_current_configuration_name -->
+                                                               </xsl:if>
+                                                               <xsl:if test="not($common_id = $configuration_id)">
+                                                                       <xsl:value-of
+                                                                               select="concat($tab,$tab,$tab,'uib_',$view_id,'_config_delegate_portrait = &amp;uib_',$view_id,'_config_',$common_resolution,'_',$common_orientation,';',$newline)" />
+                                                                       <xsl:value-of select="concat($tab,$tab,$tab,'g_',$view_id,'_config_name_portrait = ','&quot;',$common_name,'&quot;',';',$newline)" /> <!-- update PM : get_current_configuration_name -->
+                                                               </xsl:if>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <xsl:value-of select="concat($tab,$tab,$tab,'uib_',@id,'_config_delegate_portrait = &amp;uib_',@id,'_config_',$configuration_resolution,'_portrait;',$newline)" />
+                                                               <xsl:value-of select="concat($tab,$tab,$tab,'g_',$view_id,'_config_name_portrait = ','&quot;',$configuration_name,'&quot;',';',$newline)" /> <!-- update PM : get_current_configuration_name -->
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </xsl:if>
+
+                                       <xsl:if test="count(/document/mscreen//configuration[@device=$configuration_resolution and @orientation='portrait']) = 0">
+                                               <xsl:value-of
+                                                       select="concat($tab,$tab,$tab,'uib_',$view_id,'_config_delegate_portrait = &amp;uib_',$view_id,'_config_',$common_resolution,'_',$common_orientation,';',$newline)" />
+                                               <xsl:value-of select="concat($tab,$tab,$tab,'g_',$view_id,'_config_name_portrait = ','&quot;',$common_name,'&quot;',';',$newline)" /> <!-- update PM : get_current_configuration_name -->
+                                       </xsl:if>
+
+
+                                       <xsl:if test="count(/document/mscreen//configuration[@device=$configuration_resolution and @orientation='landscape']) > 0">
+                                               <xsl:variable name="configuration_id" select="/document/mscreen/configuration[@device=$configuration_resolution and @orientation='landscape']/@id" />
+                                               <xsl:variable name="configuration_name" select="/document/mscreen/configuration[@device=$configuration_resolution and @orientation='landscape']/@name" />
+                                               <xsl:choose>
+                                                       <xsl:when test="(count(/document/views/view[$view_position]//variation[@config_ref=$configuration_id]) = 0)">
+                                                               <xsl:if test="$common_id = $configuration_id">
+                                                                       <xsl:value-of
+                                                                               select="concat($tab,$tab,$tab,'uib_',$view_id,'_config_delegate_landscape = &amp;uib_',$view_id,'_config_',$common_resolution,'_landscape;',$newline)" />
+                                                                       <xsl:value-of select="concat($tab,$tab,$tab,'g_',$view_id,'_config_name_landscape = ','&quot;',$common_name,'&quot;',';',$newline)" /> <!-- update PM : get_current_configuration_name -->
+                                                               </xsl:if>
+                                                               <xsl:if test="not($common_id = $configuration_id)">
+                                                                       <xsl:value-of
+                                                                               select="concat($tab,$tab,$tab,'uib_',$view_id,'_config_delegate_landscape = &amp;uib_',$view_id,'_config_',$common_resolution,'_',$common_orientation,';',$newline)" />
+                                                                       <xsl:value-of select="concat($tab,$tab,$tab,'g_',$view_id,'_config_name_landscape = ','&quot;',$common_name,'&quot;',';',$newline)" /> <!-- update PM : get_current_configuration_name -->
+                                                               </xsl:if>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <xsl:value-of
+                                                                       select="concat($tab,$tab,$tab,'uib_',@id,'_config_delegate_landscape',' = &amp;uib_',@id,'_config_',$configuration_resolution,'_landscape;',$newline)" />
+                                                               <xsl:value-of select="concat($tab,$tab,$tab,'g_',$view_id,'_config_name_landscape = ','&quot;',$configuration_name,'&quot;',';',$newline)" /> <!-- update PM : get_current_configuration_name -->
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </xsl:if>
+                                       <xsl:if test="count(/document/mscreen//configuration[@device=$configuration_resolution and @orientation='landscape']) = 0">
+                                               <xsl:value-of
+                                                       select="concat($tab,$tab,$tab,'uib_',$view_id,'_config_delegate_landscape = &amp;uib_',$view_id,'_config_',$common_resolution,'_',$common_orientation,';',$newline)" />
+                                               <xsl:value-of select="concat($tab,$tab,$tab,'g_',$view_id,'_config_name_landscape = ','&quot;',$common_name,'&quot;',';',$newline)" /> <!-- update PM : get_current_configuration_name -->
+                                       </xsl:if>
+                                       <xsl:value-of select="concat($newline)" />
+                               </xsl:for-each>
+                               <xsl:value-of select="concat($tab,$tab,$tab,'break;',$newline)" />
+                       </xsl:if>
+               </xsl:for-each>
+
+               <xsl:text><![CDATA[
+               default:
+]]></xsl:text>
+               <xsl:for-each select="/document/views/view">
+                       <xsl:value-of
+                               select="concat($tab,$tab,$tab,'uib_',@id,'_config_delegate_portrait',' = &amp;uib_',@id,'_config_',$common_resolution,'_',$common_orientation,';',$newline)" />
+                       <xsl:value-of
+                               select="concat($tab,$tab,$tab,'uib_',@id,'_config_delegate_landscape',' = &amp;uib_',@id,'_config_',$common_resolution,'_',$common_orientation,';',$newline)" />
+                       <xsl:value-of select="concat($tab,$tab,$tab,'g_',@id,'_config_name_portrait = ','&quot;',$common_name,'&quot;',';',$newline)" /> <!-- update PM : get_current_configuration_name -->
+                       <xsl:value-of select="concat($tab,$tab,$tab,'g_',@id,'_config_name_landscape = ','&quot;',$common_name,'&quot;',';',$newline,$newline)" /> <!-- update PM : get_current_configuration_name -->
+               </xsl:for-each>
+               <xsl:text disable-output-escaping="yes"><![CDATA[
+                       break;
+               }
+       }
+}
+
+uib_views_st* uib_views_get_instance() {
+       uib_views_init();
+       return &gst_uib_views;
+}
+
+
+void uib_views_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {
+       push_to_stack_uib_vc(vc);
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);
+}
+
+void uib_views_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);
+       pop_from_stack_uib_vc(vc);
+}
+
+// called by views_create_callback
+void push_to_stack_uib_vc(uib_view_context* push_vc) {
+       evas_object_data_set(push_vc->root_container, KEY_VIEW_VC_SAVE, g_uib_saved_vc);
+       g_uib_saved_vc = push_vc;
+}
+
+// called by views_destroy_callback
+void pop_from_stack_uib_vc(uib_view_context* pop_vc) {
+       uib_view_context* rollback_vc = evas_object_data_get(pop_vc->root_container, KEY_VIEW_VC_SAVE);
+       g_uib_saved_vc = rollback_vc;
+       if(g_uib_saved_vc) {
+               set_targeted_view(g_uib_saved_vc);
+       }
+}
+
+int gi_cur_user_view_idx = 0;
+void set_targeted_view(uib_view_context* vc) {
+       const char* view_name = vc->view_name;
+       gi_cur_user_view_idx = (vc->is_user_view)? find_user_view_idx((char*)view_name) : -1;
+
+       if(gi_cur_user_view_idx < 0) {
+]]></xsl:text>
+               <xsl:for-each select="/document/views/view">
+                       <xsl:choose>
+                               <xsl:when test="position()=1">
+                                       <xsl:value-of
+                                               select="concat($tab, $tab,'if(!strcmp(view_name,&quot;',@id,'&quot;)) {',$newline,
+                                                          $tab, $tab,$tab,'gst_uib_views.uib_view_target_config_portrait = uib_',@id, '_config_delegate_portrait;',$newline,
+                                                          $tab, $tab,$tab,'gst_uib_views.uib_view_target_config_landscape = uib_',@id, '_config_delegate_landscape;',$newline,$newline,
+                                                          $tab, $tab,$tab,'g_views_config_delegate_name_portrait = g_',@id, '_config_name_portrait;',$newline,
+                                                          $tab, $tab,$tab,'g_views_config_delegate_name_landscape = g_',@id, '_config_name_landscape;',$newline,$newline)" /> <!-- update PM : get_current_configuration_name -->
+
+
+                                       <!-- update sensor control -->
+                                       <xsl:choose>
+                                               <xsl:when test="@screen_orientation='full_sensor'">
+                                                       <xsl:value-of select="concat($tab, $tab, 'uib_util_rotation_set(g_win_obj->win, e_rotation_fullSensor);',$newline,
+                                                          $tab,'}')" />
+                                               </xsl:when>
+                                               <xsl:when test="@screen_orientation='no_sensor'">
+                                                       <xsl:value-of select="concat($tab, $tab, 'uib_util_rotation_set(g_win_obj->win, e_rotation_noSensor);',$newline,
+                                                          $tab,'}')" />
+                                               </xsl:when>
+                                               <xsl:when test="@screen_orientation='only_landscape'">
+                                                       <xsl:value-of select="concat($tab, $tab, 'uib_util_rotation_set(g_win_obj->win, e_rotation_onlyLandscape);',$newline,
+                                                          $tab,'}')" />
+                                               </xsl:when>
+                                               <xsl:when test="@screen_orientation='only_portrait'">
+                                                       <xsl:value-of select="concat($tab, $tab, 'uib_util_rotation_set(g_win_obj->win, e_rotation_onlyPortrait);',$newline,
+                                                          $tab,'}')" />
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:value-of select="concat($tab, $tab, $tab, 'uib_util_rotation_set(g_win_obj->win, e_rotation_default);',$newline,
+                                                          $tab, $tab,'}')" />
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of
+                                               select="concat(' else if(!strcmp(view_name,&quot;',@id,'&quot;)) {',$newline,
+                                                          $tab,$tab,$tab,'gst_uib_views.uib_view_target_config_portrait = uib_',@id, '_config_delegate_portrait;',$newline,
+                                                          $tab,$tab,$tab,'gst_uib_views.uib_view_target_config_landscape = uib_',@id, '_config_delegate_landscape;',$newline,$newline,
+                                                          $tab,$tab,$tab,'g_views_config_delegate_name_portrait = g_',@id, '_config_name_portrait;',$newline,
+                                                          $tab,$tab,$tab,'g_views_config_delegate_name_landscape = g_',@id, '_config_name_landscape;',$newline,$newline)" />
+                                       <!-- update sensor control -->
+                                       <xsl:choose>
+                                               <xsl:when test="@screen_orientation='full_sensor'">
+                                                       <xsl:value-of select="concat($tab, $tab, 'uib_util_rotation_set(g_win_obj->win, e_rotation_fullSensor);',$newline,
+                                                          $tab,'}')" />
+                                               </xsl:when>
+                                               <xsl:when test="@screen_orientation='no_sensor'">
+                                                       <xsl:value-of select="concat($tab, $tab, 'uib_util_rotation_set(g_win_obj->win, e_rotation_noSensor);',$newline,
+                                                          $tab,'}')" />
+                                               </xsl:when>
+                                               <xsl:when test="@screen_orientation='only_landscape'">
+                                                       <xsl:value-of select="concat($tab, $tab, 'uib_util_rotation_set(g_win_obj->win, e_rotation_onlyLandscape);',$newline,
+                                                          $tab,'}')" />
+                                               </xsl:when>
+                                               <xsl:when test="@screen_orientation='only_portrait'">
+                                                       <xsl:value-of select="concat($tab, $tab, 'uib_util_rotation_set(g_win_obj->win, e_rotation_onlyPortrait);',$newline,
+                                                          $tab,'}')" />
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:value-of select="concat($tab, $tab, $tab, 'uib_util_rotation_set(g_win_obj->win, e_rotation_default);',$newline,
+                                                          $tab,$tab,'}')" />
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:for-each>
+               <xsl:text disable-output-escaping="yes"><![CDATA[
+               else { // This is user view
+                       gst_uib_views.uib_view_target_config_portrait = NULL;
+                       gst_uib_views.uib_view_target_config_landscape = NULL;
+
+                       g_views_config_delegate_name_portrait = VIEWS_CONFIG_NAME_NONE;
+                       g_views_config_delegate_name_landscape = VIEWS_CONFIG_NAME_NONE;
+               }
+       }
+       int orientation=elm_win_rotation_get(g_win_obj->win);
+       elm_win_indicator_mode_set(g_win_obj->win, vc->indicator_state);
+       uib_views_get_instance()->uib_views_orientation_handler(orientation);
+}
+
+void uib_ctxpopup_back_callback(void *data, Evas_Object *obj, void *event_info) {
+       eext_ctxpopup_back_cb(data, obj, event_info);
+       evas_object_del(obj);
+}
+
+void uib_views_orientation_handler(int orient_status) {
+       if(gi_cur_user_view_idx < 0) {
+               switch(DEF_UIB_ORIENT_TYPE(orient_status)) {
+               case e_orientation_port:
+                       uib_views_get_instance()->uib_view_target_config_portrait();
+                       g_views_current_config_name = g_views_config_delegate_name_portrait;
+                       break;
+               case e_orientation_land:
+                       uib_views_get_instance()->uib_view_target_config_landscape();
+                       g_views_current_config_name = g_views_config_delegate_name_landscape;
+                       break;
+               default:
+                       uib_views_get_instance()->uib_view_target_config_portrait();
+                       g_views_current_config_name = g_views_config_delegate_name_portrait;
+                       break;
+               }
+       }
+       else {
+               uib_view_context* vc = uib_app_manager_get_instance()->find_view_context((char*) (gst_uib_user_views[gi_cur_user_view_idx].view_name));
+               gst_uib_user_views[gi_cur_user_view_idx].draw_user_view_cb(g_win_obj, vc);
+               g_views_current_config_name = VIEWS_CONFIG_NAME_NONE;
+       }
+}
+
+char* get_current_config_name() {
+       return g_views_current_config_name;
+}
+
+
+void uib_views_orientation_changed_cb(void *win, Evas_Object *obj, void *event_info) {
+       int orientation=elm_win_rotation_get(win);
+       uib_views_orientation_handler(orientation);
+}
+
+void uib_views_current_view_redraw() {
+       uib_views_orientation_changed_cb(g_win_obj->win, NULL, NULL);
+}
+
+void set_startup_view_name (const char* startup_view_name) {
+       gpsz_startup_view_name = (char*)startup_view_name;
+}
+
+uib_view_context* create_startup_view()
+{
+       evas_object_smart_callback_add(g_win_obj->win, KEY_WM_ROTATION_CHANGED, uib_views_orientation_changed_cb, g_win_obj->win);
+       gpsz_startup_view_name = (gpsz_startup_view_name==NULL)? DEF_STARTUP_VIEW_NAME : gpsz_startup_view_name;
+       if(strlen(gpsz_startup_view_name) < 1) {
+               UIB_DLOG(DLOG_ERROR, LOG_TAG, "create_startup_view= (Invalid startup view name=%s)\n", gpsz_startup_view_name);
+               exit(0);
+       }
+       uib_util_push_view(gpsz_startup_view_name);
+       return uib_app_manager_get_instance()->find_view_context(gpsz_startup_view_name);
+}
+
+int add_user_views (char* user_view_name, void (*draw_user_view_cb)(window_obj* win_obj, uib_view_context* vc)) {
+       if(gi_user_views_total_num < DEF_UIB_VIEW_MAX_NUM) {
+               gst_uib_user_views[gi_user_views_total_num].view_name = user_view_name;
+               gst_uib_user_views[gi_user_views_total_num].draw_user_view_cb = draw_user_view_cb;
+               gi_user_views_total_num++;
+               return 0;
+       }
+       return -1;
+}
+
+int find_user_view_idx(char* view_name) {
+       int i=0;
+
+       for(i=0; i < gi_user_views_total_num; i++) {
+               if(!strcmp(view_name, gst_uib_user_views[i].view_name))
+                       return i;
+       }
+       return -1; // find failed
+}
+
+int get_total_hit_num (uib_view_context* vc) {
+       int i=0;
+       int same_name_count=0;
+
+       for(i=0; i < gi_user_views_total_num; i++) {
+               if(!strcmp(vc->view_name, gst_uib_user_views[i].view_name)) {
+                       same_name_count++;
+               }
+       }
+       return (vc->is_user_view)? same_name_count-1 : same_name_count;
+}
+
+uib_view_context* create_user_view (char* user_view_name) {
+
+       int error_state = 0;
+
+       int idx = find_user_view_idx(user_view_name);
+       if (idx < 0) {
+               return NULL;
+       }
+       elm_win_indicator_mode_set(g_win_obj->win, ELM_WIN_INDICATOR_SHOW);
+       uib_view_context* vc = calloc(1, sizeof(uib_view_context));
+       vc->parent = g_win_obj->app_naviframe;
+       vc->view_name = user_view_name;
+       vc->is_user_view = true;
+       error_state = uib_app_manager_get_instance()->add_view_context((uib_view_context*)vc);
+
+       if(gst_uib_user_views[idx].draw_user_view_cb) {
+               set_targeted_view(vc);
+       }
+
+       //bind event handler
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_views_destroy_callback, vc);
+       uib_views_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, NULL);
+       return (uib_view_context*)vc;
+}
+
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$profile='tv'">
+                               <xsl:text><![CDATA[
+window_obj* create_window_obj()
+{
+       g_win_obj = calloc(1, sizeof(window_obj));
+       if (!g_win_obj) {
+               return NULL;
+       }]]></xsl:text>
+       <xsl:if test="$has_custom_theme='true'">
+               <xsl:text><![CDATA[
+       char *custom_theme_edj_path = NULL;
+       uib_util_rm_get_resource_path(APP_RESOURCE_TYPE_LAYOUT, "theme/custom_theme.edj", &custom_theme_edj_path);
+       elm_theme_overlay_add(NULL, custom_theme_edj_path);
+               ]]></xsl:text>
+       </xsl:if>
+       <xsl:text><![CDATA[
+       g_win_obj->win = elm_win_add(NULL, NULL, ELM_WIN_BASIC);
+       elm_win_fullscreen_set(g_win_obj->win, EINA_TRUE);
+       elm_win_alpha_set(g_win_obj->win, EINA_TRUE);
+
+       g_win_obj->bg = elm_bg_add(g_win_obj->win);
+       evas_object_size_hint_weight_set(g_win_obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(g_win_obj->win, g_win_obj->bg);
+       evas_object_show(g_win_obj->bg);
+
+       g_win_obj->conformant = elm_box_add(g_win_obj->win);
+       evas_object_size_hint_align_set(g_win_obj->conformant, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(g_win_obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(g_win_obj->conformant);
+       elm_win_resize_object_add(g_win_obj->win, g_win_obj->conformant);
+
+       g_win_obj->app_naviframe = elm_naviframe_add(g_win_obj->conformant);
+       evas_object_size_hint_weight_set(g_win_obj->app_naviframe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(g_win_obj->app_naviframe, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_show(g_win_obj->app_naviframe);
+       elm_box_pack_end(g_win_obj->conformant, g_win_obj->app_naviframe);
+
+       evas_object_data_set(g_win_obj->win, "root", g_win_obj);
+
+       evas_object_show(g_win_obj->win);
+       return g_win_obj;
+}
+               ]]></xsl:text>
+                       </xsl:when>
+                       <xsl:when test="$is_widget_project='true'">
+                               <xsl:text><![CDATA[
+window_obj* create_window_obj(widget_context_h context, int w, int h)
+{
+       g_win_obj = calloc(1, sizeof(window_obj));
+       if (!g_win_obj) {
+               return NULL;
+       }]]></xsl:text>
+       <xsl:if test="$has_custom_theme='true'">
+               <xsl:text><![CDATA[
+       char *custom_theme_edj_path = NULL;
+       uib_util_rm_get_resource_path(APP_RESOURCE_TYPE_LAYOUT, "theme/custom_theme.edj", &custom_theme_edj_path);
+       elm_theme_overlay_add(NULL, custom_theme_edj_path);
+               ]]></xsl:text>
+       </xsl:if>
+       <xsl:text><![CDATA[
+       int ret = widget_app_get_elm_win(context, &(g_win_obj->win));
+       if (ret != WIDGET_ERROR_NONE) {
+               UIB_DLOG(DLOG_ERROR, LOG_TAG, "failed to get window. err = %d", ret);
+               return NULL;
+       }
+       evas_object_resize(g_win_obj->win, w, h);
+
+       elm_win_conformant_set(g_win_obj->win, EINA_TRUE);
+       evas_object_show(g_win_obj->win);
+       g_win_obj->bg = elm_bg_add(g_win_obj->win);
+       evas_object_size_hint_weight_set(g_win_obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(g_win_obj->win, g_win_obj->bg);
+       evas_object_show(g_win_obj->bg);
+
+       elm_win_indicator_mode_set(g_win_obj->win, ELM_WIN_INDICATOR_SHOW);
+       g_win_obj->conformant = elm_conformant_add(g_win_obj->win);
+       evas_object_size_hint_weight_set(g_win_obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(g_win_obj->win, g_win_obj->conformant);
+       evas_object_show(g_win_obj->conformant);
+
+       g_win_obj->app_naviframe = elm_naviframe_add(g_win_obj->conformant);
+       elm_object_content_set(g_win_obj->conformant, g_win_obj->app_naviframe);]]></xsl:text>
+                               <!-- <xsl:if test="$profile='wearable-circle'">
+                                       <xsl:value-of select="concat($newline, $tab, 'g_win_obj->circle_surface = eext_circle_surface_conformant_add(g_win_obj->conformant);')" />
+                               </xsl:if> -->
+                               <xsl:text><![CDATA[
+       evas_object_data_set(g_win_obj->win, "root", g_win_obj);
+       return g_win_obj;
+}]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:text><![CDATA[
+window_obj* create_window_obj()
+{
+       g_win_obj = calloc(1, sizeof(window_obj));
+       if (!g_win_obj) {
+               return NULL;
+       }]]></xsl:text>
+       <xsl:if test="$has_custom_theme='true'">
+               <xsl:text><![CDATA[
+       char *custom_theme_edj_path = NULL;
+       uib_util_rm_get_resource_path(APP_RESOURCE_TYPE_LAYOUT, "theme/custom_theme.edj", &custom_theme_edj_path);
+       elm_theme_overlay_add(NULL, custom_theme_edj_path);
+               ]]></xsl:text>
+       </xsl:if>
+       <xsl:text><![CDATA[
+       g_win_obj->win = elm_win_add(NULL, NULL, ELM_WIN_BASIC);
+       elm_win_conformant_set(g_win_obj->win, EINA_TRUE);
+       evas_object_show(g_win_obj->win);
+       g_win_obj->bg = elm_bg_add(g_win_obj->win);
+       evas_object_size_hint_weight_set(g_win_obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(g_win_obj->win, g_win_obj->bg);
+       evas_object_show(g_win_obj->bg);
+
+       elm_win_indicator_mode_set(g_win_obj->win, ELM_WIN_INDICATOR_SHOW);
+       g_win_obj->conformant = elm_conformant_add(g_win_obj->win);
+       evas_object_size_hint_weight_set(g_win_obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(g_win_obj->win, g_win_obj->conformant);
+       evas_object_show(g_win_obj->conformant);
+
+       g_win_obj->app_naviframe = elm_naviframe_add(g_win_obj->conformant);
+       elm_object_content_set(g_win_obj->conformant, g_win_obj->app_naviframe);]]></xsl:text>
+                               <!-- <xsl:if test="$profile='wearable-circle'">
+                                       <xsl:value-of select="concat($newline, $tab, 'g_win_obj->circle_surface = eext_circle_surface_conformant_add(g_win_obj->conformant);')" />
+                               </xsl:if> -->
+                               <xsl:text><![CDATA[
+
+       evas_object_data_set(g_win_obj->win, "root", g_win_obj);
+       return g_win_obj;
+}
+               ]]></xsl:text>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+
+
+void destroy_window_obj()
+{
+       if (g_win_obj) {
+               evas_object_del(g_win_obj->win);
+               free(g_win_obj);
+               g_win_obj = NULL;
+       }
+       destory_genlist_item_class();]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$profile='mobile' or $profile='tv'">
+                               <xsl:text><![CDATA[
+       destory_gengrid_item_class();]]></xsl:text>
+                       </xsl:when>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+}
+
+window_obj* get_window_obj() {
+       return g_win_obj;
+}
+
+Evas_Object* get_window() {
+       return gst_uib_views.get_window_obj()->win;
+}
+
+Evas_Object* get_conformant() {
+       return gst_uib_views.get_window_obj()->conformant;
+}
+
+/***********************************************************************************************
+ *
+ * item class callbacks
+ *
+ ***********************************************************************************************/
+static Evas_Object* create_item_image(Evas_Object* parent, const char* path) {
+       Evas_Object *icon = elm_icon_add(parent);
+       char *resource_path = NULL;
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$is_version_rm_support='true'">
+                               <xsl:text><![CDATA[
+       uib_util_rm_get_resource_path(APP_RESOURCE_TYPE_IMAGE, path, &resource_path);
+               ]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:text><![CDATA[
+       uib_util_rm_get_resource_path(-1, path, &resource_path);
+               ]]></xsl:text>
+                       </xsl:otherwise>
+               </xsl:choose>
+               <xsl:text><![CDATA[
+       elm_image_file_set(icon, resource_path, NULL);
+       if(resource_path) {
+               free(resource_path);
+       }
+       evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(ICON_MIN_SIZE),ELM_SCALE_SIZE(ICON_MIN_SIZE));
+       evas_object_show(icon);
+       return icon;
+}
+
+char* uib_genlist_label_get(void *data, Evas_Object *obj, const char *part) {
+       uib_genlist_item *item = (uib_genlist_item*)data;
+       if(!strcmp(part, "elm.text")) {
+               if (item->label) {
+                       return strdup(item->label);
+               }
+       }
+       else if (!strcmp(part, "elm.text.sub") || !strcmp(part, "elm.text.1")) {
+               if (item->sub_label) {
+                       return strdup(item->sub_label);
+               }
+       }
+       return NULL;
+}
+
+Evas_Object* uib_genlist_icon_get(void *data , Evas_Object *obj, const char *part) {
+       uib_genlist_item *item = (uib_genlist_item*) data;
+       if (!strcmp(part, "elm.swallow.icon")) {
+               if(item->icon_standard){
+                       Evas_Object *ic = elm_icon_add(obj);
+                       elm_icon_standard_set(ic, item->icon_standard);
+                       evas_object_size_hint_min_set(ic, ELM_SCALE_SIZE(ICON_MIN_SIZE),ELM_SCALE_SIZE(ICON_MIN_SIZE));
+                       return ic;
+               } else if(item->icon_path){
+                       return create_item_image(obj, item->icon_path);
+               }
+       }
+
+       if (!strcmp(part, "elm.swallow.end")) {
+               if (item->end_icon_standard) {
+                       Evas_Object *ic = elm_icon_add(obj);
+                       elm_icon_standard_set(ic, item->end_icon_standard);
+                       evas_object_size_hint_min_set(ic, ELM_SCALE_SIZE(ICON_MIN_SIZE),ELM_SCALE_SIZE(ICON_MIN_SIZE));
+                       return ic;
+               } else if (item->end_icon_path) {
+                       return create_item_image(obj, item->end_icon_path);
+               }
+       }
+
+       if (!strcmp(part, "elm.icon")) {
+               if(item->icon_path){
+                       Evas_Object *ic = create_item_image(obj, item->icon_path);
+                       return ic;
+               }
+       }
+       return NULL;
+}
+
+Eina_Bool uib_genlist_state_get(void *data , Evas_Object *obj , const char *part) {
+       return EINA_FALSE;
+}
+
+void uib_genlist_del(void *data , Evas_Object *obj) {
+       uib_genlist_item *item = (uib_genlist_item*)data;
+       if (item) {
+               if (item->label) free(item->label);
+               if (item->sub_label) free(item->sub_label);
+               if (item->icon_path) free(item->icon_path);
+               if (item->icon_standard) free(item->icon_standard);
+               if (item->end_icon_path) free(item->end_icon_path);
+               if (item->end_icon_standard) free(item->end_icon_standard);
+               free(item);
+       }
+}
+
+
+Elm_Object_Item* create_genlist_item(Evas_Object* genlist, const char* style, const char* label, const char* sub_label, const char* icon_path, const char* icon_standard, const char* end_icon_path, const char* end_icon_standard, Elm_Object_Item* parent, Elm_Genlist_Item_Type type, Evas_Smart_Cb func, void* data){
+       uib_genlist_item* item = malloc(sizeof(uib_genlist_item));
+       memset(item, 0x0, sizeof(uib_genlist_item));
+
+       item->label = strdup(label);
+       item->sub_label = strdup(sub_label);
+       if(strlen(icon_path) != 0){
+               item->icon_path = strdup(icon_path);
+       } else if(strlen(icon_standard) != 0){
+               item->icon_standard = strdup(icon_standard);
+    }
+
+       if(strlen(end_icon_path) != 0){
+               item->end_icon_path = strdup(end_icon_path);
+       } else if(strlen(end_icon_standard) != 0){
+               item->end_icon_standard = strdup(end_icon_standard);
+       }
+
+       uib_genlist_item_style_e style_e = get_genlist_item_style_e(style);
+       if(style_e == UIB_GENLIST_ITEM_STYLE_GROUPINDEX) {
+               type = ELM_GENLIST_ITEM_TREE;
+       }
+       return elm_genlist_item_append(genlist,  get_genlist_item_class(style), item, parent, type, func, data);
+}
+
+static void destory_genlist_item_class() {
+       for(int i = 0; i< UIB_GENLIST_ITEM_STYLE_SIZE; i++) {
+               Elm_Genlist_Item_Class *itc = _gis[i];
+               if(itc != NULL) {
+                       elm_genlist_item_class_free(itc);
+               }
+       }
+}
+
+static Elm_Genlist_Item_Class* get_genlist_item_class(const char* style) {
+       uib_genlist_item_style_e style_e = get_genlist_item_style_e(style);
+       Elm_Genlist_Item_Class *itc = _gis[style_e];
+       if(itc == NULL) {
+               itc = create_genlist_item_class(style);
+               if(itc != NULL) {
+                       _gis[style_e] = itc;
+               }
+       }
+       return itc;
+}
+
+static Elm_Genlist_Item_Class* create_genlist_item_class(const char* style) {
+       Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
+       itc->item_style = style;
+       itc->func.text_get = uib_genlist_label_get;
+       itc->func.content_get = uib_genlist_icon_get;
+       itc->func.state_get = uib_genlist_state_get;
+       itc->func.del = uib_genlist_del;
+
+       return itc;
+}
+]]></xsl:text>
+               <xsl:choose>
+                       <xsl:when test="$profile='mobile' or $profile='tv'">
+                               <xsl:text><![CDATA[
+char* uib_gengrid_label_get(void *data, Evas_Object *obj, const char *part) {
+       uib_gengrid_item *item = (uib_gengrid_item*)data;
+       if (item->label) {
+               return strdup(item->label);
+       } else {
+               return NULL;
+       }
+}
+
+Evas_Object* uib_gengrid_icon_get(void *data, Evas_Object *obj, const char *part) {
+       uib_gengrid_item *item = (uib_gengrid_item*) data;
+       if (!strcmp(part, "elm.swallow.icon") && item->icon_path) {
+               return create_item_image(obj, item->icon_path);
+       } else {
+               return NULL;
+       }
+}
+
+Eina_Bool uib_gengrid_state_get(void *data, Evas_Object *obj, const char *part) {
+       return EINA_FALSE;
+}
+
+void uib_gengrid_del(void *data, Evas_Object *obj) {
+       uib_gengrid_item *item = (uib_gengrid_item*)data;
+       if (item) {
+               if (item->label) free(item->label);
+               if (item->icon_path) free(item->icon_path);
+               free(item);
+       }
+}
+
+static void destory_gengrid_item_class() {
+       for(int i = 0; i< UIB_GENGRID_ITEM_STYLE_SIZE; i++) {
+               Elm_Genlist_Item_Class *itc = _gic[i];
+               if(itc != NULL) {
+                       elm_gengrid_item_class_free(itc);
+               }
+       }
+}
+
+static Elm_Gengrid_Item_Class* get_gengrid_item_class(const char* style) {
+       uib_gengrid_item_style_e style_e = get_gengrid_item_style_e(style);
+       Elm_Gengrid_Item_Class *itc = _gic[style_e];
+       if(itc == NULL) {
+               itc = create_gengrid_item_class(style);
+               if(itc != NULL) {
+                       _gic[style_e] = itc;
+               }
+       }
+       return itc;
+}
+
+static Elm_Gengrid_Item_Class* create_gengrid_item_class(const char* style) {
+       Elm_Gengrid_Item_Class *itc = elm_gengrid_item_class_new();
+       itc->item_style = style;
+       itc->func.text_get = uib_gengrid_label_get;
+       itc->func.content_get = uib_gengrid_icon_get;
+       itc->func.state_get = uib_gengrid_state_get;
+       itc->func.del = uib_gengrid_del;
+
+       return itc;
+}
+
+Elm_Object_Item* create_multibuttonentry_item(Evas_Object* multibuttonentry, const char* label, Evas_Smart_Cb func, void* data) {
+       Elm_Object_Item* item = elm_multibuttonentry_item_append(multibuttonentry, label, func, data);
+       return item;
+}
+
+Elm_Object_Item* create_gengrid_item(Evas_Object* gengrid, const char* style, const char* label, const char* path, Evas_Smart_Cb func, void* data) {
+       uib_gengrid_item* item = malloc(sizeof(uib_gengrid_item));
+       memset(item, 0x0, sizeof(uib_gengrid_item));
+       item->label = strdup(label);
+       item->icon_path = strdup(path);
+
+       return elm_gengrid_item_append(gengrid, get_gengrid_item_class(style), item, func, data);
+}
+]]></xsl:text>
+                               <xsl:choose>
+                                       <xsl:when test="$version='2.3' or $version='2.3.1'">
+                                               <xsl:text><![CDATA[
+static uib_gengrid_item_style_e get_gengrid_item_style_e(const char* style) {
+       uib_gengrid_item_style_e item_style = UIB_GENGRID_ITEM_STYLE_UNKNOWN;
+
+       if(!strcmp("default", style)){
+               item_style = UIB_GENGRID_ITEM_STYLE_DEFAULT;
+       }else if(!strcmp("album-preview", style)){
+               item_style = UIB_GENGRID_ITEM_STYLE_ALBUM_PREVIEW;
+       }else if(!strcmp("block", style)){
+               item_style = UIB_GENGRID_ITEM_STYLE_BLOCK;
+       }else if(!strcmp("group_index", style)){
+               item_style = UIB_GENGRID_ITEM_STYLE_GROUP_INDEX;
+       }else if(!strcmp("default_grid", style)){
+               item_style = UIB_GENGRID_ITEM_STYLE_DEFAULT_GRID;
+       }else if(!strcmp("default_gridtext2", style)){
+               item_style = UIB_GENGRID_ITEM_STYLE_DEFAULT_GRIDTEXT2;
+       }else if(!strcmp("default_gridtext", style)){
+               item_style = UIB_GENGRID_ITEM_STYLE_DEFAULT_GRIDTEXT;
+       }else if(!strcmp("default_style", style)){
+               item_style = UIB_GENGRID_ITEM_STYLE_DEFAULT_STYLE;
+       }else {
+               item_style = UIB_GENGRID_ITEM_STYLE_DEFAULT;
+       }
+
+       return item_style;
+}
+
+static uib_genlist_item_style_e get_genlist_item_style_e(const char* style) {
+       uib_genlist_item_style_e item_style = UIB_GENLIST_ITEM_STYLE_UNKNOWN;
+
+       if(!strcmp("default", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_DEFAULT;
+       }else if(!strcmp("default_style", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_DEFAULT_STYLE;
+       }else if(!strcmp("double_label", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_DOUBLE_LABEL;
+       }else if(!strcmp("end_icon", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_END_ICON;
+       }else if(!strcmp("full", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_FULL;
+       }else if(!strcmp("group_index", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_GROUPINDEX;
+       }else if(!strcmp("one_icon", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_ONE_ICON;
+       }else if(!strcmp("message", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_ONE_MESSAGE;
+       }else {
+               item_style = UIB_GENLIST_ITEM_STYLE_DEFAULT;
+       }
+
+       return item_style;
+}
+
+]]></xsl:text>
+                                       </xsl:when>
+                                       <xsl:when test="$version='2.4' or $version='3.0' or $version='4.0'">
+                                               <xsl:text><![CDATA[
+static uib_gengrid_item_style_e get_gengrid_item_style_e(const char* style) {
+       uib_gengrid_item_style_e item_style = UIB_GENGRID_ITEM_STYLE_UNKNOWN;
+
+       if(!strcmp("default", style)){
+               item_style = UIB_GENGRID_ITEM_STYLE_DEFAULT;
+       }else if(!strcmp("type1", style)){
+               item_style = UIB_GENGRID_ITEM_STYLE_TYPE1;
+       }else if(!strcmp("type2", style)){
+               item_style = UIB_GENGRID_ITEM_STYLE_TYPE2;
+       }else {
+               item_style = UIB_GENGRID_ITEM_STYLE_DEFAULT;
+       }
+
+       return item_style;
+}
+
+static uib_genlist_item_style_e get_genlist_item_style_e(const char* style) {
+       uib_genlist_item_style_e item_style = UIB_GENLIST_ITEM_STYLE_UNKNOWN;
+
+       if(!strcmp("type1", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_TYPE1;
+       }else if(!strcmp("type2", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_TYPE2;
+       }else if(!strcmp("multiline", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_MULTILINE;
+       }else if(!strcmp("full", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_FULL;
+       }else if(!strcmp("group_index", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_GROUPINDEX;
+       }else if(!strcmp("group_index/expandable", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_GROUPINDEX_EXPANDABLE;
+       }else if(!strcmp("default", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_DEFAULT;
+       }else if(!strcmp("double_label", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_DOUBLE_LABEL;
+       }else if(!strcmp("one_icon", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_ONE_ICON;
+       }else if(!strcmp("end_icon", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_END_ICON;
+       }else{
+               item_style = UIB_GENLIST_ITEM_STYLE_DEFAULT;
+       }
+
+       return item_style;
+}
+]]></xsl:text>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:when>
+                       <xsl:when test="$profile='wearable'">
+                               <xsl:text><![CDATA[
+static uib_genlist_item_style_e get_genlist_item_style_e(const char* style) {
+       uib_genlist_item_style_e item_style = UIB_GENLIST_ITEM_STYLE_UNKNOWN;
+
+       if(!strcmp("default", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_DEFAULT;;
+       }else if(!strcmp("groupindex", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_GROUPINDEX;
+       }else if(!strcmp("1text", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_1TEXT;
+       }else if(!strcmp("1text.1icon", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON;
+       }else if(!strcmp("2text", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_2TEXT;
+       }else if(!strcmp("2text.1", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_2TEXT_1;
+       }else if(!strcmp("1text.1icon.divider", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON_DIVIDER;
+       }else if(!strcmp("1text.1icon.1", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON_1;
+       }else if(!strcmp("2text.1icon.1", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_2TEXT_1ICON_1;
+       }else if(!strcmp("multiline/1text", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_NULTILINE_1TEXT;
+       }else if(!strcmp("multiline/2text", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_NULTILINE_2TEXT;
+       }else{
+               item_style = UIB_GENLIST_ITEM_STYLE_DEFAULT;
+       }
+
+       return item_style;
+}
+]]></xsl:text>
+                       </xsl:when>
+                       <xsl:when test="$profile='wearable-circle'">
+                               <xsl:text><![CDATA[
+static uib_genlist_item_style_e get_genlist_item_style_e(const char* style) {
+       uib_genlist_item_style_e item_style = UIB_GENLIST_ITEM_STYLE_UNKNOWN;
+
+       if(!strcmp("default", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_DEFAULT;
+       }else if(!strcmp("title", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_TITLE;
+       }else if(!strcmp("groupindex", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_GROUPINDEX;
+       }else if(!strcmp("1text", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_1TEXT;
+       }else if(!strcmp("1text.1icon", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON;
+       }else if(!strcmp("2text", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_2TEXT;
+       }else if(!strcmp("1text.1icon.divider", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON_DIVIDER;
+       }else if(!strcmp("1text.1icon.1", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_1TEXT_1ICON_1;
+       }else if(!strcmp("2text.1icon.1", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_2TEXT_1ICON_1;
+       }else if(!strcmp("editfield", style)){
+               item_style = UIB_GENLIST_ITEM_STYLE_EDITFIELD;
+       }else{
+               item_style = UIB_GENLIST_ITEM_STYLE_DEFAULT;
+       }
+
+       return item_style;
+}
+]]></xsl:text>
+                       </xsl:when>
+                       <xsl:otherwise />
+               </xsl:choose>
+               <!-- END : OUTPUT -->
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/util/common.xsl b/org.tizen.efluibuilder.codegenerator/res/util/common.xsl
new file mode 100644 (file)
index 0000000..f69d5cc
--- /dev/null
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template name="dup">
+               <xsl:param name="input" />
+               <xsl:param name="count" select="2" />
+               <xsl:choose>
+                       <xsl:when test="not($count) or not($input)" />
+                       <xsl:when test="$count = 1">
+                               <xsl:value-of select="$input" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <!-- If $count is odd append an extra copy of input -->
+                               <xsl:if test="$count mod 2">
+                                       <xsl:value-of select="$input" />
+                               </xsl:if>
+                               <!-- Recursively apply template after doubling input and halving count -->
+                               <xsl:call-template name="dup">
+                                       <xsl:with-param name="input" select="concat($input,$input)" />
+                                       <xsl:with-param name="count" select="floor($count div 2)" />
+                               </xsl:call-template>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+       <xsl:template name="search-and-replace">
+               <xsl:param name="input" />
+               <xsl:param name="search-string" />
+               <xsl:param name="replace-string" />
+               <xsl:choose>
+                       <!-- See if the input contains the search string -->
+                       <xsl:when test="$search-string and 
+                           contains($input,$search-string)">
+                               <!-- If so, then concatenate the substring before the search string to the replacement string and to the result of recursively applying this template to the 
+                                       remaining substring. -->
+                               <xsl:value-of select="substring-before($input,$search-string)" />
+                               <xsl:value-of select="$replace-string" />
+                               <xsl:call-template name="search-and-replace">
+                                       <xsl:with-param name="input" select="substring-after($input,$search-string)" />
+                                       <xsl:with-param name="search-string" select="$search-string" />
+                                       <xsl:with-param name="replace-string" select="$replace-string" />
+                               </xsl:call-template>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <!-- There are no more occurrences of the search string so just return the current input string -->
+                               <xsl:value-of select="$input" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template name="size_hint_align_set">
+               <xsl:param name="align_h" />
+               <xsl:param name="align_v" />
+               <xsl:param name="indentation" />
+               <xsl:param name="id" />
+
+               <xsl:if test="string-length($align_h) != 0 and string-length($align_v) != 0">
+                       <xsl:variable name="x">
+                               <xsl:choose>
+                                       <xsl:when test="$align_h='fill'">
+                                               <xsl:value-of select='format-number(-1, "#.0")' />
+                                       </xsl:when>
+                                       <xsl:when test="$align_v='left'">
+                                               <xsl:value-of select='format-number(0, "#.0")' />
+                                       </xsl:when>
+                                       <xsl:when test="$align_v='center'">
+                                               <xsl:value-of select='format-number(0.5, "#.0")' />
+                                       </xsl:when>
+                                       <xsl:when test="$align_v='right'">
+                                               <xsl:value-of select='format-number(1, "#.0")' />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="$align_h" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:variable>
+                       <xsl:variable name="y">
+                               <xsl:choose>
+                                       <xsl:when test="$align_v='fill'">
+                                               <xsl:value-of select='format-number(-1, "#.0")' />
+                                       </xsl:when>
+                                       <xsl:when test="$align_v='top'">
+                                               <xsl:value-of select='format-number(0, "#.0")' />
+                                       </xsl:when>
+                                       <xsl:when test="$align_v='center'">
+                                               <xsl:value-of select='format-number(0.5, "#.0")' />
+                                       </xsl:when>
+                                       <xsl:when test="$align_v='bottom'">
+                                               <xsl:value-of select='format-number(1, "#.0")' />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="$align_v" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:variable>
+                       <xsl:value-of select="concat($indentation, 'evas_object_size_hint_align_set(vc->', $id, ', ', $x, ', ' , $y, ');', '&#xD;')" />
+               </xsl:if>
+
+       </xsl:template>
+
+       <xsl:template name="size_hint_weight_set">
+               <xsl:param name="weight_h" />
+               <xsl:param name="weight_v" />
+               <xsl:param name="indentation" />
+               <xsl:param name="id" />
+
+               <xsl:if test="string-length($weight_h) != 0 and string-length($weight_v) != 0">
+                       <xsl:variable name="x">
+                               <xsl:choose>
+                                       <xsl:when test="$weight_h='expand'">
+                                               <xsl:value-of select='format-number(-1, "#.0")' />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select='format-number($weight_h, "#.0")' />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:variable>
+                       <xsl:variable name="y">
+                               <xsl:choose>
+                                       <xsl:when test="$weight_v='expand'">
+                                               <xsl:value-of select='format-number(-1, "#.0")' />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select='format-number($weight_v, "#.0")' />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:variable>
+                       <xsl:value-of select="concat($indentation, 'evas_object_size_hint_weight_set(vc->', $id, ', ', $x, ', ' , $y, ');', '&#xD;')" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template name="function_call3">
+               <xsl:param name="function_name" />
+               <xsl:param name="param1" />
+               <xsl:param name="param2" />
+               <xsl:param name="param3" />
+               <xsl:value-of select="$function_name" />
+               <xsl:text>(</xsl:text>
+               <xsl:value-of select="$param1" />
+               <xsl:text>, </xsl:text>
+               <xsl:value-of select="$param2" />
+               <xsl:text>, </xsl:text>
+               <xsl:value-of select="$param3" />
+               <xsl:text>);</xsl:text>
+       </xsl:template>
+
+       <xsl:template name="eina_bool">
+               <xsl:param name="bool" />
+               <xsl:choose>
+                       <xsl:when test="$bool = 'true'">
+                               <xsl:value-of select="'EINA_TRUE'" />
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="'EINA_FALSE'" />
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+
+       <xsl:template name="disable">
+               <xsl:param name="disable" />
+               <xsl:param name="indentation" />
+               <xsl:param name="id" />
+               <xsl:if test="string-length($disable) != 0"><!-- default: false -->
+                       <xsl:choose>
+                               <xsl:when test="$disable = 'true'">
+                                       <xsl:value-of select="concat($indentation, 'elm_object_disabled_set(vc->', $id, ', EINA_TRUE);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of select="concat($indentation, 'elm_object_disabled_set(vc->', $id, ', EINA_FALSE);', $newline)" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="*" mode="visible">
+               <xsl:param name="parent" />
+               <xsl:param name="view_configuration_id" />
+               <xsl:param name="level" select="count(./ancestor::*)-count(//view/ancestor::*)" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+
+               <xsl:choose>
+                       <xsl:when test="count(./variation[@config_ref=$view_configuration_id]) > 0">
+                               <xsl:for-each select="./variation[@config_ref=$view_configuration_id]">
+                                       <xsl:choose>
+                                               <xsl:when test="@visible = 'false'">
+                                                       <xsl:value-of select="concat($indentation1, 'evas_object_hide(vc->', $parent, ');',$newline)" />
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:value-of select="concat($indentation1, 'evas_object_show(vc->', $parent, ');',$newline)" />
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </xsl:for-each>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:choose>
+                                       <xsl:when test="@visible = 'false'">
+                                               <xsl:value-of select="concat($indentation1, 'evas_object_hide(vc->', $parent, ');',$newline)" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of select="concat($indentation1, 'evas_object_show(vc->', $parent, ');',$newline)" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template name="style">
+               <xsl:param name="style" />
+               <xsl:param name="indentation" />
+               <xsl:param name="id" />
+               <xsl:if test="string-length($style) != 0">
+                       <xsl:value-of select="concat($indentation, 'elm_object_style_set(vc->', $id, ',', '&quot;', $style, '&quot;', ');', $newline)" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template name="colors">
+               <xsl:param name="colors" />
+               <xsl:param name="indentation" />
+               <xsl:param name="id" />
+               <xsl:param name="widgettype" />
+               <xsl:if test="string-length($colors) != 0">
+                       <xsl:variable name="colorpick"
+                               select="normalize-space(substring-before($colors, ';'))" />
+                       <xsl:if test="string-length($colorpick)!= 0">
+                               <xsl:variable name="colorclass"
+                                       select="normalize-space(substring-before($colorpick, ':'))" />
+                               <xsl:variable name="colorname"
+                                       select="normalize-space(substring-after($colorpick, ':'))" />
+                               <xsl:value-of
+                                       select="concat($indentation, 'int ', $id, '_',$colorclass,'_hexValue = strtol(&quot;', $colorname, '&quot;+1, NULL, 16);', $newline)" />
+                               <xsl:value-of disable-output-escaping="yes"
+                                       select="concat($indentation, 'int ', $id, '_',$colorclass,'_r = (', $id, '_',$colorclass,'_hexValue', '&amp;', '0xFF0000)', '&gt;&gt;', '16;', $newline)" />
+                               <xsl:value-of disable-output-escaping="yes"
+                                       select="concat($indentation, 'int ', $id, '_',$colorclass,'_g = (', $id, '_',$colorclass,'_hexValue', '&amp;', '0xFF00)', '&gt;&gt;', '8;', $newline)" />
+                               <xsl:value-of disable-output-escaping="yes"
+                                       select="concat($indentation, 'int ', $id, '_',$colorclass,'_b = (', $id, '_',$colorclass,'_hexValue', '&amp;', '0xFF);', $newline)" />
+                               <xsl:choose>
+                               <xsl:when test="string-length($widgettype)!= 0">
+                                       <xsl:value-of
+                                               select="concat($indentation, 'elm_object_item_color_class_color_set(vc->', $id, ',', '&quot;', $colorclass, '&quot;', ', ', $id, '_',$colorclass,'_r, ', $id, '_',$colorclass,'_g, ', $id, '_',$colorclass,'_b, 255);', $newline)" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of
+                                               select="concat($indentation, 'elm_object_color_class_color_set(vc->', $id, ',', '&quot;', $colorclass, '&quot;', ', ', $id, '_',$colorclass,'_r, ', $id, '_',$colorclass,'_g, ', $id, '_',$colorclass,'_b, 255);', $newline)" />
+                               </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:if>
+                       <xsl:for-each select=".">
+                               <xsl:call-template name="colors">
+                                       <xsl:with-param name="colors"
+                                               select="normalize-space(substring-after($colors, ';'))" />
+                                       <xsl:with-param name="indentation" select="$indentation" />
+                                       <xsl:with-param name="id" select="$id" />
+                                       <xsl:with-param name="widgettype" select="$widgettype" />
+
+                               </xsl:call-template>
+                       </xsl:for-each>
+
+               </xsl:if>
+       </xsl:template>
+
+    <!-- This is intended to escape backslash('\') to double backslash('\\') for file path -->
+    <xsl:template name="escapeStr">
+        <xsl:param name="str" select="."/>
+        <xsl:choose>
+            <xsl:when test="contains($str, '\')">
+                <xsl:value-of select="concat(substring-before($str, '\'), '\\' )"/>
+                <xsl:call-template name="escapeStr">
+                    <xsl:with-param name="str" select="substring-after($str, '\')"/>
+                </xsl:call-template>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="$str"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/res/util/event.xsl b/org.tizen.efluibuilder.codegenerator/res/util/event.xsl
new file mode 100644 (file)
index 0000000..7eaa6c0
--- /dev/null
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <xsl:template match="event/@*">
+               <xsl:param name="level" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="view" />
+               <xsl:param name="parent" />
+               <xsl:variable name="signal">
+                       <xsl:value-of select="concat('&quot;', substring-after(name(.), 'on'), '&quot;')" />
+               </xsl:variable>
+
+               <xsl:if test="starts-with(name(.), 'on')">
+                       <xsl:value-of select="concat($indentation, 'void ', $view, '_', ., '(uib_' , $view, '_view_context*, Evas_Object*, void*);', $newline)" />
+                       <xsl:value-of select="concat($indentation, 'evas_object_smart_callback_add(vc->', $parent, ', ' , $signal ,', (Evas_Smart_Cb)', $view, '_', . , ', vc);', $newline)" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="event" mode="event.view.declaration">
+               <xsl:param name="level" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="view" />
+               <xsl:param name="parent" />
+
+               <xsl:if test="string-length(@signal)!=0">
+                       <xsl:value-of select="concat($indentation, 'void ', @function_name, '(uib_' , $view, '_view_context*, Evas_Object*, void*);', $newline)" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="event" mode="registration">
+               <xsl:param name="parent" />
+               <xsl:param name="view" />
+
+               <xsl:if test="string-length(@signal)!=0 and @signal!='itemselected'">
+                       <xsl:value-of
+                               select="concat($indent, 'evas_object_smart_callback_add(vc->', $parent, ', ' , '&#34;', @signal , '&#34;', ', (Evas_Smart_Cb)', @function_name, ', vc);')" />
+                       <xsl:value-of select="$newline" />
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template match="event" mode="item_event">
+               <!-- Storyboard_START -->
+               <xsl:choose>
+                       <xsl:when test="string-length(@target)=0">
+                               <xsl:if test="@signal='itemselected'">
+                                       <xsl:value-of select="concat(@function_name)" />
+                               </xsl:if>
+                       </xsl:when>
+                       <xsl:when test="string-length(@connection_wrapper)!=0 and @signal='itemselected'">
+                               <xsl:value-of select="concat(@connection_wrapper)" />
+                       </xsl:when>
+               </xsl:choose>
+               <!-- Storyboard_END -->
+       </xsl:template>
+
+       <!-- Storyboard_START -->
+       <xsl:template match="event" mode="event.wrapper.declaration">
+               <xsl:param name="level" />
+               <xsl:param name="indentation">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="indentation1">
+                       <xsl:call-template name="dup">
+                               <xsl:with-param name="input" select="$indent" />
+                               <xsl:with-param name="count" select="$level+1" />
+                       </xsl:call-template>
+               </xsl:param>
+               <xsl:param name="view" />
+               <xsl:choose>
+                       <xsl:when test="string-length(@target)=0">
+                               <xsl:if test="string-length(@signal)!=0">
+                                       <xsl:value-of select="concat($indentation, 'void ', @function_name, '(uib_' , $view, '_view_context*, Evas_Object*, void*);', $newline)" />
+                               </xsl:if>
+                       </xsl:when>
+                       <xsl:when test="string-length(@connection_wrapper)!=0">
+                               <xsl:value-of select="concat($indentation, 'void ', @connection_wrapper, '(uib_' , $view, '_view_context*, Evas_Object*, void*);', $newline)" />
+                       </xsl:when>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="event" mode="event.wrapper.registration">
+               <xsl:param name="parent" />
+               <xsl:param name="view" />
+               <xsl:variable name="event">
+                       <xsl:value-of select="concat('&quot;',@signal,'&quot;')"></xsl:value-of>
+               </xsl:variable>
+               <xsl:choose>
+                       <xsl:when test="string-length(@target)=0">
+                               <xsl:if test="string-length(@signal)!=0 and @signal!='itemselected'">
+                                       <xsl:value-of select="concat($indent, 'evas_object_smart_callback_add(vc->', $parent, ', ' , $event, ', (Evas_Smart_Cb)', @function_name, ', vc);')" />
+                                       <xsl:value-of select="$newline" />
+                               </xsl:if>
+                       </xsl:when>
+                       <xsl:when test="string-length(@connection_wrapper)!=0 and @signal !='itemselected'">
+                               <xsl:value-of select="concat($indent,'evas_object_smart_callback_add(vc->', $parent, ', ' , $event ,', (Evas_Smart_Cb)', @connection_wrapper, ', vc);')" />
+                               <xsl:value-of select="$newline" />
+                       </xsl:when>
+               </xsl:choose>
+       </xsl:template>
+       <!-- Storyboard_END -->
+
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder.codegenerator/res/util/rconvert.xsl b/org.tizen.efluibuilder.codegenerator/res/util/rconvert.xsl
new file mode 100644 (file)
index 0000000..4f406de
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <!-- This XSL is not template! -->
+
+       <!-- new: will be added -->
+       <!-- <type id="efl.colorselector@mode"> <constant value="" displayName="(None)" /> <constant value="0" displayName="ELM_COLORSELECTOR_PALETTE" /> <constant value="1" 
+               displayName="ELM_COLORSELECTOR_COMPONENTS" /> <constant value="2" displayName="ELM_COLORSELECTOR_BOTH" /> <constant value="3" displayName="ELM_COLORSELECTOR_PICKER" 
+               /> <constant value="4" displayName="ELM_COLORSELECTOR_PLANE" /> <constant value="5" displayName="ELM_COLORSELECTOR_PALETTE_PLANE" /> <constant value="6" displayName="ELM_COLORSELECTOR_ALL" 
+               /> <constant value="4" displayName="ELM_COLORSELECTOR_ALL" /> </type> -->
+
+       <xsl:variable name="value_map">
+               <map>
+                       <entry key="option:center">ELM_BG_OPTION_CENTER</entry>
+                       <entry key="option:scale">ELM_BG_OPTION_SCALE</entry>
+                       <entry key="option:stretch">ELM_BG_OPTION_STRETCH</entry>
+                       <entry key="option:tile">ELM_BG_OPTION_TILE</entry>
+
+                       <entry key="direction:horizontal">true</entry>
+                       <entry key="direction:vertical">false</entry>
+
+                       <entry key="file_text_format:plain_utf8">ELM_TEXT_FORMAT_PLAIN_UTF8</entry>
+                       <entry key="file_text_format:markup_utf8">ELM_TEXT_FORMAT_MARKUP_UTF8</entry>
+
+                       <entry key="context_menu:false">true</entry>
+                       <entry key="context_menu:true">false</entry>
+
+                       <entry key="select_mode:default">ELM_OBJECT_SELECT_MODE_DEFAULT</entry>
+                       <entry key="select_mode:always">ELM_OBJECT_SELECT_MODE_ALWAYS</entry>
+                       <entry key="select_mode:none">ELM_OBJECT_SELECT_MODE_NONE</entry>
+                       <entry key="select_mode:display_only">ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY</entry>
+
+                       <entry key="calendar:select_mode:default">ELM_CALENDAR_SELECT_MODE_DEFAULT</entry>
+                       <entry key="calendar:select_mode:always">ELM_CALENDAR_SELECT_MODE_ALWAYS</entry>
+                       <entry key="calendar:select_mode:none">ELM_CALENDAR_SELECT_MODE_NONE</entry>
+                       <entry key="calendar:select_mode:ondemand">ELM_CALENDAR_SELECT_MODE_ONDEMAND</entry>
+
+                       <entry key="scrollbar_h:auto">ELM_SCROLLER_POLICY_AUTO</entry>
+                       <entry key="scrollbar_h:true">ELM_SCROLLER_POLICY_ON</entry>
+                       <entry key="scrollbar_h:false">ELM_SCROLLER_POLICY_OFF</entry>
+
+                       <entry key="scrollbar_v:auto">ELM_SCROLLER_POLICY_AUTO</entry>
+                       <entry key="scrollbar_v:true">ELM_SCROLLER_POLICY_ON</entry>
+                       <entry key="scrollbar_v:false">ELM_SCROLLER_POLICY_OFF</entry>
+
+                       <entry key="autohide:false">true</entry>
+                       <entry key="autohide:true">false</entry>
+
+                       <entry key="indicator:false">true</entry>
+                       <entry key="indicator:true">false</entry>
+
+                       <entry key="image:orient:none">ELM_IMAGE_ORIENT_NONE</entry>
+                       <entry key="image:orient:orient_0">ELM_IMAGE_ORIENT_0</entry>
+                       <entry key="image:orient:orient_90">ELM_IMAGE_ORIENT_90</entry>
+                       <entry key="image:orient:rotate_90">ELM_IMAGE_ROTATE_90</entry>
+                       <entry key="image:orient:orient_180">ELM_IMAGE_ORIENT_180</entry>
+                       <entry key="image:orient:rotate_180">ELM_IMAGE_ROTATE_180</entry>
+                       <entry key="image:orient:orient_270">ELM_IMAGE_ORIENT_270</entry>
+                       <entry key="image:orient:rotate_270">ELM_IMAGE_ROTATE_270</entry>
+                       <entry key="image:orient:flip_horizontal">ELM_IMAGE_FLIP_HORIZONTAL</entry>
+                       <entry key="image:orient:flip_vertical">ELM_IMAGE_FLIP_VERTICAL</entry>
+                       <entry key="image:orient:flip_transpose">ELM_IMAGE_FLIP_TRANSPOSE</entry>
+                       <entry key="image:orient:flip_transverse">ELM_IMAGE_FLIP_TRANSVERSE</entry>
+
+                       <entry key="panel:orient:top">ELM_PANEL_ORIENT_TOP</entry>
+                       <entry key="panel:orient:bottom">ELM_PANEL_ORIENT_BOTTOM</entry>
+                       <entry key="panel:orient:left">ELM_PANEL_ORIENT_LEFT</entry>
+                       <entry key="panel:orient:right">ELM_PANEL_ORIENT_RIGHT</entry>
+
+                       <entry key="line_wrap:none">ELM_WRAP_NONE</entry>
+                       <entry key="line_wrap:char">ELM_WRAP_CHAR</entry>
+                       <entry key="line_wrap:word">ELM_WRAP_WORD</entry>
+                       <entry key="line_wrap:mixed">ELM_WRAP_MIXED</entry>
+
+                       <entry key="mode:compress">ELM_LIST_COMPRESS</entry>
+                       <entry key="mode:scroll">ELM_LIST_SCROLL</entry>
+                       <entry key="mode:limit">ELM_LIST_LIMIT</entry>
+                       <entry key="mode:expand">ELM_LIST_EXPAND</entry>
+
+                       <entry key="shrink_mode:none">ELM_TOOLBAR_SHRINK_NONE</entry>
+                       <entry key="shrink_mode:hide">ELM_TOOLBAR_SHRINK_HIDE</entry>
+                       <entry key="shrink_mode:scroll">ELM_TOOLBAR_SHRINK_SCROLL</entry>
+                       <entry key="shrink_mode:menu">ELM_TOOLBAR_SHRINK_MENU</entry>
+                       <entry key="shrink_mode:expand">ELM_TOOLBAR_SHRINK_EXPAND</entry>
+
+                       <entry key="item_type:none">ELM_GENLIST_ITEM_NONE</entry>
+                       <entry key="item_type:tree">ELM_GENLIST_ITEM_TREE</entry>
+                       <entry key="item_type:group">ELM_GENLIST_ITEM_GROUP</entry>
+
+                       <entry key="gengrid:align:none">ELM_GENGRID_ITEM_SCROLLTO_NONE</entry>
+                       <entry key="gengrid:align:in">ELM_GENGRID_ITEM_SCROLLTO_IN</entry>
+                       <entry key="gengrid:align:left">ELM_GENGRID_ITEM_SCROLLTO_TOP</entry>
+                       <entry key="gengrid:align:center">ELM_GENGRID_ITEM_SCROLLTO_MIDDLE</entry>
+                       <!--<entry key="gengrid:align:right">ELM_GENGRID_ITEM_SCROLLTO_BOTTOM </entry> -->
+
+                       <entry key="genlist:align:none">ELM_GENLIST_ITEM_SCROLLTO_NONE</entry>
+                       <entry key="genlist:align:in">ELM_GENLIST_ITEM_SCROLLTO_IN</entry>
+                       <entry key="genlist:align:left">ELM_GENLIST_ITEM_SCROLLTO_TOP</entry>
+                       <entry key="genlist:align:center">ELM_GENLIST_ITEM_SCROLLTO_MIDDLE</entry>
+                       <!--<entry key="genglist:align:right">ELM_GENLIST_ITEM_SCROLLTO_BOTTOM </entry> -->
+               </map>
+       </xsl:variable>
+
+       <!-- [caller example] // write code on top of ui_component.xsl (eg: box.xsl) <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common"> 
+               // Add a Name Space! // write the code to where you want it <xsl:variable name="key_val1" select="concat(attribute_name, ':', @attribute)"/> <xsl:variable name="rconv_val" 
+               select="exslt:node-set($value_map)//entry[@key=$key_val1]"/> <xsl:value-of select="concat($indentation, 'ui', '-builder', $rconv_val1)"/> -->
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/Activator.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/Activator.java
new file mode 100644 (file)
index 0000000..1f9b3ec
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.tizen.efluibuilder.codegenerator"; //$NON-NLS-1$
+
+    // The shared instance
+    private static Activator plugin;
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     * 
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGenerator.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGenerator.java
new file mode 100644 (file)
index 0000000..d29c839
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import org.eclipse.core.resources.IProject;
+
+
+public final class CodeGenerator implements ICodeGenerator {
+    private IProject project = null;
+
+    public CodeGenerator(IProject project) {
+        this.project = project;
+    }
+
+    private IProject getProject() {
+        return project;
+    }
+
+    @Override
+    public void generate() throws CodeGeneratorException {
+        ManagedCodeGenerator generator = new ManagedCodeGenerator(getProject());
+        generator.generate();
+    }
+
+    @Override
+    public void clean() throws CodeGeneratorException {
+        ManagedCodeGenerator generator = new ManagedCodeGenerator(getProject());
+        generator.clean();
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGeneratorConstants.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGeneratorConstants.java
new file mode 100644 (file)
index 0000000..f78422f
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+public final class CodeGeneratorConstants {
+    public static final String REPLACE_KEY_ID = "%id%"; //$NON-NLS-1$
+    public static final String VIEW_NAME = REPLACE_KEY_ID; // $NON-NLS-1$
+    public static final String BOILERPLATE = "/*******************************************************************************\n" //$NON-NLS-1$
+            + "* This file was generated by UI Builder.\n" //$NON-NLS-1$
+            + "* User should hand edit this file.\n" //$NON-NLS-1$
+            + "********************************************************************************/\n\n" //$NON-NLS-1$
+            + "#include \"app_main.h\"\n" //$NON-NLS-1$
+            + "#include \"view_data.h\"\n" //$NON-NLS-1$
+            + "#include \"uib_app_manager.h\"\n" //$NON-NLS-1$
+            + "#include \"uib_views.h\"\n" //$NON-NLS-1$
+            + "#include \"uib_views_inc.h\"\n" //$NON-NLS-1$
+            + "\n" //$NON-NLS-1$
+            + "typedef struct _uib_" + VIEW_NAME + "_control_context {\n" //$NON-NLS-1$
+            + "        /* add your variables here */\n" //$NON-NLS-1$
+            + "\n" //$NON-NLS-1$
+            + "} uib_" + VIEW_NAME + "_control_context;\n" //$NON-NLS-1$
+            + "\n"; //$NON-NLS-1$
+    public static final String BOILERPLATE_CIRCLE = "/*******************************************************************************\n" //$NON-NLS-1$
+            + "* This file was generated by UI Builder.\n" //$NON-NLS-1$
+            + "* User should hand edit this file.\n" //$NON-NLS-1$
+            + "********************************************************************************/\n\n" //$NON-NLS-1$
+            + "#include \"app_main.h\"\n" //$NON-NLS-1$
+            + "#include \"uib_views.h\"\n" //$NON-NLS-1$
+            + "#include \"uib_views_inc.h\"\n" //$NON-NLS-1$
+            + "\n" //$NON-NLS-1$
+            + "typedef struct _uib_" + VIEW_NAME + "_control_context {\n" //$NON-NLS-1$
+            + " /* add your variables here */\n" //$NON-NLS-1$
+            + "\n" //$NON-NLS-1$
+            + "} uib_" + VIEW_NAME + "_control_context;\n" //$NON-NLS-1$
+            + "\n"; //$NON-NLS-1$
+    public static final String MANAGED_BOILERPLATE = "/*******************************************************************************\n" //$NON-NLS-1$
+            + "* This file was generated by UI Builder.\n" //$NON-NLS-1$
+            + "* This file will be auto-generated each and everytime you save your project.\n" //$NON-NLS-1$
+            + "* Do not hand edit this file.\n" //$NON-NLS-1$
+            + "********************************************************************************/\n\n"; //$NON-NLS-1$
+
+    public static final String FILE_PROJECT_META = ".uproject";
+    public static final String FILE_LAYOUT_META = "layout/layout.xml";
+       public static final String FILE_DATABINDING_META = "layout/.databinding";
+    public static final String FILE_CUSTOM_THEME = "res/theme/custom_theme.edj";
+
+    public static final String DIRECTORY_SRC = "src/"; //$NON-NLS-1$
+    public static final String DIRECTORY_MANAGED = DIRECTORY_SRC + "managed/"; //$NON-NLS-1$
+    public static final String DIRECTORY_EVENT_HANDLER = DIRECTORY_SRC + "event_handler/"; //$NON-NLS-1$
+    public static final String DIRECTORY_MANAGED_SRC = DIRECTORY_MANAGED + "src/"; //$NON-NLS-1$
+    public static final String DIRECTORY_MANAGED_INC = DIRECTORY_MANAGED + "inc/"; //$NON-NLS-1$
+
+    public static final String DIRECTORY_MANAGER_SRC = DIRECTORY_MANAGED_SRC + "manager/"; //$NON-NLS-1$
+    public static final String DIRECTORY_UTILS_SRC = DIRECTORY_MANAGED_SRC + "utils/"; //$NON-NLS-1$
+    public static final String DIRECTORY_VIEW_SRC = DIRECTORY_MANAGED_SRC + "view/"; //$NON-NLS-1$
+    public static final String DIRECTORY_CONNECTION_SRC = DIRECTORY_MANAGED_SRC + "connection/"; //$NON-NLS-1$
+    public static final String DIRECTORY_MANAGED_DATABINDING_INC = DIRECTORY_MANAGED_INC + "databinding/"; //$NON-NLS-1$
+    public static final String DIRECTORY_MANAGED_DATABINDING_SRC = DIRECTORY_MANAGED_SRC + "databinding/"; //$NON-NLS-1$;
+
+    public static final String UIB_APP_MANAGER_HEADER = CodeGeneratorConstants.DIRECTORY_MANAGED_INC + "uib_app_manager.h"; //$NON-NLS-1$
+    public static final String UIB_APP_MANAGER_SOURCE = CodeGeneratorConstants.DIRECTORY_MANAGER_SRC + "uib_app_manager.c"; //$NON-NLS-1$
+    public static final String UIB_VIEW_MANAGER_HEADER = CodeGeneratorConstants.DIRECTORY_MANAGED_INC + "uib_view_manager.h"; //$NON-NLS-1$
+    public static final String UIB_VIEW_MANAGER_SOURCE = CodeGeneratorConstants.DIRECTORY_MANAGER_SRC + "uib_view_manager.c"; //$NON-NLS-1$
+    public static final String UIB_GLOBAL_INC_HEADER = CodeGeneratorConstants.DIRECTORY_MANAGED_INC + "g_inc_uib.h"; //$NON-NLS-1$
+    public static final String UIB_UTIL_HEADER = CodeGeneratorConstants.DIRECTORY_MANAGED_INC + "uib_util.h"; //$NON-NLS-1$
+    public static final String UIB_UTIL_SOURCE = CodeGeneratorConstants.DIRECTORY_UTILS_SRC + "uib_util.c"; //$NON-NLS-1$
+    public static final String UIB_VIEWS_INC_HEADER = CodeGeneratorConstants.DIRECTORY_MANAGED_INC + "uib_views_inc.h"; //$NON-NLS-1$
+    public static final String UIB_VIEWS_HEADER = CodeGeneratorConstants.DIRECTORY_MANAGED_INC + "uib_views.h"; //$NON-NLS-1$
+    public static final String UIB_VIEWS_SOURCE = CodeGeneratorConstants.DIRECTORY_VIEW_SRC + "uib_views.c"; //$NON-NLS-1$
+    public static final String UIB_VIEW_DATA = CodeGeneratorConstants.DIRECTORY_MANAGED_INC + "view_data.h"; //$NON-NLS-1$
+    public static final String UIB_VIEW_HEADER = CodeGeneratorConstants.DIRECTORY_MANAGED_INC + "uib_%id%_view.h"; //$NON-NLS-1$
+    public static final String UIB_VIEW_SOURCE = CodeGeneratorConstants.DIRECTORY_VIEW_SRC + "uib_%id%_view.c"; //$NON-NLS-1$
+    public static final String UIB_CONNECTION_SOURCE = CodeGeneratorConstants.DIRECTORY_CONNECTION_SRC + "uib_%id%_connection.c"; //$NON-NLS-1$
+
+    public static final String DIRECTORY_RES = "res/"; //$NON-NLS-1$
+    public static final String UIB_APP_MANAGER_HEADER_XSL = "inc/uib_app_manager_header.xsl"; //$NON-NLS-1$
+    public static final String UIB_APP_MANAGER_SOURCE_XSL = "src/uib_app_manager_source.xsl"; //$NON-NLS-1$
+    public static final String UIB_VIEW_MANAGER_HEADER_XSL = "inc/uib_view_manager_header.xsl"; //$NON-NLS-1$
+    public static final String UIB_VIEW_MANAGER_SOURCE_XSL = "src/uib_view_manager_source.xsl"; //$NON-NLS-1$
+    public static final String UIB_GLOBAL_INC_HEADER_XSL = "inc/g_inc_uib_header.xsl"; //$NON-NLS-1$
+    public static final String UIB_UTIL_HEADER_XSL = "inc/uib_util_header.xsl"; //$NON-NLS-1$
+    public static final String UIB_UTIL_SOURCE_XSL = "src/uib_util_source.xsl"; //$NON-NLS-1$
+    public static final String UIB_VIEWS_INC_HEADER_XSL = "inc/uib_views_inc_header.xsl"; //$NON-NLS-1$
+    public static final String UIB_VIEWS_HEADER_XSL = "inc/uib_views_header.xsl"; //$NON-NLS-1$
+    public static final String UIB_VIEWS_SOURCE_XSL = "src/uib_views_source.xsl"; //$NON-NLS-1$
+    public static final String UIB_VIEW_DATA_HEADER_XSL = "inc/view_data_header.xsl"; //$NON-NLS-1$
+    public static final String UIB_VIEW_HEADER_XSL = "inc/uib_view_header.xsl"; //$NON-NLS-1$
+    public static final String UIB_VIEW_SOURCE_XSL = "src/uib_view_source.xsl"; //$NON-NLS-1$
+    public static final String UIB_CONNECTION_SOURCE_XSL = "src/uib_connection_source.xsl"; //$NON-NLS-1$
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGeneratorException.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGeneratorException.java
new file mode 100644 (file)
index 0000000..542d4ae
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+public final class CodeGeneratorException extends Exception {
+
+    private static final long serialVersionUID = -6163340800998223729L;
+
+    /**
+     * Constructs an {@code CodeGeneratorException} with {@code null} as its error detail message.
+     */
+    public CodeGeneratorException() {
+        super();
+    }
+
+    /**
+     * Constructs an {@code CodeGeneratorException} with the specified detail message.
+     * 
+     * @param message
+     *            The detail message (which is saved for later retrieval by the
+     *            {@link #getMessage()} method)
+     */
+    public CodeGeneratorException(String message) {
+        super(message);
+    }
+
+    public CodeGeneratorException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGeneratorUtil.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/CodeGeneratorUtil.java
new file mode 100644 (file)
index 0000000..7a5226f
--- /dev/null
@@ -0,0 +1,301 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Writer;
+import java.net.URL;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.URIResolver;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.application.TizenProjectDescription;
+import org.tizen.common.util.Assert;
+import org.tizen.common.util.ProjectUtil;
+import org.tizen.efluibuilder.utility.XMLUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+
+public final class CodeGeneratorUtil {
+
+    private static Logger logger = LoggerFactory.getLogger(CodeGeneratorUtil.class);
+
+    private static final float SUPPORT_RM_VERSION = 2.4F;
+
+    public static String getProfile(IProject project) throws SAXException, IOException, ParserConfigurationException, XPathExpressionException {
+        // read file
+        IFile projectMetaFile = project.getFile(CodeGeneratorConstants.FILE_PROJECT_META);
+        File appFile = new File(projectMetaFile.getLocation().toString());
+        Document document = loadXML(appFile);
+        Assert.notNull(document);
+
+        // read shape element
+        String shape = XMLUtil.getValue(document, "/properties/shape");
+
+        TizenProjectDescription tizenProjectDescription = ProjectUtil.getTizenProjectDescription(project);
+        String profile = tizenProjectDescription.getProfileName();
+        if (shape.equals("circle")) {
+            profile = "wearable-circle";
+        }
+        return profile;
+    }
+
+    public static String getProjectVersion(IProject project) throws SAXException, IOException, ParserConfigurationException, XPathExpressionException {
+        // read file
+        IFile projectMetaFile = project.getFile(CodeGeneratorConstants.FILE_PROJECT_META);
+        File appFile = new File(projectMetaFile.getLocation().toString());
+        Document document = loadXML(appFile);
+        Assert.notNull(document);
+
+        // read version
+        String version = null;
+        if (XMLUtil.isExistValue(document, "/properties/version")) {
+            version = XMLUtil.getValue(document, "/properties/version");
+        } else {
+            version = "0.0";
+        }
+
+        return version;
+    }
+
+    public static Document loadXML(File xml) throws SAXException, IOException, ParserConfigurationException {
+        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+        documentBuilderFactory.setNamespaceAware(true);
+        DocumentBuilder builder = documentBuilderFactory.newDocumentBuilder();
+        Document doc = builder.parse(xml);
+        return doc;
+    }
+
+    public static NodeList getViews(Document document) throws XPathExpressionException {
+        String pathExpression = "/document/views/view";
+        NodeList nodeList = getNodes(document, pathExpression);
+        return nodeList;
+    }
+
+    public static NodeList getNodes(Document document, String pathExpression) throws XPathExpressionException {
+        // start FIXME : following codes should be removed
+        // [MAC] Work Around for JDK 1.7 runtime environment
+        Thread thread = Thread.currentThread();
+        ClassLoader cl = thread.getContextClassLoader();
+        if (cl == null) {
+            cl = CodeGeneratorUtil.class.getClassLoader();
+            thread.setContextClassLoader(cl);
+        }
+        // end [MAC] Work Around for JDK 1.7 runtime environment
+
+        XPath xpath = XPathFactory.newInstance().newXPath();
+        NodeList nodeList = (NodeList) xpath.evaluate(pathExpression, document, XPathConstants.NODESET);
+        return nodeList;
+    }
+
+    public static Node getView(Document document, String id) throws XPathExpressionException {
+        if (id == null || id.isEmpty()) {
+            return null;
+        }
+
+        NodeList views = getViews(document);
+        for (int i = 0; i < views.getLength(); i++) {
+            Node node = views.item(i);
+            String viewId = CodeGeneratorUtil.getViewId(node);
+            if (id.equals(viewId)) {
+                return node;
+            }
+        }
+
+        return null;
+    }
+
+    public static String getStartupView(Document document) throws XPathExpressionException {
+        // start FIXME : following codes should be removed
+        // [MAC] Work Around for JDK 1.7 runtime environment
+        Thread thread = Thread.currentThread();
+        ClassLoader cl = thread.getContextClassLoader();
+        if (cl == null) {
+            cl = CodeGeneratorUtil.class.getClassLoader();
+            thread.setContextClassLoader(cl);
+        }
+        // end [MAC] Work Around for JDK 1.7 runtime environment
+
+        XPath xpath = XPathFactory.newInstance().newXPath();
+        String expression = "/document/views/@startup";
+        Object object = xpath.evaluate(expression, document, XPathConstants.NODE);
+        Assert.notNull(object);
+        Assert.isTrue(object instanceof Node);
+        Node node = (Node) object;
+        String id = node.getTextContent();
+        return id;
+    }
+
+    public static Writer getDestinationWriter(File targetDirectory, String path) throws IOException {
+        File destination = new File(targetDirectory, path);
+        FileWriter out = new FileWriter(destination);
+        return out;
+    }
+
+    public static InputStream openStream(String name) throws IOException {
+        Bundle bundle = Platform.getBundle(Activator.PLUGIN_ID);
+        if (bundle == null) {
+            logger.error("Invalid bundle");
+            return null;
+        }
+        URL url = bundle.getResource(name);
+        if (url == null) {
+            logger.error("Invalid resource");
+            return null;
+        }
+        InputStream stream = url.openStream();
+        if (stream == null) {
+            logger.error("Invalid stream");
+            return null;
+        }
+        return stream;
+    }
+
+    public static String getViewId(Node node) {
+        String name = null;
+        NamedNodeMap viewNodeAttributeMap = node.getAttributes();
+        for (int i = 0; i < viewNodeAttributeMap.getLength(); i++) {
+            Node viewNodeAttribute = viewNodeAttributeMap.item(i);
+            if (viewNodeAttribute.getNodeName().equals("id")) {
+                name = viewNodeAttribute.getNodeValue();
+            }
+        }
+
+        return name;
+    }
+
+    public static boolean isVersionRMSupport(String platformVersionString) {
+        platformVersionString = platformVersionString.substring(0, 3); // eg) 2.3.1 -> 2.3
+        float platformVersionFloat = Float.parseFloat(platformVersionString);
+        if (platformVersionFloat >= SUPPORT_RM_VERSION) {
+            // The alternative resource support 2.4 platform upper
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public static void createDirectoy(File targetDirectory, String path) {
+        File directory = new File(targetDirectory, path);
+        if (!directory.exists()) {
+            boolean result = directory.mkdirs();
+            if (result == false) {
+                logger.warn("It failed to create directory : " + directory.getPath());
+            }
+        }
+    }
+
+    /**
+     * @param node
+     * @param writer
+     * @param xslStream
+     * @param parameterKey
+     * @param parameterValue
+     * @param isRMSupportVersion
+     * @param profile
+     * @throws TransformerException
+     * @throws IOException
+     */
+    public static void generateCode(Node node, Writer writer, StreamSource xslStream, String parameterKey,
+                                    String parameterValue, String isRMSupportVersion, String profile)
+            throws TransformerException, IOException {
+        // create Tranform
+        TransformerFactory transformerFactory = TransformerFactory.newInstance();
+        transformerFactory.setURIResolver(new URIResolver() {
+            @Override
+            public Source resolve(String href, String base) throws TransformerException {
+                String uri = "res/" + href;
+                try {
+                    InputStream stream = openStream(uri);
+                    return new StreamSource(stream);
+                } catch (IOException e) {
+                    logger.error(e.getMessage());
+                }
+                return null;
+            }
+        });
+        // DOMSource xslDom = new DOMSource(xslDoc);
+        Transformer transformer = transformerFactory.newTransformer(xslStream);
+        transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+        transformer.setOutputProperty(OutputKeys.METHOD, "text");
+        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+        transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+        transformer.setParameter(parameterKey, parameterValue);
+
+        if (isRMSupportVersion != null) { // for RM
+            transformer.setParameter("is_version_rm_support", isRMSupportVersion);
+        }
+
+        if (profile != null) {
+            transformer.setParameter("profile", profile);
+        }
+
+        // transform
+        DOMSource srcDom = new DOMSource(node);
+
+        // Writer writer = new OutputStreamWriter(out);
+        StreamResult result = new StreamResult(writer);
+        transformer.transform(srcDom, result);
+        writer.close();
+    }
+
+    public static String getNodeId(Node node, final String id) {
+        String nodeId = null;
+
+        Node node2 = node.getAttributes().getNamedItem(id);
+        if (node2 != null) {
+            nodeId = node2.getTextContent();
+        }
+
+        return nodeId;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/DataBindingCodeGenerator.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/DataBindingCodeGenerator.java
new file mode 100644 (file)
index 0000000..2fcc5e1
--- /dev/null
@@ -0,0 +1,240 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.codegenerator;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Writer;
+
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.xpath.XPathExpressionException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class DataBindingCodeGenerator {
+       private enum CODE_TYPE {
+               HEADER, SOURCE
+       }
+
+       private enum DOCUMENT_TYPE {
+               LAYOUT_DOCUMENT, DATABINDING_DOCUMENT
+               }
+
+       private enum CODE_MODULE {
+               DATABINDING_MANAGER("res/databinding/db_manager_", "uib_db_manager", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_VIEWX_BINDINGS("res/databinding/db_view_bindings_", "uib_views_binding", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_DATAMODELX("res/databinding/db_datamodel_", "", DOCUMENT_TYPE.DATABINDING_DOCUMENT),
+               DATABINDING_DATASOURCEX("res/databinding/db_datasource_", "", DOCUMENT_TYPE.DATABINDING_DOCUMENT),
+               DATABINDING_DATAMODELS("res/databinding/db_datamodels_","uib_datamodels", DOCUMENT_TYPE.DATABINDING_DOCUMENT),
+               DATABINDING_VIEWS_BINDING("res/databinding/db_views_binding_","uib_views_binding", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_DATASOURCES("res/databinding/db_datasources_","uib_datasources", DOCUMENT_TYPE.DATABINDING_DOCUMENT),
+               DATABINDING_DS_HANDLER_CONTACTS("res/databinding/db_ds_handler_contacts_","datasources/uib_datasource_handler_contacts", DOCUMENT_TYPE.DATABINDING_DOCUMENT),
+               DATABINDING_DS_HANDLER_STATIC("res/databinding/db_ds_handler_static_","datasources/uib_datasource_handler_static", DOCUMENT_TYPE.DATABINDING_DOCUMENT),
+               DATABINDING_DS_HANDLER_CALLHISTORY("res/databinding/db_ds_handler_call_history_","datasources/uib_datasource_handler_call_history", DOCUMENT_TYPE.DATABINDING_DOCUMENT),
+               DATABINDING_DS_HANDLER_REMOTE("res/databinding/db_ds_handler_remote_","datasources/uib_datasource_handler_remote", DOCUMENT_TYPE.DATABINDING_DOCUMENT),
+               DATABINDING_COMMON("res/databinding/db_common_","uib_databinding_common", DOCUMENT_TYPE.DATABINDING_DOCUMENT),
+               DATABINDING_LIST_WIDGET_HANDLER("res/databinding/db_widget_handler_list_","widgets/uib_widget_handler_list", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_LISTITEM_WIDGET_HANDLER("res/databinding/db_widget_handler_listitem_","widgets/uib_widget_handler_listitem", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_LABEL_WIDGET_HANDLER("res/databinding/db_widget_handler_label_","widgets/uib_widget_handler_label", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_BUTTON_WIDGET_HANDLER("res/databinding/db_widget_handler_button_","widgets/uib_widget_handler_button", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_CHECKBOX_WIDGET_HANDLER("res/databinding/db_widget_handler_checkbox_","widgets/uib_widget_handler_checkbox", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_RADIO_WIDGET_HANDLER("res/databinding/db_widget_handler_radio_","widgets/uib_widget_handler_radio", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_FLIPSELECTOR_WIDGET_HANDLER("res/databinding/db_widget_handler_flipselector_","widgets/uib_widget_handler_flipselector", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_FLIPSELECTORITEM_WIDGET_HANDLER("res/databinding/db_widget_handler_flipselectoritem_","widgets/uib_widget_handler_flipselectoritem", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_HOVERSEL_WIDGET_HANDLER("res/databinding/db_widget_handler_hoversel_","widgets/uib_widget_handler_hoversel", DOCUMENT_TYPE.LAYOUT_DOCUMENT),
+               DATABINDING_HOVERSELITEM_WIDGET_HANDLER("res/databinding/db_widget_handler_hoverselitem_","widgets/uib_widget_handler_hoverselitem", DOCUMENT_TYPE.LAYOUT_DOCUMENT);
+
+               /**
+                * @return the XSLpath
+                */
+               public String getXSLpath() {
+                       return XSLpath;
+               }
+
+               /**
+                * @return the generatedCodePath
+                */
+               public String getGeneratedCodePath() {
+                       return generatedCodePath;
+               }
+
+               public DOCUMENT_TYPE getDocumentType() {
+                       return documentType;
+               }
+
+               private String XSLpath;
+               private String generatedCodePath;
+               private DOCUMENT_TYPE documentType;
+
+               private CODE_MODULE(String XSLpath, String generatedCodePath, DOCUMENT_TYPE documentType) {
+                       this.XSLpath = XSLpath;
+                       this.generatedCodePath = generatedCodePath;
+                       this.documentType = documentType;
+               }
+
+       }
+
+       private final File targetDirectory;
+       private final String isRMSupportVersion;
+       private final String profile;
+       private final Document tizenLayoutDocument;
+       private final Document databindingDocument;
+       private NodeList viewList;
+       private NodeList datamodelList;
+       private NodeList datasourceList;
+       private static final String UI_DATABINDING_VIEWX_BINDINGS = "res/databinding/db_view_bindings_"; //$NON-NLS-1$
+       private static final String UI_DATABINDING_DATAMODELX = "res/databinding/db_datamodel_"; //$NON-NLS-1$
+       private static final String UI_DATABINDING_DATASOURCEX = "res/databinding/db_datasource_"; //$NON-NLS-1$
+
+       /**
+        * @param targetDirectory
+        * @param tizenLayoutDocument
+        * @param databindingDocument
+        * @param isRMSupportVersion
+        * @param profile
+        */
+       public DataBindingCodeGenerator(File targetDirectory, Document tizenLayoutDocument, Document databindingDocument, String isRMSupportVersion,
+                       String profile) {
+               this.targetDirectory = targetDirectory;
+               this.tizenLayoutDocument = tizenLayoutDocument;
+               this.databindingDocument = databindingDocument;
+               this.isRMSupportVersion = isRMSupportVersion;
+               this.profile = profile;
+               try {
+                       this.viewList = CodeGeneratorUtil.getNodes(tizenLayoutDocument, "/document/views/view");
+                       this.datamodelList = CodeGeneratorUtil.getNodes(databindingDocument, "/dataBinding/dataModel");
+                       this.datasourceList = CodeGeneratorUtil.getNodes(databindingDocument, "/dataBinding/dataSource");
+               } catch (XPathExpressionException e) {
+                       this.viewList = null;
+                       this.datamodelList = null;
+                       this.datasourceList = null;
+               }
+       }
+
+       private static Logger logger = LoggerFactory.getLogger(DataBindingCodeGenerator.class);
+
+       public void generate() throws TransformerException, IOException {
+
+               for (CODE_MODULE module : CODE_MODULE.values()) {
+                       if (!module.getGeneratedCodePath().isEmpty()) {
+                               generateDataBindingCode(module.getXSLpath(), module.getGeneratedCodePath(), module.getDocumentType());
+                       }
+               }
+
+               // create uib_dmX_datamodel.h & uib_dmX_datamodel.c
+               generateDataBindingForNodes(UI_DATABINDING_DATAMODELX,"datamodels/uib_", "_datamodel", datamodelList, "modelName", "datamodel_id", DOCUMENT_TYPE.DATABINDING_DOCUMENT);
+
+               // create uib_dsX_datasource.h & uib_dsX_datasource.c
+               generateDataBindingForNodes(UI_DATABINDING_DATASOURCEX,"datasources/uib_", "_datasource", datasourceList, "dataSource", "datasource_id",DOCUMENT_TYPE.DATABINDING_DOCUMENT);
+
+               // create uib_viewX_bindings.h & uib_viewX_bindings.c
+               generateDataBindingForNodes(UI_DATABINDING_VIEWX_BINDINGS,"viewbindings/uib_", "_bindings", viewList, "id", "current_view_name", DOCUMENT_TYPE.LAYOUT_DOCUMENT);
+
+       }
+
+       private void generateDataBindingForNodes(final String xslPath,final String fileNamePrefix, final String fileNameSuffix, NodeList nodeList,
+                       String nodeKey, String XSLParameterKey, DOCUMENT_TYPE documentType) throws TransformerException, IOException {
+               String localXSLPath = null;
+               String generatedFileNamePrefix = null;
+               Document document = null;
+               if(documentType == DOCUMENT_TYPE.DATABINDING_DOCUMENT){
+                       document = databindingDocument;
+               }else{
+                       document = tizenLayoutDocument;
+               }
+               for (CODE_TYPE codeType : CODE_TYPE.values()) {
+                       if (codeType == CODE_TYPE.HEADER) {
+                               localXSLPath = xslPath.concat("header.xsl");
+                // Pick the filename part from relative path for headers only.
+                String[] filePathSegments = fileNamePrefix.split("/");
+                generatedFileNamePrefix = filePathSegments[filePathSegments.length - 1];
+                       } else {
+                               localXSLPath = xslPath.concat("source.xsl");
+                               generatedFileNamePrefix= fileNamePrefix;
+                       }
+                       if (nodeList != null) {
+                               for (int i = 0; i < nodeList.getLength(); i++) {
+                                       InputStream xslIs = CodeGeneratorUtil.openStream(localXSLPath);
+                                       StreamSource xslStream = new StreamSource(xslIs);
+                                       Node node = nodeList.item(i);
+                                       String nodeId = CodeGeneratorUtil.getNodeId(node, nodeKey);
+                                       Writer destinationWriter = getDestinationWriterForDataBinding(
+                                                       generatedFileNamePrefix + nodeId + fileNameSuffix, codeType);
+                                       CodeGeneratorUtil.generateCode(document, destinationWriter, xslStream, XSLParameterKey, nodeId,
+                                                       isRMSupportVersion, profile);
+                                       xslIs.close();
+                               }
+                       }
+               }
+       }
+
+       private void generateDataBindingCode(final String xslPath, final String fileNamePathSuffix, DOCUMENT_TYPE documentType)
+                       throws TransformerException, IOException {
+               String localXSLPath = null;
+               String generatedCodeFilePath = null;
+               Document document = null;
+
+               if(documentType == DOCUMENT_TYPE.DATABINDING_DOCUMENT){
+                       document = databindingDocument;
+               }else{
+                       document = tizenLayoutDocument;
+               }
+
+               for (CODE_TYPE codeType : CODE_TYPE.values()) {
+                       if (codeType == CODE_TYPE.HEADER) {
+                               localXSLPath = xslPath.concat("header.xsl");
+                               // Pick the filename part from relative path for headers only.
+                               String[] filePathSegments = fileNamePathSuffix.split("/");
+                               generatedCodeFilePath = filePathSegments[filePathSegments.length - 1];
+                       } else {
+                               localXSLPath = xslPath.concat("source.xsl");
+                               generatedCodeFilePath = fileNamePathSuffix;
+                       }
+                       InputStream xslIs = CodeGeneratorUtil.openStream(localXSLPath);
+                       StreamSource xslStream = new StreamSource(xslIs);
+                       Writer destinationWriter = getDestinationWriterForDataBinding(generatedCodeFilePath, codeType);
+                       CodeGeneratorUtil.generateCode(document, destinationWriter, xslStream, "", "", isRMSupportVersion, profile);
+                       xslIs.close();
+               }
+       }
+
+       private Writer getDestinationWriterForDataBinding(final String fileNamePathSuffix, CODE_TYPE type) throws IOException {
+               String codePath = null;
+               if (type == CODE_TYPE.HEADER) {
+                       codePath = CodeGeneratorConstants.DIRECTORY_MANAGED_DATABINDING_INC + fileNamePathSuffix + ".h";
+               } else {
+                       codePath = CodeGeneratorConstants.DIRECTORY_MANAGED_DATABINDING_SRC + fileNamePathSuffix + ".c";
+               }
+               File destination = new File(targetDirectory, codePath);
+               FileWriter out = new FileWriter(destination);
+               return out;
+       }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/ICodeGenerator.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/ICodeGenerator.java
new file mode 100644 (file)
index 0000000..ae264c3
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+public interface ICodeGenerator {
+
+    /**
+     * 
+     * @throws CodeGeneratorException
+     */
+    public void generate() throws CodeGeneratorException;
+
+    /**
+     * 
+     * @throws CodeGeneratorException
+     */
+    public void clean() throws CodeGeneratorException;
+}
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/ManagedCodeGenerator.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/ManagedCodeGenerator.java
new file mode 100644 (file)
index 0000000..5fdeb21
--- /dev/null
@@ -0,0 +1,276 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Writer;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.xpath.XPathExpressionException;
+
+import org.apache.commons.io.FileUtils;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.TizenProjectType;
+import org.tizen.common.core.application.TizenProjectDescription;
+import org.tizen.common.util.Assert;
+import org.tizen.common.util.ProjectUtil;
+import org.tizen.efluibuilder.codegenerator.view.ViewCodeGenerator;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+
+public final class ManagedCodeGenerator {
+    protected static Logger logger = LoggerFactory.getLogger(ManagedCodeGenerator.class);
+
+    public static Map<String, String> managedCodeMap = initManagedCodeMap();
+
+    private IProject project = null;
+    private File targetDirectory = null;
+    private String startUpView = null;
+    private String profile = null;
+    private String isRMSupportVersion = null;
+    private boolean isWidgetProject = false;
+    private boolean hasCustomTheme = false;
+    private String platformVersion = null;
+
+    private static Map<String, String> initManagedCodeMap() {
+        Map<String, String> files = new HashMap<String, String>();
+        String basePath = CodeGeneratorConstants.DIRECTORY_RES;
+        files.put(CodeGeneratorConstants.UIB_APP_MANAGER_HEADER, basePath + CodeGeneratorConstants.UIB_APP_MANAGER_HEADER_XSL);
+        files.put(CodeGeneratorConstants.UIB_APP_MANAGER_SOURCE, basePath + CodeGeneratorConstants.UIB_APP_MANAGER_SOURCE_XSL);
+        files.put(CodeGeneratorConstants.UIB_VIEW_MANAGER_HEADER, basePath + CodeGeneratorConstants.UIB_VIEW_MANAGER_HEADER_XSL);
+        files.put(CodeGeneratorConstants.UIB_VIEW_MANAGER_SOURCE, basePath + CodeGeneratorConstants.UIB_VIEW_MANAGER_SOURCE_XSL);
+        files.put(CodeGeneratorConstants.UIB_GLOBAL_INC_HEADER, basePath + CodeGeneratorConstants.UIB_GLOBAL_INC_HEADER_XSL);
+        files.put(CodeGeneratorConstants.UIB_UTIL_HEADER, basePath + CodeGeneratorConstants.UIB_UTIL_HEADER_XSL);
+        files.put(CodeGeneratorConstants.UIB_UTIL_SOURCE, basePath + CodeGeneratorConstants.UIB_UTIL_SOURCE_XSL);
+        files.put(CodeGeneratorConstants.UIB_VIEWS_INC_HEADER, basePath + CodeGeneratorConstants.UIB_VIEWS_INC_HEADER_XSL);
+        files.put(CodeGeneratorConstants.UIB_VIEWS_HEADER, basePath + CodeGeneratorConstants.UIB_VIEWS_HEADER_XSL);
+        files.put(CodeGeneratorConstants.UIB_VIEWS_SOURCE, basePath + CodeGeneratorConstants.UIB_VIEWS_SOURCE_XSL);
+        files.put(CodeGeneratorConstants.UIB_VIEW_DATA, basePath + CodeGeneratorConstants.UIB_VIEW_DATA_HEADER_XSL);
+        return Collections.unmodifiableMap(files);
+    }
+
+    public ManagedCodeGenerator(IProject project) throws CodeGeneratorException {
+        this.project = project;
+
+        try {
+            profile = CodeGeneratorUtil.getProfile(project);
+        } catch (XPathExpressionException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (SAXException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (IOException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (ParserConfigurationException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        }
+
+        TizenProjectDescription tizenProjectDescription = ProjectUtil.getTizenProjectDescription(project);
+        platformVersion = tizenProjectDescription.getVersion();
+        isRMSupportVersion = CodeGeneratorUtil.isVersionRMSupport(platformVersion) + "";
+        targetDirectory = new File(project.getLocation().toString());
+        TizenProjectType projectType = ProjectUtil.getTizenProjectType(project);
+        if (projectType != null) {
+            isWidgetProject = projectType.isNativeWidgetApplicationProject();      
+        }            
+        hasCustomTheme = project.exists(new Path(CodeGeneratorConstants.FILE_CUSTOM_THEME));
+    }
+
+    public void generate() throws CodeGeneratorException {
+        IFile layoutMetaFile = project.getFile(CodeGeneratorConstants.FILE_LAYOUT_META);
+        File srcFile = new File(layoutMetaFile.getLocation().toString());
+
+        try {
+            Document document = CodeGeneratorUtil.loadXML(srcFile);
+            Assert.notNull(document);
+            this.startUpView = CodeGeneratorUtil.getStartupView(document);
+
+            deleteOldFilesAndCreateDirectories(targetDirectory);
+
+            Set<String> keySet = managedCodeMap.keySet();
+            Iterator<String> iterator = keySet.iterator();
+            while (iterator.hasNext()) {
+                String targetPath = iterator.next();
+                String xsl = managedCodeMap.get(targetPath);
+                // get writer
+                Writer destinationWriter = CodeGeneratorUtil.getDestinationWriter(targetDirectory, targetPath);
+
+                // get StreamSource
+                InputStream xslIs = CodeGeneratorUtil.openStream(xsl);
+                StreamSource xslStream = new StreamSource(xslIs);
+
+                generateCode(document, destinationWriter, xslStream);
+
+                // close
+                destinationWriter.close();
+                xslIs.close();
+            }
+
+            NodeList list = CodeGeneratorUtil.getViews(document);
+            generateViewsFiles(list);
+            // create databinding related source and headers
+            generateDataBindingCode(list, document);
+
+            refreshManaged();
+        } catch (SAXException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (IOException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (ParserConfigurationException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (TransformerException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (XPathExpressionException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        }
+    }
+
+    public void clean() throws CodeGeneratorException {
+        File directoryToBeDeleted = new File(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_MANAGED);
+        if (directoryToBeDeleted.exists()) {
+            try {
+                FileUtils.deleteDirectory(directoryToBeDeleted);
+            } catch (IOException e) {
+                throw new CodeGeneratorException(e.getMessage());
+            }
+        }
+        refreshManaged();
+    }
+
+    private void generateViewsFiles(NodeList list) throws CodeGeneratorException {
+        ViewCodeGenerator viewCodeGenerator = new ViewCodeGenerator(project);
+        for (int i = 0; i < list.getLength(); i++) {
+            Node node = list.item(i);
+            String viewId = CodeGeneratorUtil.getViewId(node);
+            viewCodeGenerator.generate(viewId);
+        }
+    }
+
+    private void deleteOldFilesAndCreateDirectories(File directory) throws CodeGeneratorException {
+        clean();
+        createDirectories(directory);
+    }
+
+    private void createDirectories(File directory) {
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_MANAGED_INC);
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_VIEW_SRC);
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_UTILS_SRC);
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_MANAGER_SRC);
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_CONNECTION_SRC);
+        // Databinding directory creation
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_MANAGED_DATABINDING_INC);
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_MANAGED_DATABINDING_SRC);
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_MANAGED_DATABINDING_SRC + "/widgets");
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_MANAGED_DATABINDING_SRC + "/datasources");
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_MANAGED_DATABINDING_SRC + "/datamodels");
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_MANAGED_DATABINDING_SRC + "/viewbindings");
+       }
+
+    private void generateCode(Node node, Writer writer, StreamSource xslStream) throws TransformerException {
+        // create Tranform
+        TransformerFactory transformerFactory = TransformerFactory.newInstance();
+        // DOMSource xslDom = new DOMSource(xslDoc);
+        Transformer transformer = transformerFactory.newTransformer(xslStream);
+        transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+        transformer.setOutputProperty(OutputKeys.METHOD, "text");
+        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+        transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+        if (startUpView != null) {
+            transformer.setParameter("startup_view", startUpView);
+        }
+
+        if (profile != null) {
+            transformer.setParameter("profile", profile);
+        }
+        if (isRMSupportVersion != null) {
+            transformer.setParameter("is_version_rm_support", isRMSupportVersion);
+        }
+
+        transformer.setParameter("is_widget_project", isWidgetProject);
+        transformer.setParameter("has_custom_theme", hasCustomTheme);
+
+        if (platformVersion != null) {
+            transformer.setParameter("version", platformVersion);
+        }
+
+        // transform
+        DOMSource srcDom = new DOMSource(node);
+        // Writer writer = new OutputStreamWriter(out);
+        StreamResult result = new StreamResult(writer);
+        transformer.transform(srcDom, result);
+    }
+
+    private void refreshManaged() throws CodeGeneratorException {
+        IFolder folder = project.getFolder(CodeGeneratorConstants.DIRECTORY_MANAGED);
+        if (folder != null) {
+            try {
+                folder.refreshLocal(IResource.DEPTH_INFINITE, null);
+            } catch (CoreException e) {
+                throw new CodeGeneratorException(e.getMessage());
+            }
+        }
+    }
+
+    private void generateDataBindingCode(NodeList list, Document tizenLayoutDocument) throws TransformerException, IOException {
+        IFile databindingMetaFile = project.getFile(CodeGeneratorConstants.FILE_DATABINDING_META);
+        File srcFile = new File(databindingMetaFile.getLocation().toString());
+
+        Document databindingDocument = null;
+        try {
+            databindingDocument = CodeGeneratorUtil.loadXML(srcFile);
+        } catch (SAXException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (ParserConfigurationException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        DataBindingCodeGenerator generator = new DataBindingCodeGenerator(this.targetDirectory, tizenLayoutDocument,
+                databindingDocument, isRMSupportVersion, profile);
+        generator.generate();
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/event/EventCodeGenerator.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/event/EventCodeGenerator.java
new file mode 100644 (file)
index 0000000..6a907bb
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator.event;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPathExpressionException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorConstants;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorException;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorUtil;
+import org.xml.sax.SAXException;
+
+
+public class EventCodeGenerator implements IEventCodeGenerator {
+    private IProject project = null;
+
+    public EventCodeGenerator(IProject project) {
+        this.project = project;
+    }
+
+    private IProject getProject() {
+        return project;
+    }
+
+    @Override
+    public void addView(String id) throws CodeGeneratorException {
+        // check FOLDER_EVENT_HANDLER folder
+        IProgressMonitor monitor = new NullProgressMonitor();
+        IFolder folder = EventCodeGeneratorUtil.getEventHandlerFolder(getProject());
+        if (!folder.exists()) {
+            try {
+                folder.create(false, true, new NullProgressMonitor());
+                folder.refreshLocal(IResource.DEPTH_ZERO, monitor);
+            } catch (CoreException e) {
+                throw new CodeGeneratorException(e.getMessage());
+            }
+        }
+        IFile file = EventCodeGeneratorUtil.getEventHandlerFile(getProject(), id);
+        if (file.exists()) {
+            return;
+        }
+
+        // FIXME : start for wearable circle
+        String profile;
+        try {
+            profile = CodeGeneratorUtil.getProfile(getProject());
+        } catch (XPathExpressionException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (SAXException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (IOException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (ParserConfigurationException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        }
+
+        Assert.notNull(profile);
+        String handlerCode;
+        if (profile != null && profile.equals("wearable-circle")) {
+            handlerCode = CodeGeneratorConstants.BOILERPLATE_CIRCLE;
+        } else {
+            handlerCode = CodeGeneratorConstants.BOILERPLATE;
+        }
+        // FIXME : end for wearable circle
+
+        handlerCode = handlerCode.replace(CodeGeneratorConstants.REPLACE_KEY_ID, id);
+        try {
+            file.create(new ByteArrayInputStream(handlerCode.getBytes()), true, monitor);
+        } catch (CoreException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        }
+    }
+
+    @Override
+    public void removeView(String id) throws CodeGeneratorException {
+        IFile file = EventCodeGeneratorUtil.getEventHandlerFile(getProject(), id);
+        if (!file.exists()) {
+            return;
+        }
+        try {
+            file.delete(true, new NullProgressMonitor());
+        } catch (CoreException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/event/EventCodeGeneratorUtil.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/event/EventCodeGeneratorUtil.java
new file mode 100644 (file)
index 0000000..f4252d2
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator.event;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorConstants;
+
+
+public final class EventCodeGeneratorUtil {
+
+    public static IFolder getEventHandlerFolder(IProject project) {
+        IFolder folder = project.getFolder(CodeGeneratorConstants.DIRECTORY_EVENT_HANDLER);
+        return folder;
+    }
+
+    public static IFile getEventHandlerFile(IProject project, String id) {
+        IFolder folder = getEventHandlerFolder(project);
+        // make file name
+        String fileName = createFileName(id);
+        IFile file = folder.getFile(fileName);
+        return file;
+    }
+
+    private static String createFileName(String id) {
+        String fileName = "uib_" + id + "_event_handler.c";
+        return fileName;
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/event/IEventCodeGenerator.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/event/IEventCodeGenerator.java
new file mode 100644 (file)
index 0000000..28df34b
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator.event;
+
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorException;
+
+
+public interface IEventCodeGenerator {
+
+    /**
+     * 
+     * @throws CodeGeneratorException
+     */
+    public void addView(String id) throws CodeGeneratorException;
+
+    /**
+     * 
+     * @throws CodeGeneratorException
+     */
+    public void removeView(String id) throws CodeGeneratorException;
+}
diff --git a/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/view/ViewCodeGenerator.java b/org.tizen.efluibuilder.codegenerator/src/org/tizen/efluibuilder/codegenerator/view/ViewCodeGenerator.java
new file mode 100644 (file)
index 0000000..430fb0a
--- /dev/null
@@ -0,0 +1,216 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator.view;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Writer;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.URIResolver;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.xpath.XPathExpressionException;
+import org.apache.commons.io.FileUtils;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.application.TizenProjectDescription;
+import org.tizen.common.util.ProjectUtil;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorConstants;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorException;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
+
+
+public final class ViewCodeGenerator {
+    private static Logger logger = LoggerFactory.getLogger(ViewCodeGenerator.class);
+
+    private static Map<String, String> viewCodeMap = initViewCodeMap();
+    private IProject project = null;
+    private File targetDirectory = null;
+    private String profile = null;
+    private String isRMSupportVersion = null;
+    private String platformVersion = null;
+
+    private static Map<String, String> initViewCodeMap() {
+        Map<String, String> files = new HashMap<String, String>();
+        String basePath = CodeGeneratorConstants.DIRECTORY_RES;
+        files.put(CodeGeneratorConstants.UIB_VIEW_HEADER, basePath + CodeGeneratorConstants.UIB_VIEW_HEADER_XSL);
+        files.put(CodeGeneratorConstants.UIB_VIEW_SOURCE, basePath + CodeGeneratorConstants.UIB_VIEW_SOURCE_XSL);
+        files.put(CodeGeneratorConstants.UIB_CONNECTION_SOURCE, basePath + CodeGeneratorConstants.UIB_CONNECTION_SOURCE_XSL);
+        return Collections.unmodifiableMap(files);
+    }
+
+    public ViewCodeGenerator(IProject project) throws CodeGeneratorException {
+        this.project = project;
+
+        try {
+            profile = CodeGeneratorUtil.getProfile(project);
+        } catch (XPathExpressionException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (SAXException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (IOException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (ParserConfigurationException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        }
+
+        TizenProjectDescription tizenProjectDescription = ProjectUtil.getTizenProjectDescription(project);
+        platformVersion = tizenProjectDescription.getVersion();
+        isRMSupportVersion = CodeGeneratorUtil.isVersionRMSupport(platformVersion) + "";
+        targetDirectory = new File(project.getLocation().toString());
+    }
+
+    public void generate(String viewId) throws CodeGeneratorException {
+        IFile layoutMetaFile = project.getFile(CodeGeneratorConstants.FILE_LAYOUT_META);
+        File srcFile = new File(layoutMetaFile.getLocation().toString());
+
+        try {
+            Document document = CodeGeneratorUtil.loadXML(srcFile);
+
+            clean(viewId);
+            createDirectories();
+
+            Set<String> keySet = viewCodeMap.keySet();
+            Iterator<String> iterator = keySet.iterator();
+            while (iterator.hasNext()) {
+                String targetPath = iterator.next();
+                String xsl = viewCodeMap.get(targetPath);
+                // get writer
+                targetPath = targetPath.replace(CodeGeneratorConstants.REPLACE_KEY_ID, viewId);
+                Writer destinationWriter = CodeGeneratorUtil.getDestinationWriter(targetDirectory, targetPath);
+
+                // get StreamSource
+                InputStream xslIs = CodeGeneratorUtil.openStream(xsl);
+                StreamSource xslStream = new StreamSource(xslIs);
+                
+                generateCode(document, destinationWriter, xslStream, viewId);
+
+                // close
+                destinationWriter.close();
+                xslIs.close();
+
+                refresh(targetPath);
+            }
+
+        } catch (SAXException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (ParserConfigurationException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (IOException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        } catch (TransformerException e) {
+            throw new CodeGeneratorException(e.getMessage());
+        }
+    }
+
+    public void clean(String viewId) throws CodeGeneratorException {
+        Set<String> keySet = viewCodeMap.keySet();
+        Iterator<String> iterator = keySet.iterator();
+        while (iterator.hasNext()) {
+            String targetPath = iterator.next();
+            targetPath = targetPath.replace(CodeGeneratorConstants.REPLACE_KEY_ID, viewId);
+            File file = new File(this.targetDirectory, targetPath);
+            if (file.exists()) {
+                FileUtils.deleteQuietly(file);
+                refresh(targetPath);
+            }
+        }
+    }
+
+    private void createDirectories() {
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_MANAGED_INC);
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_VIEW_SRC);
+        CodeGeneratorUtil.createDirectoy(this.targetDirectory, CodeGeneratorConstants.DIRECTORY_CONNECTION_SRC);
+    }
+
+    private void refresh(String targetPath) throws CodeGeneratorException {
+        IFile file = project.getFile(targetPath);
+        if (file != null) {
+            try {
+                file.refreshLocal(IResource.DEPTH_INFINITE, null);
+            } catch (CoreException e) {
+                throw new CodeGeneratorException(e.getMessage());
+            }
+        }
+    }
+
+    private void generateCode(Node document, Writer writer, StreamSource xslStream, String viewName) throws TransformerException {
+        // create Tranform
+        TransformerFactory transformerFactory = TransformerFactory.newInstance();
+        transformerFactory.setURIResolver(new URIResolver() {
+            @Override
+            public Source resolve(String href, String base) throws TransformerException {
+                String uri = "res/" + href;
+                try {
+                    InputStream stream = CodeGeneratorUtil.openStream(uri);
+                    return new StreamSource(stream);
+                } catch (IOException e) {
+                    logger.error(e.getMessage());
+                }
+                return null;
+            }
+        });
+        // DOMSource xslDom = new DOMSource(xslDoc);
+        Transformer transformer = transformerFactory.newTransformer(xslStream);
+        transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+        transformer.setOutputProperty(OutputKeys.METHOD, "text");
+        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+        transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+        transformer.setParameter("current_view_name", viewName);
+
+        if (this.isRMSupportVersion != null) { // for RM
+            transformer.setParameter("is_version_rm_support", this.isRMSupportVersion);
+        }
+
+        if (this.profile != null) {
+            transformer.setParameter("profile", this.profile);
+        }
+
+        // transform
+        DOMSource srcDom = new DOMSource(document);
+
+        // Writer writer = new OutputStreamWriter(out);
+        StreamResult result = new StreamResult(writer);
+        transformer.transform(srcDom, result);
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/AbstractPageCodeGeneratorTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/AbstractPageCodeGeneratorTest.java
new file mode 100644 (file)
index 0000000..aa102ba
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.StringWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+abstract public class AbstractPageCodeGeneratorTest {
+    private File xslDirectory = new File("./res/");
+    private File targetDirectory = new File(".");
+    protected File tumlFile = new File("test01/page01.tvdm");
+    protected Document loadedDocument;
+    protected Node node;
+    ViewCodeGenerator generator;
+
+    abstract protected void loadPage() throws Exception;
+
+    abstract protected String getExpectedCode() throws IOException;
+
+    @Before
+    public void setUp() throws Exception {
+//        generator = new ViewCodeGenerator(xslDirectory, targetDirectory);
+    }
+
+    @Test
+    public void testPageSourceGeneration() throws Exception {
+        loadPage();
+        StringWriter writer = new StringWriter();
+        // for avoid of build error, This function should be updated or deleted.
+        // generator.generateViewCode(node, new OutputStreamWriter(System.out), null, null);
+        // generator.generateViewCode(node, writer, null, null);
+
+        String expectedCode = getExpectedCode();
+        System.out.println();
+        System.out.println(toStringForComparison(expectedCode));
+        System.out.println(toStringForComparison(writer.getBuffer().toString()));
+        // assertEquals(toStringForComparison(expectedCode),
+        // toStringForComparison(writer.getBuffer().toString()));
+        String string1 = toStringForComparison(expectedCode);
+        String string2 = toStringForComparison(writer.getBuffer().toString());
+        System.out.println("----" + string1.length());
+        System.out.println("----" + string2.length());
+        assertEquals(string1, string2);
+        assertEquals(string1.length(), string2.length());
+    }
+
+    @Test
+    public void testPageHeaderGeneration() throws Exception {
+        loadPage();
+        // for avoid of build error, This function should be updated or deleted.
+        // generator.generateViewHeader(node, new OutputStreamWriter(System.out), null, null);
+
+        String expectedCode = getStringFromFile(new File("testcases/test01_grid_button/expected/managed/inc/uib_page1_view.h"));
+        System.out.println();
+        System.out.println(toStringForComparison(expectedCode));
+    }
+
+    protected Document loadTuml(File tuml) throws Exception {
+        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+        documentBuilderFactory.setNamespaceAware(true);
+        DocumentBuilder builder = documentBuilderFactory.newDocumentBuilder();
+        Document doc = builder.parse(tuml);
+        return doc;
+    }
+
+    protected String getStringFromFile(File file) throws IOException {
+        StringBuffer buffer = new StringBuffer();
+        BufferedReader reader = new BufferedReader(new FileReader(file));
+        char[] buf = new char[1024];
+        int numRead = 0;
+        while ((numRead = reader.read(buf)) != -1) {
+            String readData = String.valueOf(buf, 0, numRead);
+            buffer.append(readData);
+        }
+        reader.close();
+        return buffer.toString();
+    }
+
+    protected NodeList getViews(Document document) throws XPathExpressionException {
+        XPath xpath = XPathFactory.newInstance().newXPath();
+        String expression = "/tizenFile/document/documentData/tizen.doc/tizen.view";
+        NodeList nodeList = (NodeList) xpath.evaluate(expression, document, XPathConstants.NODESET);
+        return nodeList;
+    }
+
+    protected String toStringForComparison(String string) {
+        return string.replaceAll("\n|\r|\\s", "");
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/AllTests.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/AllTests.java
new file mode 100644 (file)
index 0000000..6a08e03
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+
+
+//@RunWith(Suite.class)
+//@SuiteClasses({ CodeGeneratorTest.class, Page01PageCodeGeneratorTest.class, Page02PageCodeGeneratorTest.class, Page03PageCodeGeneratorTest.class,
+//        Page04PageCodeGeneratorTest.class, Page05PageCodeGeneratorTest.class, Page06PageCodeGeneratorTest.class, Page07PageCodeGeneratorTest.class,
+//        Page08_CheckTest.class, Page09_RadioTest.class, Page10_ColorselectorTest.class, Page11_LabelTest.class, Page12_MultibuttonentryTest.class,
+//        Page13_GenGridTest.class, Page14_GenListTest.class, Page15_EntryTest.class, Page16_SliderTest.class, Page17_LayoutTest.class, Page18_PanesTest.class,
+//        Page19_GenGridTreeTest.class, Page20_TableTest.class, Page98_EventTest.class })
+//public class AllTests {
+//
+// }
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/CodeGeneratorTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/CodeGeneratorTest.java
new file mode 100644 (file)
index 0000000..8e07951
--- /dev/null
@@ -0,0 +1,95 @@
+///*
+// * UI Builder
+// *
+// * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+// *
+// * Licensed under the Apache License, Version 2.0 (the "License");
+// * you may not use this file except in compliance with the License.
+// * You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the License is distributed on an "AS IS" BASIS,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the License for the specific language governing permissions and
+// * limitations under the License.
+// *
+// * Contributors:
+// * - S-Core Co., Ltd
+// *
+// */
+//
+//
+//package org.tizen.efluibuilder.codegenerator;
+//
+//import static org.junit.Assert.assertFalse;
+//import static org.junit.Assert.assertTrue;
+//
+//import java.io.File;
+//import java.io.IOException;
+//
+//import javax.xml.parsers.DocumentBuilder;
+//import javax.xml.parsers.DocumentBuilderFactory;
+//import javax.xml.parsers.ParserConfigurationException;
+//import javax.xml.transform.TransformerException;
+//import javax.xml.xpath.XPathExpressionException;
+//
+//import org.junit.Before;
+//import org.junit.Test;
+//import org.w3c.dom.Document;
+//import org.xml.sax.SAXException;
+//
+//
+//public class CodeGeneratorTest {
+//    private CodeGenerator generator;
+//    private File xslDirectory = new File("./res");
+//    private File targetDirectory = new File("./cogen_test");
+//    File tumlFile = new File("test01_grid_button/layout.tuml");
+//    File appXmlFile = new File("test01_grid_button/.app.xml");
+//    private Document tuml;
+//    private Document appXml;
+//
+//    @Before
+//    public void setUp() throws SAXException, IOException, ParserConfigurationException {
+//        // this.generator = new CodeGenerator(xslDirectory, targetDirectory); // for avoid of build
+//        // error, This function should be updated or deleted.
+//        // this.tuml = this.loadXML(tumlFile);
+//        // this.appXml = this.loadXML(appXmlFile);
+//        // generator = new CodeGenerator(xslDirectory, targetDirectory);
+//    }
+//
+//    @Test
+//    public void testGenerateAndCleanFiles() throws IOException, CodeGeneratorException {
+//        this.generator.generate(tumlFile, appXmlFile);
+//        assertTrue(new File(targetDirectory, "src/managed").exists());
+//        this.generator.clean();
+//        assertFalse(new File(targetDirectory, "src/managed").exists());
+//    }
+//
+//    @Test
+//    public void testGenerateCommonHeader() throws IOException, TransformerException {
+//        // generator.generateViewsHeader(appXml, new OutputStreamWriter(System.out), null); // for
+//        // avoid of build error, This function should be updated or deleted.
+//    }
+//
+//    @Test
+//    public void testGenerateCommonSource() throws TransformerException, IOException, XPathExpressionException {
+//        // generator.generateViewsSource(tuml, tuml, new OutputStreamWriter(System.out), null); //
+//        // for avoid of build error, This function should be updated or deleted.
+//    }
+//
+//    @Test
+//    public void testGenerateViewsHeader() throws TransformerException, IOException {
+//        // generator.generateViewsIncHeader(tuml, new OutputStreamWriter(System.out), null); // for
+//        // avoid of build error, This function should be updated or deleted.
+//    }
+//
+//    private Document loadXML(File tuml) throws SAXException, IOException, ParserConfigurationException {
+//        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+//        documentBuilderFactory.setNamespaceAware(true);
+//        DocumentBuilder builder = documentBuilderFactory.newDocumentBuilder();
+//        Document doc = builder.parse(tuml);
+//        return doc;
+//    }
+// }
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page01PageCodeGeneratorTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page01PageCodeGeneratorTest.java
new file mode 100644 (file)
index 0000000..e4d3d2c
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page01PageCodeGeneratorTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test01_grid_button/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test01_grid_button/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page02PageCodeGeneratorTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page02PageCodeGeneratorTest.java
new file mode 100644 (file)
index 0000000..827ea84
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page02PageCodeGeneratorTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/est02_panel/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test02_panel/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page03PageCodeGeneratorTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page03PageCodeGeneratorTest.java
new file mode 100644 (file)
index 0000000..3ff8d0d
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page03PageCodeGeneratorTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test03_background/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test03_background/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page04PageCodeGeneratorTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page04PageCodeGeneratorTest.java
new file mode 100644 (file)
index 0000000..7a52ee4
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page04PageCodeGeneratorTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test04_scroller/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test04_scroller/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page05PageCodeGeneratorTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page05PageCodeGeneratorTest.java
new file mode 100644 (file)
index 0000000..6c16758
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page05PageCodeGeneratorTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test05_spinner/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test05_spinner/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page06PageCodeGeneratorTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page06PageCodeGeneratorTest.java
new file mode 100644 (file)
index 0000000..7a18956
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page06PageCodeGeneratorTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test06_progressbar/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test06_progressbar/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page07PageCodeGeneratorTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page07PageCodeGeneratorTest.java
new file mode 100644 (file)
index 0000000..8b7a978
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page07PageCodeGeneratorTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test07_grid_in_grid/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test07_grid_in_grid/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page08_CheckTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page08_CheckTest.java
new file mode 100644 (file)
index 0000000..8292195
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page08_CheckTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test08_check/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test08_check/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page09_RadioTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page09_RadioTest.java
new file mode 100644 (file)
index 0000000..9fc28b9
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page09_RadioTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test09_radio/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test09_radio/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page10_ColorselectorTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page10_ColorselectorTest.java
new file mode 100644 (file)
index 0000000..cf4d32a
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page10_ColorselectorTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test10_colorselector/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test10_colorselector/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page11_LabelTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page11_LabelTest.java
new file mode 100644 (file)
index 0000000..a96aa25
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page11_LabelTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test11_label/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test11_label/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page12_MultibuttonentryTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page12_MultibuttonentryTest.java
new file mode 100644 (file)
index 0000000..af721fb
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page12_MultibuttonentryTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test12_multibuttonentry/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test12_multibuttonentry/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page13_GenGridTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page13_GenGridTest.java
new file mode 100644 (file)
index 0000000..f280fe6
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page13_GenGridTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test13_gengrid/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test13_gengrid/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page14_GenListTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page14_GenListTest.java
new file mode 100644 (file)
index 0000000..2bae505
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page14_GenListTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test14_genlist/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test14_genlist/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page15_EntryTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page15_EntryTest.java
new file mode 100644 (file)
index 0000000..2b6f1ff
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page15_EntryTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test15_entry/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test15_entry/expected/managed/src/uib_view1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_view1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_view1_view.h", generator.getHeaderFileName(node));
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page16_SliderTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page16_SliderTest.java
new file mode 100644 (file)
index 0000000..8f75b47
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page16_SliderTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test16_slider/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test16_slider/expected/managed/src/uib_view1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_view1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_view1_view.h", generator.getHeaderFileName(node));
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page17_LayoutTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page17_LayoutTest.java
new file mode 100644 (file)
index 0000000..493ab37
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page17_LayoutTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test17_layout/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test17_layout/expected/managed/src/uib_view1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_view1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_view1_view.h", generator.getHeaderFileName(node));
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page18_PanesTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page18_PanesTest.java
new file mode 100644 (file)
index 0000000..e104fa7
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page18_PanesTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test18_panes/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test18_panes/expected/managed/src/uib_view1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_view1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_view1_view.h", generator.getHeaderFileName(node));
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page19_GenGridTreeTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page19_GenGridTreeTest.java
new file mode 100644 (file)
index 0000000..3fdaa2a
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page19_GenGridTreeTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test19_genlist_treeitem/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test19_genlist_treeitem/expected/managed/src/uib_view1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_view1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_view1_view.h", generator.getHeaderFileName(node));
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page20_TableTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page20_TableTest.java
new file mode 100644 (file)
index 0000000..3cb5dee
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page20_TableTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test20_table/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test20_table/expected/managed/src/uib_view1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_view1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_view1_view.h", generator.getHeaderFileName(node));
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page21_BoxTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page21_BoxTest.java
new file mode 100644 (file)
index 0000000..a243e95
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page21_BoxTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test21_box/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test21_box/expected/managed/src/uib_view1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_view1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_view1_view.h", generator.getHeaderFileName(node));
+    }
+}
diff --git a/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page98_EventTest.java b/org.tizen.efluibuilder.codegenerator/test/org/tizen/efluibuilder/codegenerator/Page98_EventTest.java
new file mode 100644 (file)
index 0000000..4934f73
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.codegenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+
+public class Page98_EventTest extends AbstractPageCodeGeneratorTest {
+    protected void loadPage() throws Exception {
+        tumlFile = new File("testcases/test98_event/layout.tuml");
+        loadedDocument = loadTuml(tumlFile);
+        node = getViews(loadedDocument).item(0);
+        assertTrue(node != null);
+    }
+
+    protected String getExpectedCode() throws IOException {
+        return getStringFromFile(new File("testcases/test98_event/expected/managed/src/uib_page1_view.c"));
+    }
+
+    @Test
+    public void testFileName() throws Exception {
+        loadPage();
+        assertEquals("uib_page1_view.c", generator.getSourceFileName(node));
+        assertEquals("uib_page1_view.h", generator.getHeaderFileName(node));
+    }
+
+}
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/inc/uib_page1_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/inc/uib_page1_view.h
new file mode 100644 (file)
index 0000000..6e834d5
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_page1_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_PAGE1_VIEW_H_\r
+#define UIB_PAGE1_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_page1_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_page1_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_page1_view_context;\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_page1_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_PAGE1_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..c1cc611
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_page1_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..072566a
--- /dev/null
@@ -0,0 +1,68 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+\r
+/* event handler declarations */\r
+\r
+\r
+\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 480, 800);\r
+\r
+               vc->button1 = elm_button_add(vc->content1);\r
+               if (vc->button1) {\r
+                       evas_object_size_hint_align_set(vc->button1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->button1, 1, 1);\r
+                       elm_object_text_set(vc->button1, "버튼123");\r
+                       elm_button_autorepeat_set(vc->button1, EINA_TRUE);\r
+                       elm_button_autorepeat_initial_timeout_set(vc->button1,100);\r
+                       elm_button_autorepeat_gap_timeout_set(vc->button1,120);\r
+                       evas_object_show(vc->button1);\r
+               }\r
+               vc->button2 = elm_button_add(vc->content1);\r
+               if (vc->button2) {\r
+                       evas_object_size_hint_align_set(vc->button2, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->button2, 1, 1);\r
+                       elm_object_text_set(vc->button2, "Button");\r
+                       evas_object_show(vc->button2);\r
+               }\r
+               vc->button3 = elm_button_add(vc->content1);\r
+               if (vc->button3) {\r
+                       evas_object_size_hint_align_set(vc->button3, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->button3, 1, 1);\r
+                       elm_object_text_set(vc->button3, "Button");\r
+                       evas_object_show(vc->button3);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->button1, 48, 36, 193, 50);\r
+               elm_grid_pack(vc->content1, vc->button2, 48, 108, 193, 50);\r
+               elm_grid_pack(vc->content1, vc->button3, 48, 180, 193, 50);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
+\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/layout.tuml
new file mode 100644 (file)
index 0000000..1aabca4
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet>
+                                               <ruleset name="#page1 #button1" pageId="page1" partId="button1">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="1" />
+                                                       <style name="top" value="36px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                               <ruleset name="#page1 #button2" pageId="page1" partId="button2">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="1" />
+                                                       <style name="top" value="108px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                               <ruleset name="#page1 #button3" pageId="page1" partId="button3">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="2" />
+                                                       <style name="top" value="180px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                       </styleSheet>
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="480"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="800" visible="" weight-x="1" weight-y="1">
+                                               <efl.button align-x="FILL" align-y="FILL" autorepeat="true"
+                                                       autorepeat-gap-timeout="120" autorepeat-initial-timeout="100"
+                                                       disable="false" id="button1" pack-height="50" pack-left="48"
+                                                       pack-top="36" pack-width="193" text="버튼 123" visible="true"
+                                                       weight-x="1" weight-y="1" />
+                                               <efl.button align-x="FILL" align-y="FILL" autorepeat=""
+                                                       autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                       id="button2" pack-height="50" pack-left="48" pack-top="108"
+                                                       pack-width="193" text="Button" visible="true" weight-x="1"
+                                                       weight-y="1" />
+                                               <efl.button align-x="FILL" align-y="FILL" autorepeat=""
+                                                       autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                       id="button3" pack-height="50" pack-left="48" pack-top="180"
+                                                       pack-width="193" text="Button" visible="true" weight-x="1"
+                                                       weight-y="1" />
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/layout1.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test01_grid_button/layout1.tuml
new file mode 100644 (file)
index 0000000..70e0636
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>3</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet>
+                                               <ruleset name="#page1 #button1" pageId="page1" partId="button1">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="1" />
+                                                       <style name="top" value="36px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                               <ruleset name="#page1 #button2" pageId="page1" partId="button2">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="1" />
+                                                       <style name="top" value="108px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                               <ruleset name="#page1 #button3" pageId="page1" partId="button3">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="2" />
+                                                       <style name="top" value="180px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                       </styleSheet>
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.page data-dom-cache="" data-title="" id="page1">
+                                       <efl.grid disabled="false" align-x="FILL" align-y="FILL" id="content1" pack-height=""
+                                               pack-left="" pack-top="" pack-width="" size-height="800"
+                                               size-width="480" visible="true" weight-x="1.0" weight-y="1.0">
+                                               <efl.button align-x="FILL" align-y="FILL" autorepeat="" autorepeat-gap-timeout=""
+                                                       autorepeat-initial-timeout="" id="button1" pack-height="50"
+                                                       pack-left="48" pack-top="48" pack-width="193" text="버튼 123" weight-x="1.0" weight-y="1.0" />
+                                               <efl.button align-x="FILL" align-y="FILL" autorepeat="" autorepeat-gap-timeout=""
+                                                       autorepeat-initial-timeout="" id="button2" pack-height="50"
+                                                       pack-left="48" pack-top="108" pack-width="193" text="Button" weight-x="1.0" weight-y="1.0" />
+                                               <efl.button align-x="FILL" align-y="FILL" autorepeat="" autorepeat-gap-timeout=""
+                                                       autorepeat-initial-timeout="" id="button3" pack-height="50"
+                                                       pack-left="48" pack-top="180" pack-width="193" text="Button" weight-x="1.0" weight-y="1.0"/>
+                                       </efl.grid>
+                               </tizen.page>
+                               <tizen.page data-dom-cache="" data-title="" id="page2">
+                                       <efl.grid disabled="false" id="content2" pack-height=""
+                                               pack-left="" pack-top="" pack-width="" size-height="800"
+                                               size-width="480" visible="true">
+                                               <efl.button autorepeat="" autorepeat-gap-timeout=""
+                                                       autorepeat-initial-timeout="" id="button1" pack-height="50"
+                                                       pack-left="48" pack-top="48" pack-width="193" text="버튼 123" />
+                                               <efl.button autorepeat="" autorepeat-gap-timeout=""
+                                                       autorepeat-initial-timeout="" id="button2" pack-height="50"
+                                                       pack-left="48" pack-top="108" pack-width="193" text="Button" />
+                                               <efl.button autorepeat="" autorepeat-gap-timeout=""
+                                                       autorepeat-initial-timeout="" id="button3" pack-height="50"
+                                                       pack-left="48" pack-top="180" pack-width="193" text="Button" />
+                                       </efl.grid>
+                               </tizen.page>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..f855ba9
--- /dev/null
@@ -0,0 +1,75 @@
+
+
+/*
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __UIB_COMMON_H__
+#define __UIB_COMMON_H__
+
+#include <Elementary.h>
+
+#define        APP_NAME                        "calc"
+#define        KEY_VIEW_CONTEXT        "uib,view,context"
+#define        KEY_VIEW_CREATE         "uib,view,create"
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"
+
+typedef struct
+{
+    Evas_Object *win;
+    Evas_Object *bg;
+    Evas_Object *conformant;
+    Evas_Object *layout;
+} window_obj;
+
+typedef struct _uib_view_context
+{
+    Evas_Object*       parent;
+       Evas_Object*    root_container;
+       const char*     view_name;
+} uib_view_context;
+
+
+/**
+ * @brief Create startup view
+ * @param[in]   win     EFL Window
+ * @return uib_view_context
+ */
+uib_view_context * startup_view_create(window_obj* win);
+
+
+/**
+ * @brief Call a callback on view creation
+ * @param[in]   vc                     view context
+ * @param[in]   obj                    The root container widget of this view
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event
+ */
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;
+
+
+/**
+ * @brief Call a callback on view termination
+ * @param[in]   vc                     view context
+ * @param[in]   obj                    The root container widget of this view
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event
+ */
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;
+
+window_obj* win_create();
+void win_destroy(window_obj *win_obj);
+
+#endif /* __UIB_COMMON_H__ */
+
+
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..15960b5
--- /dev/null
@@ -0,0 +1,47 @@
+
+
+/*
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * uib_main_view.h
+ *
+ *  Created on: Nov 27, 2014
+ *      Author: djhwang
+ */
+
+#ifndef UIB_MAIN_VIEW_H_
+#define UIB_MAIN_VIEW_H_
+
+//#include <Elementary.h>
+
+typedef struct _uib_main_view_context
+{
+    Evas_Object*       parent;
+    Evas_Object*       root_container;
+    const char*                view_name;
+    struct uib_main_control_context* cc;
+    Evas_Object*       grid1;
+    Evas_Object*       button1;
+} uib_main_view_context;
+
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);
+
+
+#endif /* UIB_MAIN_VIEW_H_ */
+
+
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..a7f1038
--- /dev/null
@@ -0,0 +1,77 @@
+
+
+/*
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+#include "uib_common.h"
+#include "uib_views.h"
+
+
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);
+}
+
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);
+       if (vc) {
+               free(vc);
+       }
+}
+
+uib_view_context* startup_view_create(window_obj* win)
+{
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);
+    if (vc) {
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);
+    }
+
+    return vc;
+}
+
+window_obj* win_create()
+{
+       window_obj* obj = calloc(1, sizeof(window_obj));
+    if (!obj)
+       return NULL;
+
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);
+       elm_win_conformant_set(obj->win, EINA_TRUE);
+       evas_object_show(obj->win);
+
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);
+       obj->conformant = elm_conformant_add(obj->win);
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(obj->win, obj->conformant);
+       evas_object_show(obj->conformant);
+
+       obj->bg = elm_bg_add(obj->conformant);
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(obj->bg);
+
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);
+       return obj;
+}
+
+void win_destroy(window_obj *obj)
+{
+       if (obj) {
+               evas_object_del(obj->win);
+               free(obj);
+       }
+}
+
+
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..aa0990a
--- /dev/null
@@ -0,0 +1,55 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+\r
+/* event handler declarations */\r
+\r
+\r
+\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+               vc->panel1 = elm_panel_add(vc->content1);\r
+               if (vc->panel1) {\r
+                       evas_object_size_hint_align_set(vc->panel1, 0.5, 0.5);\r
+                       evas_object_size_hint_weight_set(vc->panel1, 0.41, 0.71);\r
+                       elm_panel_orient_set(vc->panel1, (Elm_Panel_Orient)1);\r
+                       vc->button1 = elm_button_add(vc->panel1);\r
+                       if (vc->button1) {\r
+                               evas_object_size_hint_align_set(vc->button1, -1.0, -1.0);\r
+                               evas_object_size_hint_weight_set(vc->button1, 1, 1);\r
+                               elm_object_text_set(vc->button1, "Button");\r
+                               evas_object_show(vc->button1);\r
+                       }\r
+                       elm_object_content_set(vc->panel1, vc->button1);\r
+                       evas_object_show(vc->panel1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->panel1, 72, 228, 150, 80);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
+\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test02_panel/layout.tuml
new file mode 100644 (file)
index 0000000..de595d0
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>3</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet />
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.panel align-x="0.5" align-y="0.5" id="panel1"
+                                                       orient="1" pack-height="80" pack-left="72" pack-top="228"
+                                                       pack-width="150" visible="true" weight-x="0.41" weight-y="0.71">
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat=""
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable=""
+                                                               id="button1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                                               text="Button" visible="" weight-x="1" weight-y="1" />
+                                               </efl.panel>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test03_background/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test03_background/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..f855ba9
--- /dev/null
@@ -0,0 +1,75 @@
+
+
+/*
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __UIB_COMMON_H__
+#define __UIB_COMMON_H__
+
+#include <Elementary.h>
+
+#define        APP_NAME                        "calc"
+#define        KEY_VIEW_CONTEXT        "uib,view,context"
+#define        KEY_VIEW_CREATE         "uib,view,create"
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"
+
+typedef struct
+{
+    Evas_Object *win;
+    Evas_Object *bg;
+    Evas_Object *conformant;
+    Evas_Object *layout;
+} window_obj;
+
+typedef struct _uib_view_context
+{
+    Evas_Object*       parent;
+       Evas_Object*    root_container;
+       const char*     view_name;
+} uib_view_context;
+
+
+/**
+ * @brief Create startup view
+ * @param[in]   win     EFL Window
+ * @return uib_view_context
+ */
+uib_view_context * startup_view_create(window_obj* win);
+
+
+/**
+ * @brief Call a callback on view creation
+ * @param[in]   vc                     view context
+ * @param[in]   obj                    The root container widget of this view
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event
+ */
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;
+
+
+/**
+ * @brief Call a callback on view termination
+ * @param[in]   vc                     view context
+ * @param[in]   obj                    The root container widget of this view
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event
+ */
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;
+
+window_obj* win_create();
+void win_destroy(window_obj *win_obj);
+
+#endif /* __UIB_COMMON_H__ */
+
+
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..15960b5
--- /dev/null
@@ -0,0 +1,47 @@
+
+
+/*
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * uib_main_view.h
+ *
+ *  Created on: Nov 27, 2014
+ *      Author: djhwang
+ */
+
+#ifndef UIB_MAIN_VIEW_H_
+#define UIB_MAIN_VIEW_H_
+
+//#include <Elementary.h>
+
+typedef struct _uib_main_view_context
+{
+    Evas_Object*       parent;
+    Evas_Object*       root_container;
+    const char*                view_name;
+    struct uib_main_control_context* cc;
+    Evas_Object*       grid1;
+    Evas_Object*       button1;
+} uib_main_view_context;
+
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);
+
+
+#endif /* UIB_MAIN_VIEW_H_ */
+
+
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..a7f1038
--- /dev/null
@@ -0,0 +1,77 @@
+
+
+/*
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+#include "uib_common.h"
+#include "uib_views.h"
+
+
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);
+}
+
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);
+       if (vc) {
+               free(vc);
+       }
+}
+
+uib_view_context* startup_view_create(window_obj* win)
+{
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);
+    if (vc) {
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);
+    }
+
+    return vc;
+}
+
+window_obj* win_create()
+{
+       window_obj* obj = calloc(1, sizeof(window_obj));
+    if (!obj)
+       return NULL;
+
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);
+       elm_win_conformant_set(obj->win, EINA_TRUE);
+       evas_object_show(obj->win);
+
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);
+       obj->conformant = elm_conformant_add(obj->win);
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(obj->win, obj->conformant);
+       evas_object_show(obj->conformant);
+
+       obj->bg = elm_bg_add(obj->conformant);
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(obj->bg);
+
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);
+       return obj;
+}
+
+void win_destroy(window_obj *obj)
+{
+       if (obj) {
+               evas_object_del(obj->win);
+               free(obj);
+       }
+}
+
+
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test03_background/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..35061fd
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+\r
+#include "app_main.h"\r
+\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+\r
+               vc->bg1 = elm_bg_add(vc->content1);\r
+               if (vc->bg1) {\r
+                       evas_object_size_hint_align_set(vc->bg1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->bg1, 1, 1);\r
+                       elm_bg_option_set(vc->bg1, (Elm_Bg_Option)0);\r
+                       elm_bg_load_size_set(vc->bg1, 20, 30);\r
+                       evas_object_show(vc->bg1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->bg1, 48, 228, 200, 73);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
+\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test03_background/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test03_background/layout.tuml
new file mode 100644 (file)
index 0000000..5532550
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>3</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet />
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.bg align-x="FILL" align-y="FILL" color="" id="bg1"
+                                                       image="test.jpg" load-size-height="30" load-size-width="20" option="0"
+                                                       pack-height="73" pack-left="48" pack-top="228" pack-width="200"
+                                                       visible="" weight-x="1" weight-y="1" />
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..f855ba9
--- /dev/null
@@ -0,0 +1,75 @@
+
+
+/*
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __UIB_COMMON_H__
+#define __UIB_COMMON_H__
+
+#include <Elementary.h>
+
+#define        APP_NAME                        "calc"
+#define        KEY_VIEW_CONTEXT        "uib,view,context"
+#define        KEY_VIEW_CREATE         "uib,view,create"
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"
+
+typedef struct
+{
+    Evas_Object *win;
+    Evas_Object *bg;
+    Evas_Object *conformant;
+    Evas_Object *layout;
+} window_obj;
+
+typedef struct _uib_view_context
+{
+    Evas_Object*       parent;
+       Evas_Object*    root_container;
+       const char*     view_name;
+} uib_view_context;
+
+
+/**
+ * @brief Create startup view
+ * @param[in]   win     EFL Window
+ * @return uib_view_context
+ */
+uib_view_context * startup_view_create(window_obj* win);
+
+
+/**
+ * @brief Call a callback on view creation
+ * @param[in]   vc                     view context
+ * @param[in]   obj                    The root container widget of this view
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event
+ */
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;
+
+
+/**
+ * @brief Call a callback on view termination
+ * @param[in]   vc                     view context
+ * @param[in]   obj                    The root container widget of this view
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event
+ */
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;
+
+window_obj* win_create();
+void win_destroy(window_obj *win_obj);
+
+#endif /* __UIB_COMMON_H__ */
+
+
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..15960b5
--- /dev/null
@@ -0,0 +1,47 @@
+
+
+/*
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * uib_main_view.h
+ *
+ *  Created on: Nov 27, 2014
+ *      Author: djhwang
+ */
+
+#ifndef UIB_MAIN_VIEW_H_
+#define UIB_MAIN_VIEW_H_
+
+//#include <Elementary.h>
+
+typedef struct _uib_main_view_context
+{
+    Evas_Object*       parent;
+    Evas_Object*       root_container;
+    const char*                view_name;
+    struct uib_main_control_context* cc;
+    Evas_Object*       grid1;
+    Evas_Object*       button1;
+} uib_main_view_context;
+
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);
+
+
+#endif /* UIB_MAIN_VIEW_H_ */
+
+
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/src/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/src/layout.tuml
new file mode 100644 (file)
index 0000000..225e31f
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-view</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.doc>
+                               <tizen.view id="view1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="480"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="800" visible="" weight-x="1" weight-y="1">
+                                               <efl.scroller align-x="FILL" align-y="FILL" h-bounce="true"
+                                                       id="scroller1" min-limit-h="false" min-limit-w="true"
+                                                       pack-height="122" pack-left="4" pack-top="203" pack-width="470"
+                                                       policy-h="2" policy-v="0" propagate-events="true"
+                                                       single-direction="1" v-bounce="true" visible="true" weight-x="1"
+                                                       weight-y="1">
+                                                       <efl.label align-x="FILL" align-y="FILL" disable="false"
+                                                               duration="" ellipsis="false" id="label1" pack-height=""
+                                                               pack-left="" pack-top="" pack-width="" slide-mode="" style="default"
+                                                               text="aaaaaaaaaa&quot;" visible="true" weight-x="1" weight-y="1"
+                                                               wrap-set="" wrap-width="" />
+                                               </efl.scroller>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..a7f1038
--- /dev/null
@@ -0,0 +1,77 @@
+
+
+/*
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+#include "uib_common.h"
+#include "uib_views.h"
+
+
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);
+}
+
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);
+       if (vc) {
+               free(vc);
+       }
+}
+
+uib_view_context* startup_view_create(window_obj* win)
+{
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);
+    if (vc) {
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);
+    }
+
+    return vc;
+}
+
+window_obj* win_create()
+{
+       window_obj* obj = calloc(1, sizeof(window_obj));
+    if (!obj)
+       return NULL;
+
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);
+       elm_win_conformant_set(obj->win, EINA_TRUE);
+       evas_object_show(obj->win);
+
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);
+       obj->conformant = elm_conformant_add(obj->win);
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(obj->win, obj->conformant);
+       evas_object_show(obj->conformant);
+
+       obj->bg = elm_bg_add(obj->conformant);
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(obj->bg);
+
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);
+       return obj;
+}
+
+void win_destroy(window_obj *obj)
+{
+       if (obj) {
+               evas_object_del(obj->win);
+               free(obj);
+       }
+}
+
+
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..865e0eb
--- /dev/null
@@ -0,0 +1,60 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+\r
+/* event handler declarations */\r
+\r
+\r
+\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+\r
+               vc->scroller1 = elm_scroller_add(vc->content1);\r
+               if (vc->scroller1) {\r
+                       evas_object_size_hint_align_set(vc->scroller1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->scroller1, 1, 1);\r
+                       elm_scroller_bounce_set(vc->scroller1, EINA_TRUE, EINA_FALSE);\r
+                       elm_scroller_content_min_limit(vc->scroller1, EINA_FALSE, EINA_FALSE);\r
+                       elm_scroller_policy_set (vc->scroller1, (Elm_Scroller_Policy) 0, (Elm_Scroller_Policy) 0);\r
+                       elm_scroller_single_direction_set(vc->scroller1, (Elm_Scroller_Single_Direction)1);\r
+                       elm_scroller_propagate_events_set(vc->scroller1, EINA_TRUE);\r
+                       vc->panel1 = elm_panel_add(vc->scroller1);\r
+                       if (vc->panel1) {\r
+                               evas_object_size_hint_align_set(vc->panel1, -1.0, -1.0);\r
+                               evas_object_size_hint_weight_set(vc->panel1, 1, 1);\r
+                               evas_object_show(vc->panel1);\r
+                       }\r
+                       elm_object_content_set(vc->scroller1, vc->panel1);\r
+                       evas_object_show(vc->scroller1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->scroller1, 48, 48, 200, 150);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
+\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test04_scroller/layout.tuml
new file mode 100644 (file)
index 0000000..ea3ac37
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>3</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet />
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.scroller align-x="FILL" align-y="FILL" h-bounce="true"
+                                                       id="scroller1" min-limit-h="false" min-limit-w="false"
+                                                       pack-height="150" pack-left="48" pack-top="48" pack-width="200"
+                                                       policy-h="0" policy-v="0" propagate-events="true" single-direction="1"
+                                                       v-bounce="false" visible="true" weight-x="1" weight-y="1">
+                                                       <efl.panel align-x="FILL" align-y="FILL" id="panel1"
+                                                               orient="" pack-height="" pack-left="" pack-top="" pack-width=""
+                                                               visible="" weight-x="1" weight-y="1" />
+                                               </efl.scroller>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..1b57a85
--- /dev/null
@@ -0,0 +1,47 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+\r
+/* event handler declarations */\r
+\r
+\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+\r
+               vc->spinner1 = elm_spinner_add(vc->content1);\r
+               if (vc->spinner1) {\r
+                       evas_object_size_hint_align_set(vc->spinner1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->spinner1, 1, 1);\r
+                       elm_spinner_min_max_set(vc->spinner1,0,100);\r
+                       evas_object_show(vc->spinner1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->spinner1, 60, 120, 150, 40);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
+\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test05_spinner/layout.tuml
new file mode 100644 (file)
index 0000000..1a57449
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>3</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet />
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.spinner align-x="FILL" align-y="FILL" base=""
+                                                       disable="" editable="" id="spinner1" interval="" label-format=""
+                                                       max="100" min="0" pack-height="40" pack-left="60" pack-top="120"
+                                                       pack-width="150" round="" step="" style="" value="" visible=""
+                                                       weight-x="1" weight-y="1" wrap="" />
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..d21fdd1
--- /dev/null
@@ -0,0 +1,49 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+\r
+#include "app_main.h"\r
+\r
+\r
+/* event handler declarations */\r
+\r
+\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+\r
+               vc->progressbar1 = elm_progressbar_add(vc->content1);\r
+               if (vc->progressbar1) {\r
+                       evas_object_size_hint_align_set(vc->progressbar1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->progressbar1, 1.0, 1.0);\r
+                       elm_object_style_set(vc->progressbar1, "wheel");\r
+                       elm_progressbar_horizontal_set(vc->progressbar1, EINA_TRUE);\r
+                       elm_progressbar_pulse_set(vc->progressbar1, EINA_TRUE);\r
+                       elm_progressbar_value_set(vc->progressbar1,0);\r
+                       evas_object_show(vc->progressbar1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->progressbar1, 60, 192, 150, 30);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test06_progressbar/layout.tuml
new file mode 100644 (file)
index 0000000..f99dbc2
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet />
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.progressbar align-x="FILL" align-y="FILL"
+                                                       disable="" format="" horizontal="true" id="progressbar1" inverted=""
+                                                       pack-height="30" pack-left="60" pack-top="192" pack-width="150"
+                                                       pulse="true" span-size="" style="wheel" text="test" value="0" visible=""
+                                                       weight-x="1.0" weight-y="1.0" />                                                
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..f37794a
--- /dev/null
@@ -0,0 +1,43 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+               vc->grid1 = elm_grid_add(vc->content1);\r
+               if (vc->grid1) {\r
+                       evas_object_size_hint_align_set(vc->grid1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->grid1, 1, 1);\r
+                       elm_grid_size_set(vc->grid1, 241, 241);\r
+                       evas_object_show(vc->grid1);\r
+               }\r
+\r
+               elm_grid_pack(vc->content1, vc->grid1, 36, 36, 241, 241);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test07_grid_in_grid/layout.tuml
new file mode 100644 (file)
index 0000000..c6e821e
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet />
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.grid align-x="FILL" align-y="FILL" col_count="241"
+                                                       id="grid1" pack-height="241" pack-left="36" pack-top="36"
+                                                       pack-width="241" row_count="241" visible="" weight-x="1"
+                                                       weight-y="1">
+                                               </efl.grid>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test08_check/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test08_check/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test08_check/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..1b0cae4
--- /dev/null
@@ -0,0 +1,41 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+\r
+               vc->check1 = elm_check_add(vc->content1);\r
+               if (vc->check1) {\r
+                       evas_object_size_hint_align_set(vc->check1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->check1, 1, 1);\r
+                       elm_object_text_set(vc->check1,"Check");\r
+                       evas_object_show(vc->check1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->check1, 108, 132, 100, 30);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test08_check/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test08_check/layout.tuml
new file mode 100644 (file)
index 0000000..68dc07f
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet />
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.check align-x="FILL" align-y="FILL" disable=""
+                                                       id="check1" pack-height="30" pack-left="108" pack-top="132"
+                                                       pack-width="100" state="" text="Check" visible="" weight-x="1"
+                                                       weight-y="1" />
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..09f1244
--- /dev/null
@@ -0,0 +1,65 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+               static int val;\r
+               vc->radio1 = elm_radio_add(vc->content1);\r
+               if(vc->radio1) {\r
+                       evas_object_size_hint_align_set(vc->radio1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->radio1, 1, 1);\r
+                       elm_object_text_set(vc->radio1,"Radio");\r
+                       elm_radio_state_value_set(vc->radio1,);\r
+                       elm_radio_value_pointer_set(vc->radio1,&val);\r
+                       evas_object_show(vc->radio1);\r
+               }\r
+               vc->radio2 = elm_radio_add(vc->content1);\r
+               if(vc->radio2) {\r
+                       evas_object_size_hint_align_set(vc->radio2, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->radio2, 1, 1);\r
+                       elm_object_text_set(vc->radio2,"Radio");\r
+                       elm_radio_state_value_set(vc->radio2,);\r
+                       elm_radio_value_pointer_set(vc->radio2,&val);\r
+                       elm_radio_group_add(vc->radio2,vc->radio1);\r
+                       evas_object_show(vc->radio2);\r
+               }\r
+               vc->radio3 = elm_radio_add(vc->content1);\r
+               if(vc->radio3) {\r
+                       evas_object_size_hint_align_set(vc->radio3, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->radio3, 1, 1);\r
+                       elm_object_text_set(vc->radio3,"Radio");\r
+                       elm_radio_state_value_set(vc->radio3,);\r
+                       elm_radio_value_pointer_set(vc->radio3,&val);\r
+                       elm_radio_group_add(vc->radio3,vc->radio1);\r
+                       evas_object_show(vc->radio3);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->radio1, 108, 144, 100, 30);\r
+               elm_grid_pack(vc->content1, vc->radio2, 108, 144, 100, 30);\r
+               elm_grid_pack(vc->content1, vc->radio3, 108, 144, 100, 30);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test09_radio/layout.tuml
new file mode 100644 (file)
index 0000000..281f2ff
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet />
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">                                           
+                                               <efl.radio align-x="FILL" align-y="FILL" disable=""
+                                                       id="radio1" pack-height="30" pack-left="108" pack-top="144"
+                                                       pack-width="100" state-value="" text="Radio" value="" visible=""
+                                                       weight-x="1" weight-y="1" />
+                                               <efl.radio align-x="FILL" align-y="FILL" disable=""
+                                                       id="radio2" pack-height="30" pack-left="108" pack-top="144"
+                                                       pack-width="100" state-value="" text="Radio" value="" visible=""
+                                                       weight-x="1" weight-y="1" />
+                                               <efl.radio align-x="FILL" align-y="FILL" disable=""
+                                                       id="radio3" pack-height="30" pack-left="108" pack-top="144"
+                                                       pack-width="100" state-value="" text="Radio" value="" visible=""
+                                                       weight-x="1" weight-y="1" />
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..716c304
--- /dev/null
@@ -0,0 +1,41 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+\r
+               vc->colorselector1 = elm_colorselector_add(vc->content1);\r
+               if (vc->colorselector1) {\r
+                       evas_object_size_hint_align_set(vc->colorselector1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->colorselector1, 1, 1);\r
+                       elm_colorselector_mode_set(vc->colorselector1, (Elm_Colorselector_Mode)2);\r
+                       evas_object_show(vc->colorselector1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->colorselector1, 24, 12, 265, 301);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test10_colorselector/layout.tuml
new file mode 100644 (file)
index 0000000..fcc037e
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet />
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.colorselector align-x="FILL" align-y="FILL"
+                                                       disable="" id="colorselector1" mode="2" pack-height="301"
+                                                       pack-left="24" pack-top="12" pack-width="265" select-a="255"
+                                                       select-b="255" select-g="255" select-r="255" visible="" weight-x="1"
+                                                       weight-y="1" />
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test11_label/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test11_label/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test11_label/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..a49c4fc
--- /dev/null
@@ -0,0 +1,42 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+\r
+               vc->label1 = elm_label_add(vc->content1);\r
+               if (vc->label1) {\r
+                       evas_object_size_hint_align_set(vc->label1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->label1, 1, 1);\r
+                       elm_object_text_set(vc->label1,"test");\r
+                       elm_object_style_set(vc->label1,"default");\r
+                       evas_object_show(vc->label1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->label1, 72, 48, 100, 30);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test11_label/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test11_label/layout.tuml
new file mode 100644 (file)
index 0000000..c7f7ca8
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet />
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.label align-x="FILL" align-y="FILL" disable=""
+                                                       duration="" ellipsis="" id="label1" pack-height="30" pack-left="72"
+                                                       pack-top="48" pack-width="100" slide-mode="" style="default"
+                                                       text="test" visible="" weight-x="1" weight-y="1" wrap-set=""
+                                                       wrap-width="" />
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..ac1f414
--- /dev/null
@@ -0,0 +1,45 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+\r
+               vc->multibuttonentry1 = elm_multibuttonentry_add(vc->content1);\r
+               if (vc->multibuttonentry1) {\r
+                       evas_object_size_hint_align_set(vc->multibuttonentry1, -1.0, 0);\r
+                       evas_object_size_hint_weight_set(vc->multibuttonentry1, 0, 0);\r
+                       vc->multibuttonentryitem1 = create_multibuttonentry_item(vc->multibuttonentry1, "item", NULL, NULL);\r
+                       vc->multibuttonentryitem2 = create_multibuttonentry_item(vc->multibuttonentry1, "item", NULL, NULL);\r
+                       vc->multibuttonentryitem3 = create_multibuttonentry_item(vc->multibuttonentry1, "item", NULL, NULL);\r
+                       vc->multibuttonentryitem4 = create_multibuttonentry_item(vc->multibuttonentry1, "item", NULL, NULL);\r
+                       evas_object_show(vc->multibuttonentry1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->multibuttonentry1, 84, 96, 150, 109);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test12_multibuttonentry/layout.tuml
new file mode 100644 (file)
index 0000000..d4308a5
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet>
+                                               <ruleset name="#page1 #button1" pageId="page1" partId="button1">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="1" />
+                                                       <style name="top" value="36px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                               <ruleset name="#page1 #button2" pageId="page1" partId="button2">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="1" />
+                                                       <style name="top" value="108px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                               <ruleset name="#page1 #button3" pageId="page1" partId="button3">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="2" />
+                                                       <style name="top" value="180px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                       </styleSheet>
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.multibuttonentry align-x="FILL" align-y="0"
+                                                       disable="" editable="" expanded="" id="multibuttonentry1"
+                                                       pack-height="109" pack-left="84" pack-top="96" pack-width="150"
+                                                       visible="" weight-x="0" weight-y="0">
+                                                       <efl.multibuttonentryitem id="multibuttonentryitem1"
+                                                               label="item" />
+                                                       <efl.multibuttonentryitem id="multibuttonentryitem2"
+                                                               label="item" />
+                                                       <efl.multibuttonentryitem id="multibuttonentryitem3"
+                                                               label="item" />
+                                                       <efl.multibuttonentryitem id="multibuttonentryitem4"
+                                                               label="item" />
+                                               </efl.multibuttonentry>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..feff762
--- /dev/null
@@ -0,0 +1,51 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+void page1_gengriditem1_onitemselected(uib_page1_view_context*, Evas_Object*, void*);\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+\r
+               vc->gengrid1 = elm_gengrid_add(vc->content1);\r
+               if (vc->gengrid1) {\r
+                       evas_object_size_hint_align_set(vc->gengrid1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->gengrid1, 1, 1);\r
+                       elm_gengrid_item_size_set(vc->gengrid1, 100, 100);\r
+                       elm_gengrid_horizontal_set(vc->gengrid1, EINA_FALSE);\r
+                       elm_gengrid_multi_select_set(vc->gengrid1, EINA_FALSE);\r
+                       elm_gengrid_select_mode_set(vc->gengrid1, (Elm_Object_Select_Mode)0);\r
+\r
+                       initialize_gengrid_class();\r
+                       vc->gengriditem1= create_gengrid_item(vc->gengrid1, "gen grid item", "../res/tizen_blank_16.png", (Evas_Smart_Cb)page1_gengriditem1_onitemselected, vc);\r
+                       elm_gengrid_item_selected_set(vc->gengriditem1, EINA_TRUE);\r
+                       vc->gengriditem2= create_gengrid_item(vc->gengrid1, "item", "../res/tizen_blank_64.png", NULL, NULL);\r
+                       elm_object_item_disabled_set(vc->gengriditem2,EINA_TRUE);\r
+                       evas_object_show(vc->gengrid1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->gengrid1, 12, 0, 300, 300);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test13_gengrid/layout.tuml
new file mode 100644 (file)
index 0000000..0a747c0
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet>
+                                               <ruleset name="#page1 #button1" pageId="page1" partId="button1">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="1" />
+                                                       <style name="top" value="36px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                               <ruleset name="#page1 #button2" pageId="page1" partId="button2">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="1" />
+                                                       <style name="top" value="108px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                               <ruleset name="#page1 #button3" pageId="page1" partId="button3">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="2" />
+                                                       <style name="top" value="180px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                       </styleSheet>
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.gengrid align-x="FILL" align-y="FILL" disable=""
+                                                       horizontal="false" id="gengrid1" item-size-h="100" item-size-w="100"
+                                                       multi-select="false" pack-height="300" pack-left="12" pack-top="0"
+                                                       pack-width="300" select-mode="0" visible="" weight-x="1"
+                                                       weight-y="1">
+                                                       <efl.gengriditem disabled="" id="gengriditem1"
+                                                               image-path="../res/tizen_blank_16.png" label="gen grid item"
+                                                               selected="true">
+                                                               <event onitemselected="gengriditem1_onitemselected" />
+                                                       </efl.gengriditem>
+                                                       <efl.gengriditem disabled="true" id="gengriditem2"
+                                                               image-path="../res/tizen_blank_64.png" label="item" selected="" />
+                                               </efl.gengrid>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..c0f056f
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+\r
+               vc->genlist1 = elm_genlist_add(vc->content1);\r
+               if (vc->genlist1) {\r
+                       evas_object_size_hint_align_set(vc->genlist1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->genlist1, 1, 1);\r
+                       elm_genlist_homogeneous_set(vc->genlist1, EINA_FALSE);\r
+                       initialize_genlist_class("default");\r
+                       vc->genlistitem1= create_genlist_item(vc->genlist1, "1","", "", "home", "","", NULL, (Elm_Genlist_Item_Type)0, NULL, NULL);\r
+                       vc->genlistitem2= create_genlist_item(vc->genlist1, "2","", "", "home", "","",NULL, (Elm_Genlist_Item_Type)0, NULL, NULL);\r
+                       vc->genlistitem3= create_genlist_item(vc->genlist1, "3","", "", "clock", "", "",NULL, (Elm_Genlist_Item_Type)0, NULL, NULL);\r
+                       evas_object_show(vc->genlist1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->genlist1, 48, 36, 229, 241);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test14_genlist/layout.tuml
new file mode 100644 (file)
index 0000000..f87d179
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet>
+                                               <ruleset name="#page1 #button1" pageId="page1" partId="button1">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="1" />
+                                                       <style name="top" value="36px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                               <ruleset name="#page1 #button2" pageId="page1" partId="button2">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="1" />
+                                                       <style name="top" value="108px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                               <ruleset name="#page1 #button3" pageId="page1" partId="button3">
+                                                       <style name="position" value="absolute" />
+                                                       <style name="height" value="50px" />
+                                                       <style name="pack-height" value="0" />
+                                                       <style name="width" value="193px" />
+                                                       <style name="pack-left" value="1" />
+                                                       <style name="left" value="48px" />
+                                                       <style name="pack-top" value="2" />
+                                                       <style name="top" value="180px" />
+                                                       <style name="pack-width" value="0" />
+                                               </ruleset>
+                                       </styleSheet>
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.genlist align-x="FILL" align-y="FILL" disable="false"
+                                                       homogeneous="false" id="genlist1" item-add="2" item-style="default"
+                                                       pack-height="241" pack-left="48" pack-top="36" pack-width="229"
+                                                       select-mode="" visible="true" weight-x="1" weight-y="1">
+                                                       <efl.genlistitem id="genlistitem1" item-type="0"
+                                                               label="1" standard-icon="home" />
+                                                       <efl.genlistitem id="genlistitem2" item-type="0"
+                                                               label="2" standard-icon="home" />
+                                                       <efl.genlistitem id="genlistitem3" item-type="0"
+                                                               label="3" standard-icon="clock" />
+                                               </efl.genlist>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/src/uib_view1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/expected/managed/src/uib_view1_view.c
new file mode 100644 (file)
index 0000000..0cac7ee
--- /dev/null
@@ -0,0 +1,43 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_view1_view_create(Evas_Object* parent, void* create_callback_param) {\r
+       uib_view1_view_context* vc = calloc(1, sizeof(uib_view1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "view1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 480, 800);\r
+               vc->entry1 = elm_entry_add(vc->content1);\r
+               if (vc->entry1) {\r
+                       elm_object_text_set(vc->entry1, "Entry");\r
+                       elm_entry_single_line_set(vc->entry1, EINA_FALSE);\r
+                       elm_entry_password_set(vc->entry1, EINA_FALSE);\r
+                       elm_entry_editable_set(vc->entry1, EINA_TRUE);\r
+                       elm_entry_context_menu_disabled_set(vc->entry1, EINA_FALSE);\r
+                       elm_entry_scrollable_set(vc->entry1, EINA_FALSE);\r
+                       evas_object_size_hint_align_set(vc->entry1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->entry1, 1, 1);\r
+                       elm_object_disabled_set(vc->entry1, EINA_FALSE);\r
+                       evas_object_show(vc->entry1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->entry1, 155, 119, 151, 101);\r
+               evas_object_show(vc->content1);\r
+       }\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb) uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*) vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test15_entry/layout.tuml
new file mode 100644 (file)
index 0000000..f0911a7
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-view</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.doc>
+                               <tizen.view id="view1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="480"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="800" visible="" weight-x="1" weight-y="1">
+                                               <efl.entry align-x="FILL" align-y="FILL" autosave="false"
+                                                       context-menu-disabled="false" disable="false" editable="true"
+                                                       file-path="" id="entry1" pack-height="101" pack-left="155"
+                                                       pack-top="119" pack-width="151" password="false" scrollable="false"
+                                                       single-line="false" text="Entry" text-format="0" visible="true"
+                                                       weight-x="1" weight-y="1" />
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/src/uib_view1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/expected/managed/src/uib_view1_view.c
new file mode 100644 (file)
index 0000000..a57c239
--- /dev/null
@@ -0,0 +1,37 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_view1_view_create(Evas_Object* parent, void* create_callback_param) {\r
+       uib_view1_view_context* vc = calloc(1, sizeof(uib_view1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "view1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 480, 800);\r
+               vc->slider1 = elm_slider_add(vc->content1);\r
+               if (vc->slider1) {\r
+                       elm_slider_min_max_set(vc->slider1, 0, 1);\r
+                       evas_object_size_hint_align_set(vc->slider1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->slider1, 1, 1);\r
+                       evas_object_show(vc->slider1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->slider1, 120, 143, 201, 31);\r
+               evas_object_show(vc->content1);\r
+       }\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb) uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*) vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test16_slider/layout.tuml
new file mode 100644 (file)
index 0000000..a0b8ea1
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-view</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.doc>
+                               <tizen.view id="view1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="480"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="800" visible="" weight-x="1" weight-y="1">
+                                               <efl.slider align-x="FILL" align-y="FILL" disable="false"
+                                                       horizontal="true" id="slider1" indicator-format="" inverted="false"
+                                                       max="1" min="0" pack-height="31" pack-left="120" pack-top="143"
+                                                       pack-width="201" show-indicator="false" span-size="" step=""
+                                                       unit-format="" value="" visible="true" weight-x="1" weight-y="1" />
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/src/uib_view1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/expected/managed/src/uib_view1_view.c
new file mode 100644 (file)
index 0000000..1c53d58
--- /dev/null
@@ -0,0 +1,39 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_view1_view_create(Evas_Object* parent,\r
+               void* create_callback_param) {\r
+       uib_view1_view_context* vc = calloc(1, sizeof(uib_view1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "view1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 480, 800);\r
+               vc->layout1 = elm_layout_add(vc->content1);\r
+               if (vc->layout1) {\r
+                       evas_object_size_hint_align_set(vc->layout1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->layout1, 1, 1);\r
+                       evas_object_show(vc->layout1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->layout1, 107, 132, 168, 180);\r
+               evas_object_show(vc->content1);\r
+       }\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL,\r
+                       (Evas_Object_Event_Cb) uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container),\r
+                       vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*) vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test17_layout/layout.tuml
new file mode 100644 (file)
index 0000000..e72c833
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-view</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.doc>
+                               <tizen.view id="view1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="480"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="800" visible="" weight-x="1" weight-y="1">
+                                               <efl.layout align-x="FILL" align-y="FILL" disable="false"
+                                                       file-path="" group-name="" id="layout1" pack-height="180"
+                                                       pack-left="107" pack-top="132" pack-width="168" visible="true"
+                                                       weight-x="1" weight-y="1" />
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/src/uib_view1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/expected/managed/src/uib_view1_view.c
new file mode 100644 (file)
index 0000000..0a311a1
--- /dev/null
@@ -0,0 +1,62 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_view1_view_create(Evas_Object* parent, void* create_callback_param) {\r
+       uib_view1_view_context* vc = calloc(1, sizeof(uib_view1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "view1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 480, 800);\r
+               vc->panes1 = elm_panes_add(vc->content1);\r
+               if (vc->panes1) {\r
+                       elm_panes_horizontal_set(vc->panes1, EINA_FALSE);\r
+\r
+                       elm_panes_fixed_set(vc->panes1, EINA_FALSE);\r
+\r
+                       elm_panes_content_right_size_set(vc->panes1, 0.5);\r
+\r
+                       vc->button1 = elm_button_add(vc->panes1);\r
+                       if (vc->button1) {\r
+                               evas_object_size_hint_align_set(vc->button1, -1.0, -1.0);\r
+                               evas_object_size_hint_weight_set(vc->button1, 1, 1);\r
+                               elm_object_text_set(vc->button1, "Button");\r
+                               elm_button_autorepeat_set(vc->button1, EINA_FALSE);\r
+                               evas_object_show(vc->button1);\r
+                       }\r
+                       vc->button2 = elm_button_add(vc->panes1);\r
+                       if (vc->button2) {\r
+                               evas_object_size_hint_align_set(vc->button2, -1.0, -1.0);\r
+                               evas_object_size_hint_weight_set(vc->button2, 1, 1);\r
+                               elm_object_text_set(vc->button2, "Button");\r
+                               elm_button_autorepeat_set(vc->button2, EINA_FALSE);\r
+                               evas_object_show(vc->button2);\r
+                       }\r
+                       elm_object_part_content_set(vc->panes1, "left", vc->button1);\r
+                       elm_object_part_content_set(vc->panes1, "right", vc->button2);\r
+                       evas_object_size_hint_align_set(vc->panes1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->panes1, 1, 1);\r
+                       evas_object_show(vc->panes1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->panes1, 155, 132, 151, 151);\r
+               evas_object_show(vc->content1);\r
+       }\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL,\r
+                       (Evas_Object_Event_Cb) uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container),\r
+                       vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*) vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test18_panes/layout.tuml
new file mode 100644 (file)
index 0000000..3483585
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-view</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.doc>
+                               <tizen.view id="view1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="480"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="800" visible="" weight-x="1" weight-y="1">
+                                               <efl.panes align-x="FILL" align-y="FILL" col_count="2"
+                                                       fixed="false" horizontal="false" id="panes1" pack-height="151"
+                                                       pack-left="155" pack-top="132" pack-width="151" right-size="0.5"
+                                                       visible="true" weight-x="1" weight-y="1">
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button1" pack-height="1" pack-left="0" pack-top="0"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button2" pack-height="1" pack-left="1" pack-top="0"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                               </efl.panes>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/src/uib_view1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/expected/managed/src/uib_view1_view.c
new file mode 100644 (file)
index 0000000..26244fd
--- /dev/null
@@ -0,0 +1,54 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_view1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_view1_view_context* vc = calloc(1, sizeof(uib_view1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "view1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if (vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 480, 800);\r
+\r
+               vc->genlist1 = elm_genlist_add(vc->content1);\r
+               if (vc->genlist1) {\r
+                       evas_object_size_hint_align_set(vc->genlist1, -1.0,-1.0);\r
+                       evas_object_size_hint_weight_set(vc->genlist1, 1,1);\r
+                       elm_genlist_homogeneous_set(vc->genlist1, EINA_FALSE);\r
+                       elm_genlist_select_mode_set(vc->genlist1,(Elm_Object_Select_Mode)0);\r
+                       initialize_genlist_class("default");\r
+                       vc->genlistitem1= create_genlist_item(vc->genlist1, "List item", "", "", "","","", NULL, (Elm_Genlist_Item_Type)1, NULL, NULL);\r
+                       vc->genlistitem7= create_genlist_item(vc->genlist1, "List item", "", "", "","","", vc->genlistitem1, (Elm_Genlist_Item_Type)0, NULL, NULL);\r
+                       vc->genlistitem8= create_genlist_item(vc->genlist1, "List item", "","", "","","",vc->genlistitem1, (Elm_Genlist_Item_Type)0, NULL, NULL);\r
+                       vc->genlistitem9= create_genlist_item(vc->genlist1, "List item", "", "", "","","",vc->genlistitem1, (Elm_Genlist_Item_Type)0, NULL, NULL);\r
+                       vc->genlistitem10= create_genlist_item(vc->genlist1, "List item", "", "","","","", vc->genlistitem1, (Elm_Genlist_Item_Type)0, NULL, NULL);\r
+                       vc->genlistitem2= create_genlist_item(vc->genlist1, "List item", "", "", "","","",NULL, (Elm_Genlist_Item_Type)2, NULL, NULL);\r
+                       vc->genlistitem3= create_genlist_item(vc->genlist1, "List item", "", "", "","","",NULL, (Elm_Genlist_Item_Type)2, NULL, NULL);\r
+                       vc->genlistitem4= create_genlist_item(vc->genlist1, "List item", "", "", "","","",NULL, (Elm_Genlist_Item_Type)0, NULL, NULL);\r
+                       vc->genlistitem5= create_genlist_item(vc->genlist1, "List item", "", "","","","", NULL, (Elm_Genlist_Item_Type)0, NULL, NULL);\r
+                       vc->genlistitem6= create_genlist_item(vc->genlist1, "List item", "", "", "","","",NULL, (Elm_Genlist_Item_Type)0, NULL, NULL);\r
+                       evas_object_show(vc->genlist1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->genlist1, 44, 113, 400, 401);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test19_genlist_treeitem/layout.tuml
new file mode 100644 (file)
index 0000000..fb160d9
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-view</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.doc>
+                               <tizen.view id="view1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="480"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="800" visible="" weight-x="1" weight-y="1">
+                                               <efl.genlist align-x="FILL" align-y="FILL" disable="false"
+                                                       homogeneous="false" id="genlist1" item-add="1" item-style="default"
+                                                       pack-height="401" pack-left="44" pack-top="113" pack-width="400"
+                                                       select-mode="0" visible="true" weight-x="1" weight-y="1">
+                                                       <efl.genlistitem id="genlistitem1" image-path=""
+                                                               item-add="3" item-type="1" label="List item" standard-icon="">
+                                                               <efl.genlistitem id="genlistitem7" image-path=""
+                                                                       item-type="0" label="List item" standard-icon="" />
+                                                               <efl.genlistitem id="genlistitem8" image-path=""
+                                                                       item-type="0" label="List item" standard-icon="" />
+                                                               <efl.genlistitem id="genlistitem9" image-path=""
+                                                                       item-type="0" label="List item" standard-icon="" />
+                                                               <efl.genlistitem id="genlistitem10" image-path=""
+                                                                       item-type="0" label="List item" standard-icon="" />
+                                                       </efl.genlistitem>
+                                                       <efl.genlistitem id="genlistitem2" image-path=""
+                                                               item-type="2" label="List item" standard-icon="" />
+                                                       <efl.genlistitem id="genlistitem3" image-path=""
+                                                               item-type="2" label="List item" standard-icon="" />
+                                                       <efl.genlistitem id="genlistitem4" image-path=""
+                                                               item-type="0" label="List item" standard-icon="" />
+                                                       <efl.genlistitem id="genlistitem5" image-path=""
+                                                               item-type="0" label="List item" standard-icon="" />
+                                                       <efl.genlistitem id="genlistitem6" image-path=""
+                                                               item-type="0" label="List item" standard-icon="" />
+                                               </efl.genlist>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test20_table/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test20_table/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/src/uib_view1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test20_table/expected/managed/src/uib_view1_view.c
new file mode 100644 (file)
index 0000000..2b61412
--- /dev/null
@@ -0,0 +1,148 @@
+/*******************************************************************************\r
+* This file was generated by UI Builder.\r
+* This file will be auto-generated each and everytime you save your project.\r
+* Do not hand edit this file.\r
+********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_view1_view_create(Evas_Object* parent, void* create_callback_param) {\r
+       uib_view1_view_context* vc = calloc(1, sizeof(uib_view1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "view1";\r
+       vc->content1= elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+       if(vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0,-1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1,1);\r
+               elm_grid_size_set(vc->content1, 480, 800);\r
+               vc->table1= elm_table_add(vc->content1);\r
+               if(vc->table1) {\r
+                       Evas_Object *ph_table1;\r
+                       for (int i=0; i <4; i++) {\r
+                               for (int j=0; j <3; j++) {\r
+                                       ph_table1= evas_object_rectangle_add(evas_object_evas_get(vc->table1));\r
+                                       evas_object_size_hint_weight_set( ph_table1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND );\r
+                                       evas_object_size_hint_align_set( ph_table1, EVAS_HINT_FILL, EVAS_HINT_FILL );\r
+                                       evas_object_hide(ph_table1);\r
+                                       elm_table_pack(vc->table1, ph_table1, j, i, 1, 1);\r
+                               }\r
+                       }\r
+                       elm_table_homogeneous_set(vc->table1, EINA_TRUE);\r
+                       elm_table_padding_set(vc->table1,5,5);\r
+                       evas_object_size_hint_align_set(vc->table1, -1.0,-1.0);\r
+                       evas_object_size_hint_weight_set(vc->table1, 1,1);\r
+                       vc->button1 = elm_button_add(vc->table1);\r
+                       if (vc->button1) {\r
+                               evas_object_size_hint_align_set(vc->button1, -1.0,-1.0);\r
+                               evas_object_size_hint_weight_set(vc->button1, 1,1);\r
+                               elm_object_text_set(vc->button1,"Button");\r
+                               elm_button_autorepeat_set(vc->button1, EINA_FALSE);\r
+                               evas_object_show(vc->button1);\r
+                       }\r
+                       vc->check1 = elm_check_add(vc->table1);\r
+                       if(vc->check1) {\r
+                               evas_object_size_hint_align_set(vc->check1, -1.0,-1.0);\r
+                               evas_object_size_hint_weight_set(vc->check1, 1,1);\r
+                               elm_object_text_set(vc->check1,"Check");\r
+                               elm_check_state_set(vc->check1, EINA_FALSE);\r
+                               evas_object_show(vc->check1);\r
+                       }\r
+                       vc->button3 = elm_button_add(vc->table1);\r
+                       if (vc->button3) {\r
+                               evas_object_size_hint_align_set(vc->button3, -1.0,-1.0);\r
+                               evas_object_size_hint_weight_set(vc->button3, 1,1);\r
+                               elm_object_text_set(vc->button3,"Button");\r
+                               elm_button_autorepeat_set(vc->button3, EINA_FALSE);\r
+                               evas_object_show(vc->button3);\r
+                       }\r
+                       vc->button4 = elm_button_add(vc->table1);\r
+                       if (vc->button4) {\r
+                               evas_object_size_hint_align_set(vc->button4, -1.0,-1.0);\r
+                               evas_object_size_hint_weight_set(vc->button4, 1,1);\r
+                               elm_object_text_set(vc->button4,"Button");\r
+                               elm_button_autorepeat_set(vc->button4, EINA_FALSE);\r
+                               evas_object_show(vc->button4);\r
+                       }\r
+                       vc->button5 = elm_button_add(vc->table1);\r
+                       if (vc->button5) {\r
+                               evas_object_size_hint_align_set(vc->button5, -1.0,-1.0);\r
+                               evas_object_size_hint_weight_set(vc->button5, 1,1);\r
+                               elm_object_text_set(vc->button5,"Button");\r
+                               elm_button_autorepeat_set(vc->button5, EINA_FALSE);\r
+                               evas_object_show(vc->button5);\r
+                       }\r
+                       vc->button6 = elm_button_add(vc->table1);\r
+                       if (vc->button6) {\r
+                               evas_object_size_hint_align_set(vc->button6, -1.0,-1.0);\r
+                               evas_object_size_hint_weight_set(vc->button6, 1,1);\r
+                               elm_object_text_set(vc->button6,"Button");\r
+                               elm_button_autorepeat_set(vc->button6, EINA_FALSE);\r
+                               evas_object_show(vc->button6);\r
+                       }\r
+                       vc->button7 = elm_button_add(vc->table1);\r
+                       if (vc->button7) {\r
+                               evas_object_size_hint_align_set(vc->button7, -1.0,-1.0);\r
+                               evas_object_size_hint_weight_set(vc->button7, 1,1);\r
+                               elm_object_text_set(vc->button7,"Button");\r
+                               elm_button_autorepeat_set(vc->button7, EINA_FALSE);\r
+                               evas_object_show(vc->button7);\r
+                       }\r
+                       vc->button8 = elm_button_add(vc->table1);\r
+                       if (vc->button8) {\r
+                               evas_object_size_hint_align_set(vc->button8, -1.0,-1.0);\r
+                               evas_object_size_hint_weight_set(vc->button8, 1,1);\r
+                               elm_object_text_set(vc->button8,"Button");\r
+                               elm_button_autorepeat_set(vc->button8, EINA_FALSE);\r
+                               evas_object_show(vc->button8);\r
+                       }\r
+                       vc->button9 = elm_button_add(vc->table1);\r
+                       if (vc->button9) {\r
+                               evas_object_size_hint_align_set(vc->button9, -1.0,-1.0);\r
+                               evas_object_size_hint_weight_set(vc->button9, 1,1);\r
+                               elm_object_text_set(vc->button9,"Button");\r
+                               elm_button_autorepeat_set(vc->button9, EINA_FALSE);\r
+                               evas_object_show(vc->button9);\r
+                       }\r
+                       vc->button10 = elm_button_add(vc->table1);\r
+                       if (vc->button10) {\r
+                               evas_object_size_hint_align_set(vc->button10, -1.0,-1.0);\r
+                               evas_object_size_hint_weight_set(vc->button10, 1,1);\r
+                               elm_object_text_set(vc->button10,"Button");\r
+                               elm_button_autorepeat_set(vc->button10, EINA_FALSE);\r
+                               evas_object_show(vc->button10);\r
+                       }\r
+                       vc->button11 = elm_button_add(vc->table1);\r
+                       if (vc->button11) {\r
+                               evas_object_size_hint_align_set(vc->button11, -1.0,-1.0);\r
+                               evas_object_size_hint_weight_set(vc->button11, 1,1);\r
+                               elm_object_text_set(vc->button11,"Button");\r
+                               elm_button_autorepeat_set(vc->button11, EINA_FALSE);\r
+                               evas_object_show(vc->button11);\r
+                       }\r
+                       elm_table_pack(vc->table1, vc->button1, 0, 0, 1, 1);\r
+                       elm_table_pack(vc->table1, vc->check1, 1, 0, 1, 1);\r
+                       elm_table_pack(vc->table1, vc->button3, 0, 1, 1, 1);\r
+                       elm_table_pack(vc->table1, vc->button4, 1, 1, 1, 1);\r
+                       elm_table_pack(vc->table1, vc->button5, 2, 1, 1, 1);\r
+                       elm_table_pack(vc->table1, vc->button6, 0, 2, 1, 1);\r
+                       elm_table_pack(vc->table1, vc->button7, 1, 2, 1, 1);\r
+                       elm_table_pack(vc->table1, vc->button8, 2, 2, 1, 1);\r
+                       elm_table_pack(vc->table1, vc->button9, 0, 3, 1, 1);\r
+                       elm_table_pack(vc->table1, vc->button10, 1, 3, 1, 1);\r
+                       elm_table_pack(vc->table1, vc->button11, 2, 3, 1, 1);\r
+                       evas_object_show(vc->table1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->table1, 24, 49, 324, 233);\r
+               evas_object_show(vc->content1);\r
+       }\r
+       //bind event handler\r
+\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test20_table/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test20_table/layout.tuml
new file mode 100644 (file)
index 0000000..bc2df1d
--- /dev/null
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-view</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.doc>
+                               <tizen.view id="view1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="480"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="800" visible="" weight-x="1" weight-y="1">
+                                               <efl.table align-x="FILL" align-y="FILL" col_count="3"
+                                                       homogeneous="true" id="table1" pack-height="233" pack-left="24"
+                                                       pack-top="49" pack-width="324" padding_h="5" padding_v="5"
+                                                       row_count="4" visible="true" weight-x="1" weight-y="1">
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button1" pack-height="1" pack-left="0" pack-top="0"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                                       <efl.check align-x="FILL" align-y="FILL" disable="false"
+                                                               id="check1" pack-height="1" pack-left="1" pack-top="0"
+                                                               pack-width="1" state="false" text="Check" visible="true"
+                                                               weight-x="1" weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button3" pack-height="1" pack-left="0" pack-top="1"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button4" pack-height="1" pack-left="1" pack-top="1"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button5" pack-height="1" pack-left="2" pack-top="1"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button6" pack-height="1" pack-left="0" pack-top="2"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button7" pack-height="1" pack-left="1" pack-top="2"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button8" pack-height="1" pack-left="2" pack-top="2"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button9" pack-height="1" pack-left="0" pack-top="3"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button10" pack-height="1" pack-left="1" pack-top="3"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button11" pack-height="1" pack-left="2" pack-top="3"
+                                                               pack-width="1" text="Button" visible="true" weight-x="1"
+                                                               weight-y="1" />
+                                               </efl.table>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test21_box/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test21_box/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/src/uib_view1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test21_box/expected/managed/src/uib_view1_view.c
new file mode 100644 (file)
index 0000000..e09520a
--- /dev/null
@@ -0,0 +1,67 @@
+/*******************************************************************************\r
+* This file was generated by UI Builder.\r
+* This file will be auto-generated each and everytime you save your project.\r
+* Do not hand edit this file.\r
+********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_view1_view_create(Evas_Object* parent, void* create_callback_param) {\r
+       uib_view1_view_context* vc = calloc(1, sizeof(uib_view1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "view1";\r
+       vc->content1= elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+       if(vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 480, 800);\r
+               vc->box1= elm_box_add(vc->content1);\r
+               if(vc->box1) {\r
+                       elm_box_homogeneous_set(vc->box1, EINA_FALSE);\r
+                       elm_box_horizontal_set(vc->box1, EINA_FALSE);\r
+                       elm_box_padding_set(vc->box1,,);\r
+                       evas_object_size_hint_align_set(vc->box1, 0.5, 0.5);\r
+                       evas_object_size_hint_weight_set(vc->box1, 0.52, 0.38);\r
+                       vc->button2 = elm_button_add(vc->box1);\r
+                       if (vc->button2) {\r
+                               evas_object_size_hint_align_set(vc->button2, -1.0, -1.0);\r
+                               evas_object_size_hint_weight_set(vc->button2, 1, 1);\r
+                               elm_object_text_set(vc->button2,"Button");\r
+                               elm_button_autorepeat_set(vc->button2, EINA_FALSE);\r
+                               evas_object_show(vc->button2);\r
+                       }\r
+                       vc->button1 = elm_button_add(vc->box1);\r
+                       if (vc->button1) {\r
+                               evas_object_size_hint_align_set(vc->button1, -1.0, -1.0);\r
+                               evas_object_size_hint_weight_set(vc->button1, 1, 1);\r
+                               elm_object_text_set(vc->button1,"111");\r
+                               elm_button_autorepeat_set(vc->button1, EINA_FALSE);\r
+                               evas_object_show(vc->button1);\r
+                       }\r
+                       vc->button3 = elm_button_add(vc->box1);\r
+                       if (vc->button3) {\r
+                               evas_object_size_hint_align_set(vc->button3, 0.05, 0.94);\r
+                               evas_object_size_hint_weight_set(vc->button3, 0, 0.97);\r
+                               elm_object_text_set(vc->button3,"Button");\r
+                               elm_button_autorepeat_set(vc->button3, EINA_FALSE);\r
+                               evas_object_show(vc->button3);\r
+                       }\r
+                       elm_box_pack_end(vc->box1, vc->button2);\r
+                       elm_box_pack_end(vc->box1, vc->button1);\r
+                       elm_box_pack_end(vc->box1, vc->button3);\r
+                       evas_object_show(vc->box1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->box1, 24, 60, 408, 204);\r
+               evas_object_show(vc->content1);\r
+       }\r
+       //bind event handler\r
+\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test21_box/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test21_box/layout.tuml
new file mode 100644 (file)
index 0000000..b668e77
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-view</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.doc>
+                               <tizen.view id="view1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="480"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="800" visible="" weight-x="1" weight-y="1">
+                                               <efl.box align-x="0.5" align-y="0.5" homogeneous="false"
+                                                       horizontal="false" id="box1" pack-height="204" pack-left="24"
+                                                       pack-top="60" pack-width="408" visible="true" weight-x="0.52"
+                                                       weight-y="0.38">
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button2" pack-height="" pack-left="" pack-top="" pack-width=""
+                                                               text="Button" visible="true" weight-x="1" weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button1" pack-height="1" pack-left="0" pack-top="0"
+                                                               pack-width="1" text="111" visible="true" weight-x="1" weight-y="1" />
+                                                       <efl.button align-x="0.05" align-y="0.94" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button3" pack-height="" pack-left="" pack-top="" pack-width=""
+                                                               text="Button" visible="true" weight-x="0" weight-y="0.97" />
+                                               </efl.box>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test22_something/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test22_something/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/src/uib_view1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test22_something/expected/managed/src/uib_view1_view.c
new file mode 100644 (file)
index 0000000..5ed5400
--- /dev/null
@@ -0,0 +1,66 @@
+/*******************************************************************************\r
+* This file was generated by UI Builder.\r
+* This file will be auto-generated each and everytime you save your project.\r
+* Do not hand edit this file.\r
+********************************************************************************/\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+\r
+uib_view_context* uib_view1_view_create(Evas_Object* parent, void* create_callback_param) {\r
+       uib_view1_view_context* vc = calloc(1, sizeof(uib_view1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "";\r
+       vc->content1= elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+       if(vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1, 1);\r
+               elm_grid_size_set(vc->content1, 480, 800);\r
+               vc->box1= elm_box_add(vc->content1);\r
+               if(vc->box1) {\r
+                       elm_box_homogeneous_set(vc->box1, EINA_FALSE);\r
+                       elm_box_horizontal_set(vc->box1, EINA_FALSE);\r
+                       evas_object_size_hint_align_set(vc->box1, 0.5, 0.5);\r
+                       evas_object_size_hint_weight_set(vc->box1, 0.52, 0.38);\r
+                       vc->button2 = elm_button_add(vc->box1);\r
+                       if (vc->button2) {\r
+                               evas_object_size_hint_align_set(vc->button2, -1.0, -1.0);\r
+                               evas_object_size_hint_weight_set(vc->button2, 1, 1);\r
+                               elm_object_text_set(vc->button2,"Button");\r
+                               elm_button_autorepeat_set(vc->button2, EINA_FALSE);\r
+                               evas_object_show(vc->button2);\r
+                       }\r
+                       vc->button1 = elm_button_add(vc->box1);\r
+                       if (vc->button1) {\r
+                               evas_object_size_hint_align_set(vc->button1, -1.0, -1.0);\r
+                               evas_object_size_hint_weight_set(vc->button1, 1, 1);\r
+                               elm_object_text_set(vc->button1,"111");\r
+                               elm_button_autorepeat_set(vc->button1, EINA_FALSE);\r
+                               evas_object_show(vc->button1);\r
+                       }\r
+                       vc->button3 = elm_button_add(vc->box1);\r
+                       if (vc->button3) {\r
+                               evas_object_size_hint_align_set(vc->button3, 0.05, 0.94);\r
+                               evas_object_size_hint_weight_set(vc->button3, 0, 0.97);\r
+                               elm_object_text_set(vc->button3,"Button");\r
+                               elm_button_autorepeat_set(vc->button3, EINA_FALSE);\r
+                               evas_object_show(vc->button3);\r
+                       }\r
+                       elm_box_pack_end(vc->box1, vc->button2);\r
+                       elm_box_pack_end(vc->box1, vc->button1);\r
+                       elm_box_pack_end(vc->box1, vc->button3);\r
+                       evas_object_show(vc->box1);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->box1, 24, 60, 408, 204);\r
+               evas_object_show(vc->content1);\r
+       }\r
+       //bind event handler\r
+\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test22_something/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test22_something/layout.tuml
new file mode 100644 (file)
index 0000000..b668e77
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-view</type>
+               <version>1</version>
+               <desc>Tizen Web UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.doc>
+                               <tizen.view id="view1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="480"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="800" visible="" weight-x="1" weight-y="1">
+                                               <efl.box align-x="0.5" align-y="0.5" homogeneous="false"
+                                                       horizontal="false" id="box1" pack-height="204" pack-left="24"
+                                                       pack-top="60" pack-width="408" visible="true" weight-x="0.52"
+                                                       weight-y="0.38">
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button2" pack-height="" pack-left="" pack-top="" pack-width=""
+                                                               text="Button" visible="true" weight-x="1" weight-y="1" />
+                                                       <efl.button align-x="FILL" align-y="FILL" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button1" pack-height="1" pack-left="0" pack-top="0"
+                                                               pack-width="1" text="111" visible="true" weight-x="1" weight-y="1" />
+                                                       <efl.button align-x="0.05" align-y="0.94" autorepeat="false"
+                                                               autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable="false"
+                                                               id="button3" pack-height="" pack-left="" pack-top="" pack-width=""
+                                                               text="Button" visible="true" weight-x="0" weight-y="0.97" />
+                                               </efl.box>
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test98_event/app.xml b/org.tizen.efluibuilder.codegenerator/testcases/test98_event/app.xml
new file mode 100644 (file)
index 0000000..e5ad148
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tizenFile>
+    <fileInfo>
+        <type>tizen-project</type>
+        <version>3</version>
+        <desc>Tizen Web UI Builder Project</desc>
+    </fileInfo>
+    <tizenProject>
+        <libraries>
+            <library type="framework" param="@tizen_jquery"/>
+            <library type="framework" param="@tizen_lib"/>
+            <library type="framework" param="@tizen_core"/>
+            <library type="system" param="./tizen-ui-builder-fw/page-system.js"/>
+            <library type="system" param="./app.managed.js"/>
+            <library type="pages" param="all"/>
+            <library type="entry" param="./tizen-ui-builder-fw/app-entry.js"/>
+            <library type="entry" param="./app.js"/>
+        </libraries>
+        <frameworks>
+            <variables>
+                <variable name="theme" value="tizen-white"/>
+                <variable name="viewportmode" value="device-width"/>
+            </variables>
+            <framework param="@tizen_jquery" path="tizen-web-ui-fw/latest/js/jquery.js"/>
+            <framework param="@tizen_lib" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"/>
+            <framework param="@tizen_core" path="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" param2="data-framework-theme='%theme%'"/>
+        </frameworks>
+        <pages>
+            <page name="page1" startup="true" pagePath="layout/layout.tuml" jsPath="page/page1.js" managedJsPath="page/page1.managed.js" htmlPath="page/page1.html" cssPath="page/page1.css" managedCssPath="page/page1.managed.css"/>
+        </pages>
+        <stylesheets>
+            <stylesheet type="user" param="./app.css"/>
+            <stylesheet type="framework" param="tizen-web-ui-fw/latest/themes/%theme%/tizen-web-ui-fw-theme.css"/>
+        </stylesheets>
+        
+        <nscreen>
+          <screenDescLayer name="common" displayName="Common" order="0" category="COMMON" attributes="required,fixed" />
+          <screenDescLayer name="portrait" displayName="Portrait" or0der="1" category="ORIENTATION">
+            <screenDesc>
+                       <property name="orientation" value="Portrait" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="320x240" displayName="320x240" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="320" />
+                       <property name="deviceHeight" value="320" />
+            </screenDesc>
+          </screenDescLayer>
+          <screenDescLayer name="640x480" displayName="640x480" order="4" category="RESOLUTION">
+            <screenDesc>
+                       <property name="deviceWidth" value="640" />
+                       <property name="deviceHeight" value="480" />
+            </screenDesc>
+          </screenDescLayer>
+        </nscreen>
+    </tizenProject>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/src/uib_page1_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test98_event/expected/managed/src/uib_page1_view.c
new file mode 100644 (file)
index 0000000..5f39cff
--- /dev/null
@@ -0,0 +1,51 @@
+/*******************************************************************************\r
+ * This file was generated by UI Builder.\r
+ * This file will be auto-generated each and everytime you save your project.\r
+ * Do not hand edit this file.\r
+ ********************************************************************************/\r
+\r
+#include "app_main.h"\r
+\r
+/* event handler declarations */\r
+void page1_button1_onclicked(uib_page1_view_context*, Evas_Object*, void*);\r
+\r
+uib_view_context* uib_page1_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_page1_view_context* vc = calloc(1, sizeof(uib_page1_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "page1";\r
+       vc->content1 = elm_grid_add(parent);\r
+       vc->root_container = vc->content1;\r
+\r
+       if(vc->content1) {\r
+               evas_object_size_hint_align_set(vc->content1, -1.0,-1.0);\r
+               evas_object_size_hint_weight_set(vc->content1, 1,1);\r
+               elm_grid_size_set(vc->content1, 320, 320);\r
+               vc->button1 = elm_button_add(vc->content1);\r
+               if (vc->button1) {\r
+                       evas_object_size_hint_align_set(vc->button1, -1.0,-1.0);\r
+                       evas_object_size_hint_weight_set(vc->button1, 1,1);\r
+                       elm_object_text_set(vc->button1,"Button");\r
+                       evas_object_show(vc->button1);\r
+               }\r
+               vc->button2 = elm_button_add(vc->content1);\r
+               if (vc->button2) {\r
+                       evas_object_size_hint_align_set(vc->button2, -1.0,-1.0);\r
+                       evas_object_size_hint_weight_set(vc->button2, 1,1);\r
+                       elm_object_text_set(vc->button2,"Button");\r
+                       evas_object_show(vc->button2);\r
+               }\r
+               elm_grid_pack(vc->content1, vc->button1, 72, 60, 150, 50);\r
+               elm_grid_pack(vc->content1, vc->button2, 132, 156, 150, 50);\r
+               evas_object_show(vc->content1);\r
+       }\r
+\r
+       //bind event handler\r
+       evas_object_smart_callback_add(vc->button1, "clicked", (Evas_Smart_Cb)page1_button1_onclicked, vc);\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test98_event/layout.tuml b/org.tizen.efluibuilder.codegenerator/testcases/test98_event/layout.tuml
new file mode 100644 (file)
index 0000000..f0b251d
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-page</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Project</desc>
+       </fileInfo>
+       <document>
+               <documentInfo>
+                       <title>test</title>
+                       <author>noname</author>
+                       <version>0.1.1</version>
+               </documentInfo>
+               <documentData>
+                       <tizen.style>
+                               <styleSheetLayer pageId="page1" screenDescName="common">
+                                       <styleSheet />
+                               </styleSheetLayer>
+                       </tizen.style>
+                       <tizen.doc>
+                               <tizen.view id="page1">
+                                       <efl.grid align-x="FILL" align-y="FILL" col_count="320"
+                                               id="content1" pack-height="" pack-left="" pack-top="" pack-width=""
+                                               row_count="320" visible="" weight-x="1" weight-y="1">
+                                               <efl.button align-x="FILL" align-y="FILL" autorepeat=""
+                                                       autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable=""
+                                                       id="button1" pack-height="50" pack-left="72" pack-top="60"
+                                                       pack-width="150" text="Button" visible="" weight-x="1" weight-y="1">
+                                                       <event onclicked="button1_onclicked" />
+                                               </efl.button>
+                                               <efl.button align-x="FILL" align-y="FILL" autorepeat=""
+                                                       autorepeat-gap-timeout="" autorepeat-initial-timeout="" disable=""
+                                                       id="button2" pack-height="50" pack-left="132" pack-top="156"
+                                                       pack-width="150" text="Button" visible="" weight-x="1" weight-y="1" />
+                                       </efl.grid>
+                               </tizen.view>
+                       </tizen.doc>
+               </documentData>
+       </document>
+</tizenFile>
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/inc/uib_common.h b/org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/inc/uib_common.h
new file mode 100644 (file)
index 0000000..7032de9
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __UIB_COMMON_H__\r
+#define __UIB_COMMON_H__\r
+\r
+#define        APP_NAME                        "calc"\r
+#define        KEY_VIEW_CONTEXT        "uib,view,context"\r
+#define        KEY_VIEW_CREATE         "uib,view,create"\r
+#define        KEY_VIEW_DESTROY        "uib,view,destroy"\r
+\r
+typedef struct\r
+{\r
+    Evas_Object *win;\r
+    Evas_Object *bg;\r
+    Evas_Object *conformant;\r
+    Evas_Object *layout;\r
+} window_obj;\r
+\r
+typedef struct _uib_view_context\r
+{\r
+    Evas_Object*       parent;\r
+       Evas_Object*    root_container;\r
+       const char*     view_name;\r
+} uib_view_context;\r
+\r
+\r
+/**\r
+ * @brief Create startup view\r
+ * @param[in]   win     EFL Window\r
+ * @return uib_view_context\r
+ */\r
+uib_view_context * startup_view_create(window_obj* win);\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view creation\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+\r
+/**\r
+ * @brief Call a callback on view termination\r
+ * @param[in]   vc                     view context\r
+ * @param[in]   obj                    The root container widget of this view\r
+ * @param[in]   event_info     pointer to an event specific struct or information to pass to the callback functions registered on this event\r
+ */\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) ;\r
+\r
+window_obj* win_create();\r
+void win_destroy(window_obj *win_obj);\r
+\r
+#endif /* __UIB_COMMON_H__ */\r
+\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/inc/uib_main_view.h b/org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/inc/uib_main_view.h
new file mode 100644 (file)
index 0000000..86ff72e
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * uib_main_view.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_MAIN_VIEW_H_\r
+#define UIB_MAIN_VIEW_H_\r
+\r
+//#include <Elementary.h>\r
+\r
+typedef struct _uib_main_view_context\r
+{\r
+    Evas_Object*       parent;\r
+    Evas_Object*       root_container;\r
+    const char*                view_name;\r
+    struct uib_main_control_context* cc;\r
+    Evas_Object*       grid1;\r
+    Evas_Object*       button1;\r
+} uib_main_view_context;\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param);\r
+uib_view_context* uib_main_view_destroy(Evas_Object* parent, void* create_callback_param);\r
+\r
+\r
+#endif /* UIB_MAIN_VIEW_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/inc/uib_views.h b/org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/inc/uib_views.h
new file mode 100644 (file)
index 0000000..44aea21
--- /dev/null
@@ -0,0 +1,15 @@
+/*\r
+ * uib_views.h\r
+ *\r
+ *  Created on: Nov 27, 2014\r
+ *      Author: djhwang\r
+ */\r
+\r
+#ifndef UIB_VIEWS_H_\r
+#define UIB_VIEWS_H_\r
+\r
+\r
+#include "uib_main_view.h"\r
+\r
+\r
+#endif /* UIB_VIEWS_H_ */\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/src/uib_common.c b/org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/src/uib_common.c
new file mode 100644 (file)
index 0000000..e393774
--- /dev/null
@@ -0,0 +1,73 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include "uib_common.h"\r
+#include "uib_views.h"\r
+\r
+\r
+void uib_view_create_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_CREATE, event_info);\r
+}\r
+\r
+void uib_view_destroy_callback(void* vc, Evas* e, Evas_Object* obj, void* event_info) {\r
+       evas_object_smart_callback_call(obj, KEY_VIEW_DESTROY, event_info);\r
+       if (vc) {\r
+               free(vc);\r
+       }\r
+}\r
+\r
+uib_view_context* startup_view_create(window_obj* win)\r
+{\r
+    uib_view_context* vc = uib_main_view_create(win->conformant, NULL);\r
+    if (vc) {\r
+       elm_object_part_content_set(win->conformant, "elm.swallow.content", vc->root_container);\r
+    }\r
+\r
+    return vc;\r
+}\r
+\r
+window_obj* win_create()\r
+{\r
+       window_obj* obj = calloc(1, sizeof(window_obj));\r
+    if (!obj)\r
+       return NULL;\r
+\r
+       obj->win = elm_win_add(NULL, APP_NAME, ELM_WIN_BASIC);\r
+       elm_win_conformant_set(obj->win, EINA_TRUE);\r
+       evas_object_show(obj->win);\r
+\r
+       elm_win_indicator_mode_set(obj->win, ELM_WIN_INDICATOR_SHOW);\r
+       obj->conformant = elm_conformant_add(obj->win);\r
+       evas_object_size_hint_weight_set(obj->conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(obj->win, obj->conformant);\r
+       evas_object_show(obj->conformant);\r
+\r
+       obj->bg = elm_bg_add(obj->conformant);\r
+       evas_object_size_hint_weight_set(obj->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       evas_object_show(obj->bg);\r
+\r
+       elm_object_part_content_set(obj->conformant, "elm.swallow.bg", obj->bg);\r
+       return obj;\r
+}\r
+\r
+void win_destroy(window_obj *obj)\r
+{\r
+       if (obj) {\r
+               evas_object_del(obj->win);\r
+               free(obj);\r
+       }\r
+}\r
diff --git a/org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/src/uib_main_view.c b/org.tizen.efluibuilder.codegenerator/testcases/test99_multipage/expected/managed/src/uib_main_view.c
new file mode 100644 (file)
index 0000000..e788f54
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright 2014 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include "app_main.h"\r
+\r
+\r
+/* event handler declarations */\r
+void on_main_create(uib_main_view_context*, Evas_Object*, void*);\r
+void on_main_destroy(uib_main_view_context*, Evas_Object*, void*);\r
+\r
+\r
+\r
+\r
+uib_view_context* uib_main_view_create(Evas_Object* parent, void* create_callback_param)\r
+{\r
+       uib_main_view_context* vc = calloc(1, sizeof(uib_main_view_context));\r
+       vc->parent = parent;\r
+       vc->view_name = "button1";\r
+       vc->grid1 = elm_grid_add(parent);\r
+       vc->root_container = vc->grid1;\r
+\r
+       if (vc->grid1) {\r
+               elm_object_disabled_set(vc->grid1, EINA_FALSE);\r
+               evas_object_size_hint_align_set(vc->grid1, -1.0, -1.0);\r
+               evas_object_size_hint_weight_set(vc->grid1, 1.0, 1.0);\r
+               elm_grid_size_set(vc->grid1, 480, 800);\r
+\r
+               vc->button1 = elm_button_add(vc->grid1);\r
+               if (vc->button1) {\r
+                       elm_grid_pack(vc->grid1, vc->button1, 188, 0, 100, 49);\r
+                       evas_object_show(vc->button1);\r
+                       elm_object_disabled_set(vc->button1, EINA_FALSE);\r
+                       evas_object_size_hint_align_set(vc->button1, -1.0, -1.0);\r
+                       evas_object_size_hint_weight_set(vc->button1, 1.0, 1.0);\r
+                       elm_object_style_set(vc->button1, "cancel");\r
+                       elm_object_text_set(vc->button1, "button");\r
+                       elm_button_autorepeat_set(vc->button1, EINA_FALSE);\r
+                       elm_button_autorepeat_initial_timeout_set(vc->button1, 1.0);\r
+                       elm_button_autorepeat_gap_timeout_set(vc->button1, 0.5);\r
+               }\r
+       }\r
+\r
+       //bind event handler\r
+       evas_object_smart_callback_add(vc->root_container, KEY_VIEW_CREATE, (Evas_Smart_Cb)on_main_create, vc);\r
+       evas_object_smart_callback_add(vc->root_container, KEY_VIEW_DESTROY, (Evas_Smart_Cb)on_main_destroy, vc);\r
+\r
+\r
+       evas_object_data_set(vc->root_container, KEY_VIEW_CONTEXT, vc);\r
+       evas_object_event_callback_add(vc->root_container, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)uib_view_destroy_callback, vc);\r
+       uib_view_create_callback(vc, evas_object_evas_get(vc->root_container), vc->root_container, create_callback_param);\r
+\r
+       evas_object_show(vc->grid1);\r
+\r
+       return (uib_view_context*)vc;\r
+}\r
+\r
+\r
diff --git a/org.tizen.efluibuilder.common/.classpath b/org.tizen.efluibuilder.common/.classpath
new file mode 100644 (file)
index 0000000..eea4e54
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.efluibuilder.common/.gitignore b/org.tizen.efluibuilder.common/.gitignore
new file mode 100644 (file)
index 0000000..ae3c172
--- /dev/null
@@ -0,0 +1 @@
+/bin/
diff --git a/org.tizen.efluibuilder.common/.project b/org.tizen.efluibuilder.common/.project
new file mode 100644 (file)
index 0000000..a82a1cd
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.efluibuilder.common</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.efluibuilder.common/.settings/org.eclipse.jdt.core.prefs b/org.tizen.efluibuilder.common/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..6dffab0
--- /dev/null
@@ -0,0 +1,98 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.tizen.efluibuilder.common/META-INF/MANIFEST.MF b/org.tizen.efluibuilder.common/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..1f5aad5
--- /dev/null
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.efluibuilder.common;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Export-Package: org.tizen.efluibuilder.utility,
+ org.tizen.uibuilder.tizenfile
+Require-Bundle: org.tizen.common,
+ org.eclipse.swt,
+ org.eclipse.core.runtime,
+ org.eclipse.jface,
+ org.eclipse.draw2d,
+ org.eclipse.ui.workbench,
+ org.eclipse.core.resources,
+ org.eclipse.ui.ide,
+ org.eclipse.gef;bundle-version="3.9.0"
+Bundle-Vendor: %Bundle-Vendor
diff --git a/org.tizen.efluibuilder.common/OSGI-INF/l10n/bundle.properties b/org.tizen.efluibuilder.common/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..0a38d92
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for org.tizen.efluibuilder.common
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen EFL UI Builder Common
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.common/build.properties b/org.tizen.efluibuilder.common/build.properties
new file mode 100644 (file)
index 0000000..c58ea21
--- /dev/null
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               OSGI-INF/
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/CachedImage.java b/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/CachedImage.java
new file mode 100644 (file)
index 0000000..13aebf9
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.utility;
+
+import java.text.MessageFormat;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * This class is intended for caching a image. It MUST be disposed explicitly.
+ */
+public class CachedImage {
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    // statistical information
+    private static AtomicInteger referenceCount = new AtomicInteger();
+    private int callCount = 0;
+    private int hitCount = 0;
+
+    // cached information
+    private Image image;
+    private int hashCode = 0;
+
+    /**
+     * Get a cached image. If no cache, create from ImageDescriptor.
+     * 
+     * @param desc
+     *            If it is null, returns null.
+     * @return If SWT runs out of image handles, returns null.
+     */
+    public Image get(ImageDescriptor desc) {
+        if (desc == null) {
+            return null;
+        }
+
+        this.callCount++;
+        int descHashCode = desc.hashCode();
+
+        if (this.image != null) {
+            // if same image, return cache
+            if (this.hashCode == descHashCode) {
+                this.hitCount++;
+                return this.image;
+            }
+
+            // if it is invalidated, remove cache.
+            this.dispose();
+        }
+
+        // update image
+        this.image = desc.createImage();
+        // Note: it is still possible for this method to return null in extreme cases,
+        // for example if SWT runs out of image handles.
+        if (this.image != null) {
+            referenceCount.incrementAndGet();
+            this.hashCode = descHashCode;
+            logger.debug(MessageFormat.format("Cached image is created: {0}", this.hashCode));
+        } else {
+            logger.error("Failed to create a image. (Out of image handles)");
+        }
+
+        return this.image;
+    }
+
+    public void dispose() {
+        if (this.image != null) {
+            this.image.dispose();
+
+            int remainedReferences = referenceCount.decrementAndGet();
+            logger.debug(MessageFormat.format("Cached image is disposed: {0} (Remained {1} / HitRate {2}%)", this.hashCode, remainedReferences, getHitRate()));
+        }
+
+        this.image = null;
+        this.hashCode = 0;
+
+        this.callCount = 0;
+        this.hitCount = 0;
+    }
+
+    private double getHitRate() {
+        if (this.callCount == 0) {
+            return 0;
+        }
+
+        return this.hitCount * 100 / (double) this.callCount;
+    }
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/CastUtil.java b/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/CastUtil.java
new file mode 100644 (file)
index 0000000..83c68f9
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.utility;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public final class CastUtil {
+
+    public static <T> List<T> castList(Object obj, Class<T> clazz) {
+        List<T> result = new ArrayList<T>();
+        if (obj instanceof List<?>) {
+            for (Object o : (List<?>) obj) {
+                result.add(clazz.cast(o));
+            }
+            return result;
+        }
+        return null;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/CollectionHelper.java b/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/CollectionHelper.java
new file mode 100644 (file)
index 0000000..61f9200
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.utility;
+
+import java.util.Collections;
+
+
+public final class CollectionHelper {
+
+    public static <T> Iterable<T> safeCollection(Iterable<T> iterable) {
+        return iterable == null ? Collections.<T> emptyList() : iterable;
+    }
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/DOMUtil.java b/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/DOMUtil.java
new file mode 100644 (file)
index 0000000..748938e
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.utility;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+
+
+public class DOMUtil {
+
+    public static Document getDocument(Node node) {
+        if (node == null) {
+            return null;
+        }
+
+        if (node instanceof Document) {
+            return (Document) node;
+        }
+
+        return node.getOwnerDocument();
+    }
+
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/IDEUtil.java b/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/IDEUtil.java
new file mode 100644 (file)
index 0000000..b6e20d5
--- /dev/null
@@ -0,0 +1,226 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.utility;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.part.ISetSelectionTarget;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public final class IDEUtil {
+    private static Logger logger = LoggerFactory.getLogger(IDEUtil.class);
+
+    public static void showIndicator(final long time) {
+        logger.info("Start");
+
+        Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                BusyIndicator.showWhile(Display.getDefault(), new Runnable() {
+                    @Override
+                    public void run() {
+                        logger.info("Start");
+                        try {
+                            Thread.sleep(time);
+                        } catch (InterruptedException e) {
+                            e.printStackTrace();
+                        }
+                        logger.info("End");
+                    }
+                });
+            }
+        });
+
+        logger.info("End");
+    }
+
+    private static IWorkbench getWorkbench() {
+        return PlatformUI.getWorkbench();
+    }
+
+    private static IWorkbenchWindow getActiveWorkbenchWindow() {
+        return getWorkbench().getActiveWorkbenchWindow();
+    }
+
+    private static IWorkbenchPage getActivePage() {
+        IWorkbenchWindow window = getActiveWorkbenchWindow();
+        if (window == null) {
+            throw new NullPointerException("IWorkbenchWindow window is null");
+        }
+        return window.getActivePage();
+    }
+
+    public static void open(final IFile file) {
+        Display.getDefault().syncExec(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    openEditor(file);
+                } catch (PartInitException e) {
+                    e.printStackTrace();
+                    return;
+                }
+                /*
+                 * Note : Currently not use
+                 */
+                // selectProjectExplorer(file);
+            }
+        });
+    }
+
+    /**
+     * Opens an editor on the given file resource. This method will attempt to resolve the editor
+     * based on content-type bindings as well as traditional name/extension bindings.
+     * <p>
+     * If the page already has an editor open on the target object then that editor is brought to
+     * front; otherwise, a new editor is opened. If <code>activate == true</code> the editor will be
+     * activated.
+     * <p>
+     * 
+     * @param page
+     *            the page in which the editor will be opened
+     * @param input
+     *            the editor input
+     * @param activate
+     *            if <code>true</code> the editor will be activated
+     * @return an open editor or <code>null</code> if an external editor was opened
+     * @exception PartInitException
+     *                if the editor could not be initialized
+     * @see org.eclipse.ui.IWorkbenchPage#openEditor(org.eclipse.ui.IEditorInput, String, boolean)
+     */
+    public static void openEditor(IFile file) throws PartInitException {
+        IWorkbenchPage workbenchPage = getActivePage();
+        if (workbenchPage == null) {
+            throw new NullPointerException("IWorkbenchPage page is null");
+        }
+
+        IDE.openEditor(workbenchPage, file, true);
+    }
+
+    public static void selectProjectExplorer(IFile file) {
+        IWorkbenchPage workbenchPage = getActivePage();
+        if (workbenchPage == null) {
+            throw new NullPointerException("IWorkbenchPage page is null");
+        }
+
+        IWorkbenchPart part = workbenchPage.findView("org.eclipse.ui.navigator.ProjectExplorer");
+        if (part == null) {
+            return;
+        }
+
+        if (part instanceof ISetSelectionTarget) {
+            ISelection selection = new StructuredSelection(file);
+            ((ISetSelectionTarget) part).selectReveal(selection);
+        }
+    }
+
+    /**
+     * Fix issue focus of the current shell. You can use this API for only MessageBox when the shell
+     * is null.
+     * 
+     * @param None
+     * @return Real current Shell object
+     */
+    public static Shell getRealCurrentActiveShell() {
+        Shell shell = null;
+        Display display = Display.getDefault();
+        final Shell[] shells = display.getShells();
+        shell = shells[shells.length - 1];
+        return shell;
+    }
+
+    /**
+     * Show error dialog with StackTrace
+     *
+     * @param pluginId
+     *            the unique identifier of the relevant plug-in
+     * @param parentShell
+     *            the shell under which to create this dialog
+     * @param dialogTitle
+     *            the title to use for this dialog, or <b>null</b> to indicate that the default
+     *            title should be used.
+     * @param message
+     *            the message to show in this dialog, or <b>null</b> to indicate that the error's
+     *            message should be shown as the primary message.
+     * @param e
+     *            The exception that occurred.
+     * @return the code of the button that was pressed that resulted in this dialog closing. This
+     *         will be <code>Dialog.OK</code> if the OK button was pressed, or
+     *         <code>Dialog.CANCEL</code> if this dialog's close window decoration or the ESC key
+     *         was used.
+     */
+    public static int showErrorDialogWithStacktrace(String pluginId, Shell parentShell, String dialogTitle, String message, Throwable e) {
+        IStatus multiStatus = getMultiStatusForStackTrace(pluginId, e);
+
+        // show error dialog
+        return ErrorDialog.openError(parentShell, dialogTitle, message, multiStatus);
+    }
+
+    /**
+     * Get MultiStatus for stack trace in Throwable
+     *
+     * @param pluginId
+     *            the unique identifier of the relevant plug-in
+     * @param e
+     *            The exception that occurred.
+     * @return MultiStatus with stack trace
+     */
+    public static MultiStatus getMultiStatusForStackTrace(String pluginId, Throwable e) {
+        // convert stack trace to status
+        List<IStatus> statusList = new ArrayList<IStatus>();
+        for (StackTraceElement stackTraceElement : e.getStackTrace()) {
+            statusList.add(new Status(IStatus.ERROR,
+                                      pluginId,
+                                      stackTraceElement.toString()));
+        }
+
+        // merge status
+        return new MultiStatus(pluginId,
+                               IStatus.ERROR,
+                               statusList.toArray(new IStatus[0]), // stack trace
+                               e.toString(), // exception class type
+                               e);
+
+    }
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/ImageUtil.java b/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/ImageUtil.java
new file mode 100644 (file)
index 0000000..2d07d27
--- /dev/null
@@ -0,0 +1,202 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.utility;
+
+import java.io.ByteArrayOutputStream;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.ImageLoader;
+import org.eclipse.swt.graphics.Path;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Display;
+import org.tizen.common.util.Assert;
+
+
+public final class ImageUtil {
+
+    public static Path createCirclePath(int x, int y, int width, int height) {
+        Path path = new Path(null);
+        path.addArc(x, y, width, height, 0, 360);
+        return path;
+    }
+
+//    public static Image getCircleImage(Image image, int width, int height) {
+//        Assert.notNull(image);
+//
+//        Image circleImage = new Image(null, width, height);
+//        GC gc = new GC(circleImage);
+//
+//        // resize image
+//        Image resizedImage = resize(image, width, height);
+//
+//        // create Pattern
+//        Pattern pattern = new Pattern(null, resizedImage);
+//        resizedImage.dispose();
+//        gc.setBackground(ColorConstants.white);
+//        gc.setAlpha(0);
+//        gc.fillRectangle(0, 0, width, height);
+//        gc.setBackgroundPattern(pattern);
+//        gc.fillOval(0, 0, width, height);
+//        gc.dispose();
+//
+//        return circleImage;
+//    }
+//
+//    public static Image getCircleImage(ImageDescriptor imageDescriptor, int width, int height) {
+//        Assert.notNull(imageDescriptor);
+//
+//        // create image
+//        Image image = imageDescriptor.createImage();
+//        if (image != null) {
+//            try {
+//                return getCircleImage(image, width, height);
+//            } finally {         
+//                    image.dispose();                     
+//                   }      
+//        }
+//        return null;
+//    }
+
+    public static Point getBestSize(Point original, Point max) {
+        return getBestSize(original.x, original.y, max.x, max.y);
+    }
+
+    public static Point getBestSize(int originalX, int originalY, int maxX, int maxY) {
+
+        double bestRatio = getBestRatio(originalX, originalY, maxX, maxY);
+
+        int newWidth = (int) (originalX / bestRatio);
+        int newHeight = (int) (originalY / bestRatio);
+        // logger.debug("newWidth " + newWidth + " newHeight " + newHeight);
+
+        return new Point(newWidth, newHeight);
+    }
+
+    public static double getBestRatio(int originalX, int originalY, int maxX, int maxY) {
+        double widthRatio = (double) originalX / (double) maxX;
+        double heightRatio = (double) originalY / (double) maxY;
+
+        double bestRatio = widthRatio > heightRatio ? widthRatio : heightRatio;
+        return bestRatio;
+    }
+
+    /**
+     * Resize an image to the best fitting size. Old and new Image (result)must be disposed after
+     * use.
+     * 
+     * @param img
+     * @param maxWidth
+     * @param maxHeight
+     * @return
+     */
+    public static Image resizeBestSize(Image image, int maxWidth, int maxHeight) {
+        Assert.notNull(image);
+
+        // Calculate best size
+        Point newSize = getBestSize(image.getBounds().width, image.getBounds().height, maxWidth, maxHeight);
+
+        // Resize image
+        return resize(image, newSize.x, newSize.y);
+    }
+
+    public static ImageData resize(ImageData imageData, int width, int height, boolean antiAliasing) {
+        Assert.notNull(imageData);
+
+        if (imageData.width == width && imageData.height == height)
+            return imageData;
+
+        if (antiAliasing) {
+            Image tmpImage = null;
+            Image fullImage = new Image(Display.getCurrent(), imageData);
+            ImageData result = null;
+            tmpImage = resize(fullImage, width, height);
+
+            result = tmpImage.getImageData();
+            tmpImage.dispose();
+            fullImage.dispose();
+            return result;
+        }
+        return imageData.scaledTo(width, height);
+    }
+
+    public static boolean isResizeRequired(Image image, int width, int height) {
+        Rectangle bounds = image.getBounds();
+        return !(bounds.width == width && bounds.height == height);
+    }
+
+    /**
+     * Returns a new scaled image. new Image must be disposed after use.
+     * 
+     * @param image
+     * @param width
+     * @param height
+     * @return
+     */
+    public static Image resize(Image image, int width, int height) {
+        Assert.notNull(image);
+
+        final Image scaled = new Image(Display.getDefault(), width, height);
+        GC gc = new GC(scaled);
+
+        // Linux-GTK Bug 174932
+        if (!SWT.getPlatform().equals("gtk")) {
+            gc.setAdvanced(true);
+        }
+
+        if (gc.getAdvanced()) {
+            gc.setAntialias(SWT.ON);
+            gc.setInterpolation(SWT.HIGH);
+        }
+        gc.drawImage(image, 0, 0, image.getBounds().width, image.getBounds().height, 0, 0, width, height);
+        gc.dispose();
+
+        return scaled;
+    }
+
+    public static byte[] saveImage(Image image, int format) {
+        Assert.notNull(image);
+
+        ImageLoader il = new ImageLoader();
+        il.data = new ImageData[] { image.getImageData() };
+        ByteArrayOutputStream bas = new ByteArrayOutputStream();
+        il.save(bas, format);
+        return bas.toByteArray();
+    }
+
+    public static Image addBorderImage(Image image, int width, int height, Color lineColor) {
+        Image newImage = new Image(Display.getDefault(), width, height);
+        GC gc = new GC(newImage);
+        gc.drawImage(image, 0, 0, image.getBounds().width, image.getBounds().height, 0, 0, width, height);
+        gc.setForeground(lineColor);
+        gc.drawRectangle(0, 0, width - 1, height - 1);
+        gc.dispose();
+        return newImage;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/PlatformUtil.java b/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/PlatformUtil.java
new file mode 100644 (file)
index 0000000..7151d80
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.utility;
+
+public final class PlatformUtil {
+    public static final String OS_WIN32 = org.eclipse.core.runtime.Platform.OS_WIN32; // $NON-NLS-1$
+    public static final String OS_LINUX = org.eclipse.core.runtime.Platform.OS_LINUX; // $NON-NLS-1$
+    public static final String OS_MACOSX = org.eclipse.core.runtime.Platform.OS_MACOSX; // $NON-NLS-1$
+
+    private static final String BACKSLASH = "\\"; //$NON-NLS-1$
+    private static final String SLASH = "/"; //$NON-NLS-1$
+
+    public static String getOS() {
+        if (org.eclipse.core.runtime.Platform.getOS().equals(org.eclipse.core.runtime.Platform.OS_WIN32)) {
+            return OS_WIN32;
+        } else if (org.eclipse.core.runtime.Platform.getOS().equals(org.eclipse.core.runtime.Platform.OS_LINUX)) {
+            return OS_LINUX;
+        } else if (org.eclipse.core.runtime.Platform.getOS().equals(org.eclipse.core.runtime.Platform.OS_MACOSX)) {
+            return OS_MACOSX;
+        } else {
+            return org.eclipse.core.runtime.Platform.getOS();
+        }
+    }
+
+    public static String getCorrectedPath(String path) {
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_WIN32)) {
+            path = path.replace(SLASH, BACKSLASH);
+        }
+        return path;
+    }
+
+    public static String getCorrectedOSFullPath(String path) {
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_WIN32)) {
+            path = getCorrectedPath(path); // In effect, this function is futile.
+            path = path.substring(1); // This is important!, remove root backslash('\\')
+        }
+        return path;
+    }
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/ResourceUtil.java b/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/ResourceUtil.java
new file mode 100644 (file)
index 0000000..0fbb6db
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.utility;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.ImageLoader;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+import org.tizen.common.util.Assert;
+
+
+public final class ResourceUtil {
+    private ResourceUtil() {
+    }
+
+    // public static URL getFileURL(String bundle, String fullPath) {
+    // URL url = null;
+    // if (fullPath != null && !fullPath.isEmpty()) {
+    // url = FileLocator.find(org.eclipse.core.runtime.Platform.getBundle(bundle), new
+    // Path(fullPath), null);
+    // } else {
+    // url = FileLocator.find(org.eclipse.core.runtime.Platform.getBundle(bundle), new Path(""),
+    // null);
+    // }
+    // if (url != null) {
+    // try {
+    // return FileLocator.resolve(url);
+    // } catch (IOException e) {
+    // return null;
+    // }
+    // }
+    // return null;
+    // }
+
+    /**
+     * 
+     * @param url
+     * @return
+     * @throws IOException
+     */
+    public static ImageDescriptor getImageDescriptor(URL url) {
+        ImageLoader imageLoader = new ImageLoader();
+        InputStream stream = null;
+        try {
+            stream = url.openStream();
+        } catch (IOException e) {
+            throw new RuntimeException(e.getMessage() + " : " + url.toString());
+        }
+        ImageData[] imageData = imageLoader.load(stream);
+        try {
+            stream.close();
+        } catch (IOException e) {
+            throw new RuntimeException(e.getMessage());
+        }
+        ImageDescriptor imageDescriptor = ImageDescriptor.createFromImageData(imageData[0]);
+        return imageDescriptor;
+    }
+
+    /**
+     * 
+     * @param pluginId
+     * @param path
+     * @return
+     */
+    public static ImageDescriptor getImageDescriptor(String pluginId, String path) {
+        // URL url = getFileURL(pluginId, path);
+        // ImageDescriptor imageDescriptor = getImageDescriptor(url);
+        // return imageDescriptor;
+        return AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, path);
+    }
+
+    /**
+     * 
+     * @param pluginId
+     * @param path
+     * @return Caller must dispose returned image.
+     */
+    public static Image createImage(String pluginId, String path) {
+        ImageDescriptor imageDescriptor = getImageDescriptor(pluginId, path);
+        if (imageDescriptor == null) {
+            return null;
+        }
+        return imageDescriptor.createImage();
+    }
+
+    /**
+     * 
+     * @param pluginId
+     * @param path
+     * @return
+     */
+    public static URI getURI(String pluginId, String path) {
+        URL url = getURL(pluginId, path);
+        URI uri = getURI(url);
+        return uri;
+    }
+
+    //
+    // @Deprecated
+    // public static InputStream openStream(String pluginId, String path) {
+    // URL url = getFileURL(pluginId, path);
+    // InputStream stream = null;
+    // try {
+    // stream = url.openStream();
+    // } catch (IOException e) {
+    // throw new RuntimeException(e.getMessage());
+    // }
+    // return stream;
+    // }
+
+    public static URL getURL(String pluginId, String path) {
+        Bundle bundle = Platform.getBundle(pluginId);
+        if (bundle != null) {
+            URL url = bundle.getResource(path);
+            Assert.notNull(url, "Invalid path : " + path);
+            URL fileUrl = null;
+            try {
+                fileUrl = FileLocator.toFileURL(url);
+            } catch (IOException e) {
+                throw new RuntimeException(e.getMessage());
+            }
+            return fileUrl;
+        }
+        return null;
+    }
+
+    private static URI getURI(URL url) {
+        URI uri = null;
+        try {
+            uri = URIUtil.toURI(url);
+        } catch (URISyntaxException e) {
+            throw new RuntimeException(e.getMessage());
+        }
+        return uri;
+    }
+
+    public static boolean isAvailableURI(String pluginId, String path) {
+        Bundle bundle = Platform.getBundle(pluginId);
+        if (bundle != null) {
+            if (bundle.getResource(path) != null)
+                return true;
+        }
+
+        return false;
+    }
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/XMLUtil.java b/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/XMLUtil.java
new file mode 100644 (file)
index 0000000..a230f72
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.utility;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.MalformedURLException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.tizen.common.util.Assert;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+
+public final class XMLUtil {
+
+    public static Document clean(Document document) throws XPathExpressionException {
+        // remove whitespace
+        // Affect the source editor should be considered
+        XPath xPath = XPathFactory.newInstance().newXPath();
+        NodeList nodeList = (NodeList) xPath.evaluate("//text()[normalize-space()='']", document, XPathConstants.NODESET);
+        for (int i = 0; i < nodeList.getLength(); ++i) {
+            Node node = nodeList.item(i);
+            node.getParentNode().removeChild(node);
+        }
+
+        return document;
+    }
+
+    public static Node getNode(Document document, String xpathExpression) throws XPathExpressionException {
+        XPath xpath = XPathFactory.newInstance().newXPath();
+        Object object = xpath.evaluate(xpathExpression, document, XPathConstants.NODE);
+        Assert.isTrue(object instanceof Node, object.getClass().getName());
+        Node node = (Node) object;
+        return node;
+    }
+
+    public static String getValue(Document document, String xpathExpression) throws XPathExpressionException {
+        Node node = getNode(document, xpathExpression);
+        String value = node.getTextContent();
+        return value;
+    }
+
+    public static boolean isExistValue(Document document, String xpathExpression) throws XPathExpressionException {
+        XPath xpath = XPathFactory.newInstance().newXPath();
+        Object object = xpath.evaluate(xpathExpression, document, XPathConstants.NODE);
+        if (object == null) {
+            return false;
+        }
+
+        return true;
+    }
+
+    public static Document load(File file) throws ParserConfigurationException, MalformedURLException, SAXException, IOException {
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder builder = factory.newDocumentBuilder();
+        InputStream stream = file.toURI().toURL().openStream();
+        Document document = builder.parse(stream);
+        stream.close();
+        return document;
+    }
+
+    public static void save(Document document, File file) throws IOException, TransformerException {
+        DOMSource source = new DOMSource(document);
+        FileWriter writer = new FileWriter(file.getAbsolutePath());
+        StreamResult result = new StreamResult(writer);
+        try {
+            TransformerFactory factory = TransformerFactory.newInstance();
+            factory.setAttribute("indent-number", 4);
+            Transformer transformer = factory.newTransformer();
+            transformer.setOutputProperty(OutputKeys.ENCODING, "utf-8");
+            transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+            transformer.transform(source, result);
+        } finally {
+            writer.close();
+        }
+    }
+
+    public static String transform(Document srcDoc, Document xslDoc) throws TransformerException, IOException {
+        DOMSource src = new DOMSource(srcDoc);
+        DOMSource xsl = new DOMSource(xslDoc);
+        StringWriter writer = new StringWriter();
+        Result result = new StreamResult(writer);
+
+        TransformerFactory transformerFactory = TransformerFactory.newInstance();
+        Transformer transformer = transformerFactory.newTransformer(xsl);
+        transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+        transformer.setOutputProperty(OutputKeys.METHOD, "text");
+        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+        transformer.transform(src, result);
+
+        String renderData = writer.toString();
+        writer.close();
+
+        return renderData;
+    }
+
+    public static String transform(Document document) throws TransformerException, IOException {
+        DOMSource src = new DOMSource(document);
+        StringWriter writer = new StringWriter();
+        StreamResult result = new StreamResult(writer);
+
+        TransformerFactory factory = TransformerFactory.newInstance();
+        factory.setAttribute("indent-number", 4);
+        Transformer transformer = null;
+        transformer = factory.newTransformer();
+        // transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+        transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+        transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+        transformer.transform(src, result);
+
+        String renderData = writer.getBuffer().toString();
+        writer.close();
+
+        return renderData;
+    }
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/deprecated/DomUtil.java b/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/deprecated/DomUtil.java
new file mode 100644 (file)
index 0000000..d79ac5b
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.utility.deprecated;
+
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+@Deprecated
+public final class DomUtil {
+    private static final String EMPTY = ""; //$NON-NLS-1$
+    private static final String BODY_ELEMENT = "//body";
+    private static final String ATTRIBUTE_PREFIX = "@";
+
+    public static Node getNode(Element element, String xpath) {
+        XPathFactory xpathFactory = XPathFactory.newInstance();
+        XPath expr = xpathFactory.newXPath();
+        Object node = null;
+        try {
+            if (xpath != null && !xpath.equals(EMPTY)) {
+                node = expr.compile(xpath).evaluate(element, XPathConstants.NODE);
+            }
+        } catch (XPathExpressionException e) {
+            e.printStackTrace();
+        }
+
+        if (node instanceof Node) {
+            return (Node) node;
+        }
+
+        return null;
+    }
+
+    public static Node getAttributeNode(Element element, String xpath) {
+        String xpathResult = "";
+
+        if (!xpath.equals("text()")) {
+            xpathResult = ATTRIBUTE_PREFIX;
+        }
+        xpathResult += xpath;
+
+        return getNode(element, xpathResult);
+    }
+
+    public static Element getTargetElementOfAttr(Element element, String xpath) {
+        Element target = element;
+
+        if (xpath != null && !xpath.equals(EMPTY)) {
+            Object node = getNode(element, xpath);
+
+            if (node != null && node instanceof Element) {
+                target = (Element) node;
+            } else {
+                target = null;
+            }
+        }
+
+        return target;
+    }
+
+    public static Node getNode(Document doc, String xpath) {
+        XPathFactory xpathFactory = XPathFactory.newInstance();
+        XPath expr = xpathFactory.newXPath();
+        Object node = null;
+        try {
+            if (xpath != null && !xpath.equals(EMPTY)) {
+                node = expr.compile(xpath).evaluate(doc, XPathConstants.NODE);
+            }
+        } catch (XPathExpressionException e) {
+            e.printStackTrace();
+        }
+
+        if (node instanceof Node) {
+            return (Node) node;
+        }
+
+        return null;
+    }
+
+    /**
+     * @param doc
+     * @return
+     */
+    public static Node getBodyNode(Document doc) {
+        return getNode(doc, BODY_ELEMENT);
+    }
+
+    public static Node importedNode(Document targetDocument, Node pageNode) {
+        return targetDocument.importNode(pageNode, true);
+    }
+
+    /**
+     * @param targetDocument
+     * @param pageNode
+     *            imported pageNode
+     */
+    public static void appendPageNode(Document targetDocument, Node pageNode) {
+        Node targetBodyNode = getBodyNode(targetDocument);
+
+        if (targetBodyNode == null) {
+            return;
+        }
+
+        targetBodyNode.appendChild(pageNode);
+    }
+
+    public static void insertBeforePageNode(Document targetDocument, Node pageNode, Node refPageNode) {
+        Node targetBodyNode = getBodyNode(targetDocument);
+
+        if (targetBodyNode == null) {
+            return;
+        }
+
+        targetBodyNode.insertBefore(pageNode, refPageNode);
+    }
+
+    public static void removePageNode(Document targetDocument, Node pageNode) {
+        Node targetBodyNode = getBodyNode(targetDocument);
+
+        if (targetBodyNode == null) {
+            return;
+        }
+
+        targetBodyNode.removeChild(pageNode);
+    }
+
+    // public static void importNode(Document document, Part part) {
+    // part.setElement((Element)DomUtil.importedNode(document, part.getElement()));
+    //
+    // List<Part> children = part.getChildren();
+    // if(children != null && !children.isEmpty()) {
+    // for(Part child : children) {
+    // importNode(document, child);
+    // }
+    // }
+    // }
+
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/deprecated/FileSelector.java b/org.tizen.efluibuilder.common/src/org/tizen/efluibuilder/utility/deprecated/FileSelector.java
new file mode 100644 (file)
index 0000000..9fa78be
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.utility.deprecated;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+/**
+ * FileDialog wrapper class
+ * <p>
+ * Instances of this class allow the user to navigate the file system and select or enter a file
+ * name.
+ * <dl>
+ * <dt><b>Styles:</b></dt>
+ * <dd>SAVE, OPEN, MULTI</dd>
+ * </dl>
+ * 
+ */
+@Deprecated
+public final class FileSelector {
+    public static final int OPEN = SWT.OPEN;
+    public static final int SAVE = SWT.SAVE;
+    public static final int MULTI = SWT.MULTI;
+
+    private Shell parent = null;
+    private FileDialog fileDialog = null;
+    private IProject project = null;
+
+    public FileSelector(Shell parent, int style, IProject project) {
+        this.parent = parent;
+        this.project = project;
+        fileDialog = new FileDialog(parent, style);
+    }
+
+    public void setFilterExtensions(String[] extensions) {
+        fileDialog.setFilterExtensions(extensions);
+    }
+
+    public void setFilterNames(String[] names) {
+        fileDialog.setFilterNames(names);
+    }
+
+    public void setFilterIndex(int index) {
+        fileDialog.setFilterIndex(index);
+    }
+
+    /**
+     * @return selected files
+     */
+    public String[] open() {
+        String projectPath = getProject().getLocation().toString();
+        String resourcePath = projectPath + "/res";
+        fileDialog.setFilterPath(resourcePath);
+        // fileDialog.open() returns last path of selected files
+        String selectedFilePath = fileDialog.open();
+        // if fileDialog cancel selectedFilePath is null
+        if (selectedFilePath == null) {
+            return null;
+        }
+
+        selectedFilePath = PlatformUtil.getCorrectedPath(selectedFilePath);
+
+        if (!isValidatePath(selectedFilePath, projectPath)) {
+            return null;
+        }
+
+        String[] files = fileDialog.getFileNames();
+        for (int i = 0; i < files.length; i++) {
+            files[i] = makeRelativePath(selectedFilePath, files[i]);
+        }
+        return files;
+    }
+
+    private IProject getProject() {
+        return project;
+    }
+
+    // TODO this method is temporary version
+    private String makeRelativePath(String selectedPath, String fileName) {
+        String projectPath = getProject().getLocation().toString();
+        String resourcePath = projectPath + "/res";
+        // remove file name and change to relative path
+        IPath path = new Path(selectedPath.substring(resourcePath.length(), selectedPath.length()));
+        String folderPath = path.removeLastSegments(1).toString();
+        String pathPrefix = "";
+        if (folderPath.equals("/")) {
+
+        } else {
+            folderPath = folderPath.replaceFirst("/", "");
+            pathPrefix = folderPath + "/";
+        }
+        return pathPrefix + fileName;
+    }
+
+    private boolean isValidatePath(String path, String projectPath) {
+        if (path == null || projectPath == null) {
+            return false;
+        }
+
+        // check validate path
+        if (!path.startsWith(projectPath)) {
+            MessageDialog.openError(parent, "Invalid File", "Please select file in your project (res directory only)");
+            return false;
+        }
+
+        return true;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileConstants.java b/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileConstants.java
new file mode 100644 (file)
index 0000000..9b2f5b3
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.uibuilder.tizenfile;
+
+/**
+ * A web ui builder constants class.
+ */
+public class TizenFileConstants {
+
+    // Special character
+    public static final String EMPTY = ""; //$NON-NLS-1$
+    public static final String SPACE = " "; //$NON-NLS-1$
+    public static final String TAB = "  "; //$NON-NLS-1$
+    public static final String SLASH = "/"; //$NON-NLS-1$
+    public static final String BSLASH = "\\"; //$NON-NLS-1$
+    public static final String NEW_LINE = "\n"; //$NON-NLS-1$
+    public static final String DOT = "."; //$NON-NLS-1$
+    public static final String COMMA = ","; //$NON-NLS-1$
+    public static final String COLON = ":"; //$NON-NLS-1$
+    public static final String SEMICOLON = ";"; //$NON-NLS-1$
+    public static final String DASH = "-"; //$NON-NLS-1$
+    public static final String UNDERBAR = "_"; //$NON-NLS-1$
+    public static final String OPEN_BRACKET = "("; //$NON-NLS-1$
+    public static final String CLOSE_BRACKET = ")"; //$NON-NLS-1$
+    public static final String OPEN_CURLY_BRACKET = "{"; //$NON-NLS-1$
+    public static final String CLOSE_CURLY_BRACKET = "}"; //$NON-NLS-1$
+    public static final String OPEN_SQUARE_BRACKET = "["; //$NON-NLS-1$
+    public static final String CLOSE_SQUARE_BRACKET = "]"; //$NON-NLS-1$
+    public static final String OPEN_TRI_BRACKET = "<"; //$NON-NLS-1$
+    public static final String CLOSE_TRI_BRACKET = ">"; //$NON-NLS-1$
+    public static final String TILDE = "~"; //$NON-NLS-1$
+    public static final String ELLIPSIS = "..."; //$NON-NLS-1$
+    public static final String EQUAL = "="; //$NON-NLS-1$
+    public static final String ASTERISK = "*"; //$NON-NLS-1$
+    public static final String GRAVE_ACCENT = "`"; //$NON-NLS-1$
+    public static final String QUOTATION_MARK = "\""; //$NON-NLS-1$
+    public static final String SHARP = "#"; //$NON-NLS-1$
+    public static final String AT = "@"; //$NON-NLS-1$
+
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileData.java b/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileData.java
new file mode 100644 (file)
index 0000000..e471d68
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.uibuilder.tizenfile;
+
+import org.w3c.dom.Document;
+
+
+public class TizenFileData {
+
+    private String name;
+    private String version;
+    private Document document;
+
+    public TizenFileData() {
+        this.version = null;
+        this.document = null;
+    }
+
+    public TizenFileData(String name, String version, Document document) {
+        this.name = name;
+        this.version = version;
+        this.document = document;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public Document getDocument() {
+        return document;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public void setDocument(Document document) {
+        this.document = document;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileDataEntry.java b/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileDataEntry.java
new file mode 100644 (file)
index 0000000..ab287b7
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.uibuilder.tizenfile;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+public class TizenFileDataEntry {
+
+    private String name = null;
+    private Object value = null;
+    private Map<String, Object> properties = null;
+    private List<TizenFileDataEntry> children = null;
+
+    public TizenFileDataEntry() {
+        name = TizenFileConstants.EMPTY;
+    }
+
+    public TizenFileDataEntry(String name) {
+        this.name = name;
+    }
+
+    public TizenFileDataEntry(String name, Object value) {
+        this(name);
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Object getValue() {
+        return value;
+    }
+
+    public void setValue(Object value) {
+        this.value = value;
+    }
+
+    public void addProperty(String key, Object value) {
+        if (key == null) {
+            return;
+        }
+
+        if (value == null) {
+            removeProperty(key);
+            return;
+        }
+
+        if (properties == null) {
+            properties = new HashMap<String, Object>();
+        }
+
+        properties.put(key, value);
+    }
+
+    public void removeProperty(String key) {
+        if (key == null) {
+            return;
+        }
+
+        if (properties == null) {
+            return;
+        }
+
+        properties.remove(key);
+
+        if (properties.isEmpty()) {
+            properties = null;
+        }
+    }
+
+    public Object getProperty(String key) {
+        if (key == null) {
+            return null;
+        }
+
+        if (properties == null) {
+            return null;
+        }
+
+        return properties.get(key);
+    }
+
+    public void addStringProperty(String key, String value) {
+        addProperty(key, value);
+    }
+
+    public String getStringProperty(String key) {
+        if (key == null) {
+            return null;
+        }
+
+        Object value = getProperty(key);
+        if (value instanceof String) {
+            return (String) value;
+        }
+        return null;
+    }
+
+    public void addEntryProperty(String key, TizenFileDataEntry value) {
+        addProperty(key, value);
+    }
+
+    public TizenFileDataEntry getEntryProperty(String key) {
+        if (key == null) {
+            return null;
+        }
+
+        Object value = getProperty(key);
+        if (value instanceof TizenFileDataEntry) {
+            return (TizenFileDataEntry) value;
+        }
+        return null;
+    }
+
+    public void addListProperty(String key, List<Object> listValue) {
+        addProperty(key, listValue);
+    }
+
+    @SuppressWarnings("unchecked")
+    public List<Object> getListProperty(String key) {
+        if (key == null) {
+            return null;
+        }
+
+        Object value = getProperty(key);
+        if (value instanceof List) {
+            return (List<Object>) value;
+        }
+        return null;
+    }
+
+    public void addListPropertyItem(String key, Object value) {
+        if (key == null) {
+            return;
+        }
+
+        List<Object> list = getListProperty(key);
+        if (list == null) {
+            list = new ArrayList<Object>();
+            addListProperty(key, list);
+        }
+
+        if (list != null) {
+            list.add(value);
+        }
+    }
+
+    public void addListPropertyList(String key, List<Object> valueList) {
+        if (key == null || valueList == null) {
+            return;
+        }
+
+        List<Object> list = getListProperty(key);
+        if (list == null) {
+            list = new ArrayList<Object>();
+            addListProperty(key, list);
+        }
+
+        if (list != null) {
+            for (Object item : valueList) {
+                list.add(item);
+            }
+        }
+    }
+
+    public void addChild(TizenFileDataEntry child) {
+        if (child == null) {
+            return;
+        }
+
+        if (children == null) {
+            children = new ArrayList<TizenFileDataEntry>();
+        }
+
+        children.add(child);
+    }
+
+    public void removeChild(TizenFileDataEntry child) {
+        if (child == null) {
+            return;
+        }
+
+        if (children == null) {
+            return;
+        }
+
+        children.remove(child);
+
+        if (children.isEmpty()) {
+            children = null;
+        }
+    }
+
+    public List<TizenFileDataEntry> getChildren() {
+        return children;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileDataHelper.java b/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileDataHelper.java
new file mode 100644 (file)
index 0000000..a4d1484
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.uibuilder.tizenfile;
+
+import java.util.Arrays;
+import java.util.List;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+
+
+public class TizenFileDataHelper {
+
+    public static TizenFileDataEntry convert(String name, Element element, List<String> attrList) {
+        TizenFileDataEntry entry = new TizenFileDataEntry(name);
+
+        NamedNodeMap attrMap = element.getAttributes();
+        for (String attrName : attrList) {
+            Attr attr = (Attr) attrMap.getNamedItem(attrName);
+            if (attr != null) {
+                entry.addProperty(attrName, attr.getValue());
+            }
+        }
+
+        return entry;
+    }
+
+    public static TizenFileDataEntry convert(String name, Element element, String[] attrArray) {
+        return convert(name, element, Arrays.asList(attrArray));
+    }
+
+    public static TizenFileDataEntry convert(String name, Element element, String attrList) {
+        String[] attrArray = attrList.split(TizenFileConstants.COMMA);
+        return convert(name, element, attrArray);
+    }
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileDataProperty.java b/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileDataProperty.java
new file mode 100644 (file)
index 0000000..ec78b54
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.uibuilder.tizenfile;
+
+public class TizenFileDataProperty {
+
+    private String key = null;
+    private String value = null;
+
+    public TizenFileDataProperty(String key, String value) {
+        this.key = key;
+        this.value = value;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileFormatter.java b/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileFormatter.java
new file mode 100644 (file)
index 0000000..93d0b68
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.uibuilder.tizenfile;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+public class TizenFileFormatter {
+
+    private static final String ELEMENT_TIZEN_FILE = "tizenFile"; //$NON-NLS-1$
+    private static final String ELEMENT_FILE_INFO = "fileInfo"; //$NON-NLS-1$
+    private static final String ELEMENT_TYPE = "type"; //$NON-NLS-1$
+    private static final String ELEMENT_VERSION = "version"; //$NON-NLS-1$
+    private static final String ELEMENT_DESC = "desc"; //$NON-NLS-1$
+
+    private boolean validate = false;
+    private String type = null;
+    private String version = null;
+    private String desc = null;
+
+    public TizenFileFormatter(String type, String version, String desc) {
+        this.type = type;
+        this.version = version;
+        this.desc = desc;
+    }
+
+    public TizenFileFormatter(Element rootElem) {
+        validate = parse(rootElem);
+    }
+
+    public Document generateFileFormat() throws ParserConfigurationException {
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder docBuilder = null;
+        docBuilder = factory.newDocumentBuilder();
+
+        Document doc = docBuilder.newDocument();
+
+        Element rootElem = doc.createElement(ELEMENT_TIZEN_FILE);
+
+        Element elem0 = doc.createElement(ELEMENT_FILE_INFO);
+        rootElem.appendChild(elem0);
+
+        Element elem = doc.createElement(ELEMENT_TYPE);
+        elem.setTextContent(type);
+        elem0.appendChild(elem);
+
+        elem = doc.createElement(ELEMENT_VERSION);
+        elem.setTextContent(version);
+        elem0.appendChild(elem);
+
+        elem = doc.createElement(ELEMENT_DESC);
+        elem.setTextContent(desc);
+        elem0.appendChild(elem);
+
+        doc.appendChild(rootElem);
+
+        return doc;
+    }
+
+    private boolean parse(Element rootElem) {
+        if (!rootElem.getNodeName().equals(ELEMENT_TIZEN_FILE)) {
+            return false;
+        }
+
+        NodeList fileInfos = rootElem.getElementsByTagName(ELEMENT_FILE_INFO);
+        if (fileInfos.getLength() != 1) {
+            return false;
+        }
+
+        NodeList fileInfo = fileInfos.item(0).getChildNodes();
+        for (int i = 0; i < fileInfo.getLength(); i++) {
+            Node fileInfoItem = fileInfo.item(i);
+            if (fileInfoItem instanceof Element) {
+                Element elem = (Element) fileInfoItem;
+                if (elem.getNodeName().equals(ELEMENT_TYPE)) {
+                    type = elem.getTextContent();
+                } else if (elem.getNodeName().equals(ELEMENT_VERSION)) {
+                    version = elem.getTextContent();
+                } else if (elem.getNodeName().equals(ELEMENT_DESC)) {
+                    desc = elem.getTextContent();
+                }
+            }
+        }
+
+        if (type == null || type.isEmpty()) {
+            return false;
+        }
+        if (version == null || version.isEmpty()) {
+            return false;
+        }
+
+        return true;
+    }
+
+    public boolean isValidate() {
+        return validate;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+}
diff --git a/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileReader.java b/org.tizen.efluibuilder.common/src/org/tizen/uibuilder/tizenfile/TizenFileReader.java
new file mode 100644 (file)
index 0000000..c79f4d5
--- /dev/null
@@ -0,0 +1,186 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.uibuilder.tizenfile;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+
+public class TizenFileReader {
+
+    /**
+     * Reads a page file.
+     * 
+     * @param url
+     *            a url of page file
+     * @param partFactory
+     *            a {@link PartFactory}
+     * @return {@link PageFileData}
+     * @throws ParserConfigurationException
+     * @throws IOException
+     * @throws SAXException
+     */
+    public static Document readFile(InputStream inputStream) throws ParserConfigurationException, SAXException, IOException {
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder builder = null;
+        Document doc = null;
+        builder = factory.newDocumentBuilder();
+        doc = builder.parse(inputStream);
+        return doc;
+    }
+
+    /**
+     * Reads a page file.
+     * 
+     * @param filePath
+     *            a path of page file
+     * @param partFactory
+     *            a {@link PartFactory}
+     * @return {@link PageFileData}
+     * @throws IOException
+     * @throws SAXException
+     * @throws ParserConfigurationException
+     */
+    public static Document readFile(String filePath) throws IOException, ParserConfigurationException, SAXException {
+        Document doc = null;
+        doc = readFile(new File(filePath).toURI().toURL());
+
+        return doc;
+    }
+
+    /**
+     * Reads a page file.
+     * 
+     * @param url
+     *            a url of page file
+     * @param partFactory
+     *            a {@link PartFactory}
+     * @return {@link PageFileData}
+     * @throws IOException
+     * @throws SAXException
+     * @throws ParserConfigurationException
+     */
+    public static Document readFile(URL url) throws IOException, ParserConfigurationException, SAXException {
+        return readFile(url.openStream());
+    }
+
+    /**
+     * Reads a page file string.
+     * 
+     * @param data
+     *            a page file string
+     * @param partFactory
+     *            a {@link PartFactory}
+     * @return {@link PageFileData}
+     * @throws IOException
+     * @throws SAXException
+     * @throws ParserConfigurationException
+     */
+    public static Document readFileString(String data) throws ParserConfigurationException, SAXException, IOException {
+        return readFile(new ByteArrayInputStream(data.getBytes("UTF-8")));
+    }
+
+    private static boolean validate(Document doc, String version, String headerId) {
+        if (doc == null) {
+            return false;
+        }
+
+        Element documentElement = doc.getDocumentElement();
+
+        TizenFileFormatter fileReader = new TizenFileFormatter(documentElement);
+        if (!fileReader.isValidate()) {
+            return false;
+        }
+        if (!fileReader.getType().equals(headerId)) {
+            return false;
+        }
+        if (!fileReader.getVersion().equals(version)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Read a page html
+     * 
+     * @param stream
+     *            page template string stream
+     * @return page html
+     * @throws IOException
+     * @throws SAXException
+     * @throws ParserConfigurationException
+     */
+    public static Document readFile(InputStream stream, String version, String headerId) throws ParserConfigurationException, SAXException, IOException {
+        Document doc = readFile(stream);
+
+        if (!validate(doc, version, headerId)) {
+            return null;
+        }
+
+        return doc;
+    }
+
+    public static Document readFile(String filePath, String version, String headerId) throws IOException, ParserConfigurationException, SAXException {
+        Document doc = readFile(filePath);
+
+        if (!validate(doc, version, headerId)) {
+            return null;
+        }
+
+        return doc;
+    }
+
+    public static Document readFile(URL url, String version, String headerId) throws IOException, ParserConfigurationException, SAXException {
+        Document doc = readFile(url);
+
+        if (!validate(doc, version, headerId)) {
+            return null;
+        }
+
+        return doc;
+    }
+
+    public static Document readFileString(String data, String version, String headerId) throws ParserConfigurationException, SAXException, IOException {
+        Document doc = readFileString(data);
+
+        if (!validate(doc, version, headerId)) {
+            return null;
+        }
+
+        return doc;
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.configurator/.classpath b/org.tizen.efluibuilder.configurator/.classpath
new file mode 100644 (file)
index 0000000..1fa3e68
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.efluibuilder.configurator/.project b/org.tizen.efluibuilder.configurator/.project
new file mode 100644 (file)
index 0000000..ecbebf5
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.efluibuilder.configurator</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.efluibuilder.configurator/.settings/org.eclipse.jdt.core.prefs b/org.tizen.efluibuilder.configurator/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..da318c2
--- /dev/null
@@ -0,0 +1,90 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
diff --git a/org.tizen.efluibuilder.configurator/META-INF/MANIFEST.MF b/org.tizen.efluibuilder.configurator/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..636a19c
--- /dev/null
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.efluibuilder.configurator
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.tizen.efluibuilder.configurator.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.tizen.efluibuilder.common,
+ org.tizen.efluibuilder.descriptor
+Bundle-ActivationPolicy: lazy
+Export-Package: org.tizen.efluibuilder.core.configuration.device,
+ org.tizen.efluibuilder.core.configurator
+Bundle-Vendor: %Bundle-Vendor
diff --git a/org.tizen.efluibuilder.configurator/OSGI-INF/l10n/bundle.properties b/org.tizen.efluibuilder.configurator/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..09f6564
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for org.tizen.efluibuilder.configurator
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen EFL UI Builder Configurator
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.configurator/build.properties b/org.tizen.efluibuilder.configurator/build.properties
new file mode 100644 (file)
index 0000000..5844780
--- /dev/null
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               res/,\
+               OSGI-INF/
diff --git a/org.tizen.efluibuilder.configurator/res/devices/default/default_device.xml b/org.tizen.efluibuilder.configurator/res/devices/default/default_device.xml
new file mode 100644 (file)
index 0000000..34afc97
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-device</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Device Descriptor</desc>
+       </fileInfo>
+
+       <devices>
+               <device name="WVGA" displayName="Device WVGA [480X800]">
+                       <screenDesc>
+                               <property name="orientation" type="orientation" value="PORTRAIT" />
+                               <property name="devicePixelRatio" value="1.0" />
+                               <property name="deviceWidth" value="480" />
+                               <property name="deviceHeight" value="800" />
+                               <property name="width" value="480" />
+                               <property name="height" value="800" />
+                       </screenDesc>
+               </device>
+               <device name="qHD" displayName="Device qHD [540X960]">
+                       <screenDesc>
+                               <property name="orientation" type="orientation" value="PORTRAIT" />
+                               <property name="devicePixelRatio" value="1.0" />
+                               <property name="deviceWidth" value="540" />
+                               <property name="deviceHeight" value="960" />
+                               <property name="width" value="540" />
+                               <property name="height" value="960" />
+                       </screenDesc>
+               </device>
+               <device name="HD" displayName="Device HD [720X1280]">
+                       <screenDesc>
+                               <property name="orientation" type="orientation" value="PORTRAIT" />
+                               <property name="devicePixelRatio" value="1.0" />
+                               <property name="deviceWidth" value="720" />
+                               <property name="deviceHeight" value="1280" />
+                               <property name="width" value="720" />
+                               <property name="height" value="1280" />
+                       </screenDesc>
+               </device>
+       </devices>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.configurator/res/devices/mobile-2.3/default_device.xml b/org.tizen.efluibuilder.configurator/res/devices/mobile-2.3/default_device.xml
new file mode 100644 (file)
index 0000000..11bfc80
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-device</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Device Descriptor</desc>
+       </fileInfo>
+       <devices>
+               <device name="HD" displayName="Device HD [720X1280: MDPI]">
+                       <screenDesc>
+                               <property name="width" value="720" />
+                               <property name="height" value="1280" />
+                               <property name="dispalySize" value="4.65 inch" />
+                               <property name="DPI" value="MDPI" />
+                       </screenDesc>
+               </device>
+               <device name="WVGA" displayName="Device WVGA [480X800: LDPI]">
+                       <screenDesc>
+                               <property name="width" value="480" />
+                               <property name="height" value="800" />
+                               <property name="dispalySize" value="4.5 inch" />
+                               <property name="DPI" value="LDPI" />
+                       </screenDesc>
+               </device>
+       </devices>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.configurator/res/devices/mobile-3.0/default_device.xml b/org.tizen.efluibuilder.configurator/res/devices/mobile-3.0/default_device.xml
new file mode 100644 (file)
index 0000000..ff7a3c4
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-device</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Device Descriptor</desc>
+       </fileInfo>
+       <devices>
+               <device name="HD" displayName="Device HD [720X1280: MDPI]">
+                       <screenDesc>
+                               <property name="width" value="720" />
+                               <property name="height" value="1280" />
+                               <property name="dispalySize" value="5" />
+                               <property name="DPI" value="MDPI" />
+                               <property name="aspectRatio" value="9:16" />
+                       </screenDesc>
+               </device>
+               <device name="qHD" displayName="Device qHD [540X960: LDPI]">
+                       <screenDesc>
+                               <property name="width" value="540" />
+                               <property name="height" value="960" />
+                               <property name="dispalySize" value="" />
+                               <property name="DPI" value="LDPI" />
+                               <property name="aspectRatio" value="" />
+                       </screenDesc>
+               </device>
+               <device name="WVGA" displayName="Device WVGA [480X800: LDPI]">
+                       <screenDesc>
+                               <property name="width" value="480" />
+                               <property name="height" value="800" />
+                               <property name="dispalySize" value="5" />
+                               <property name="DPI" value="LDPI" />
+                               <property name="aspectRatio" value="3:5" />
+                       </screenDesc>
+               </device>
+       </devices>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.configurator/res/devices/tv-3.0/default_device.xml b/org.tizen.efluibuilder.configurator/res/devices/tv-3.0/default_device.xml
new file mode 100644 (file)
index 0000000..a59df2d
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-device</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Device Descriptor</desc>
+       </fileInfo>
+       <devices>
+               <device name="HD" displayName="Device HD [720X1280: MDPI]">
+                       <screenDesc>
+                               <property name="width" value="720" />
+                               <property name="height" value="1280" />
+                               <property name="dispalySize" value="4.65 inch" />
+                               <property name="DPI" value="MDPI" />
+                       </screenDesc>
+               </device>
+               <device name="FHD" displayName="Device FHD [1080x1920: HDPI]">
+                       <screenDesc>
+                               <property name="width" value="1080" />
+                               <property name="height" value="1920" />
+                               <property name="dispalySize" value="inch" />
+                               <property name="DPI" value="HDPI" />
+                       </screenDesc>
+               </device>
+       </devices>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.configurator/res/devices/wearable-2.3.1/default_device.xml b/org.tizen.efluibuilder.configurator/res/devices/wearable-2.3.1/default_device.xml
new file mode 100644 (file)
index 0000000..c570852
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-device</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Device Descriptor</desc>
+       </fileInfo>
+       <devices>
+               <device name="SQUARE_320x320" displayName="Device 320x320 Square [320x320: HDPI]">
+                       <screenDesc>
+                               <property name="width" value="320" />
+                               <property name="height" value="320" />
+                               <property name="dispalySize" value="1.4 inch" />
+                               <property name="DPI" value="HDPI" />
+                       </screenDesc>
+               </device>
+               <device name="SQUARE_360x480" displayName="Device 360x480 Square [360x480: MDPI]">
+                       <screenDesc>
+                               <property name="width" value="360" />
+                               <property name="height" value="480" />
+                               <property name="dispalySize" value="2.0 inch" />
+                               <property name="DPI" value="MDPI" />
+                       </screenDesc>
+               </device>
+       </devices>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.configurator/res/devices/wearable-circle-2.3.1/default_device.xml b/org.tizen.efluibuilder.configurator/res/devices/wearable-circle-2.3.1/default_device.xml
new file mode 100644 (file)
index 0000000..baf8f9f
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-device</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Device Descriptor</desc>
+       </fileInfo>
+       <devices>
+               <device name="CIRCLE_360x360" displayName="Device 360x360 Circle [360x360: HDPI]">
+                       <screenDesc>
+                               <property name="width" value="360" />
+                               <property name="height" value="360" />
+                               <property name="dispalySize" value="1.6 inch" />
+                               <property name="DPI" value="HDPI" />
+                       </screenDesc>
+               </device>
+       </devices>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.configurator/res/devices/wearable-circle-3.0/default_device.xml b/org.tizen.efluibuilder.configurator/res/devices/wearable-circle-3.0/default_device.xml
new file mode 100644 (file)
index 0000000..baf8f9f
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizenFile>
+       <fileInfo>
+               <type>tizen-device</type>
+               <version>1</version>
+               <desc>Tizen Native UI Builder Device Descriptor</desc>
+       </fileInfo>
+       <devices>
+               <device name="CIRCLE_360x360" displayName="Device 360x360 Circle [360x360: HDPI]">
+                       <screenDesc>
+                               <property name="width" value="360" />
+                               <property name="height" value="360" />
+                               <property name="dispalySize" value="1.6 inch" />
+                               <property name="DPI" value="HDPI" />
+                       </screenDesc>
+               </device>
+       </devices>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/configurator/Activator.java b/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/configurator/Activator.java
new file mode 100644 (file)
index 0000000..fe5f513
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.configurator;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.tizen.efluibuilder.configurator"; //$NON-NLS-1$
+
+    // The shared instance
+    private static Activator plugin;
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     * 
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/Device.java b/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/Device.java
new file mode 100644 (file)
index 0000000..a72da54
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.core.configuration.device;
+
+import java.text.MessageFormat;
+
+
+public final class Device extends ScreenDesc {
+    private String name = null;
+    private String displayName = null;
+    private String descriptor = null;
+
+    public Device(String name, String displayName) {
+        this.name = name;
+        this.displayName = displayName;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setDisplayName(String display) {
+        displayName = display;
+    }
+
+    public String getDisplayName() {
+        if (displayName == null) {
+            displayName = name + " [" + getWidth() + "x" + getHeight() + "]";
+        }
+        return this.displayName;
+    }
+
+    public String getDeviceDescriptor() {
+        return descriptor;
+    }
+
+    public void setDeviceDescriptor(String descriptor) {
+        this.descriptor = descriptor;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return MessageFormat.format("Device Info name: {0}, Device DisplayName: {1}",
+                                    getName(), getDisplayName());
+    }
+}
diff --git a/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/DeviceDeserializer.java b/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/DeviceDeserializer.java
new file mode 100644 (file)
index 0000000..43c3b41
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.core.configuration.device;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.NodeList;
+
+
+public class DeviceDeserializer {
+    public static final String ELEMENT_DEVICE = "device"; //$NON-NLS-1$
+
+    public static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_DISPLAYNAME = "displayName"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_DESCRIPTOR = "descriptor"; //$NON-NLS-1$
+
+    public static Device parseElement(Element elem) {
+        String name = null, displayName = null, descriptor = null;
+
+        NamedNodeMap attrList = elem.getAttributes();
+        for (int i = 0; i < attrList.getLength(); i++) {
+            Attr attr = (Attr) attrList.item(i);
+
+            if (attr.getName().equals(ATTRIBUTE_NAME)) {
+                name = attr.getValue();
+            } else if (attr.getName().equals(ATTRIBUTE_DISPLAYNAME)) {
+                displayName = attr.getValue();
+            } else if (attr.getName().equals(ATTRIBUTE_DESCRIPTOR)) {
+                descriptor = attr.getValue();
+            }
+        }
+
+        Device device = new Device(name, displayName);
+        if (descriptor != null) {
+            device.setDeviceDescriptor(descriptor);
+        }
+
+        NodeList elemList = elem.getElementsByTagName(ScreenDescDeserializer.ELEMENT_SCREENDESC);
+        if (elemList.getLength() > 0) {
+            ScreenDesc screenDesc = ScreenDescDeserializer.parseElement((Element) elemList.item(0));
+            device.assign(screenDesc);
+        }
+
+        return device;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/DeviceFileReader.java b/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/DeviceFileReader.java
new file mode 100644 (file)
index 0000000..ae7d117
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.core.configuration.device;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.tizen.uibuilder.tizenfile.TizenFileFormatter;
+import org.tizen.uibuilder.tizenfile.TizenFileReader;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+
+public class DeviceFileReader extends TizenFileReader {
+    public static List<Device> read(String filePath) throws IOException, SAXException, ParserConfigurationException {
+        Document doc = readFile(filePath);
+        List<Device> devices = parseDevice(doc);
+        return devices;
+    }
+
+    private static List<Device> parseDevice(Document doc) {
+        if (doc == null) {
+            return null;
+        }
+
+        Element root = doc.getDocumentElement();
+
+        TizenFileFormatter fileReader = new TizenFileFormatter(root);
+        if (!fileReader.isValidate()) {
+            return null;
+        }
+        if (!fileReader.getType().equals("tizen-device")) {
+            return null;
+        }
+        if (!fileReader.getVersion().equals("1")) {
+            return null;
+        }
+
+        List<Device> devices = new ArrayList<Device>();
+
+        NodeList elemList = root.getElementsByTagName("devices");
+        for (int i = 0; i < elemList.getLength(); i++) {
+            devices.addAll(parseDevice((Element) elemList.item(i)));
+        }
+
+        return devices;
+    }
+
+    private static List<Device> parseDevice(Element elem) {
+        List<Device> devices = new ArrayList<Device>();
+        NodeList elemList = elem.getChildNodes();
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Node childNode = elemList.item(i);
+            if (childNode instanceof Element) {
+                if (childNode.getNodeName().equals("device")) {
+                    devices.add(DeviceDeserializer.parseElement((Element) childNode));
+                }
+            }
+        }
+
+        return devices;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/DeviceManager.java b/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/DeviceManager.java
new file mode 100644 (file)
index 0000000..1dee45b
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.core.configuration.device;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.net.URI;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.xml.sax.SAXException;
+
+
+public final class DeviceManager {
+    private Map<String, Device> devices = new LinkedHashMap<String, Device>();
+
+    public Device find(String name) {
+        return devices.get(name);
+    }
+
+    public Collection<Device> getDevices() {
+        return devices.values();
+    }
+
+    public void load(URI uri) throws IOException, ParserConfigurationException, SAXException {
+        File dir = new File(uri);
+        File[] files = dir.listFiles(new FileFilter() {
+            public boolean accept(final File pathname) {
+                return pathname.getName().endsWith(".xml");
+            }
+        });
+
+        if (files != null) {
+            for (File file : files) {
+                load(file.getPath());
+            }
+        }
+    }
+
+    private void load(String path) throws IOException, ParserConfigurationException, SAXException {
+        List<Device> deviceList = DeviceFileReader.read(path);
+        if (deviceList == null) {
+            throw new IOException();
+        }
+        for (Device device : deviceList) {
+            devices.put(device.getName(), device);
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/ScreenDesc.java b/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/ScreenDesc.java
new file mode 100644 (file)
index 0000000..75e3344
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.core.configuration.device;
+
+public class ScreenDesc {
+
+    public static int INVALID_VALUE = -9999;
+
+    public enum DPI {
+        INVALID_VALUE, ALL, LDPI, MDPI, HDPI, XHDPI, XXHDPI;
+    }
+
+    // Media Feature
+    private int width;
+    private int height;
+    private String displaySize;
+    private DPI dpi;
+    private String aspectRatio;
+
+    public ScreenDesc() {
+        clearAll();
+    }
+
+    public ScreenDesc(ScreenDesc screenDesc) {
+        assign(screenDesc);
+    }
+
+    public void clearAll() {
+        width = INVALID_VALUE;
+        height = INVALID_VALUE;
+        displaySize = null;
+        dpi = DPI.INVALID_VALUE;
+        aspectRatio = null;
+    }
+
+    public void assign(ScreenDesc screenDesc) {
+        width = screenDesc.width;
+        height = screenDesc.height;
+        displaySize = screenDesc.displaySize;
+        dpi = screenDesc.dpi;
+        aspectRatio = screenDesc.aspectRatio;
+    }
+
+    public int getWidth() {
+        return width;
+    }
+
+    public void setWidth(int width) {
+        this.width = width;
+    }
+
+    public int getHeight() {
+        return height;
+    }
+
+    public void setHeight(int height) {
+        this.height = height;
+    }
+
+    public String getDisplaySize() {
+        return displaySize;
+    }
+
+    public void setDisplaySize(String displaySize) {
+        this.displaySize = displaySize;
+    }
+
+    public DPI getDPI() {
+        return dpi;
+    }
+
+    public void setDpi(DPI dpi) {
+        this.dpi = dpi;
+    }
+
+    public void setDPI(String dpiStr) {
+        if (dpiStr.equalsIgnoreCase("LDPI")) {
+            dpi = DPI.LDPI;
+        } else if (dpiStr.equalsIgnoreCase("MDPI")) {
+            dpi = DPI.MDPI;
+        } else if (dpiStr.equalsIgnoreCase("HDPI")) {
+            dpi = DPI.HDPI;
+        } else if (dpiStr.equalsIgnoreCase("XHDPI")) {
+            dpi = DPI.XHDPI;
+        } else if (dpiStr.equalsIgnoreCase("XXHDPI")) {
+            dpi = DPI.XXHDPI;
+        }
+    }
+
+    public String getAspectRatio() {
+        return aspectRatio;
+    }
+
+    public void setAspectRatio(String aspectRatio) {
+        this.aspectRatio = aspectRatio;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/ScreenDescDeserializer.java b/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configuration/device/ScreenDescDeserializer.java
new file mode 100644 (file)
index 0000000..7181433
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.core.configuration.device;
+
+import org.tizen.efluibuilder.core.configurator.ConfiguratorConstants;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+
+public class ScreenDescDeserializer {
+    public static final String ELEMENT_SCREENDESC = "screenDesc"; //$NON-NLS-1$
+
+    public static final String ATTRIBUTE_WIDTH = "width"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_HEIGHT = "height"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_DISPLAYSIZE = "dispalySize"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_DPI = "DPI"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_ASPECTRATIO = "aspectRatio"; //$NON-NLS-1$
+
+    /**
+     * Parses an element.
+     * 
+     * @param pageFileData
+     *            a {@link PageFileData}
+     * @param elem
+     *            an element
+     * @param partFactory
+     *            a {@link PartFactory}
+     * @param selectors
+     *            a List containing {@link StyleRuleSet}
+     * @return {@link Part}
+     */
+    public static ScreenDesc parseElement(Element elem) {
+        if (elem == null) {
+            throw new IllegalArgumentException();
+        }
+
+        if (!elem.getNodeName().equals(ScreenDescDeserializer.ELEMENT_SCREENDESC)) {
+            throw new IllegalArgumentException();
+        }
+
+        ScreenDesc screenDesc = new ScreenDesc();
+        NodeList elemList = elem.getElementsByTagName(ConfiguratorConstants.ELEMENT_PROPERTY);
+        int len = elemList.getLength();
+        for (int i = 0; i < len; i++) {
+            Element childElem = (Element) elemList.item(i);
+
+            String name = childElem.getAttribute(ConfiguratorConstants.ATTRIBUTE_NAME);
+            if (name.equals(ScreenDescDeserializer.ATTRIBUTE_WIDTH)) {
+                screenDesc.setWidth(Integer.valueOf(childElem.getAttribute(ConfiguratorConstants.ATTRIBUTE_VALUE)));
+            } else if (name.equals(ScreenDescDeserializer.ATTRIBUTE_HEIGHT)) {
+                screenDesc.setHeight(Integer.valueOf(childElem.getAttribute(ConfiguratorConstants.ATTRIBUTE_VALUE)));
+            } else if (name.equals(ScreenDescDeserializer.ATTRIBUTE_DISPLAYSIZE)) {
+                screenDesc.setDisplaySize(childElem.getAttribute(ConfiguratorConstants.ATTRIBUTE_VALUE));
+            } else if (name.equals(ScreenDescDeserializer.ATTRIBUTE_DPI)) {
+                screenDesc.setDPI(childElem.getAttribute(ConfiguratorConstants.ATTRIBUTE_VALUE));
+            } else if (name.equals(ScreenDescDeserializer.ATTRIBUTE_ASPECTRATIO)) {
+                screenDesc.setAspectRatio(childElem.getAttribute(ConfiguratorConstants.ATTRIBUTE_VALUE));
+            }
+        }
+
+        return screenDesc;
+    }
+}
diff --git a/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configurator/Configurator.java b/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configurator/Configurator.java
new file mode 100644 (file)
index 0000000..2bd3ee1
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.core.configurator;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.tizen.efluibuilder.configurator.Activator;
+import org.tizen.efluibuilder.core.configuration.device.DeviceManager;
+import org.tizen.efluibuilder.model.descriptors.DescriptorManager;
+import org.tizen.efluibuilder.utility.ResourceUtil;
+import org.xml.sax.SAXException;
+
+
+public enum Configurator {
+
+    /*
+     * Name( Platform, ......Device path, ......Descriptor path, ......Schema path ),
+     * 
+     * or
+     * 
+     * Name( Platform, ......PlatformConfigurator anotherConfigurator ),
+     */
+
+    // 2.3
+    MOBILE_2_3(ConfiguratorConstants.PLATFORM_MOBILE_2_3,
+            ConfiguratorConstants.PATH_MOBILE_2_3_DEVICE,
+            ConfiguratorConstants.PATH_MOBILE_2_3_DESCRIPTOR,
+            ConfiguratorConstants.PATH_MOBILE_2_3_SCHEMA),
+
+    // 2.3.1
+    MOBILE_2_3_1(ConfiguratorConstants.PLATFORM_MOBILE_2_3_1,
+            MOBILE_2_3), WEARABLE_2_3_1(ConfiguratorConstants.PLATFORM_WEARABLE_2_3_1,
+                    ConfiguratorConstants.PATH_WEARABLE_2_3_1_DEVICE,
+                    ConfiguratorConstants.PATH_WEARABLE_2_3_1_DESCRIPTOR,
+                    ConfiguratorConstants.PATH_WEARABLE_2_3_1_SCHEMA), WEARABLE_CIRCLE_2_3_1(ConfiguratorConstants.PLATFORM_WEARABLE_CIRCLE_2_3_1,
+                            ConfiguratorConstants.PATH_WEARABLE_CIRCLE_2_3_1_DEVICE,
+                            ConfiguratorConstants.PATH_WEARABLE_CIRCLE_2_3_1_DESCRIPTOR,
+                            ConfiguratorConstants.PATH_WEARABLE_CIRCLE_2_3_1_SCHEMA),
+
+    // 2.3.2
+    WEARABLE_CIRCLE_2_3_2(ConfiguratorConstants.PLATFORM_WEARABLE_CIRCLE_2_3_2,
+            WEARABLE_CIRCLE_2_3_1),
+
+    // 2.4
+    MOBILE_2_4(ConfiguratorConstants.PLATFORM_MOBILE_2_4,
+            ConfiguratorConstants.PATH_MOBILE_2_3_DEVICE,
+            ConfiguratorConstants.PATH_MOBILE_2_4_DESCRIPTOR,
+            ConfiguratorConstants.PATH_MOBILE_2_4_SCHEMA),
+
+    // 3.0
+    MOBILE_3_0(ConfiguratorConstants.PLATFORM_MOBILE_3_0,
+            ConfiguratorConstants.PATH_MOBILE_2_3_DEVICE,
+            ConfiguratorConstants.PATH_MOBILE_3_0_DESCRIPTOR,
+            ConfiguratorConstants.PATH_MOBILE_3_0_SCHEMA), WEARABLE_CIRCLE_3_0(ConfiguratorConstants.PLATFORM_WEARABLE_CIRCLE_3_0,
+                    ConfiguratorConstants.PATH_WEARABLE_CIRCLE_3_0_DEVICE,
+                    ConfiguratorConstants.PATH_WEARABLE_CIRCLE_3_0_DESCRIPTOR,
+                    ConfiguratorConstants.PATH_WEARABLE_CIRCLE_3_0_SCHEMA), TV_3_0(ConfiguratorConstants.PLATFORM_TV_3_0,
+                            ConfiguratorConstants.PATH_TV_3_0_DEVICE,
+                            ConfiguratorConstants.PATH_TV_3_0_DESCRIPTOR,
+                            ConfiguratorConstants.PATH_TV_3_0_SCHEMA),
+
+    // 4.0
+    MOBILE_4_0(ConfiguratorConstants.PLATFORM_MOBILE_4_0,
+            ConfiguratorConstants.PATH_MOBILE_2_3_DEVICE,
+            ConfiguratorConstants.PATH_MOBILE_3_0_DESCRIPTOR,
+            ConfiguratorConstants.PATH_MOBILE_3_0_SCHEMA), WEARABLE_CIRCLE_4_0(ConfiguratorConstants.PLATFORM_WEARABLE_CIRCLE_4_0,
+                    WEARABLE_CIRCLE_3_0),
+                    ;
+
+    // attributes
+    private String platform; // It MUST be unique
+    private String devicePath;
+    private String descriptorPath;
+    private String schemaPath;
+
+    // internal instances
+    private static Map<String, DescriptorManager> descriptorMgr = new HashMap<String, DescriptorManager>();
+    private static Map<String, DeviceManager> deviceMgr = new HashMap<String, DeviceManager>();
+
+    /**
+     * Constructor
+     */
+    private Configurator(String platform, String devicePath, String descriptorPath, String schemaPath) {
+        this.platform = platform;
+        this.devicePath = devicePath;
+        this.descriptorPath = descriptorPath;
+        this.schemaPath = schemaPath;
+    }
+
+    /**
+     * Constructor with another platform
+     */
+    private Configurator(String platform, Configurator configurator) {
+        this.platform = platform;
+        this.devicePath = configurator.getDevicePath();
+        this.descriptorPath = configurator.getDescriptorPath();
+        this.schemaPath = configurator.getLayoutSchemaLocation();
+    }
+
+    public String getPlatform() {
+        return this.platform;
+    }
+
+    public static Configurator of(String platform) {
+        for (Configurator configurator : Configurator.values()) {
+            if (configurator.getPlatform().equals(platform)) {
+                return configurator;
+            }
+        }
+
+        throw new IllegalArgumentException(platform + " platform is not supported."); //$NON-NLS-1$
+    }
+
+    public String getDescriptorPath() {
+        return this.descriptorPath;
+    }
+
+    private DescriptorManager createDescriptorManager() {
+        DescriptorManager manager = new DescriptorManager();
+        try {
+            manager.load(this.descriptorPath);
+        } catch (IOException e) {
+            throw new ConfiguratorException(e.getMessage());
+        } catch (ParserConfigurationException e) {
+            throw new ConfiguratorException(e.getMessage());
+        } catch (SAXException e) {
+            throw new ConfiguratorException(e.getMessage());
+        }
+
+        return manager;
+    }
+
+    public synchronized DescriptorManager getDescriptorManager() {
+        if (!descriptorMgr.containsKey(this.descriptorPath)) {
+            descriptorMgr.put(this.descriptorPath, createDescriptorManager());
+        }
+
+        return descriptorMgr.get(this.descriptorPath);
+    }
+
+    public String getDevicePath() {
+        return this.devicePath;
+    }
+
+    private DeviceManager createDeviceManager() {
+        DeviceManager manager = new DeviceManager();
+        URI uri = ResourceUtil.getURI(Activator.PLUGIN_ID, this.devicePath);
+        try {
+            manager.load(uri);
+        } catch (IOException e) {
+            throw new ConfiguratorException(e.getMessage());
+        } catch (ParserConfigurationException e) {
+            throw new ConfiguratorException(e.getMessage());
+        } catch (SAXException e) {
+            throw new ConfiguratorException(e.getMessage());
+        }
+
+        return manager;
+    }
+
+    public synchronized DeviceManager getDeviceManager() {
+        if (!deviceMgr.containsKey(this.devicePath)) {
+            deviceMgr.put(this.devicePath, createDeviceManager());
+        }
+
+        return deviceMgr.get(this.devicePath);
+    }
+
+    public String getLayoutSchemaLocation() {
+        return this.schemaPath;
+    }
+}
diff --git a/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configurator/ConfiguratorConstants.java b/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configurator/ConfiguratorConstants.java
new file mode 100644 (file)
index 0000000..d4b8518
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.core.configurator;
+
+public final class ConfiguratorConstants {
+    // Property
+    public static final String ELEMENT_PROPERTY = "property"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
+
+    public static final String MOBILE_2_3_DESCRIPTOR = "mobile-2.3_descriptor";
+    public static final String MOBILE_2_3_DEVICE = "mobile-2.3_device";
+
+    public static final String WEARABLE_2_3_1_DESCRIPTOR = "wearable-2.3.1_descriptor";
+    public static final String WEARABLE_2_3_1_DEVICE = "wearable-2.3.1_device";
+
+    public static final String WEARABLE_CIRCLE_2_3_1_DESCRIPTOR = "wearable-circle-2.3.1_descriptor";
+    public static final String WEARABLE_CIRCLE_2_3_1_DEVICE = "wearable-circle-2.3.1_device";
+
+    public static final String MOBILE_2_4_DESCRIPTOR = "mobile-2.4_descriptor";
+    public static final String MOBILE_2_4_DEVICE = "mobile-2.4_device";
+
+    public static final String MOBILE_3_0_DESCRIPTOR = "mobile-3.0_descriptor";
+    public static final String MOBILE_3_0_DEVICE = "mobile-3.0_device";
+
+    public static final String WEARABLE_CIRCLE_3_0_DESCRIPTOR = "wearable-circle-3.0_descriptor";
+    public static final String WEARABLE_CIRCLE_3_0_DEVICE = "wearable-circle-3.0_device";
+
+    public static final String TV_3_0_DESCRIPTOR = "tv-3.0_descriptor";
+    public static final String TV_3_0_DEVICE = "tv-3.0_device";
+
+    public static final String PATH_MOBILE_2_3_DESCRIPTOR = "res/mobile-2.3";
+    public static final String PATH_MOBILE_2_3_DEVICE = "res/devices/mobile-2.3";
+    public static final String PATH_MOBILE_2_3_SCHEMA = "res/xsd/mobile_2.3";
+
+    public static final String PATH_WEARABLE_2_3_1_DESCRIPTOR = "res/wearable-2.3.1";
+    public static final String PATH_WEARABLE_2_3_1_DEVICE = "res/devices/wearable-2.3.1";
+    public static final String PATH_WEARABLE_2_3_1_SCHEMA = "res/xsd/wearable_2.3.1";
+
+    public static final String PATH_WEARABLE_CIRCLE_2_3_1_DESCRIPTOR = "res/wearable-circle-2.3.1";
+    public static final String PATH_WEARABLE_CIRCLE_2_3_1_DEVICE = "res/devices/wearable-circle-2.3.1";
+    public static final String PATH_WEARABLE_CIRCLE_2_3_1_SCHEMA = "res/xsd/wearable_circle_2.3.1";
+
+    public static final String PATH_MOBILE_2_4_DESCRIPTOR = "res/mobile-2.4";
+    public static final String PATH_MOBILE_2_4_DEVICE = "res/devices/mobile-2.4";
+    public static final String PATH_MOBILE_2_4_SCHEMA = "res/xsd/mobile_2.4";
+
+    public static final String PATH_MOBILE_3_0_DESCRIPTOR = "res/mobile-3.0";
+    public static final String PATH_MOBILE_3_0_DEVICE = "res/devices/mobile-3.0";
+    public static final String PATH_MOBILE_3_0_SCHEMA = "res/xsd/mobile_3.0";
+
+    public static final String PATH_WEARABLE_CIRCLE_3_0_DESCRIPTOR = "res/wearable-circle-3.0";
+    public static final String PATH_WEARABLE_CIRCLE_3_0_DEVICE = "res/devices/wearable-circle-3.0";
+    public static final String PATH_WEARABLE_CIRCLE_3_0_SCHEMA = "res/xsd/wearable_circle_3.0";
+
+    public static final String PATH_TV_3_0_DESCRIPTOR = "res/tv-3.0";
+    public static final String PATH_TV_3_0_DEVICE = "res/devices/tv-3.0";
+    public static final String PATH_TV_3_0_SCHEMA = "res/xsd/tv_3.0";
+
+    // profile
+    public static final String PROFILE_MOBILE = "mobile";
+    public static final String PROFILE_WEARABLE = "wearable";
+    public static final String PROFILE_WEARABLE_CIRCLE = "wearable-circle";
+    public static final String PROFILE_TV = "tv";
+
+    public static final String PLATFORM_MOBILE_2_3 = "mobile-2.3";
+    public static final String PLATFORM_MOBILE_2_3_1 = "mobile-2.3.1";
+    public static final String PLATFORM_WEARABLE_2_3_1 = "wearable-2.3.1";
+    public static final String PLATFORM_WEARABLE_CIRCLE_2_3_1 = "wearable-circle-2.3.1";
+    public static final String PLATFORM_WEARABLE_CIRCLE_2_3_2 = "wearable-circle-2.3.2";
+    public static final String PLATFORM_MOBILE_2_4 = "mobile-2.4";
+
+    public static final String PLATFORM_MOBILE_3_0 = "mobile-3.0";
+    public static final String PLATFORM_WEARABLE_CIRCLE_3_0 = "wearable-circle-3.0";
+    public static final String PLATFORM_TV_3_0 = "tv-3.0";
+
+    public static final String PLATFORM_MOBILE_4_0 = "mobile-4.0";
+    public static final String PLATFORM_WEARABLE_CIRCLE_4_0 = "wearable-circle-4.0";
+
+}
diff --git a/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configurator/ConfiguratorException.java b/org.tizen.efluibuilder.configurator/src/org/tizen/efluibuilder/core/configurator/ConfiguratorException.java
new file mode 100644 (file)
index 0000000..1403817
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.core.configurator;
+
+public final class ConfiguratorException extends RuntimeException {
+
+    private static final long serialVersionUID = -2142696936984570086L;
+
+    /**
+     * Constructs an {@code CodeGeneratorException} with {@code null} as its error detail message.
+     */
+    public ConfiguratorException() {
+        super();
+    }
+
+    /**
+     * Constructs an {@code CodeGeneratorException} with the specified detail message.
+     * 
+     * @param message
+     *            The detail message (which is saved for later retrieval by the
+     *            {@link #getMessage()} method)
+     */
+    public ConfiguratorException(String message) {
+        super(message);
+    }
+
+    public ConfiguratorException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/org.tizen.efluibuilder.converter/.classpath b/org.tizen.efluibuilder.converter/.classpath
new file mode 100644 (file)
index 0000000..eea4e54
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.efluibuilder.converter/.project b/org.tizen.efluibuilder.converter/.project
new file mode 100644 (file)
index 0000000..d64fe34
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.efluibuilder.converter</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.efluibuilder.converter/.settings/org.eclipse.jdt.core.prefs b/org.tizen.efluibuilder.converter/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..79f9de1
--- /dev/null
@@ -0,0 +1,94 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.tizen.efluibuilder.converter/META-INF/MANIFEST.MF b/org.tizen.efluibuilder.converter/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..f40f722
--- /dev/null
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.efluibuilder.converter;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.tizen.efluibuilder.converter.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.ui.ide;bundle-version="3.9.2",
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources;bundle-version="3.8.101",
+ org.tizen.common,
+ org.tizen.efluibuilder.configurator;bundle-version="1.0.0",
+ org.tizen.efluibuilder.common;bundle-version="1.0.0",
+ org.tizen.efluibuilder
+Bundle-ActivationPolicy: lazy
+Export-Package: org.tizen.efluibuilder.converter
+Import-Package: org.tizen.efluibuilder.core.configurator
+Bundle-Vendor: %Bundle-Vendor
diff --git a/org.tizen.efluibuilder.converter/OSGI-INF/l10n/bundle.properties b/org.tizen.efluibuilder.converter/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..cec6303
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for org.tizen.efluibuilder.converter
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen EFL UI Builder Converter
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.converter/build.properties b/org.tizen.efluibuilder.converter/build.properties
new file mode 100644 (file)
index 0000000..d2d8422
--- /dev/null
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+               res/,\
+               META-INF/,\
+               plugin.xml,\
+               OSGI-INF/
+jre.compilation.profile = JavaSE-1.7
+
diff --git a/org.tizen.efluibuilder.converter/plugin.xml b/org.tizen.efluibuilder.converter/plugin.xml
new file mode 100644 (file)
index 0000000..d9b8154
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+  <extension point="org.eclipse.core.contenttype.contentTypes">
+       <content-type base-type="org.eclipse.core.runtime.xml"
+               file-names="layout.tuml"
+               file-extensions="tuml"
+               id="org.tizen.efluibuilder.nuib.converter"
+               name="Native UI Builder Layout Converter"
+               priority="normal">
+               <describer class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
+                               <parameter name="element" value="tizenFile"/>
+                       </describer>
+       </content-type>
+       </extension>
+       <extension point="org.eclipse.ui.editors">
+               <editor
+                       class="org.tizen.efluibuilder.converter.ProjectConverterEditor"
+                       default="true"
+                       icon="res/icons/TIZEN_file_icon.png"
+                       id="org.tizen.efluibuilder.converter.ProjectConverterEditor"
+                       name="NUIB Converter">
+                       <contentTypeBinding contentTypeId="org.tizen.efluibuilder.nuib.converter" />
+               </editor>
+       </extension>
+</plugin>
diff --git a/org.tizen.efluibuilder.converter/res/convert/default/app_main.c b/org.tizen.efluibuilder.converter/res/convert/default/app_main.c
new file mode 100644 (file)
index 0000000..780ebf2
--- /dev/null
@@ -0,0 +1,131 @@
+#include "app_main.h"
+#include "uib_app_manager.h"
+
+/* app event callbacks */
+static bool _on_create_cb(void *user_data);
+static void _on_terminate_cb(void *user_data);
+static void _on_app_control_cb(app_control_h app_control, void *user_data);
+static void _on_resume_cb(void *user_data);
+static void _on_pause_cb(void *user_data);
+static void _on_low_memory_cb(app_event_info_h event_info, void *user_data);
+static void _on_low_battery_cb(app_event_info_h event_info, void *user_data);
+static void _on_device_orientation_cb(app_event_info_h event_info, void *user_data);
+static void _on_language_changed_cb(app_event_info_h event_info, void *user_data);
+static void _on_region_format_changed_cb(app_event_info_h event_info, void *user_data);
+
+void
+nf_hw_back_cb(void* param, Evas_Object * evas_obj, void* event_info) {
+       //TODO : user define code
+       evas_obj = uib_views_get_instance()->get_window_obj()->app_naviframe;
+       elm_naviframe_item_pop(evas_obj);
+}
+
+void
+win_del_request_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       ui_app_exit();
+}
+
+Eina_Bool
+nf_root_it_pop_cb(void* elm_win, Elm_Object_Item *it) {
+       elm_win_lower(elm_win);
+       return EINA_FALSE;
+}
+
+app_data *app_create()
+{
+       return calloc(1, sizeof(app_data));
+}
+
+void app_destroy(app_data *user_data)
+{
+       uib_app_manager_get_instance()->free_all_view_context();
+       free(user_data);
+}
+
+int app_run(app_data *user_data, int argc, char **argv)
+{
+       ui_app_lifecycle_callback_s cbs =
+       {
+               .create = _on_create_cb,
+               .terminate = _on_terminate_cb,
+               .pause = _on_pause_cb,
+               .resume = _on_resume_cb,
+               .app_control = _on_app_control_cb,
+       };
+
+       app_event_handler_h handlers[5] =
+       {NULL, };
+
+       ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, _on_low_battery_cb, user_data);
+       ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, _on_low_memory_cb, user_data);
+       ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, _on_device_orientation_cb, user_data);
+       ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, _on_language_changed_cb, user_data);
+       ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, _on_region_format_changed_cb, user_data);
+
+       return ui_app_main(argc, argv, &cbs, user_data);
+}
+
+void
+app_get_resource(const char *res_file_in, char *res_path_out, int res_path_max)
+{
+       char *res_path = app_get_resource_path();
+       if (res_path) {
+               snprintf(res_path_out, res_path_max, "%s%s", res_path, res_file_in);
+               free(res_path);
+       }
+}
+
+
+static bool _on_create_cb(void *user_data)
+{
+       uib_app_manager_get_instance()->initialize();
+       return true;
+}
+
+static void _on_terminate_cb(void *user_data)
+{
+       uib_views_get_instance()->destroy_window_obj();
+}
+
+static void _on_resume_cb(void *user_data)
+{
+       /* Take necessary actions when application becomes visible. */
+}
+
+static void _on_pause_cb(void *user_data)
+{
+       /* Take necessary actions when application becomes invisible. */
+}
+
+static void _on_app_control_cb(app_control_h app_control, void *user_data)
+{
+       /* Handle the launch request. */
+}
+
+static void _on_low_memory_cb(app_event_info_h event_info, void *user_data)
+{
+       /* Take necessary actions when the system runs low on memory. */
+}
+
+static void _on_low_battery_cb(app_event_info_h event_info, void *user_data)
+{
+       /* Take necessary actions when the battery is low. */
+}
+
+static void _on_device_orientation_cb(app_event_info_h event_info, void *user_data)
+{
+       /* deprecated APIs */
+}
+
+static void _on_language_changed_cb(app_event_info_h event_info, void *user_data)
+{
+       /* Take necessary actions is called when language setting changes. */
+       uib_views_get_instance()->uib_views_current_view_redraw();
+}
+
+static void _on_region_format_changed_cb(app_event_info_h event_info, void *user_data)
+{
+       /* Take necessary actions when region format setting changes. */
+}
+
diff --git a/org.tizen.efluibuilder.converter/res/convert/default/app_main.h b/org.tizen.efluibuilder.converter/res/convert/default/app_main.h
new file mode 100644 (file)
index 0000000..ed3190b
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef __APP_MAIN_H__
+#define __APP_MAIN_H__
+
+#define ENABLE_UIB_DELOG
+
+#include "g_inc_uib.h"
+#include "uib_views.h"
+
+/**
+ * @brief Forward declaration of model
+ */
+typedef struct {
+
+} app_data;
+
+/**< H/W Back Key Event */
+/**
+ * @brief Add (register) a callback function for H/W Back Key Event to a given evas object.
+ * @param[in]   pv_param     The void pointer to be passed to this func.
+ * @param[in]   p_evas_obj    evas object (naviframe)
+ */
+void
+nf_hw_back_cb(void* param, Evas_Object * evas_obj, void* event_info);
+
+void
+win_del_request_cb(void *data, Evas_Object *obj, void *event_info);
+
+Eina_Bool
+nf_root_it_pop_cb(void* elm_win, Elm_Object_Item *it);
+
+/**
+ * @brief Create application instance
+ * @return Application instance on success, otherwise NULL
+ */
+app_data *app_create();
+
+/**
+ * @brief Destroy application instance
+ * @param[in]   app     Application instance
+ */
+void app_destroy(app_data *app);
+
+/**
+ * @brief Run Tizen application
+ * @param[in]   app     Application instance
+ * @param[in]   argc    argc paremeter received in main
+ * @param[in]   argv    argv parameter received in main
+ */
+int app_run(app_data *app, int argc, char **argv);
+
+void app_get_resource(const char *edj_file_in, char *edj_path_out, int edj_path_max);
+
+#endif /* __APP_MAIN_H__ */
+
diff --git a/org.tizen.efluibuilder.converter/res/icons/TIZEN_file_icon.png b/org.tizen.efluibuilder.converter/res/icons/TIZEN_file_icon.png
new file mode 100644 (file)
index 0000000..4d67c98
Binary files /dev/null and b/org.tizen.efluibuilder.converter/res/icons/TIZEN_file_icon.png differ
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/Activator.java b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/Activator.java
new file mode 100644 (file)
index 0000000..c5a639f
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.converter;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.tizen.efluibuilder.converter"; //$NON-NLS-1$
+
+    // The shared instance
+    private static Activator plugin;
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     * 
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/IProjectConverter.java b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/IProjectConverter.java
new file mode 100644 (file)
index 0000000..7cfe4c2
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.converter;
+
+public interface IProjectConverter {
+    /**
+     * Convert project
+     * 
+     * @throws ProjectConverterException
+     */
+    public void convert() throws ProjectConverterException;
+}
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/Messages.java b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/Messages.java
new file mode 100644 (file)
index 0000000..fc805d3
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.converter;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public final class Messages {
+    private static final String BUNDLE_NAME = Messages.class.getName();
+
+    // dialog
+    public static final String CONVERT_DIALOG_TITLE = "Native UI Builder Layout Converter";
+    public static final String CONVERT_DIALOG_MESSAGE = "Would you like to convert meta file?";
+    public static final String ERROR_DIALOG_TITLE = "ERROR";
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+
+}
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/Messages.properties b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/Messages.properties
new file mode 100644 (file)
index 0000000..b1a1ad6
--- /dev/null
@@ -0,0 +1,5 @@
+
+# dialog
+CONVERT_DIALOG_TITLE = "Native UI Builder Layout Converter";
+CONVERT_DIALOG_MESSAGE = "Would you like to convert meta file?";
+ERROR_DIALOG_TITLE = "ERROR";
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverter.java b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverter.java
new file mode 100644 (file)
index 0000000..48989c8
--- /dev/null
@@ -0,0 +1,452 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.converter;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.bind.JAXBException;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.xpath.XPathExpressionException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.application.TizenProjectDescription;
+import org.tizen.common.util.ProjectUtil;
+import org.tizen.efluibuilder.converter.table.LayoutConverterTable;
+import org.tizen.efluibuilder.core.configuration.device.Device;
+import org.tizen.efluibuilder.core.configuration.device.DeviceManager;
+import org.tizen.efluibuilder.core.configurator.Configurator;
+import org.tizen.efluibuilder.model.app.loader.PropertiesLoader;
+import org.tizen.efluibuilder.model.app.loader.jaxb.Properties;
+import org.tizen.efluibuilder.model.app.loader.jaxb.ViewModel;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+import org.tizen.efluibuilder.utility.ResourceUtil;
+import org.tizen.efluibuilder.utility.XMLUtil;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+
+public final class ProjectConverter implements IProjectConverter {
+    private static Logger logger = LoggerFactory.getLogger(ProjectConverter.class);
+
+    private static final String APP_MAIN_H_PATH = "inc/app_main.h"; //$NON-NLS-1$
+    private static final String APP_MAIN_C_PATH = "src/app_main.c"; //$NON-NLS-1$
+    private static final String BAK_APP_MAIN_H_FILE = "app_main.h.bak"; //$NON-NLS-1$
+    private static final String BAK_APP_MAIN_C_FILE = "app_main.c.bak"; //$NON-NLS-1$
+    private static final String RES_APP_MAIN_H_PATH = "res/convert/default/app_main.h"; //$NON-NLS-1$
+    private static final String RES_APP_MAIN_C_PATH = "res/convert/default/app_main.c"; //$NON-NLS-1$
+
+    private IProject project = null;
+    private List<ViewModel> viewModelList = new ArrayList<ViewModel>();
+
+    public ProjectConverter(IProject project) {
+        this.project = project;
+    }
+
+    private IProject getProject() {
+        return project;
+    }
+
+    /**
+     * Convert the project
+     * 
+     * @throws ProjectConverterException
+     */
+    public void convert() throws ProjectConverterException {
+        // 1. Verify Preconditions
+        // layout.tuml
+        logger.debug("1. Verify Preconditions");
+        IFile oldLayoutFile = getProject().getFile(ProjectConverterConstants.FILE_OLD_LAYOUT_META);
+        if (!oldLayoutFile.exists()) {
+            throw new ProjectConverterException("layout.tuml file is not exist");
+        }
+
+        // app.xml
+        IFile oldAppFile = getProject().getFile(ProjectConverterConstants.FILE_OLD_APP_META);
+        if (!oldAppFile.exists()) {
+            throw new ProjectConverterException("app.xml file is not exist");
+        }
+
+        // layout.xml
+        IFile newLayoutFile = getProject().getFile(ProjectConverterConstants.FILE_NEW_LAYOUT_META);
+        if (newLayoutFile.exists()) {
+            throw new ProjectConverterException("layout.xml file is already exist");
+        }
+
+        // .app.xml
+        IFile newAppFile = getProject().getFile(ProjectConverterConstants.FILE_NEW_APP_META);
+        if (newAppFile.exists()) {
+            throw new ProjectConverterException(".uproject file is already exist");
+        }
+
+        try {
+            // 2. Load app.xml
+            // currently we need only startup and device information
+            logger.debug("2. Load app.xml");
+            File appFile = oldAppFile.getLocation().toFile();
+            Document document = XMLUtil.load(appFile);
+
+            // get startup
+            String startup = XMLUtil.getValue(document, "/tizenFile/tizenProject/startup/@viewId");
+            // get device
+            String device = XMLUtil.getValue(document, "/tizenFile/tizenProject/device/@name");
+            String shape = ProjectConverterConstants.SHAPE_SQUARE;
+            if (device.contains("CIRCLE")) {
+                shape = ProjectConverterConstants.SHAPE_CIRCLE;
+            }
+
+            // 3. Delete app.xml file
+            logger.debug("3. Delete app.xml");
+            // oldAppFile.move(new Path(FILE_NEW_APP_META), true, true, null);
+            oldAppFile.delete(true, new NullProgressMonitor());
+
+            // 4. Save new .app.xml file
+            logger.debug("4. Save .uproject");
+            Properties properties = new Properties();
+            properties.setShape(shape);
+
+            // 5. Load and Convert layout.tuml
+            logger.debug("5. Load and Convert layout.tuml");
+            // convert old files to new files (app.xml / layout.tuml ====> .app.xml / layout.xml)
+            Document newDocument = convert(oldLayoutFile);
+            // create new layout.xml file
+            // Is it enough to replace .tuml -> .xml ??
+            properties.setViews(viewModelList);
+
+            PropertiesLoader loader = new PropertiesLoader();
+            loader.data = properties;
+            loader.save(newAppFile);
+
+            String path = newLayoutFile.getLocation().toString();
+            String newPath = path.replace(ProjectConverterConstants.TUML, ProjectConverterConstants.XML);
+
+            // 6. Add common configuration device for mscreen as each profile
+            logger.debug("6. Add common configuration for mscreen ");
+            Node configuration = XMLUtil.getNode(newDocument, "document/mscreen/configuration[1]/@device");
+            configuration.setNodeValue(getDeviceName(shape));
+
+            // 7. Add startup info to new document
+            logger.debug("7. Add startup info to new document ");
+            Node node = XMLUtil.getNode(newDocument, "document/views/@startup");
+            node.setNodeValue(startup);
+
+            // 8. Save layout.xml
+            logger.debug("8. Save layout.xml");
+            XMLUtil.save(newDocument, new File(newPath));
+
+            // 9. Move layout.tuml to .layout.tuml
+            logger.debug("9. Move layout.tuml to .layout.tuml");
+            oldLayoutFile.move(new Path(ProjectConverterConstants.FILE_HIDDEN_LAYOUT_META), true, true, null);
+
+            // 10. Backup
+            logger.debug("10. Backup");
+            // backup - app_main.c, app_main.h
+            convertAppMainFiles();
+        } catch (XPathExpressionException e) {
+            throw new ProjectConverterException("Project convert failed : " + e.getMessage());
+        } catch (IOException e) {
+            throw new ProjectConverterException("Project convert failed : " + e.getMessage());
+        } catch (TransformerException e) {
+            throw new ProjectConverterException("Project convert failed : " + e.getMessage());
+        } catch (ParserConfigurationException e) {
+            throw new ProjectConverterException("Project convert failed : " + e.getMessage());
+        } catch (SAXException e) {
+            throw new ProjectConverterException("Project convert failed : " + e.getMessage());
+        } catch (CoreException e) {
+            throw new ProjectConverterException("Project convert failed : " + e.getMessage());
+        } catch (JAXBException e) {
+            throw new ProjectConverterException("Project convert failed : " + e.getMessage());
+        } finally {
+            try {
+                newAppFile.refreshLocal(IResource.DEPTH_ONE, new NullProgressMonitor());
+                newLayoutFile.refreshLocal(IResource.DEPTH_ONE, new NullProgressMonitor());
+            } catch (Exception e) {
+                throw new ProjectConverterException("Project convert failed : " + e.getMessage());
+            }
+        }
+    }
+
+    private String getDeviceName(String shape) {
+        String platform = null;
+        TizenProjectDescription tizenProjectDescription = ProjectUtil.getTizenProjectDescription(project);
+        if (shape.equals(ProjectConverterConstants.SHAPE_SQUARE)) {
+            platform = tizenProjectDescription.getPlatformName();
+        } else if (shape.equals(ProjectConverterConstants.SHAPE_CIRCLE)) {
+            String profile = "wearable-circle";
+            platform = profile.concat("-").concat(tizenProjectDescription.getVersion());
+        }
+
+        Configurator configurator = Configurator.of(platform);
+        DeviceManager deviceManager = configurator.getDeviceManager();
+        Collection<Device> devices = deviceManager.getDevices();
+        Iterator<Device> iterator = devices.iterator();
+        Device deviceSpec = iterator.next();
+
+        return deviceSpec.getName();
+    }
+
+    private void convertAppMainFiles() throws MalformedURLException, IOException, CoreException {
+        // ==== step 0 ====//
+        // check backup file
+
+        IFile bakAppMainHFile = getProject().getFile(APP_MAIN_H_PATH + ".bak");
+        IFile bakAppMainCFile = getProject().getFile(APP_MAIN_C_PATH + ".bak");
+        // check converting app_main files
+        if (bakAppMainHFile.exists() && bakAppMainCFile.exists()) {
+            return;
+        }
+
+        // ==== step 2 ====//
+        // load - current files
+        IFile currentAppMainHFile = getProject().getFile(APP_MAIN_H_PATH);
+        IFile currentAppMainCFile = getProject().getFile(APP_MAIN_C_PATH);
+
+        String appMainHFullPath = currentAppMainHFile.getLocation().toOSString();
+        String appMainCFullPath = currentAppMainCFile.getLocation().toOSString();
+
+        // backup - current files
+        String resRealPath;
+        if (!bakAppMainHFile.exists() && currentAppMainHFile.exists()) {
+            currentAppMainHFile.move(new Path(BAK_APP_MAIN_H_FILE), true, true, null);
+            currentAppMainHFile.refreshLocal(IResource.DEPTH_ONE, null);
+
+            // copy from res file to project file
+            resRealPath = ResourceUtil.getURI(Activator.PLUGIN_ID, RES_APP_MAIN_H_PATH).getPath();
+            resRealPath = PlatformUtil.getCorrectedOSFullPath(resRealPath);
+            Files.copy(Paths.get(resRealPath), Paths.get(appMainHFullPath));
+
+            // refresh - new file
+            IFile newAppMainHFile = getProject().getFile(APP_MAIN_H_PATH);
+            newAppMainHFile.refreshLocal(IResource.DEPTH_ONE, null);
+        }
+        if (!bakAppMainCFile.exists() && currentAppMainCFile.exists()) {
+            currentAppMainCFile.move(new Path(BAK_APP_MAIN_C_FILE), true, true, null);
+            currentAppMainCFile.refreshLocal(IResource.DEPTH_ONE, null);
+
+            // copy from res file to project file
+            resRealPath = ResourceUtil.getURI(Activator.PLUGIN_ID, RES_APP_MAIN_C_PATH).getPath();
+            resRealPath = PlatformUtil.getCorrectedOSFullPath(resRealPath);
+            Files.copy(Paths.get(resRealPath), Paths.get(appMainCFullPath));
+
+            // refresh - new file
+            IFile newAppMainCFile = getProject().getFile(APP_MAIN_C_PATH);
+            newAppMainCFile.refreshLocal(IResource.DEPTH_ONE, null);
+        }
+    }
+
+    private Document convert(IFile oldLayoutFile)
+            throws XPathExpressionException, MalformedURLException, ParserConfigurationException, SAXException, IOException {
+        String path = oldLayoutFile.getLocation().toString();
+        File file = new File(path);
+        Document document = XMLUtil.clean(XMLUtil.load(file));
+        Element oldRootElement = document.getDocumentElement();
+
+        // create new root element
+        Element newRootElement = document.createElement(ProjectConverterConstants.DOCUMENT);
+        // create mscreen element
+        Element mscreen = document.createElement(ProjectConverterConstants.MSCREEN);
+        // create configuration element
+        Element configuration = document.createElement(ProjectConverterConstants.CONFIGURATION);
+        configuration.setAttribute(ProjectConverterConstants.ID, "config1");
+        configuration.setAttribute(ProjectConverterConstants.DEVICE, "");
+        configuration.setAttribute(ProjectConverterConstants.NAME, "common");
+        configuration.setAttribute(ProjectConverterConstants.ORIENTATION, "portrait");
+        configuration.setAttribute(ProjectConverterConstants.TYPE, "common");
+        mscreen.appendChild(configuration);
+        newRootElement.appendChild(mscreen);
+
+        // create views element
+        Element views = document.createElement(ProjectConverterConstants.VIEWS);
+        views.setAttribute(ProjectConverterConstants.STARTUP, "");
+        newRootElement.appendChild(views);
+
+        NodeList documentNodes = document.getElementsByTagName(ProjectConverterConstants.TIZEN_DOC);
+        if (documentNodes == null) {
+            return null;
+        }
+        Node documentNode = documentNodes.item(0);
+        Element documentElement = (Element) documentNode;
+        if (documentElement == null) {
+            return null;
+        }
+
+        List<Node> newNodeList = new ArrayList<Node>();
+        NodeList nodeList = documentElement.getChildNodes();
+        for (int i = 0; i < nodeList.getLength(); i++) {
+            Node node = nodeList.item(i);
+            if (!(node instanceof Element)) {
+                continue;
+            }
+            // get view id
+            Element viewElement = (Element) node;
+            Attr attributeNode = viewElement.getAttributeNode(ProjectConverterConstants.ID);
+            String viewId = null;
+            if (attributeNode != null) {
+                viewId = attributeNode.getValue();
+                addToViewModelList(viewElement, viewId);
+            }
+
+            convertBody(document, documentElement, (Element) node, viewId);
+            newNodeList.add(node);
+        }
+
+        // append to new Root element
+        for (int i = 0; i < newNodeList.size(); i++) {
+            views.appendChild(newNodeList.get(i));
+        }
+
+        // change root element
+        document.replaceChild(newRootElement, oldRootElement);
+        return document;
+    }
+
+    private void addToViewModelList(Element viewElement, String viewId) {
+        ViewModel viewModel = new ViewModel();
+        viewModel.setId(viewId);
+        Attr attributeNode = viewElement.getAttributeNode(ProjectConverterConstants.LOCATIONX);
+        if (attributeNode != null) {
+            viewModel.setLocationX(Integer.parseInt(attributeNode.getValue()));
+        }
+        attributeNode = viewElement.getAttributeNode(ProjectConverterConstants.LOCATIONY);
+        if (attributeNode != null) {
+            viewModel.setLocationY(Integer.parseInt(attributeNode.getValue()));
+        }
+        viewModelList.add(viewModel);
+    }
+
+    private static void convertBody(Document document, Element parent, Element current, String viewId) {
+        String elmName = current.getNodeName();
+        if (LayoutConverterTable.isRemovedElement(elmName)) {
+            // remove element if current element is on the removed element list
+            parent.removeChild(current);
+            return;
+        }
+
+        if (elmName.equals(ProjectConverterConstants.EVENT)) {
+            convertEvent(current, viewId);
+        } else {
+            elmName = LayoutConverterTable.convertElement(elmName);
+            // convert element name
+            document.renameNode(current, null, elmName);
+        }
+
+        NamedNodeMap attrList = current.getAttributes();
+        List<String> attrNames = new ArrayList<String>();
+        for (int i = 0; i < attrList.getLength(); i++) {
+            Attr attr = (Attr) attrList.item(i);
+            attrNames.add(attr.getName());
+        }
+
+        for (String attrName : attrNames) {
+            Attr attr = current.getAttributeNode(attrName);
+            if (attr.getValue().isEmpty()) {
+                current.removeAttributeNode(attr);
+                continue;
+            }
+
+            if (LayoutConverterTable.isRemovedAttribute(parent.getNodeName(), elmName, attr.getName())) {
+                current.removeAttributeNode(attr);
+                continue;
+            }
+
+            String convertedAttribute = LayoutConverterTable.convertAttribute(parent.getNodeName(), elmName, attr.getName());
+            String convertedValue = LayoutConverterTable.convertValue(parent.getNodeName(), elmName, convertedAttribute, attr.getValue());
+            current.removeAttributeNode(attr);
+            current.setAttribute(convertedAttribute, convertedValue);
+        }
+
+        NodeList nodeList = current.getChildNodes();
+        for (int j = 0; j < nodeList.getLength(); j++) {
+            Node child = nodeList.item(j);
+            if (!(child instanceof Element)) {
+                continue;
+            }
+            convertBody(document, current, (Element) child, viewId);
+        }
+    }
+
+    private static void convertEvent(Element current, String viewId) {
+        NamedNodeMap attrList = current.getAttributes();
+        List<String> attrNames = new ArrayList<String>();
+        for (int i = 0; i < attrList.getLength(); i++) {
+            Attr attr = (Attr) attrList.item(i);
+            attrNames.add(attr.getName());
+        }
+
+        for (String attrName : attrNames) {
+            Attr attr = current.getAttributeNode(attrName);
+            String name = attr.getName();
+            if (name.startsWith(ProjectConverterConstants.ON)) {
+                String value = attr.getValue();
+                current.setAttribute(ProjectConverterConstants.SIGNAL, convertEventSignal(name.replace(ProjectConverterConstants.ON, "")));
+                current.setAttribute(ProjectConverterConstants.FUNCTION_NAME, viewId + "_" + value);
+                current.removeAttributeNode(attr);
+            } else if (name.equals(ProjectConverterConstants.CONNECTION_WRAPPER)) {
+                String value = attr.getValue();
+                value = value.replace(ProjectConverterConstants.CONNECTION, ProjectConverterConstants.CONNECTION + viewId + "_");
+                attr.setValue(value);
+            }
+        }
+    }
+
+    private static String convertEventSignal(String signal) {
+        if (signal == null) {
+            return null;
+        }
+        if (!signal.contains("_")) {
+            return signal;
+        }
+        String[] split = signal.split("_");
+        StringBuffer result = new StringBuffer();
+        for (int i = 0; i < split.length; i++) {
+            result.append(split[i]);
+            if (i != split.length - 1) {
+                result.append(",");
+            }
+        }
+
+        return result.toString();
+    }
+
+}
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverterConstants.java b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverterConstants.java
new file mode 100644 (file)
index 0000000..65e4dec
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.converter;
+
+public final class ProjectConverterConstants {
+    public static final String FILE_OLD_APP_META = "app.xml"; //$NON-NLS-1$
+    public static final String FILE_NEW_APP_META = ".uproject"; //$NON-NLS-1$
+
+    public static final String FILE_OLD_LAYOUT_META = "layout/layout.tuml"; //$NON-NLS-1$
+    public static final String FILE_NEW_LAYOUT_META = "layout/layout.xml"; //$NON-NLS-1$
+    public static final String FILE_HIDDEN_LAYOUT_META = ".layout.tuml"; //$NON-NLS-1$
+
+    public static final String DOCUMENT = "document"; //$NON-NLS-1$
+    public static final String MSCREEN = "mscreen"; //$NON-NLS-1$
+    public static final String CONFIGURATION = "configuration"; //$NON-NLS-1$
+    public static final String DEVICE = "device"; //$NON-NLS-1$
+    public static final String NAME = "name"; //$NON-NLS-1$
+    public static final String ORIENTATION = "orientation"; //$NON-NLS-1$
+    public static final String TYPE = "type"; //$NON-NLS-1$
+
+    public static final String VIEWS = "views"; //$NON-NLS-1$
+    public static final String STARTUP = "startup"; //$NON-NLS-1$
+    public static final String TIZEN_DOC = "tizen.doc"; //$NON-NLS-1$
+    public static final String ID = "id"; //$NON-NLS-1$
+    public static final String LOCATIONX = "location-x";
+    public static final String LOCATIONY = "location-y";
+    public static final String EVENT = "event"; //$NON-NLS-1$
+    public static final String ON = "on"; //$NON-NLS-1$
+    public static final String SIGNAL = "signal"; //$NON-NLS-1$
+    public static final String FUNCTION_NAME = "function_name"; //$NON-NLS-1$
+    public static final String CONNECTION_WRAPPER = "connection_wrapper"; //$NON-NLS-1$
+    public static final String CONNECTION = "connection_"; //$NON-NLS-1$
+    public static final String TUML = ".tuml"; //$NON-NLS-1$
+    public static final String XML = ".xml"; //$NON-NLS-1$
+
+    public static final String SHAPE_SQUARE = "square"; //$NON-NLS-1$
+    public static final String SHAPE_CIRCLE = "circle"; //$NON-NLS-1$
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverterEditor.java b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverterEditor.java
new file mode 100644 (file)
index 0000000..000abbe
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.converter;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.part.FileEditorInput;
+import org.tizen.efluibuilder.utility.IDEUtil;
+
+
+public final class ProjectConverterEditor extends EditorPart {
+    public ProjectConverterEditor() {
+        super();
+    }
+
+    @Override
+    public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+        setSite(site);
+        setInput(input);
+        setPartName(input.getName());
+    }
+
+    @Override
+    public void setInput(IEditorInput input) {
+        super.setInput(input);
+        if (!(input instanceof FileEditorInput)) {
+            throw new IllegalArgumentException();
+        }
+
+        IFile file = ((FileEditorInput) input).getFile();
+        IProject project = file.getProject();
+        boolean convert = MessageDialog.openConfirm(Display.getDefault().getActiveShell(), Messages.CONVERT_DIALOG_TITLE, Messages.CONVERT_DIALOG_MESSAGE);
+        if (convert) {
+            try {
+                IProjectConverter converter = new ProjectConverter(project);
+                converter.convert();
+            } catch (ProjectConverterException e) {
+                MessageDialog.openError(Display.getDefault().getActiveShell(), Messages.ERROR_DIALOG_TITLE, e.getMessage());
+                closeEditor();
+                return;
+            }
+            IFile convertedFile = project.getFile(ProjectConverterConstants.FILE_NEW_LAYOUT_META);
+            IDEUtil.open(convertedFile);
+        }
+        closeEditor();
+    }
+
+    @Override
+    public void createPartControl(Composite parent) {
+    }
+
+    @Override
+    public boolean isDirty() {
+        return false;
+    }
+
+    @Override
+    public boolean isSaveAsAllowed() {
+        return false;
+    }
+
+    @Override
+    public void doSave(IProgressMonitor monitor) {
+    }
+
+    @Override
+    public void doSaveAs() {
+    }
+
+    @Override
+    public void setFocus() {
+    }
+
+    private void closeEditor() {
+        Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                getSite().getPage().closeEditor(ProjectConverterEditor.this, false);
+            }
+        });
+    }
+}
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverterException.java b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/ProjectConverterException.java
new file mode 100644 (file)
index 0000000..0a54eee
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.converter;
+
+public final class ProjectConverterException extends Exception {
+
+    private static final long serialVersionUID = -6163340800998223729L;
+
+    /**
+     * Constructs an {@code CodeGeneratorException} with {@code null} as its error detail message.
+     */
+    public ProjectConverterException() {
+        super();
+    }
+
+    /**
+     * Constructs an {@code CodeGeneratorException} with the specified detail message.
+     * 
+     * @param message
+     *            The detail message (which is saved for later retrieval by the
+     *            {@link #getMessage()} method)
+     */
+    public ProjectConverterException(String message) {
+        super(message);
+    }
+
+    public ProjectConverterException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/AttributeTable.java b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/AttributeTable.java
new file mode 100644 (file)
index 0000000..baa5661
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.converter.table;
+
+final class AttributeTable {
+
+    private static final int ELEMENT = 0;
+    private static final int SOURCE_ATTRIBUTE = 1;
+    private static final int TARGET_ATTRIBUTE = 2;
+
+    private static String[][] replaceAttribute = {
+            // element, source_attr, target_attr
+            { "bg", "image-path", "src" }, { "box", "horizontal", "direction" }, { "calendar", "min-year", "min_year" }, { "calendar", "max-year", "max_year" },
+            { "calendar", "select-mode", "select_mode" }, { "entry", "scrollable", "scroll" }, { "entry", "single-line", "single_line" },
+            { "entry", "context-menu-disabled", "context_menu" }, { "entry", "text-format", "file_text_format" }, { "entry", "file-path", "src" },
+            { "gengrid", "select-mode", "select_mode" }, { "gengrid", "horizontal", "direction" }, { "gengrid", "item-size-w", "item_size_w" },
+            { "gengrid", "item-size-h", "item_size_h" }, { "gengrid", "multi-select", "multi_select" }, { "gengrid", "policy-h", "scrollbar_h" },
+            { "gengrid", "policy-v", "scrollbar_v" }, { "genlist", "select-mode", "select_mode" }, { "genlist", "item-style", "item_style" },
+            { "genlist", "policy-h", "scrollbar_h" }, { "genlist", "policy-v", "scrollbar_v" }, { "genlistitem", "label", "text" },
+            { "genlistitem", "sub-label", "sub_text" }, { "grid", "col_count", "vsize_w" }, { "grid", "row_count", "vsize_h" },
+            { "image", "image-path", "src" }, { "image", "aspect-fixed", "aspect_fixed" }, { "image", "fill-outside", "fill_outside" },
+            { "image", "resizable-up", "resizable_up" }, { "image", "resizable-down", "resizable_down" }, { "image", "no-scale", "no_scale" },
+            { "index", "autohide-disabled", "autohide" }, { "index", "indicator-disabled", "indicator" }, { "label", "wrap-width", "wrap_width" },
+            { "label", "wrap-set", "line_wrap" }, { "layout", "file-path", "src" }, { "layout", "group-name", "group" }, { "list", "horizontal", "direction" },
+            { "list", "select-mode", "select_mode" }, { "list", "multi-select", "multi_select" }, { "list", "policy-h", "scrollbar_h" },
+            { "list", "policy-v", "scrollbar_v" }, { "map", "zoom-level", "zoom_level" }, { "map", "region-lon", "region_lon" },
+            { "map", "region-lat", "region_lat" }, { "panes", "horizontal", "direction" }, { "panes", "right-size", "right_size" },
+            { "progressbar", "horizontal", "direction" }, { "progressbar", "span-size", "span_size" }, { "radio", "state-value", "state_value" },
+            { "scroller", "min-limit-w", "content_min_w" }, { "scroller", "min-limit-h", "content_min_h" },
+            { "scroller", "propagate-events", "propagate_events" }, { "scroller", "policy-h", "scrollbar_h" }, { "scroller", "policy-v", "scrollbar_v" },
+            { "slider", "show-indicator", "indicator" }, { "slider", "horizontal", "direction" }, { "slider", "indicator-format", "indicator_format" },
+            { "table", "col_count", "cols" }, { "table", "row_count", "rows" }, { "toolbar", "select-mode", "select_mode" },
+            { "toolbar", "icon-size", "icon_size" }, { "toolbar", "horizontal", "direction" }, { "toolbar", "shrink-mode", "shrink_mode" },
+            { "toolbar", "transverse-expanded", "transverse_expand" }, { "toolbaritem", "image-path", "src" }, { "toolbaritem", "label", "text" },
+            { "view", "location-x", "location_x" }, { "view", "location-y", "location_y" }, { "view", "screen-orientation", "screen_orientation" }, };
+
+    private static String[][] removeAttribute = {
+            // element, removed_attr
+            { "bg", "load-size-height" }, { "bg", "load-size-width" }, { "button", "autorepeat-initial-timeout" }, { "button", "autorepeat-gap-timeout" },
+            { "button", "autorepeat" }, { "calendar", "year" }, { "calendar", "month" }, { "calendar", "date" }, { "ctxpopup", "item-add" },
+            { "datetime", "year" }, { "datetime", "month" }, { "datetime", "date" }, { "datetime", "hour" }, { "datetime", "minute" },
+            { "flipselector", "item-add" }, { "gengrid", "item-add" }, { "gengrid", "h-bounce" }, { "gengrid", "v-bounce" }, { "genlist", "item-style" },
+            { "genlist", "item-add" }, { "genlist", "h-bounce" }, { "genlist", "v-bounce" }, { "image", "prescale" }, { "image", "smooth" },
+            { "index", "item-add" }, { "list", "item-add" }, { "list", "h-bounce" }, { "list", "v-bounce" }, { "multibuttonentry", "item-add" },
+            { "panes", "col_count" }, { "scroller", "single-direction" }, { "scroller", "h-bounce" }, { "scroller", "v-bounce" }, { "spinner", "wrap" },
+            { "spinner", "value" }, { "toolbar", "item-add" }, { "toolbar", "icon-order-lookup" }, { "toolbaritem", "standard-icon" }, { "view", "name" },
+            { "view", "location-x" }, { "view", "location-y" } };
+
+    private static String[][] packReplaceAttribute = {
+            // parent, source_attr, target_attr
+            { "grid", "pack-left", "pack_x" }, { "grid", "pack-top", "pack_y" }, { "grid", "pack-width", "pack_w" }, { "grid", "pack-height", "pack_h" },
+            { "table", "pack-left", "pack_col" }, { "table", "pack-top", "pack_row" }, { "table", "pack-width", "col_span" },
+            { "table", "pack-height", "row_span" }, { "table", "pack-height", "row_span" }, { "panes", "pack-left", "pack" }, };
+
+    private static String[][] packRemoveAttribute = {
+            // parent, removed_attr
+            { "view", "pack-left" }, { "view", "pack-top" }, { "view", "pack-width" }, { "view", "pack-height" }, { "box", "pack-left" }, { "box", "pack-top" },
+            { "box", "pack-width" }, { "box", "pack-height" }, { "scroller", "pack-left" }, { "scroller", "pack-top" }, { "scroller", "pack-width" },
+            { "scroller", "pack-height" }, { "panel", "pack-left" }, { "panel", "pack-top" }, { "panel", "pack-width" }, { "panel", "pack-height" },
+            { "panes", "pack-top" }, { "panes", "pack-width" }, { "panes", "pack-height" }, };
+
+    private static String[][] commonReplaceAttribute = {
+            // source attr, target attr
+            { "align-x", "align_h" }, { "align-y", "align_v" }, { "weight-x", "weight_h" }, { "weight-y", "weight_v" }, };
+
+    static boolean isRemoveAttribute(String elem, String attr) {
+        for (int i = 0; i < removeAttribute.length; i++) {
+            String[] array = removeAttribute[i];
+            if (array[ELEMENT].equals(elem)) {
+                if (array[SOURCE_ATTRIBUTE].equals(attr)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    static boolean isRemovePackAttribute(String parentElem, String attr) {
+        for (int i = 0; i < packRemoveAttribute.length; i++) {
+            String[] array = packRemoveAttribute[i];
+            if (array[ELEMENT].equals(parentElem)) {
+                if (array[SOURCE_ATTRIBUTE].equals(attr)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    static String getReplaceAttribute(String elem, String attr) {
+        for (int i = 0; i < replaceAttribute.length; i++) {
+            String[] array = replaceAttribute[i];
+            if (array[ELEMENT].equals(elem)) {
+                if (array[SOURCE_ATTRIBUTE].equals(attr)) {
+                    return array[TARGET_ATTRIBUTE];
+                }
+            }
+        }
+        return null;
+    }
+
+    static String getPackReplaceAttribute(String parentElem, String attr) {
+        for (int i = 0; i < packReplaceAttribute.length; i++) {
+            String[] array = packReplaceAttribute[i];
+            if (array[ELEMENT].equals(parentElem)) {
+                if (array[SOURCE_ATTRIBUTE].equals(attr)) {
+                    return array[TARGET_ATTRIBUTE];
+                }
+            }
+        }
+        return null;
+    }
+
+    static String getCommonReplaceAttribute(String attr) {
+        for (int i = 0; i < commonReplaceAttribute.length; i++) {
+            String[] array = commonReplaceAttribute[i];
+            if (array[ELEMENT].equals(attr)) {
+                return array[SOURCE_ATTRIBUTE];
+            }
+        }
+        return null;
+    }
+}
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/ElementTable.java b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/ElementTable.java
new file mode 100644 (file)
index 0000000..68372a2
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.converter.table;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+final class ElementTable {
+
+    private static List<String> removeElement = createRemovedElementList();
+    private static Map<String, String> replaceElement = createElementMap();
+
+    private static Map<String, String> createElementMap() {
+        Map<String, String> element = new HashMap<String, String>();
+        element.put("efl.bg", "bg");
+        element.put("efl.box", "box");
+        element.put("efl.button", "button");
+        element.put("efl.calendar", "calendar");
+        element.put("efl.check", "check");
+        element.put("efl.colorselector", "colorselector");
+        element.put("efl.ctxpopup", "ctxpopup");
+        element.put("efl.ctxpopupitem", "ctxpopupitem");
+        element.put("efl.datetime", "datetime");
+        element.put("efl.entry", "entry");
+        element.put("efl.flipselector", "flipselector");
+        element.put("efl.flipselectoritem", "flipselectoritem");
+        element.put("efl.gengrid", "gengrid");
+        element.put("efl.gengriditem", "gengriditem");
+        element.put("efl.genlist", "genlist");
+        element.put("efl.genlistitem", "genlistitem");
+        element.put("efl.grid", "grid");
+        element.put("efl.hoversel", "hoversel");
+        element.put("efl.image", "image");
+        element.put("efl.index", "index");
+        element.put("efl.indexitem", "indexitem");
+        element.put("efl.label", "label");
+        element.put("efl.layout", "layout");
+        element.put("efl.list", "list");
+        element.put("efl.listitem", "listitem");
+        element.put("efl.map", "map");
+        element.put("efl.multibuttonentry", "multibuttonentry");
+        element.put("efl.multibuttonentryitem", "multibuttonentryitem");
+        element.put("efl.panel", "panel");
+        element.put("efl.panes", "panes");
+        element.put("efl.popup", "popup");
+        element.put("efl.progressbar", "progressbar");
+        element.put("efl.radio", "radio");
+        element.put("efl.rect", "rect");
+        element.put("efl.scroller", "scroller");
+        element.put("efl.slider", "slider");
+        element.put("efl.spinner", "spinner");
+        element.put("efl.table", "table");
+        element.put("efl.toolbar", "toolbar");
+        element.put("efl.toolbaritem", "toolbaritem");
+        element.put("tizen.view", "view");
+        return Collections.unmodifiableMap(element);
+    }
+
+    private static List<String> createRemovedElementList() {
+        List<String> removed = new ArrayList<String>();
+        removed.add("efl.naviframe");
+        removed.add("efl.icon");
+        removed.add("efl.genlistitem");
+        removed.add("efl.gengriditem");
+
+        return Collections.unmodifiableList(removed);
+    }
+
+    static boolean isRemoveElement(String elem) {
+        return removeElement.contains(elem);
+    }
+
+    static String getReplaceElement(String source) {
+        String result = replaceElement.get(source);
+        if (result == null) {
+            return source;
+        }
+        return result;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/LayoutConverterTable.java b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/LayoutConverterTable.java
new file mode 100644 (file)
index 0000000..c1a9c54
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.converter.table;
+
+public final class LayoutConverterTable {
+
+    public static String convertElement(String source) {
+        return ElementTable.getReplaceElement(source);
+    }
+
+    public static boolean isRemovedElement(String elem) {
+        return ElementTable.isRemoveElement(elem);
+    }
+
+    public static String convertAttribute(String parentElem, String elem, String attr) {
+        String results = AttributeTable.getReplaceAttribute(elem, attr);
+        if (results != null) {
+            return results;
+        }
+
+        results = AttributeTable.getCommonReplaceAttribute(attr);
+        if (results != null) {
+            return results;
+        }
+
+        results = AttributeTable.getPackReplaceAttribute(parentElem, attr);
+        if (results != null) {
+            return results;
+        }
+        return attr;
+    }
+
+    public static boolean isRemovedAttribute(String parentElem, String elem, String attr) {
+        boolean results = false;
+        if (AttributeTable.isRemoveAttribute(elem, attr)) {
+            results = true;
+        }
+        if (AttributeTable.isRemovePackAttribute(parentElem, attr)) {
+            results = true;
+        }
+        return results;
+    }
+
+    public static String convertValue(String parentElem, String elem, String attr, String val) {
+        String results = ValueTable.getCommonReplaceValue(attr, val);
+        if (results != null) {
+            return results;
+        }
+
+        results = ValueTable.getPackReplaceValue(parentElem, attr, val);
+        if (results != null) {
+            return results;
+        }
+
+        results = ValueTable.getReplaceValue(elem, attr, val);
+        if (results != null) {
+            return results;
+        }
+
+        return val;
+    }
+}
diff --git a/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/ValueTable.java b/org.tizen.efluibuilder.converter/src/org/tizen/efluibuilder/converter/table/ValueTable.java
new file mode 100644 (file)
index 0000000..d5d7990
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.converter.table;
+
+final class ValueTable {
+
+    private static final int ELEMENT = 0;
+    private static final int ATTRIBUTE = 1;
+    private static final int SOURCE_VALUE = 2;
+    private static final int TARGET_VALUE = 3;
+
+    private static final int COMMON_ATTRIBUTE = 0;
+    private static final int COMMON_SOURCE_VALUE = 1;
+    private static final int COMMON_TARGET_VALUE = 2;
+
+    private static String[][] commonReplaceValue = {
+            // attribute, Source_value, Target_value
+            { "align_h", "FILL", "fill" }, { "align_v", "FILL", "fill" }, };
+
+    private static String[][] packReplaceValue = {
+            // Parent_element, attribute, Source_value, Target_value
+            { "panes", "pack", "0", "left" }, { "panes", "pack", "1", "right" }, };
+
+    private static String[][] replaceValue = {
+            // element, attribute, Source_value, Target_value
+            { "bg", "option", "0", "center" }, { "bg", "option", "1", "scale" }, { "bg", "option", "2", "stretch" }, { "bg", "option", "3", "tile" },
+            { "box", "direction", "true", "horizontal" }, { "box", "direction", "false", "vertical" }, { "calendar", "select_mode", "0", "default" },
+            { "calendar", "select_mode", "1", "always" }, { "calendar", "select_mode", "2", "none" }, { "calendar", "select_mode", "3", "ondemand" },
+            { "entry", "file_text_format", "0", "plain_utf8" }, { "entry", "file_text_format", "1", "markup_utf8" },
+            { "entry", "context_menu", "true", "false" }, { "entry", "context_menu", "false", "true" }, { "genlist", "select_mode", "0", "default" },
+            { "genlist", "select_mode", "1", "always" }, { "genlist", "select_mode", "2", "none" }, { "genlist", "select_mode", "3", "display_only" },
+            { "genlist", "scrollbar_h", "0", "auto" }, { "genlist", "scrollbar_h", "1", "true" }, { "genlist", "scrollbar_h", "2", "false" },
+            { "genlist", "scrollbar_v", "0", "auto" }, { "genlist", "scrollbar_v", "1", "true" }, { "genlist", "scrollbar_v", "2", "false" },
+            { "index", "autohide", "true", "false" }, { "index", "autohide", "false", "true" }, { "index", "indicator", "true", "false" },
+            { "index", "indicator", "false", "true" }, { "image", "orient", "0", "none" }, { "image", "orient", "0", "orient_0" },
+            { "image", "orient", "1", "orient_90" }, { "image", "orient", "1", "rotate_90" }, { "image", "orient", "2", "orient_180" },
+            { "image", "orient", "2", "rotate_180" }, { "image", "orient", "3", "orient_270" }, { "image", "orient", "3", "rotate_270" },
+            { "image", "orient", "4", "flip_horizontal" }, { "image", "orient", "5", "flip_vertical" }, { "image", "orient", "6", "flip_transpose" },
+            { "image", "orient", "7", "flip_transverse" }, { "label", "line_wrap", "0", "none" }, { "label", "line_wrap", "1", "char" },
+            { "label", "line_wrap", "2", "word" }, { "label", "line_wrap", "3", "mixed" }, { "list", "direction", "true", "horizontal" },
+            { "list", "direction", "false", "vertical" }, { "list", "select_mode", "0", "default" }, { "list", "select_mode", "1", "always" },
+            { "list", "select_mode", "2", "none" }, { "list", "select_mode", "3", "display_only" }, { "list", "mode", "0", "compress" },
+            { "list", "mode", "1", "scroll" }, { "list", "mode", "2", "limit" }, { "list", "mode", "3", "expand" }, { "list", "scrollbar_h", "0", "auto" },
+            { "list", "scrollbar_h", "1", "true" }, { "list", "scrollbar_h", "2", "false" }, { "list", "scrollbar_v", "0", "auto" },
+            { "list", "scrollbar_v", "1", "true" }, { "list", "scrollbar_v", "2", "false" }, { "panes", "direction", "true", "horizontal" },
+            { "panes", "direction", "false", "vertical" }, { "panel", "orient", "0", "top" }, { "panel", "orient", "1", "bottom" },
+            { "panel", "orient", "2", "left" }, { "panel", "orient", "3", "right" }, { "progressbar", "direction", "true", "horizontal" },
+            { "progressbar", "direction", "false", "vertical" }, { "scroller", "scrollbar_h", "0", "auto" }, { "scroller", "scrollbar_h", "1", "true" },
+            { "scroller", "scrollbar_h", "2", "false" }, { "scroller", "scrollbar_v", "0", "auto" }, { "scroller", "scrollbar_v", "1", "true" },
+            { "scroller", "scrollbar_v", "2", "false" }, { "slider", "direction", "true", "horizontal" }, { "slider", "direction", "false", "vertical" },
+            { "toolbar", "select_mode", "0", "default" }, { "toolbar", "select_mode", "1", "always" }, { "toolbar", "select_mode", "2", "none" },
+            { "toolbar", "select_mode", "3", "display_only" }, { "toolbar", "direction", "true", "horizontal" },
+            { "toolbar", "direction", "false", "vertical" }, { "toolbar", "shrink_mode", "0", "none" }, { "toolbar", "shrink_mode", "1", "hide" },
+            { "toolbar", "shrink_mode", "2", "scroll" }, { "toolbar", "shrink_mode", "3", "menu" }, { "toolbar", "shrink_mode", "4", "expand" },
+            { "view", "screen_orientation", "noSensor", "no_sensor" }, { "view", "screen_orientation", "onlyPortrait", "only_portrait" },
+            { "view", "screen_orientation", "onlyLandscape", "only_landscape" }, { "view", "screen_orientation", "fullSensor", "full_sensor" }, };
+
+    static String getCommonReplaceValue(String attr, String val) {
+        for (int i = 0; i < commonReplaceValue.length; i++) {
+            String[] array = commonReplaceValue[i];
+            if (array[COMMON_ATTRIBUTE].equals(attr) && array[COMMON_SOURCE_VALUE].equals(val)) {
+                return array[COMMON_TARGET_VALUE];
+            }
+        }
+        return null;
+    }
+
+    static String getPackReplaceValue(String parentElem, String attr, String val) {
+        for (int i = 0; i < packReplaceValue.length; i++) {
+            String[] array = packReplaceValue[i];
+            if (array[ELEMENT].equals(parentElem) && array[ATTRIBUTE].equals(attr) && array[SOURCE_VALUE].equals(val)) {
+                return array[TARGET_VALUE];
+            }
+        }
+        return null;
+    }
+
+    static String getReplaceValue(String elem, String attr, String val) {
+        for (int i = 0; i < replaceValue.length; i++) {
+            String[] array = replaceValue[i];
+            if (array[ELEMENT].equals(elem) && array[ATTRIBUTE].equals(attr) && array[SOURCE_VALUE].equals(val)) {
+                return array[TARGET_VALUE];
+            }
+        }
+        return null;
+    }
+}
diff --git a/org.tizen.efluibuilder.descriptor/.classpath b/org.tizen.efluibuilder.descriptor/.classpath
new file mode 100644 (file)
index 0000000..1fa3e68
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.efluibuilder.descriptor/.project b/org.tizen.efluibuilder.descriptor/.project
new file mode 100644 (file)
index 0000000..13f76bf
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.efluibuilder.descriptor</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.efluibuilder.descriptor/.settings/org.eclipse.jdt.core.prefs b/org.tizen.efluibuilder.descriptor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..da318c2
--- /dev/null
@@ -0,0 +1,90 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
diff --git a/org.tizen.efluibuilder.descriptor/META-INF/MANIFEST.MF b/org.tizen.efluibuilder.descriptor/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..a92efd7
--- /dev/null
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.efluibuilder.descriptor
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.tizen.efluibuilder.descriptor.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.tizen.efluibuilder.common
+Bundle-ActivationPolicy: lazy
+Export-Package: org.tizen.efluibuilder.model.descriptors,
+ org.tizen.efluibuilder.model.descriptors.io,
+ org.tizen.efluibuilder.model.descriptors.io.file
+Bundle-Vendor: %Bundle-Vendor
diff --git a/org.tizen.efluibuilder.descriptor/OSGI-INF/l10n/bundle.properties b/org.tizen.efluibuilder.descriptor/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..b0e3063
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for org.tizen.efluibuilder.descriptor
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen EFL UI Builder Descriptor
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/build.properties b/org.tizen.efluibuilder.descriptor/build.properties
new file mode 100644 (file)
index 0000000..5844780
--- /dev/null
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               res/,\
+               OSGI-INF/
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/efl.style.edj.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/efl.style.edj.xml
new file mode 100644 (file)
index 0000000..e3f4ab8
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<defaultStyleEDJs>
+       <!-- Order means priority -->
+       <styleEDJ name="tizen-2.3-mobile-WVGA.edj" />
+       <styleEDJ name="default.edj" />
+</defaultStyleEDJs>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/efl.types.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/efl.types.xml
new file mode 100644 (file)
index 0000000..1961a63
--- /dev/null
@@ -0,0 +1,280 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<types>
+       <type id="efl@boolean">
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@direction">
+               <constant value="horizontal" displayName="horizontal" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl@selectmode">
+               <constant value="default" displayName="default" />
+               <constant value="always" displayName="always" />
+               <constant value="none" displayName="none" />
+               <constant value="display_only" displayName="display_only" />
+       </type>
+
+       <type id="efl.progressbar@style">
+               <constant value="default" displayName="default" />
+               <constant value="wheel" displayName="wheel" />
+       </type>
+
+       <type id="efl.spinner@style">
+               <constant value="horizontal" displayName="horizontal" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl.progressbar@format">
+               <constant value="%.0f%%" displayName="default" />
+               <constant value="%.1f%%" displayName="0.0" />
+               <constant value="%.2f%%" displayName="0.00" />
+               <constant value="%.3f%%" displayName="0.000" />
+               <constant value="%.4f%%" displayName="0.0000" />
+       </type>
+
+       <type id="efl.calendar@selectmode">
+               <constant value="default" displayName="default" />
+               <constant value="always" displayName="always" />
+               <constant value="none" displayName="none" />
+               <constant value="ondemand" displayName="ondemand" />
+       </type>
+
+       <type id="efl.colorselector@mode">
+               <constant value="palette" displayName="palette" />
+               <constant value="components" displayName="components" />
+               <constant value="both" displayName="both" />
+               <constant value="picker" displayName="picker" />
+               <constant value="plane" displayName="plane" />
+               <constant value="palette_plane" displayName="palette_plane" />
+               <constant value="all" displayName="all" />
+       </type>
+
+       <type id="efl.bg@option">
+               <constant value="center" displayName="center" />
+               <constant value="scale" displayName="scale" />
+               <constant value="stretch" displayName="stretch" />
+               <constant value="tile" displayName="tile" />
+       </type>
+
+       <type id="check-scale">
+               <constant value="fill" displayName="fill" />
+       </type>
+
+       <type id="efl.image@orient">
+               <constant value="none" displayName="none" />
+               <constant value="orient_0" displayName="orient_0" />
+               <constant value="orient_90" displayName="orient_90" />
+               <constant value="rotate_90" displayName="rotate_90" />
+               <constant value="orient_180" displayName="orient_180" />
+               <constant value="rotate_180" displayName="rotate_180" />
+               <constant value="orient_270" displayName="orient_270" />
+               <constant value="rotate_270" displayName="rotate_270" />
+               <constant value="flip_horizontal" displayName="flip_horizontal" />
+               <constant value="flip_vertical" displayName="flip_vertical" />
+               <constant value="flip_transpose" displayName="flip_transpose" />
+               <constant value="flip_transverse" displayName="flip_transverse" />
+       </type>
+
+       <type id="efl.label@wraptype">
+               <constant value="none" displayName="none" />
+               <constant value="char" displayName="char" />
+               <constant value="word" displayName="word" />
+               <constant value="mixed" displayName="mixed" />
+       </type>
+
+       <type id="efl.label@style">
+               <constant value="default" displayName="default" />
+               <constant value="marker" displayName="marker" />
+               <constant value="slide_long" displayName="slide_long" />
+               <constant value="slide_short" displayName="slide_short" />
+               <constant value="slide_bounce" displayName="slide_bounce" />
+       </type>
+
+       <type id="efl@scrollbar_h">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@scrollbar_v">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl.list@multiselectmode">
+               <constant value="default" displayName="default" />
+               <constant value="with_control" displayName="with_control" />
+       </type>
+
+       <type id="efl.list@mode">
+               <constant value="compress" displayName="compress" />
+               <constant value="scroll" displayName="scroll" />
+               <constant value="limit" displayName="limit" />
+               <constant value="expand" displayName="expand" />
+       </type>
+
+       <type id="efl.panel@orient">
+               <constant value="top" displayName="top" />
+               <constant value="bottom" displayName="bottom" />
+               <constant value="left" displayName="left" />
+               <constant value="right" displayName="right" />
+       </type>
+
+       <type id="efl.toolbar@shrinkmode">
+               <constant value="none" displayName="none" />
+               <constant value="hide" displayName="hide" />
+               <constant value="scroll" displayName="scroll" />
+               <constant value="menu" displayName="menu" />
+               <constant value="expand" displayName="expand" />
+       </type>
+
+       <type id="efl.toolbar@style">
+               <constant value="default" displayName="default" />
+               <constant value="navigationbar" displayName="navigationbar" />
+               <!--<constant value="tabbar_with_title" displayName="tabbar_with_title" /> -->
+       </type>
+
+       <type id="efl.entry@textformat">
+               <constant value="plain_utf8" displayName="plain_utf8" />
+               <constant value="markup_utf8" displayName="markup_utf8" />
+       </type>
+
+       <type id="efl.datetime@style">
+               <constant value="date_layout" displayName="date_layout" />
+               <constant value="time_layout" displayName="time_layout" />
+               <constant value="time_layout_24hr" displayName="time_layout_24hr" />
+       </type>
+
+       <type id="efl.button@style">
+               <constant value="default" displayName="default" />
+               <constant value="anchor" displayName="anchor" />
+               <constant value="bottom" displayName="bottom" />
+               <constant value="circle" displayName="circle" />
+               <constant value="dropdown" displayName="dropdown" />
+               <constant value="hoversel_horizontal/default" displayName="hoversel_horizontal/default" />
+               <constant value="hoversel_horizontal_entry/default" displayName="hoversel_horizontal_entry/default" />
+               <constant value="hoversel_vertical/default" displayName="hoversel_vertical/default" />
+               <constant value="hoversel_vertical_entry/default" displayName="hoversel_vertical_entry/default" />
+               <constant value="icon_reorder" displayName="icon_reorder" />
+               <constant value="naviframe/drawers" displayName="naviframe/drawers" />
+               <constant value="naviframe/title_cancel" displayName="naviframe/title_cancel" />
+               <constant value="naviframe/title_done" displayName="naviframe/title_done" />
+               <constant value="option" displayName="option" />
+       </type>
+
+       <type id="efl.check@style">
+               <constant value="default" displayName="default" />
+               <constant value="favorite" displayName="favorite" />
+               <constant value="on&amp;off" displayName="on&amp;off" />
+       </type>
+
+       <type id="efl.slider@style">
+               <constant value="default" displayName="default" />
+               <constant value="center_point" displayName="center_point" />
+       </type>
+
+       <type id="efl.gengrid@style">
+               <constant value="default" displayName="default" />
+               <constant value="default_style" displayName="default_style" />
+               <constant value="default_grid" displayName="default_grid" />
+               <constant value="default_gridtext" displayName="default_gridtext" />
+               <constant value="default_gridtext2" displayName="default_gridtext2" />
+       </type>
+
+       <type id="efl.gengrid@itemstyle">
+               <constant value="default" displayName="default" />
+               <constant value="album-preview" displayName="album-preview" />
+               <constant value="block" displayName="block" />
+               <constant value="group_index" displayName="group_index" />
+               <constant value="default_grid" displayName="default_grid" />
+               <constant value="default_gridtext2" displayName="default_gridtext2" />
+               <constant value="default_gridtext" displayName="default_gridtext" />
+               <constant value="default_style" displayName="default_style" />
+
+       </type>
+
+       <type id="efl.genlist@itemstyle">
+               <constant value="default" displayName="default" />
+               <constant value="default_style" displayName="default_style" />
+               <constant value="double_label" displayName="double_label" />
+               <constant value="end_icon" displayName="end_icon" />
+               <constant value="full" displayName="full" />
+               <constant value="group_index" displayName="group_index" />
+               <constant value="one_icon" displayName="one_icon" />
+               <constant value="message" displayName="message" />
+       </type>
+
+       <type id="efl.genlist@itemtype">
+               <constant value="none" displayName="none" />
+               <constant value="tree" displayName="tree" />
+               <constant value="group" displayName="group" />
+       </type>
+
+       <type id="efl.ctxpopup@style">
+               <constant value="default" displayName="default" />
+               <constant value="dropdown/list" displayName="dropdown/list" />
+               <constant value="dropdown/label" displayName="dropdown/label" />
+       </type>
+
+       <type id="tizen.view@screen-orientation">
+               <constant value="no_sensor" displayName="no_sensor" />
+               <constant value="only_portrait" displayName="only_portrait" />
+               <constant value="only_landscape" displayName="only_landscape" />
+               <constant value="full_sensor" displayName="full_sensor" />
+       </type>
+
+       <type id="efl.panes@pack">
+               <constant value="left" displayName="left" />
+               <constant value="right" displayName="right" />
+       </type>
+
+       <type id="efl.popup@style">
+               <constant value="default" displayName="default" />
+       </type>
+
+       <type id="efl.icon@standardicon">
+               <constant value="" displayName="(None)" />
+               <constant value="apps" displayName="apps" />
+               <constant value="arrow_down" displayName="arrow_down" />
+               <constant value="arrow_left" displayName="arrow_left" />
+               <constant value="arrow_right" displayName="arrow_right" />
+               <constant value="arrow_up" displayName="arrow_up" />
+               <constant value="chat" displayName="chat" />
+               <constant value="clock" displayName="clock" />
+               <constant value="close" displayName="close" />
+               <constant value="delete" displayName="delete" />
+               <constant value="edit" displayName="edit" />
+               <constant value="file" displayName="file" />
+               <constant value="home" displayName="home" />
+               <constant value="media_player/forward" displayName="media_player/forward" />
+               <constant value="media_player/info" displayName="media_player/info" />
+               <constant value="media_player/next" displayName="media_player/next" />
+               <constant value="media_player/pause" displayName="media_player/pause" />
+               <constant value="media_player/play" displayName="media_player/play" />
+               <constant value="media_player/prev" displayName="media_player/prev" />
+               <constant value="media_player/rewind" displayName="media_player/rewind" />
+               <constant value="media_player/stop" displayName="media_player/stop" />
+               <constant value="menu/apps" displayName="menu/apps" />
+               <constant value="menu/arrow_up" displayName="menu/arrow_up" />
+               <constant value="menu/arrow_down" displayName="menu/arrow_down" />
+               <constant value="menu/arrow_left" displayName="menu/arrow_left" />
+               <constant value="menu/arrow_right" displayName="menu/arrow_right" />
+               <constant value="menu/chat" displayName="menu/chat" />
+               <constant value="menu/clock" displayName="menu/clock" />
+               <constant value="menu/close" displayName="menu/close" />
+               <constant value="menu/delete" displayName="menu/delete" />
+               <constant value="menu/edit" displayName="menu/edit" />
+               <constant value="menu/folder" displayName="menu/folder" />
+               <constant value="menu/file" displayName="menu/file" />
+               <constant value="menu/home" displayName="menu/home" />
+               <constant value="menu/refresh" displayName="menu/refresh" />
+               <constant value="no_photo" displayName="no_photo" />
+               <constant value="photo/no_photo" displayName="photo/no_photo" />
+               <constant value="refresh" displayName="refresh" />
+       </type>
+</types>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen-native-ui-fw.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen-native-ui-fw.xml
new file mode 100644 (file)
index 0000000..f43ae44
--- /dev/null
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE descriptors [
+       <!ENTITY tizen.uicomponent.categories SYSTEM "tizen.uicomponent.categories.xml">
+       
+       <!-- default style edj -->
+       <!ENTITY efl.style.edj SYSTEM "efl.style.edj.xml">
+
+       <!-- type & event type -->
+       <!ENTITY efl.types SYSTEM "efl.types.xml">
+       <!ENTITY tizen.eventtypes SYSTEM "tizen.eventtypes.xml">
+       
+       <!-- VIEW -->
+       <!ENTITY tizen.view SYSTEM "widget/tizen.view.xml">
+       <!ENTITY tizen.empty.view SYSTEM "widget/tizen.empty.view.xml">
+       
+       <!-- WIDGET -->
+       <!ENTITY efl.bg SYSTEM "widget/efl.bg.widget.xml">
+       <!ENTITY efl.button SYSTEM "widget/efl.button.widget.xml">
+       <!ENTITY efl.check SYSTEM "widget/efl.check.widget.xml">
+       <!ENTITY efl.colorselector SYSTEM "widget/efl.colorselector.widget.xml">
+       <!ENTITY efl.datetime SYSTEM "widget/efl.datetime.widget.xml"> 
+       <!ENTITY efl.entry SYSTEM "widget/efl.entry.widget.xml">
+       <!ENTITY efl.image SYSTEM "widget/efl.image.widget.xml">
+       <!ENTITY efl.label SYSTEM "widget/efl.label.widget.xml">
+       <!ENTITY efl.radio SYSTEM "widget/efl.radio.widget.xml">
+       <!ENTITY efl.spinner SYSTEM "widget/efl.spinner.widget.xml">
+       <!ENTITY efl.slider SYSTEM "widget/efl.slider.widget.xml">
+       <!ENTITY efl.progressbar SYSTEM "widget/efl.progressbar.widget.xml">
+       <!ENTITY efl.list SYSTEM "widget/efl.list.widget.xml">
+       <!ENTITY efl.listitem SYSTEM "widget/efl.listitem.widget.xml">
+       <!ENTITY efl.scroller SYSTEM "widget/efl.scroller.widget.xml">
+       <!ENTITY efl.genlist SYSTEM "widget/efl.genlist.widget.xml">
+       <!ENTITY efl.genlistitem SYSTEM "widget/efl.genlistitem.widget.xml">
+       <!ENTITY efl.toolbar SYSTEM "widget/efl.toolbar.widget.xml">
+       <!ENTITY efl.toolbaritem SYSTEM "widget/efl.toolbaritem.widget.xml">
+       <!ENTITY efl.multibuttonentry SYSTEM "widget/efl.multibuttonentry.widget.xml">
+       <!ENTITY efl.multibuttonentryitem SYSTEM "widget/efl.multibuttonentryitem.widget.xml">
+       <!ENTITY efl.layout SYSTEM "widget/efl.layout.widget.xml">
+       <!ENTITY efl.gengrid SYSTEM "widget/efl.gengrid.widget.xml">
+       <!ENTITY efl.gengriditem SYSTEM "widget/efl.gengriditem.widget.xml">
+       <!ENTITY efl.index SYSTEM "widget/efl.index.widget.xml">
+       <!ENTITY efl.indexitem SYSTEM "widget/efl.indexitem.widget.xml">
+       
+    <!-- [START] New Widget -->
+       <!ENTITY efl.ctxpopup SYSTEM "widget/efl.ctxpopup.widget.xml">
+       <!ENTITY efl.ctxpopupitem SYSTEM "widget/efl.ctxpopupitem.widget.xml">  
+       <!ENTITY efl.popup SYSTEM "widget/efl.popup.widget.xml">
+    <!ENTITY efl.map SYSTEM "widget/efl.map.widget.xml">
+<!-- [END] New Widget -->
+
+<!-- WIDGET : Container -->
+       <!ENTITY efl.grid SYSTEM "widget/efl.grid.widget.xml">
+       <!ENTITY efl.table SYSTEM "widget/efl.table.widget.xml">
+       <!ENTITY efl.box SYSTEM "widget/efl.box.widget.xml">
+       <!ENTITY efl.panes SYSTEM "widget/efl.panes.widget.xml">
+       <!ENTITY efl.panel SYSTEM "widget/efl.panel.widget.xml">
+<!-- End of list -->
+]>
+
+<tizenFile>
+       <fileInfo>
+               <type>tizen-descriptor</type>
+               <version>2</version>
+               <desc>Tizen Native UI Builder Descriptor</desc>
+       </fileInfo>
+
+       <descriptors xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tizen="http://www.tizen.org/2012/uibuilder/descriptor">
+
+               <renderer id="EFL" />
+
+               <doc id="tizen.doc">
+
+                       <relations>
+                               <content ids="tizen.page" />
+                       </relations>
+               </doc>
+       
+       &tizen.uicomponent.categories;
+
+               <!-- default style edj -->
+       &efl.style.edj;
+
+               <!-- type & event type -->
+       &efl.types;
+       &tizen.eventtypes;
+
+               <!-- view -->
+       &tizen.view;
+
+       &efl.bg;
+       &efl.button;    
+       &efl.check;
+       &efl.colorselector;
+       &efl.datetime; 
+       &efl.entry;
+       &efl.image;
+       &efl.label;
+       &efl.radio;
+       &efl.spinner;
+       &efl.slider;
+       &efl.progressbar;
+       &efl.list;
+       &efl.listitem;
+       &efl.genlist;
+       &efl.genlistitem;
+       &efl.scroller;
+       &efl.toolbar;
+       &efl.toolbaritem;
+       &efl.multibuttonentry;
+       &efl.multibuttonentryitem;
+       &efl.layout;
+       &efl.gengrid;
+       &efl.gengriditem;
+       &efl.index;
+       &efl.indexitem; 
+       &efl.grid;
+       &efl.table;
+       &efl.box;
+       &efl.panes;
+       &efl.panel;
+               <!-- [START] New added -->
+       &efl.ctxpopup;
+       &efl.ctxpopupitem;
+       &efl.popup; 
+    &efl.map;
+               <!-- [END] New added -->
+       </descriptors>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen.eventtypes.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen.eventtypes.xml
new file mode 100644 (file)
index 0000000..dea9f2c
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<eventTypes>
+       <eventType id="event.eflevent">
+               <defaultCode>%page%_%object%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+
+       <eventType id="event.viewevent">
+               <defaultCode>%page%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+</eventTypes>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen.types.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen.types.xml
new file mode 100644 (file)
index 0000000..5b5d28c
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<types>
+    <type id="text@databinding">
+        <constant value="text" displayName=""/>
+    </type>
+    <type id="foreach@databinding">
+        <constant value="foreach" displayName=""/>
+    </type>
+</types>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen.uicomponent.categories.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/tizen.uicomponent.categories.xml
new file mode 100644 (file)
index 0000000..d86fdb4
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<UIComponentCategories>
+       <UIComponentCategory name="Views" />
+       <UIComponentCategory name="UI containers" />
+       <UIComponentCategory name="UI components" />
+</UIComponentCategories>
+
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.bg.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.bg.widget.xml
new file mode 100644 (file)
index 0000000..d47615d
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="bg" displayName="Background" smallIcon="widget/32/pal_bg_nor.png" icon.16="widget/16/view_p_bg_nor.png" category="UI components"
+       description="Background object, used for setting a solid color, image or Edje group as a background to a window or any container object" helpCategory=""
+       helpContents="content" feedbackWidth="200" feedbackHeight="200" minWidth="1" minHeight="1" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="color" type="color" displayName="Color" default="#ffffff" category="General" tooltip="sets the color on a given background UI Component." />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="sets the file path of the image">
+               <!-- <condition name="enable-property" value="" target="option"/> -->
+       </property>
+       <property name="option" type="efl.bg@option" displayName="Option" default="scale" category="General"
+               tooltip="set the way how a background UI Component is to display its image.&#10;
+- center: Center the background image.&#10;
+- scale: Scale the background image, retaining the aspect ratio.&#10;
+- stretch: Stretch the background image to fill the UI Component's area.&#10;
+- tile: Tile background image at its original size.&#10;" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.box.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.box.widget.xml
new file mode 100644 (file)
index 0000000..9587b2b
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="box" displayName="Box" smallIcon="widget/32/pal_box_nor.png" icon.16="widget/16/view_p_box_nor.png" category="UI containers"
+       description="A box arranges objects in a linear fashion, governed by a layout function that defines the details of this arrangement." layoutType="box"
+       helpCategory="" helpContents="box" feedbackWidth="200" feedbackHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the horizontal orientation." />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="sets the box to arrange its children homogeneously." />
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="sets the horizontal space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="300" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="sets the vertical space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="500" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.button.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.button.widget.xml
new file mode 100644 (file)
index 0000000..d08373b
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="button" displayName="Button" smallIcon="widget/32/pal_button_nor.png" icon.16="widget/16/view_p_button_nor.png" category="UI components"
+       description="This is a push-button. Press it and run some function. It can contain a simple label and icon object and it also has an autorepeat feature"
+       helpCategory="" helpContents="button" feedbackWidth="150" feedbackHeight="60" minWidth="70" minHeight="60" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Button" category="General" tooltip="sets the text of the UI Component." />
+       <property name="style" type="efl.button@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="repeated" displayName="repeated" eventType="event.eflevent" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent" />
+       <event name="unpressed" displayName="unpressed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.check.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.check.widget.xml
new file mode 100644 (file)
index 0000000..d593fbe
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="check" displayName="Check" smallIcon="widget/32/pal_check_nor.png" icon.16="widget/16/view_p_check_nor.png" category="UI components"
+       description="The check UI Component allows for toggling a value between true and false" helpCategory="" helpContents="efl.datetime" feedbackWidth="60"
+       feedbackHeight="60" minWidth="40" minHeight="40" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="state" type="efl@boolean" displayName="State" default="false" category="General" tooltip="sets the on/off state of the check UI Component." />
+       <property name="style" type="efl.check@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component."/>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.colorselector.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.colorselector.widget.xml
new file mode 100644 (file)
index 0000000..a3c8c61
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="colorselector" displayName="ColorSelector" smallIcon="widget/32/pal_color_nor.png" icon.16="widget/16/view_p_color_nor.png" category="UI components"
+       description="A ColorSelector is a color selection widget. It allows application to set a series of colors" helpCategory="" helpContents="efl.colorselector"
+       feedbackWidth="480" feedbackHeight="160" minWidth="60" minHeight="160" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="color,item,selected" displayName="color,item,selected" eventType="event.eflevent" />
+       <event name="color,item,longpressed" displayName="color,item,longpressed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.ctxpopup.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.ctxpopup.widget.xml
new file mode 100644 (file)
index 0000000..0abca52
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopup" displayName="Ctxpopup" smallIcon="widget/32/pal_ctx_nor.png" icon.16="widget/16/view_p_ctxp_nor.png" category="Views"
+       description="Ctxpopup(Context popup)s are used to provide options for the currently selected objects. Ctxpopup is composed of popup and a list of items inside popup." helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false"
+       uiSelector="#%id%" xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="ctxpopupitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the direction orientation." />
+       <property name="style" type="efl.ctxpopup@style" displayName="Style" default="default" category="General" tooltip="sets the style of the widget.">
+               <condition name="enable-property" value="default" target="disable" />
+       </property>
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="dismissed" displayName="dismissed" eventType="event.eflevent" />
+
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.ctxpopupitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.ctxpopupitem.widget.xml
new file mode 100644 (file)
index 0000000..dc6db61
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopupitem" displayName="CtxPopupItem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI containers" description=""
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="ctxpopup">
+
+       <relations>
+               <parent ids="ctxpopup" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="CtxPopupItem" category="General" tooltip="The text of the list item" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.datetime.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.datetime.widget.xml
new file mode 100644 (file)
index 0000000..6163e0c
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="datetime" displayName="Datetime" smallIcon="widget/32/pal_date_nor.png" icon.16="widget/16/view_p_date_nor.png" category="UI components"
+       description="Datetime UI Component is used to display and input date time values" helpCategory="" helpContents="efl.datetime" feedbackWidth="380"
+       feedbackHeight="210" minWidth="380" minHeight="210" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.datetime@style" displayName="Style" default="date_layout" category="General" tooltip="sets the style of the UI Component." />
+
+       <!-- <property name="format" type="string" displayName="Format" default="%b %d %Y %I : %M %p" tooltip="Sets the datetime format. Format is a combination of allowed 
+               LIBC date format specifiers like: &quot;%b %d, %Y %I : %M %p&quot;."/> -->
+       <!-- %Y : The year as a decimal number including the century.&#xA; %m : The month as a decimal number (range 01 to 12).&#xA; %b : The abbreviated month name according 
+               to the current locale.&#xA; %B : The full month name according to the current locale.&#xA; %h : The abbreviated month name according to the current locale(same as 
+               %b).&#xA; %d : The day of the month as a decimal number (range 01 to 31).&#xA; %e : The day of the month as a decimal number (range 1 to 31). Single digits are preceded 
+               by a blank.&#xA; %I : The hour as a decimal number using a 12-hour clock (range 01 to 12).&#xA; %H : The hour as a decimal number using a 24-hour clock (range 00 
+               to 23).&#xA; %k : The hour (24-hour clock) as a decimal number (range 0 to 23). Single digits are preceded by a blank.&#xA; %l : The hour (12-hour clock) as a decimal 
+               number (range 1 to 12). Single digits are preceded by a blank.&#xA; %M : The minute as a decimal number (range 00 to 59).&#xA; %p : Either 'AM' or 'PM' according 
+               to the given time value, or the corresponding strings for the current locale. Noon is treated as 'PM' and midnight as 'AM'.&#xA; %P : Like p, but in lower case: 
+               'am' or 'pm' or a corresponding string for the current locale.&#xA; %c : The preferred date and time representation for the current locale.&#xA; %x : The preferred 
+               date representation for the current locale without the time.&#xA; %X : The preferred time representation for the current locale without the date.&#xA; %r : The complete 
+               calendar time using the AM/PM format of the current locale.&#xA; %R : The hour and minute in decimal numbers using the format H:M.&#xA; %T : The time of the day 
+               in decimal numbers using the format H:M:S.&#xA; %F : The date using the format %Y-%m-%d." -->
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.entry.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.entry.widget.xml
new file mode 100644 (file)
index 0000000..cd5855b
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="entry" displayName="Entry" smallIcon="widget/32/pal_entry_nor.png" icon.16="widget/16/view_p_entry_nor.png" category="UI components"
+       description="An entry is a convenience UI Component which shows a box that the user can enter text into" helpCategory="" helpContents="button" feedbackWidth="150"
+       feedbackHeight="100" minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Entry" category="General" tooltip="Convenient macro for elm_object_part_text_set." />
+       <property name="single_line" type="efl@boolean" displayName="Single line" default="false" category="General" tooltip="Sets the entry to the single line mode." />
+       <property name="password" type="efl@boolean" displayName="Password" default="false" category="General" tooltip="Sets the entry to the password mode.">
+               <condition name="enable-property" value="false" target="single_line" />
+       </property>
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General" tooltip="Sets whether the entry is editable." />
+       <property name="context_menu" type="efl@boolean" displayName="Context menu enabled" default="true" category="General"
+               tooltip="Disables the entry's contextual (longpress) menu." />
+       <property name="scroll" type="efl@boolean" displayName="Scrollable" default="false" category="General" tooltip="Enables or disables scrolling in the entry." />
+
+       <property name="src" type="text-resource" displayName="File path" default="" category="General"
+               tooltip="Sets the file (and implicitly loads it) for the text to display and then allow edit. All changes are written back to the file after a short delay if the entry object is set to autosave (which is the default).">
+               <condition name="disable-property" value="" target="autosave" />
+               <condition name="disable-property" value="" target="text-format" />
+       </property>
+       <property name="file_text_format" type="efl.entry@textformat" displayName="Text Format" default="plain_utf8" category="General"
+               tooltip="Enumeration that defines the text format types.&#xD;
+       plain_utf8 : Plain UTF8 type&#xD;
+       markup_utf8 : Markup UTF8 type" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="changed,user" displayName="changed,user" eventType="event.eflevent" />
+       <event name="aborted" displayName="aborted" eventType="event.eflevent" />
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="press" displayName="press" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="clicked,triple" displayName="clicked,triple" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="selection,changed" displayName="selection,changed" eventType="event.eflevent" />
+       <event name="selection,cleared" displayName="selection,cleared" eventType="event.eflevent" />
+       <event name="selection,copy" displayName="selection,copy" eventType="event.eflevent" />
+       <event name="selection,cut" displayName="selection,cut" eventType="event.eflevent" />
+       <event name="selection,paste" displayName="selection,paste" eventType="event.eflevent" />
+       <event name="selection,start" displayName="selection,start" eventType="event.eflevent" />
+       <event name="cursor,changed" displayName="cursor,changed" eventType="event.eflevent" />
+       <event name="anchor,clicked" displayName="anchor,clicked" eventType="event.eflevent" />
+       <event name="anchor,down" displayName="anchor,down" eventType="event.eflevent" />
+       <event name="anchor,in" displayName="anchor,in" eventType="event.eflevent" />
+       <event name="anchor,out" displayName="anchor,out" eventType="event.eflevent" />
+       <event name="anchor,up" displayName="anchor,up" eventType="event.eflevent" />
+       <event name="preedit,changed" displayName="preedit,changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.gengrid.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.gengrid.widget.xml
new file mode 100644 (file)
index 0000000..127266f
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="gengrid" displayName="Gengrid" smallIcon="widget/32/pal_gengrid_nor.png" icon.16="widget/16/view_p_gengrid_nor.png" category="UI components"
+       description="This UI Component aims to position objects in a grid layout while actually creating and rendering only the visible ones" helpCategory=""
+       helpContents="list" feedbackWidth="400" feedbackHeight="400" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="gengriditem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add gengrid item" unusedEditors="source_tab" />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General"
+               tooltip="set the gengrid select mode.&#10;
+- default: Once an item is selected, it would stay highlighted and not going to call selected callback again even it was clicked. Items can get focus.&#10;
+- always: Item selected callbacks will be called every time for click events, even after the item was already selected. Items can get focus.&#10;
+- none: Items will never be highlighted and selected but the size will be adjusted by the finger size configuration. Items can't get focus.&#10;
+- display_only: Items will never be highlighted and selected and ignore the finger size. So the item size can be reduced below than the finger size configuration. Items can't get focus." />
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General"
+               tooltip="set the direction in which a given gengrid UI Component will expand while placing its items.&#10;
+       If true, items will be placed in columns, from top to bottom and, when the space for a column is filled, 
+       another one is started on the right, thus expanding the grid horizontally. &#10;If false, items will be placed in rows, 
+       from left to right and, when the space for a row is filled, another one is started below, thus expanding the grid vertically." />
+       <property name="item_size_w" type="integer" displayName="Item size W" default="200" category="General"
+               tooltip="sets the width size for the items of the gengrid UI Component.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="item_size_h" type="integer" displayName="Item size H" default="200" category="General"
+               tooltip="sets the height size for the items of the gengrid UI Component.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="multi_select" type="efl@boolean" displayName="Multi select" default="false" category="General"
+               tooltip="enables or disables multi-selection in the gengrid UI Component." />
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent" />
+       <event name="released" displayName="released" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent" />
+       <event name="realized" displayName="realized" eventType="event.eflevent" />
+       <event name="unrealized" displayName="unrealized" eventType="event.eflevent" />
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="drag,start,up" displayName="drag,start,up" eventType="event.eflevent" />
+       <event name="drag,start,down" displayName="drag,start,down" eventType="event.eflevent" />
+       <event name="drag,start,left" displayName="drag,start,left" eventType="event.eflevent" />
+       <event name="drag,start,right" displayName="drag,start,right" eventType="event.eflevent" />
+       <event name="drag,stop" displayName="drag,stop" eventType="event.eflevent" />
+       <event name="drag" displayName="drag" eventType="event.eflevent" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.gengriditem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.gengriditem.widget.xml
new file mode 100644 (file)
index 0000000..61128f3
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="gengriditem" displayName="Gengriditem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="gengridItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="gengrid">
+
+       <relations>
+               <parent ids="gengrid" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.gengrid@itemstyle" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="sets the text of item" />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="sets the file path of the image" />
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="sets the selected state of the UI Component." />
+       <property name="disabled" type="efl@boolean" displayName="Disabled" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.genlist.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.genlist.widget.xml
new file mode 100644 (file)
index 0000000..25a56cf
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlist" displayName="Genlist" smallIcon="widget/32/pal_genlist_nor.png" icon.16="widget/16/view_p_genlist_nor.png" category="UI components"
+       description="This UI Component aims to have more expansive list than the simple list in Elementary that could have more flexible items and allow many more entries while still being fast and low on memory usage. At the same time it was also made to be able to do tree structures. But the price to pay is more complexity when it comes to usage. If all you want is a simple list with icons and a single text, use the normal List object"
+       helpCategory="" helpContents="list" feedbackWidth="480" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add genlist item" unusedEditors="source_tab" />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="enable/disable homogeneous mode&#10; If true ,
+               this will enable the homogeneous mode where items are of the same
+               height and width so that genlist may do the lazy-loading at its
+               maximum ( which increases the performance for scrolling the list )&#10;
+               In the normal mode , genlist will pre-calculate all the items ' sizes
+               even though they are not in use. So items ' callbacks are called many
+               times than expected. But homogeneous mode will skip the item size
+               pre-calculation process so items ' callbacks are called only when the
+               item is needed." />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General"
+               tooltip="set the genlist select mode.&#10;
+- default: Once an item is selected, it would stay highlighted and not going to call selected callback again even it was clicked. Items can get focus.&#10;
+- always: Item selected callbacks will be called every time for click events, even after the item was already selected. Items can get focus.&#10;
+- none: Items will never be highlighted and selected but the size will be adjusted by the finger size configuration. Items can't get focus.&#10;
+- display_only: Items will never be highlighted and selected and ignore the finger size. So the item size can be reduced below than the finger size configuration. Items can't get focus." />
+
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent" />
+       <event name="released" displayName="released" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent" />
+       <event name="contracted" displayName="contracted" eventType="event.eflevent" />
+       <event name="expand,request" displayName="expand,request" eventType="event.eflevent" />
+       <event name="contract,request" displayName="contract,request" eventType="event.eflevent" />
+       <event name="realized" displayName="realized" eventType="event.eflevent" />
+       <event name="unrealized" displayName="unrealized" eventType="event.eflevent" />
+       <event name="drag,start,up" displayName="drag,start,up" eventType="event.eflevent" />
+       <event name="drag,start,down" displayName="drag,start,down" eventType="event.eflevent" />
+       <event name="drag,start,left" displayName="drag,start,left" eventType="event.eflevent" />
+       <event name="drag,start,right" displayName="drag,start,right" eventType="event.eflevent" />
+       <event name="drag,stop" displayName="drag,stop" eventType="event.eflevent" />
+       <event name="drag" displayName="drag" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="multi,swipe,left" displayName="multi,swipe,left" eventType="event.eflevent" />
+       <event name="multi,swipe,right" displayName="multi,swipe,right" eventType="event.eflevent" />
+       <event name="multi,swipe,up" displayName="multi,swipe,up" eventType="event.eflevent" />
+       <event name="multi,swipe,down" displayName="multi,swipe,down" eventType="event.eflevent" />
+       <event name="multi,pinch,in" displayName="multi,pinch,in" eventType="event.eflevent" />
+       <event name="swipe" displayName="swipe" eventType="event.eflevent" />
+       <event name="moved" displayName="moved" eventType="event.eflevent" />
+       <event name="moved,after" displayName="moved,after" eventType="event.eflevent" />
+       <event name="moved,before" displayName="moved,before" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="tree,effect,finished" displayName="tree,effect,finished" eventType="event.eflevent" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent" />
+       <event name="multi,pinch,out" displayName="multi,pinch,out" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.genlistitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.genlistitem.widget.xml
new file mode 100644 (file)
index 0000000..59b0c2d
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlistitem" displayName="Genlistitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="genlist">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.genlist@itemstyle" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="sets the text of item" />
+       <property name="sub_text" type="rm_string" displayName="Sub Text" default="Sub Text" category="General" tooltip="sets the text of item" />
+       <!-- <property name="item_type" type="efl.genlist@itemtype" displayName="Item type" default="none" category="General"
+               tooltip="sets the type of item&#10;
+- none: simple item&#10;
+- tree: this may be expanded and have child items.&#10;
+- group: an index item of a group of items. This item can have child items.">
+               <condition name="enable-property" value="1" target="item-add" />
+       </property> -->
+
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="sets the selected state of the UI Component." />
+
+       <property name="standard_icon" type="efl.icon@standardicon" displayName="Standard icon" default="" category="Icon"
+               tooltip="sets the standard icon to be shown in the list item before label text&#10;" />
+       <property name="image_path" type="image" displayName="Image path" default="" category="Icon"
+               tooltip="sets the file path of the image to be shown in the list item before label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <property name="end_standard_icon" type="efl.icon@standardicon" displayName="Standard icon" default="" category="End Icon"
+               tooltip="sets the standard icon to be shown in the list item after label text&#10;" />
+       <property name="end_image_path" type="image" displayName="Image path" default="" category="End Icon"
+               tooltip="sets the file path of the image to be shown in the list item after label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.grid.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.grid.widget.xml
new file mode 100644 (file)
index 0000000..6a5ec36
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="grid" displayName="Grid" smallIcon="widget/32/pal_grid_nor.png" icon.16="widget/16/view_p_grid_nor.png" category="UI containers"
+       description="The grid is a grid layout UI Component that lays out a series of children as a fixed 'grid' of UI Components using a given percentage of the grid width and height each using the child object."
+       layoutType="grid" helpCategory="" helpContents="grid" feedbackWidth="300" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="vsize_w" type="integer" displayName="Col count" default="1000" category="General" tooltip="sets the virtual width of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+       <property name="vsize_h" type="integer" displayName="Row count" default="1000" category="General" tooltip="sets the virtual height of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack_x" type="integer" displayName="Left" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_w" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_y" type="integer" displayName="Top" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_h" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_w" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_x" targetValue="vsize_w" error="size-max" />
+               </property>
+               <property name="pack_h" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_y" targetValue="vsize_h" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.image.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.image.widget.xml
new file mode 100644 (file)
index 0000000..7a01ffb
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="image" displayName="Image" smallIcon="widget/32/pal_image_nor.png" icon.16="widget/16/view_p_image_nor.png" category="UI components"
+       description="An Elementary image object is a direct realization of The Elementary Image Class, and it allows one to load and display an image file on it, be it from a disk file or from a memory region"
+       helpCategory="" helpContents="" feedbackWidth="50" feedbackHeight="50" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="Sets the file that is used as the image's source." />
+       <property name="no_scale" type="efl@boolean" displayName="No scale" default="false" category="General" tooltip="Disables scaling of this object." />
+       <property name="resizable_up" type="efl@boolean" displayName="Resizable(up)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable up" />
+       <property name="resizable_down" type="efl@boolean" displayName="Resizable(down)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable down" />
+       <!--<property name="orient" type="efl.image@orient" displayName="Orient" default="none" category="General" tooltip="Sets the image orientation.&#xD;&#xD; none&#xD; 
+               : No orientation change&#xD; orient_0&#xD; : No orientation change&#xD; rotate_90&#xD; : Rotate 90 degrees clockwise&#xD; rotate_180&#xD; : Rotate 180 degrees clockwise&#xD; 
+               rotate_270&#xD; : Rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise)&#xD; flip_horizontal&#xD; : Flip image horizontally&#xD; flip_vertical&#xD; : 
+               Flip image vertically&#xD; flip_transpose&#xD; : Flip the image along the y = (width - x) line (bottom-left to top-right)&#xD; flip_transverse&#xD; : Flip the image 
+               along the y = x line (top-left to bottom-right)" /> -->
+       <property name="aspect_fixed" type="efl@boolean" displayName="Aspect fixed" default="false" category="General"
+               tooltip="Set whether the original aspect ratio of the image should be kept on resize." />
+       <property name="fill_outside" type="efl@boolean" displayName="Fill outsize" default="false" category="General"
+               tooltip="Sets whether the image fills the entire object area, when keeping the aspect ratio." />
+       <!-- <property name="editable" type="efl@boolean" displayName="Editable" default="false" category="General" tooltip="Makes the image 'editable'." /> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="drop" displayName="drop" eventType="event.eflevent" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.index.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.index.widget.xml
new file mode 100644 (file)
index 0000000..a6d2fbd
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="index" displayName="Index" smallIcon="widget/32/pal_index_nor.png" icon.16="widget/16/view_p_index_nor.png" category="UI components"
+       description="An index UI Component gives you an index for fast access to whichever group of other UI items one might have" helpCategory="" helpContents=""
+       feedbackWidth="200" feedbackHeight="150" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="indexitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="autohide" type="efl@boolean" displayName="Autohide enabled" default="false" category="General"
+               tooltip="Enables or disables the auto hiding feature for a given index UI Component." />
+       <property name="indicator" type="efl@boolean" displayName="Indicator enabled" default="true" category="General" tooltip="Sets the indicator to be enabled." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="Appends a new item on a given index UI Component."
+               unusedEditors="source_tab" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="level,up" displayName="level,up" eventType="event.eflevent" />
+       <event name="level,down" displayName="level,down" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.indexitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.indexitem.widget.xml
new file mode 100644 (file)
index 0000000..3923abd
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="indexitem" displayName="Indexitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="IndexItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="index">
+
+       <relations>
+               <parent ids="index" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="The letter under which the item should be indexed" />
+       <!-- <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." /> -->
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.label.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.label.widget.xml
new file mode 100644 (file)
index 0000000..8b3e38b
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="label" displayName="Label" smallIcon="widget/32/pal_label_nor.png" icon.16="widget/16/view_p_label_nor.png" category="UI components"
+       description="UI Component to display text, with simple html-like markup" helpCategory="" helpContents="efl.progressbar" feedbackWidth="100" feedbackHeight="30"
+       minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="Label" category="General" tooltip="sets the text of the UI Component." />
+       <!-- <property name="style" type="efl.label@style" displayName="Style" default="default" category="General" tooltip="Sets the style to be used by the label.&#10; 
+               if the text doesn't fit the geometry of the label, it is ellipsized or cut. Elementary provides several styles for this UI Component.&#10; - default: No animation.&#10; 
+               - marker: Centers the text in the label and makes it bold by default.&#10; - slide_long: The entire text appears from the right of the screen and slides until it 
+               disappears in the left of the screen(reappearing on the right again).&#10; - slide_short: The text appears in the left of the label and slides to the right to show 
+               the overflow. When all of the text has been shown the position is reset.&#10; - slide_bounce: The text appears in the left of the label and slides to the right to 
+               show the overflow. When all of the text has been shown the animation reverses, moving the text to the left."/> -->
+       <property name="line_wrap" type="efl.label@wraptype" displayName="Wrap type" default="none" category="General"
+               tooltip="sets the wrapping behavior of the label.&#10;
+- none: No wrapping.&#10;
+- char: Wrap between characters.&#10;
+- word: Wrap between words.&#10;
+- mixed: Word wrap, and if that fails, char wrap." />
+       <property name="wrap_width" type="integer" displayName="Wrap width" default="0" category="General" tooltip="sets the maximum width size hint of the label." />
+       <property name="ellipsis" type="efl@boolean" displayName="Ellipsis" default="true" category="General" tooltip="sets the ellipsis behavior of the label." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="slide,end" displayName="slide,end" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.layout.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.layout.widget.xml
new file mode 100644 (file)
index 0000000..23c16b1
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="layout" displayName="Layout" smallIcon="widget/32/pal_layout_nor.png" icon.16="widget/16/view_p_layout_nor.png" category="UI components"
+       description="This is a container UI Component that takes a standard Edje design file and wraps it very thinly in a UI Component" helpCategory="" helpContents="button"
+       feedbackWidth="150" feedbackHeight="150" minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="src" type="layout-resource" displayName="File path" default="" category="General" tooltip="The path to the file (edj) that is used as a layout" />
+       <property name="group" type="dynamic-combo" displayName="Group name" default="" category="General" tooltip="The group that the layout belongs to in the edje file" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+       <event name="theme,changed" displayName="theme,changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.list.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.list.widget.xml
new file mode 100644 (file)
index 0000000..56cc96d
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="list" displayName="List" smallIcon="widget/32/pal_list_nor.png" icon.16="widget/16/view_p_list_nor.png" category="UI components"
+       description="A list UI Component is a container whose children are displayed vertically or horizontally, in order, and can be selected. The list can accept only one or multiple item selections. Also has many modes of items displaying."
+       helpCategory="" helpContents="" feedbackWidth="480" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="listitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="mode" type="efl.list@mode" displayName="Mode" default="scroll" category="General" tooltip="Sets which mode to use for the list object. In Tizen default theme, scroll and limit modes are the same as compress mode." />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General" tooltip="Sets the list select mode." />
+       <property name="multi_select" type="efl@boolean" displayName="Multi select" default="false" category="General"
+               tooltip="Enables or disables multiple items selection on the list object.">
+               <condition name="enable-property" value="true" target="multi_select_mode" />
+       </property>
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.listitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.listitem.widget.xml
new file mode 100644 (file)
index 0000000..3b68af2
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="listitem" displayName="Listitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="list">
+
+       <relations>
+               <parent ids="list" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="The text of the list item" />
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.map.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.map.widget.xml
new file mode 100644 (file)
index 0000000..171006d
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="map" displayName="Map" smallIcon="widget/32/pal_map_nor.png" icon.16="widget/16/view_p_map_nor.png" category="UI components"
+       description="This is a widget specifically for displaying a map" helpCategory="" helpContents="" feedbackWidth="300" feedbackHeight="300" minWidth="100"
+       minHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="zoom_level" type="scale-integer" displayName="Zoom level" default="15" category="General" tooltip="Sets the zoom level of the map">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="20" error="integer-max" />
+       </property>
+
+       <property name="longitude" type="double" displayName="longitude" default="0" category="General" tooltip="The longitude to show at the center">
+               <condition name="integer-min" value="-180" error="integer-min" />
+               <condition name="integer-max" value="180" error="integer-max" />
+       </property>
+       <property name="latitude" type="double" displayName="latitude" default="0" category="General" tooltip="The latitude to show at the center">
+               <condition name="integer-min" value="-90" error="integer-min" />
+               <condition name="integer-max" value="90" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="press" displayName="press" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+       <event name="loaded" displayName="loaded" eventType="event.eflevent" />
+       <event name="zoom,start" displayName="zoom,start" eventType="event.eflevent" />
+       <event name="zoom,stop" displayName="zoom,stop" eventType="event.eflevent" />
+       <event name="zoom,change" displayName="zoom,change" eventType="event.eflevent" />
+       <event name="tile,load" displayName="tile,load" eventType="event.eflevent" />
+       <event name="tile,loaded" displayName="tile,loaded" eventType="event.eflevent" />
+       <event name="route,load" displayName="route,load" eventType="event.eflevent" />
+       <event name="route,loaded" displayName="route,loaded" eventType="event.eflevent" />
+       <event name="name,load" displayName="name,load" eventType="event.eflevent" />
+       <event name="name,loaded" displayName="name,loaded" eventType="event.eflevent" />
+       <event name="overlay,clicked" displayName="overlay,clicked" eventType="event.eflevent" />
+       <event name="tile,loaded,fail" displayName="tile,loaded,fail" eventType="event.eflevent" />
+       <event name="route,loaded,fail" displayName="route,loaded,fail" eventType="event.eflevent" />
+       <event name="name,loaded,fail" displayName="name,loaded,fail" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.multibuttonentry.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.multibuttonentry.widget.xml
new file mode 100644 (file)
index 0000000..e101da5
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="multibuttonentry" displayName="Multibuttonentry" smallIcon="widget/32/pal_multi_nor.png" icon.16="widget/16/view_p_multi_nor.png" category="UI components"
+       description="multibuttonentry provides an extended functionality to text input. Multibuttonentry allows users to enter text and each chunk of text managed as a set of buttons. The typical use cases of multibuttonentry is composing emails/messages to a group of addresses, each of which is an item that can be clicked for further actions." helpCategory="" helpContents="" feedbackWidth="150" feedbackHeight="50" minWidth="10" minHeight="10" borderVisible="false"
+       uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="multibuttonentryitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <!--<property name="text" type="string" displayName="Text" default="" /> -->
+       <property name="expanded" type="efl@boolean" displayName="Expanded" default="false" category="General"
+               tooltip="set/unset the multibuttonentry to expanded state.&#10;
+In expanded state, the complete entry will be displayed. Otherwise, only single line of the entry will be displayed." />
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General"
+               tooltip="set/unset the multibuttonentry to editable state.&#10;
+If true, user can add/delete item in multibuttonentry.&#10;
+If not, the multibuttonentry is non-editable." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add multibuttonentry item" unusedEditors="source_tab" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="item,selected" displayName="item,selected" eventType="event.eflevent" />
+       <event name="item,added" displayName="item,added" eventType="event.eflevent" />
+       <event name="item,deleted" displayName="item,deleted" eventType="event.eflevent" />
+       <event name="item,clicked" displayName="item,clicked" eventType="event.eflevent" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent" />
+       <event name="contracted" displayName="contracted" eventType="event.eflevent" />
+       <event name="expand,state,changed" displayName="expand,state,changed" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.multibuttonentryitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.multibuttonentryitem.widget.xml
new file mode 100644 (file)
index 0000000..6caaa32
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="multibuttonentryitem" displayName="Multibuttonentryitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components"
+       description="multibuttonentry" helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="multibuttonentry">
+
+       <relations>
+               <parent ids="multibuttonentry" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="sets the text of item" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.panel.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.panel.widget.xml
new file mode 100644 (file)
index 0000000..ca57b3d
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="panel" displayName="Panel" smallIcon="widget/32/pal_panel_nor.png" icon.16="widget/16/view_p_panel_nor.png" category="UI containers"
+       description="A panel is an animated side-panel that contains a sub-object. It can be expanded or contracted by clicking the button on its edge." layoutType="box"
+       helpCategory="" helpContents="panel" feedbackWidth="150" feedbackHeight="80" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" max="1" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="orient" type="efl.panel@orient" displayName="Orient" default="top" category="General"
+               tooltip="sets the orientation of the panel.&#10;
+- top: Panel (dis)appears from the top&#10;
+- bottom: Panel (dis)appears from the bottom&#10;
+- left: Panel (dis)appears from the left&#10;
+- right: Panel (dis)appears from the right" />
+       <!-- hidden API is not work -->
+       <property name="hidden" type="efl@boolean" displayName="Hidden" default="false" category="General"
+               tooltip="sets the state of the panel.&#10;
+If true, panel is in contracted state&#10;
+If false, panel is in expanded state" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <!-- Events -->
+
+       <event name="scroll" displayName="scroll" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.panes.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.panes.widget.xml
new file mode 100644 (file)
index 0000000..458b03d
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="panes" displayName="Panes" smallIcon="widget/32/pal_panes_nor.png" icon.16="widget/16/view_p_panes_nor.png" category="UI containers"
+       description="The panes UI Component adds a draggable bar between two contents. When dragged this bar will resize contents' size." layoutType="panes"
+       helpCategory="" helpContents="panes" feedbackWidth="150" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General"
+               tooltip="Sets the orientation of a given panes UI Component." />
+       <property name="fixed" type="efl@boolean" displayName="Fixed" default="false" category="General" tooltip="Sets whether the left and right panes resize homogeneously." />
+       <property name="right_size" type="double" displayName="Right size" default="0.5" category="General"
+               tooltip="Sets the size proportion of the panes UI Component's right side.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack" type="efl.panes@pack" displayName="Pack" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events -->
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="unpressed" displayName="unpressed" eventType="event.eflevent" />
+       <event name="press" displayName="press" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.popup.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.popup.widget.xml
new file mode 100644 (file)
index 0000000..b3b8c57
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="popup" displayName="Popup" smallIcon="widget/32/pal_popup_nor.png" icon.16="widget/16/view_p_popup_nor.png" category="Views" description="Popups are temporarily displayed on the screenb to provide information or to ask for user confirmation. Popup allows users to take instant action for events. Popup is an enhancement of Notify components and is composed of three areas: Title, Content and Action with up to 3 buttons(optional)." layoutType="Popup"
+       helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%"
+       xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+
+       <property name="title" type="string" displayName="Title" default="Title" category="General" tooltip="The title text of the popup widget">
+       </property>
+       <property name="style" type="efl.popup@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="height" type="scale-integer" displayName="Height" default="200" category="General"
+               tooltip="sets the x of left upper corner of the widget.&#10;
+But this depends on the container of the widget.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="400" error="integer-max" />
+       </property>
+       <property name="timeout" type="double" displayName="Timeout" default="0" category="General" tooltip="Sets a timeout to hide popup automatically">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="timeout" displayName="timeout" eventType="event.eflevent" />
+       <event name="block,clicked" displayName="block,clicked" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="show,finished" displayName="show,finished" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.progressbar.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.progressbar.widget.xml
new file mode 100644 (file)
index 0000000..aa20e14
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="progressbar" displayName="Progressbar" smallIcon="widget/32/pal_progress_nor.png" icon.16="widget/16/view_p_progress_nor.png" category="UI components"
+       description="The progress bar is a UI Component for visually representing the progress status of a given job/task" helpCategory="" helpContents="efl.progressbar"
+       feedbackWidth="150" feedbackHeight="30" minWidth="50" minHeight="25" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+
+       <property name="value" type="double" displayName="Value" default="0" category="General"
+               tooltip="Sets the progress value (in percentage) on a given progress bar UI Component. The progress value must be between 0.0 and 1.0">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="span_size" type="integer" displayName="Span Size" default="0" category="General" tooltip="The length of the progress bar's bar region">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <!-- <property name="format" type="efl.progressbar@format" displayName="Format" default="%.0f%%"/> -->
+       <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General"
+               tooltip="Inverts a given progress bar UI Component's displaying values order." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief &#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.radio.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.radio.widget.xml
new file mode 100644 (file)
index 0000000..215f625
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="radio" displayName="Radio" smallIcon="widget/32/pal_radio_nor.png" icon.16="widget/16/view_p_radio_nor.png" category="UI components"
+       description="Radio is a UI Component that allows for 1 or more options to be displayed and have the user choose only 1 of them" helpCategory="" helpContents="efl.datetime"
+       feedbackWidth="60" feedbackHeight="60" minWidth="40" minHeight="40" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="value" type="integer" displayName="Value" default="0" category="General"
+               tooltip="sets the value of the radio group.&#10;
+The radio group is initialized with this value. The value should be one of the radio buttons' state values in the group to be properly initialized." />
+       <property name="state_value" type="integer" displayName="State value" default="0" category="General" tooltip="sets the integer value that this radio object represents." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the radio object is selected. If you want to trace the state change of a radio group, you should add this callback to all the radio objects in that group.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.scroller.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.scroller.widget.xml
new file mode 100644 (file)
index 0000000..d295b99
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="scroller" displayName="Scroller" smallIcon="widget/32/pal_scroller_nor.png" icon.16="widget/16/view_p_scroller_nor.png" category="UI containers"
+       description="A scroller holds (and clips) a single object and scrolls it around. This means that it allows the user to use a scroll bar (or a finger) to drag the viewable region around, moving through a much larger object that is contained in the scroller. The scroller will always have a small minimum size by default as it won't be limited by the contents of the scroller"
+       layoutType="box" helpCategory="" helpContents="" feedbackWidth="200" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General"
+               tooltip="sets the horizontal scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General"
+               tooltip="sets the vertical scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="content_min_w" type="efl@boolean" displayName="Min limit(Width)" default="false" category="General"
+               tooltip="Make the scroller minimum width size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+       <property name="content_min_h" type="efl@boolean" displayName="Min limit(Height)" default="false" category="General"
+               tooltip="Make the scroller minimum heigth size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+       <property name="propagate_events" type="efl@boolean" displayName="Propagate events" default="true" category="General"
+               tooltip="sets event propagation on a scroller.&#10;
+This enables or disables event propagation from the scroller content to the scroller and its parent. By default event propagation is enabled" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent"
+               eventInfo="@brief scrolling animation has started&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief scrolling animation has stopped&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent"
+               eventInfo="@brief dragging the contents around has started&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief dragging the contents around has stopped&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief the left edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief the right edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief the top edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief the bottom edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.slider.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.slider.widget.xml
new file mode 100644 (file)
index 0000000..775a1db
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="slider" displayName="Slider" smallIcon="widget/32/pal_slider_nor.png" icon.16="widget/16/view_p_slider_nor.png" category="UI components"
+       description="The slider adds a draggable “slider” UI Component for selecting the value of something within a range" helpCategory="" helpContents=""
+       feedbackWidth="200" feedbackHeight="30" minWidth="70" minHeight="25" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="indicator_format" type="string" displayName="Indicator format" default="" category="General"
+               tooltip="sets the format string for the indicator label.&#10;
+The slider may display its value somewhere else for example, above the slider knob that is dragged around. 
+This function sets the format string used for this." />
+       <property name="direction" type="efl@direction" displayName="Direction" default="horizontal" category="General"
+               tooltip="sets the orientation of a given slider UI Component." />
+       <property name="style" type="efl.slider@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="min" type="double" displayName="Min" default="0.0" category="General" tooltip="sets the minimum value for the slider.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max-by" value="value" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max" default="1.0" category="General" tooltip="sets the maximum value for the slider.">
+               <condition name="integer-max" value="999999" error="integer-max" />
+               <condition name="integer-min-by" value="value" error="integer-min-by" />
+       </property>
+       <property name="value" type="double" displayName="Value" default="0.0" category="General" tooltip="sets the value the slider displays.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General"
+               tooltip="inverts a given slider UI Component's displaying values order." />
+       <property name="step" type="double" displayName="Step" default="0.05" category="General" tooltip="sets the step by which slider indicator will move.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="indicator" type="efl@boolean" displayName="Show indicator" default="false" category="General"
+               tooltip="sets whether to enlarge slider indicator (augmented knob) or not.&#10;
+By default, indicator will be bigger while dragged by the user. It won't display values set if you disable indicator." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief Whenever the slider value is changed by the user.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent"
+               eventInfo="@brief A short time after the value is changed by the user. This will be called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids possibly expensive reactions to the value change.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="slider,drag,start" displayName="slider,drag,start" eventType="event.eflevent"
+               eventInfo="@brief dragging the slider indicator around has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="slider,drag,stop" displayName="slider,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief dragging the slider indicator around has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.spinner.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.spinner.widget.xml
new file mode 100644 (file)
index 0000000..f718c02
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="spinner" displayName="Spinner" smallIcon="widget/32/pal_spinner_nor.png" icon.16="widget/16/view_p_spinner_nor.png" category="UI components"
+       description="A spinner is a UI Component which allows the user to increase or decrease numeric values using arrow buttons, or edit values directly, clicking over it and typing the new value"
+       helpCategory="" helpContents="" feedbackWidth="150" feedbackHeight="150" minWidth="150" minHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.spinner@style" displayName="Style" default="horizontal" category="General"
+               tooltip="sets the style of the UI Component&#10;
+- horizontal: left/right buttons are used for changing the value.&#10;
+- vertical: up/down buttons are used for changing the value." />
+       <!-- <property name="label_format" type="string" displayName="Label format" default="%.0f" tooltip="sets the format string of the displayed label.&#10; If NULL, 
+               this sets the format to &quot;%.0f&quot;. If not it sets the format string for the label text. The label text is provided a floating point value, so the label text 
+               can display up to 1 floating point value. Note that this is optional. "/> -->
+       <property name="min" type="double" displayName="Min" default="0" category="General"
+               tooltip="sets the minimum value of the spinner.&#10;
+       If actual value is less than this value, it will be updated to this value.">
+               <condition name="integer-min" value="-9999999" error="integer-min" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max" default="100" category="General"
+               tooltip="sets the maximum value of the spinner.&#10;
+       If actual value is bigger than this value, it will be updated to this value.">
+               <condition name="integer-max" value="99999999" error="integer-max" />
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+       </property>
+       <property name="step" type="double" displayName="Step" default="1" category="General" tooltip="sets the step used to increment or decrement the spinner value.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General"
+               tooltip="sets whether the spinner can be directly edited by the user or not." />
+       <!-- <property name="interval" type="double" displayName="Interval" default="0.85" category="General" tooltip="Set the interval on time updates for an user mouse 
+               button hold on spinner UI Components' arrows.&#10; This interval value is decreased while the user holds the mouse pointer either incrementing or decrementing spinner's 
+               value. This helps the user to get to a given value distant from the current one easier/faster, as it will start to change quicker and quicker on mouse button holds. 
+               The calculation for the next change interval value, starting from the one set with this call, is the previous interval divided by 1.05, so it decreases a little 
+               bit. The default starting interval value for automatic changes is 0.85 seconds."/> <property name="base" type="double" displayName="Base" default="0" category="General" 
+               tooltip="sets the base for rounding.&#10; rounded_val = base + (double)(((value - base) / round) * round)"/> <property name="round" type="integer" displayName="Round" 
+               default="" category="General" tooltip="sets the round value for rounding.&#10; rounded_val = base + (double)(((value - base) / round) * round)"/> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief Whenever the spinner value is changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent"
+               eventInfo="@brief A short time after the value is changed by the user. This will be called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids possibly expensive reactions to the value change.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.table.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.table.widget.xml
new file mode 100644 (file)
index 0000000..f506c0d
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="table" displayName="Table" smallIcon="widget/32/pal_table_nor.png" icon.16="widget/16/view_p_table_nor.png" category="UI containers"
+       description="A container UI Component to arrange other UI Components in a table where items can span multiple columns or rows" layoutType="table" helpCategory=""
+       helpContents="" feedbackWidth="300" feedbackHeight="300" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General" tooltip="Sets the homogeneous layout in the table." />
+
+       <!-- My -->
+       <property name="cols" type="integer" displayName="Col count" default="2" category="General" tooltip="The column count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="rows" type="integer" displayName="Row count" default="2" category="General" tooltip="The row count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="The horizontal padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="The vertical padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+       <childUIComponentProperty>
+               <property name="pack_col" type="integer" displayName="Column" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="cols" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_row" type="integer" displayName="Row" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="rows" error="integer-max-by-parent-property" />
+               </property>
+               <property name="col_span" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="col_span" targetValue="cols" error="size-max" />
+               </property>
+               <property name="row_span" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="row_span" targetValue="rows" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.toolbar.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.toolbar.widget.xml
new file mode 100644 (file)
index 0000000..f67170a
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="toolbar" displayName="Toolbar" smallIcon="widget/32/pal_toolbar_nor.png" icon.16="widget/16/view_p_toolbar_nor.png" category="UI components"
+       description="A toolbar is a UI Component that displays a list of items inside a box. It can be scrollable, show a menu with items that don't fit to toolbar size or even crop them."
+       helpCategory="" helpContents="" feedbackWidth="480" feedbackHeight="50" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="toolbaritem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <!-- <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." 
+               /> -->
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="style" type="efl.toolbar@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="shrink_mode" type="efl.toolbar@shrinkmode" displayName="Shrink mode" default="none" category="General"
+               tooltip="Sets the item displaying mode of a given toolbar UI Component obj.">
+               <condition name="disable-property" value="1" target="homogeneous" />
+               <condition name="disable-property" value="3" target="homogeneous" />
+               <condition name="disable-property" value="4" target="homogeneous" />
+       </property>
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General" tooltip="Sets the toolbar select mode." />
+       <property name="icon_size" type="integer" displayName="Icon size" default="32" category="General" tooltip="Sets the icon size, in pixels, to be used by toolbar items.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="transverse_expand" type="efl@boolean" displayName="Transverse expanded" default="false" category="General"
+               tooltip="Sets the item's transverse expansion of a given toolbar UI Component obj." />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="true" category="General" tooltip="Enables or disables the homogeneous mode." />
+       <!-- <property name="align" type="double" displayName="align" default="0.5" category="General" tooltip="Sets the alignment of the items." > <condition name="integer-min" 
+               value="0" error="integer-min"/> <condition name="integer-max" value="1" error="integer-max"/> </property> -->
+       <property name="direction" type="efl@direction" displayName="Direction" default="horizontal" category="General" tooltip="Changes a toolbar's orientation." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief when the user clicks on a toolbar item and becomes selected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief when the toolbar is pressed for a certain amount of time.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.toolbaritem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/efl.toolbaritem.widget.xml
new file mode 100644 (file)
index 0000000..f9c02e6
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="toolbaritem" displayName="Toolbaritem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="toolbar">
+
+       <relations>
+               <parent ids="toolbar" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component item." />
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="The text of the item when appends items to the toolbar." />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="A string with the absolute path of an image file" />
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/tizen.view.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.3/widget/tizen.view.xml
new file mode 100644 (file)
index 0000000..f14aced
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="view" displayName="View" smallIcon="widget/32/pal_empty_nor.png" icon.16="widget/16/view_p_view_nor.png" uiSelector="#%id%" layoutType="view"
+category="Views" description="Empty View" helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false"
+xpath="">
+
+       <relations>
+               <content ids="naviframe" max="1" exclusiveGroup="default" />
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+               <content ids="tabbar" max="1" exclusiveGroup="default" />
+               <content ids="panel" max="4" />
+               <content ids="popup" max="1" exclusiveGroup="default" />
+               <content ids="ctxpopup" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-page-id" />
+       </property>
+       <property name="type" type="string" displayName="type" initValue="view" category="General">
+       </property>
+       <property name="indicator" type="efl@boolean" displayName="Indicator" default="true" category="General" tooltip="show or hide the indicator.">
+       </property>
+       <property name="screen_orientation" type="tizen.view@screen-orientation" displayName="Orientation" default="full_sensor" category="General"
+               tooltip="sets the style of the UI Component.">
+               <condition name="enable-property" value="full_sensor" target="disable" />
+       </property>
+       <property name="page_location_x" type="integer" displayName="location_x" category="Position" unusedEditors="properties">
+       </property>
+       <property name="page_location_y" type="integer" displayName="location_y" category="Position" unusedEditors="properties">
+       </property>
+       <event name="uib,view,create" displayName="view,create" eventType="event.viewevent">
+               if (sizeof(uib_%page%_control_context)) {
+               vc->cc = calloc(1,
+               sizeof(uib_%page%_control_context));
+               }
+       </event>
+       <event name="uib,view,destroy" displayName="view,destroy" eventType="event.viewevent">
+               if (vc->cc) {
+               /* destroy your Control_Context here */
+
+               free(vc->cc);
+               }
+       </event>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/efl.style.edj.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/efl.style.edj.xml
new file mode 100644 (file)
index 0000000..aa9cb3d
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<defaultStyleEDJs>
+       <!-- Order means priority -->
+       <styleEDJ name="tizen-2.4-mobile-HD.edj" />
+       <styleEDJ name="default.edj" />
+</defaultStyleEDJs>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/efl.types.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/efl.types.xml
new file mode 100644 (file)
index 0000000..3e96825
--- /dev/null
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<types>
+       <type id="efl@boolean">
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@direction">
+               <constant value="horizontal" displayName="horizontal" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl@selectmode">
+               <constant value="default" displayName="default" />
+               <constant value="always" displayName="always" />
+               <constant value="none" displayName="none" />
+               <constant value="display_only" displayName="display_only" />
+       </type>
+
+       <type id="efl.progressbar@style">
+               <constant value="default" displayName="default" />
+               <constant value="pending" displayName="pending" />
+               <constant value="process_large" displayName="process_large" />
+               <constant value="process_medium" displayName="process_medium" />
+               <constant value="process_small" displayName="process_small" />
+       </type>
+
+       <type id="efl.spinner@style">
+               <constant value="horizontal" displayName="horizontal" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl.progressbar@format">
+               <constant value="%.0f%%" displayName="default" />
+               <constant value="%.1f%%" displayName="0.0" />
+               <constant value="%.2f%%" displayName="0.00" />
+               <constant value="%.3f%%" displayName="0.000" />
+               <constant value="%.4f%%" displayName="0.0000" />
+       </type>
+
+       <type id="efl.calendar@selectmode">
+               <constant value="default" displayName="default" />
+               <constant value="always" displayName="always" />
+               <constant value="none" displayName="none" />
+               <constant value="ondemand" displayName="ondemand" />
+       </type>
+
+       <type id="efl.colorselector@mode">
+               <constant value="palette" displayName="palette" />
+               <constant value="components" displayName="components" />
+               <constant value="both" displayName="both" />
+               <constant value="picker" displayName="picker" />
+               <constant value="plane" displayName="plane" />
+               <constant value="palette_plane" displayName="palette_plane" />
+               <constant value="all" displayName="all" />
+       </type>
+
+       <type id="efl.bg@option">
+               <constant value="center" displayName="center" />
+               <constant value="scale" displayName="scale" />
+               <constant value="stretch" displayName="stretch" />
+               <constant value="tile" displayName="tile" />
+       </type>
+
+       <type id="check-scale">
+               <constant value="fill" displayName="fill" />
+       </type>
+
+       <type id="efl.image@orient">
+               <constant value="none" displayName="none" />
+               <constant value="orient_0" displayName="orient_0" />
+               <constant value="orient_90" displayName="orient_90" />
+               <constant value="rotate_90" displayName="rotate_90" />
+               <constant value="orient_180" displayName="orient_180" />
+               <constant value="rotate_180" displayName="rotate_180" />
+               <constant value="orient_270" displayName="orient_270" />
+               <constant value="rotate_270" displayName="rotate_270" />
+               <constant value="flip_horizontal" displayName="flip_horizontal" />
+               <constant value="flip_vertical" displayName="flip_vertical" />
+               <constant value="flip_transpose" displayName="flip_transpose" />
+               <constant value="flip_transverse" displayName="flip_transverse" />
+       </type>
+
+       <type id="efl.index@style">
+               <constant value="default" displayName="default" />
+               <constant value="pagecontrol" displayName="pagecontrol" />
+       </type>
+
+       <type id="efl.label@wraptype">
+               <constant value="none" displayName="none" />
+               <constant value="char" displayName="char" />
+               <constant value="word" displayName="word" />
+               <constant value="mixed" displayName="mixed" />
+       </type>
+
+       <type id="efl.label@style">
+               <constant value="default" displayName="default" />
+               <constant value="marker" displayName="marker" />
+               <constant value="slide_long" displayName="slide_long" />
+               <constant value="slide_short" displayName="slide_short" />
+               <constant value="slide_bounce" displayName="slide_bounce" />
+       </type>
+
+       <type id="efl@scrollbar_h">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@scrollbar_v">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl.scroller@style">
+               <constant value="default" displayName="default" />
+               <constant value="handler" displayName="handler" />
+       </type>
+
+       <type id="efl.list@multiselectmode">
+               <constant value="default" displayName="default" />
+               <constant value="with_control" displayName="with_control" />
+       </type>
+
+       <type id="efl.list@mode">
+               <constant value="compress" displayName="compress" />
+               <constant value="scroll" displayName="scroll" />
+               <constant value="limit" displayName="limit" />
+               <constant value="expand" displayName="expand" />
+       </type>
+
+       <type id="efl.panel@orient">
+               <constant value="top" displayName="top" />
+               <constant value="bottom" displayName="bottom" />
+               <constant value="left" displayName="left" />
+               <constant value="right" displayName="right" />
+       </type>
+
+       <type id="efl.toolbar@shrinkmode">
+               <constant value="none" displayName="none" />
+               <constant value="hide" displayName="hide" />
+               <constant value="scroll" displayName="scroll" />
+               <constant value="menu" displayName="menu" />
+               <constant value="expand" displayName="expand" />
+       </type>
+
+       <type id="efl.toolbar@style">
+               <constant value="default" displayName="default" />
+               <constant value="navigationbar" displayName="navigationbar" />
+               <!--<constant value="tabbar_with_title" displayName="tabbar_with_title" /> -->
+       </type>
+
+       <type id="efl.entry@textformat">
+               <constant value="plain_utf8" displayName="plain_utf8" />
+               <constant value="markup_utf8" displayName="markup_utf8" />
+       </type>
+
+       <type id="efl.datetime@style">
+               <constant value="default" displayName="default" />
+               <constant value="date_layout" displayName="date_layout" />
+               <constant value="time_layout" displayName="time_layout" />
+               <constant value="time_layout_24hr" displayName="time_layout_24hr" />
+       </type>
+
+       <type id="efl.button@style">
+               <constant value="default" displayName="default" />
+               <constant value="circle" displayName="circle" />
+               <constant value="editfield_clear" displayName="editfield_clear" />
+               <constant value="bottom" displayName="bottom" />
+               <constant value="icon_reorder" displayName="icon_reorder" />
+               <constant value="icon_expand_add" displayName="icon_expand_add" />
+               <constant value="icon_expand_delete" displayName="icon_expand_delete" />
+               <constant value="naviframe/title_left" displayName="naviframe/title_left" />
+               <constant value="naviframe/title_right" displayName="naviframe/title_right" />
+               <constant value="naviframe/back_btn" displayName="naviframe/back_btn" />
+               <constant value="dropdown" displayName="dropdown" />
+       </type>
+
+       <type id="efl.check@style">
+               <constant value="default" displayName="default" />
+               <constant value="favorite" displayName="favorite" />
+               <constant value="on&amp;off" displayName="on&amp;off" />
+       </type>
+
+       <type id="efl.slider@style">
+               <constant value="default" displayName="default" />
+               <constant value="center_point" displayName="center_point" />
+               <constant value="warning" displayName="warning" />
+       </type>
+
+       <type id="efl.gengrid@style">
+               <constant value="default" displayName="default" />
+               <constant value="popup" displayName="popup" />
+       </type>
+
+       <type id="efl.gengrid@itemstyle">
+               <constant value="default" displayName="default" />
+               <constant value="type1" displayName="type1" />
+               <constant value="type2" displayName="type2" />
+       </type>
+
+       <type id="efl.genlist@style">
+               <constant value="solid/default" displayName="solid/default" />
+       </type>
+
+       <type id="efl.genlist@itemstyle">
+               <constant value="type1" displayName="type1" />
+               <constant value="type2" displayName="type2" />
+               <constant value="multiline" displayName="multiline" />
+               <constant value="full" displayName="full" />
+               <constant value="group_index" displayName="group_index" />
+               <constant value="group_index/expandable" displayName="group_index/expandable" />
+               <constant value="default" displayName="default" />
+               <constant value="double_label" displayName="double_label" />
+               <constant value="one_icon" displayName="one_icon" />
+               <constant value="end_icon" displayName="end_icon" />
+       </type>
+
+       <type id="efl.genlist@itemtype">
+               <constant value="none" displayName="none" />
+               <constant value="tree" displayName="tree" />
+               <constant value="group" displayName="group" />
+       </type>
+
+       <type id="efl.ctxpopup@style">
+               <constant value="default" displayName="default" />
+               <constant value="more/default" displayName="more/default" />
+       </type>
+
+       <type id="tizen.view@screen-orientation">
+               <constant value="no_sensor" displayName="no_sensor" />
+               <constant value="only_portrait" displayName="only_portrait" />
+               <constant value="only_landscape" displayName="only_landscape" />
+               <constant value="full_sensor" displayName="full_sensor" />
+       </type>
+
+       <type id="efl.panes@pack">
+               <constant value="left" displayName="left" />
+               <constant value="right" displayName="right" />
+       </type>
+
+       <type id="efl.popup@style">
+               <constant value="default" displayName="default" />
+               <constant value="theme_bg" displayName="theme_bg" />
+       </type>
+
+       <type id="efl.icon@standardicon">
+               <constant value="" displayName="(None)" />
+               <constant value="apps" displayName="apps" />
+               <constant value="arrow_down" displayName="arrow_down" />
+               <constant value="arrow_left" displayName="arrow_left" />
+               <constant value="arrow_right" displayName="arrow_right" />
+               <constant value="arrow_up" displayName="arrow_up" />
+               <constant value="chat" displayName="chat" />
+               <constant value="clock" displayName="clock" />
+               <constant value="close" displayName="close" />
+               <constant value="delete" displayName="delete" />
+               <constant value="edit" displayName="edit" />
+               <constant value="file" displayName="file" />
+               <constant value="home" displayName="home" />
+               <constant value="media_player/forward" displayName="media_player/forward" />
+               <constant value="media_player/info" displayName="media_player/info" />
+               <constant value="media_player/next" displayName="media_player/next" />
+               <constant value="media_player/pause" displayName="media_player/pause" />
+               <constant value="media_player/play" displayName="media_player/play" />
+               <constant value="media_player/prev" displayName="media_player/prev" />
+               <constant value="media_player/rewind" displayName="media_player/rewind" />
+               <constant value="media_player/stop" displayName="media_player/stop" />
+               <constant value="menu/apps" displayName="menu/apps" />
+               <constant value="menu/arrow_up" displayName="menu/arrow_up" />
+               <constant value="menu/arrow_down" displayName="menu/arrow_down" />
+               <constant value="menu/arrow_left" displayName="menu/arrow_left" />
+               <constant value="menu/arrow_right" displayName="menu/arrow_right" />
+               <constant value="menu/chat" displayName="menu/chat" />
+               <constant value="menu/clock" displayName="menu/clock" />
+               <constant value="menu/close" displayName="menu/close" />
+               <constant value="menu/delete" displayName="menu/delete" />
+               <constant value="menu/edit" displayName="menu/edit" />
+               <constant value="menu/folder" displayName="menu/folder" />
+               <constant value="menu/file" displayName="menu/file" />
+               <constant value="menu/home" displayName="menu/home" />
+               <constant value="menu/refresh" displayName="menu/refresh" />
+               <constant value="no_photo" displayName="no_photo" />
+               <constant value="photo/no_photo" displayName="photo/no_photo" />
+               <constant value="refresh" displayName="refresh" />
+       </type>
+</types>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen-native-ui-fw.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen-native-ui-fw.xml
new file mode 100644 (file)
index 0000000..75c4f21
--- /dev/null
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE descriptors [
+    <!ENTITY tizen.types SYSTEM "tizen.types.xml">
+       <!ENTITY tizen.uicomponent.categories SYSTEM "tizen.uicomponent.categories.xml">
+       
+       <!-- default style edj -->
+       <!ENTITY efl.style.edj SYSTEM "efl.style.edj.xml">
+       
+       <!-- type & event type -->
+       <!ENTITY efl.types SYSTEM "efl.types.xml">
+       <!ENTITY tizen.eventtypes SYSTEM "tizen.eventtypes.xml">
+       
+       <!-- VIEW -->
+       <!ENTITY tizen.view SYSTEM "widget/tizen.view.xml">
+       <!ENTITY tizen.empty.view SYSTEM "widget/tizen.empty.view.xml">
+       
+       <!-- WIDGET -->
+       <!ENTITY efl.bg SYSTEM "widget/efl.bg.widget.xml">
+       <!ENTITY efl.button SYSTEM "widget/efl.button.widget.xml">
+       <!ENTITY efl.check SYSTEM "widget/efl.check.widget.xml">
+       <!ENTITY efl.colorselector SYSTEM "widget/efl.colorselector.widget.xml">
+       <!ENTITY efl.datetime SYSTEM "widget/efl.datetime.widget.xml"> 
+       <!ENTITY efl.entry SYSTEM "widget/efl.entry.widget.xml">
+       <!ENTITY efl.image SYSTEM "widget/efl.image.widget.xml">
+       <!ENTITY efl.label SYSTEM "widget/efl.label.widget.xml">
+       <!ENTITY efl.radio SYSTEM "widget/efl.radio.widget.xml">
+       <!ENTITY efl.spinner SYSTEM "widget/efl.spinner.widget.xml">
+       <!ENTITY efl.slider SYSTEM "widget/efl.slider.widget.xml">
+       <!ENTITY efl.progressbar SYSTEM "widget/efl.progressbar.widget.xml">
+       <!ENTITY efl.list SYSTEM "widget/efl.list.widget.xml">
+       <!ENTITY efl.listitem SYSTEM "widget/efl.listitem.widget.xml">
+       <!ENTITY efl.scroller SYSTEM "widget/efl.scroller.widget.xml">
+       <!ENTITY efl.genlist SYSTEM "widget/efl.genlist.widget.xml">
+       <!ENTITY efl.genlistitem SYSTEM "widget/efl.genlistitem.widget.xml">
+       <!ENTITY efl.toolbar SYSTEM "widget/efl.toolbar.widget.xml">
+       <!ENTITY efl.toolbaritem SYSTEM "widget/efl.toolbaritem.widget.xml">
+       <!ENTITY efl.multibuttonentry SYSTEM "widget/efl.multibuttonentry.widget.xml">
+       <!ENTITY efl.multibuttonentryitem SYSTEM "widget/efl.multibuttonentryitem.widget.xml">
+       <!ENTITY efl.layout SYSTEM "widget/efl.layout.widget.xml">
+       <!ENTITY efl.gengrid SYSTEM "widget/efl.gengrid.widget.xml">
+       <!ENTITY efl.gengriditem SYSTEM "widget/efl.gengriditem.widget.xml">
+       <!ENTITY efl.index SYSTEM "widget/efl.index.widget.xml">
+       <!ENTITY efl.indexitem SYSTEM "widget/efl.indexitem.widget.xml">
+       <!ENTITY efl.calendar SYSTEM "widget/efl.calendar.widget.xml">
+       <!ENTITY efl.flipselector SYSTEM "widget/efl.flipselector.widget.xml">
+       <!ENTITY efl.flipselectoritem SYSTEM "widget/efl.flipselectoritem.widget.xml">
+       <!ENTITY efl.ctxpopup SYSTEM "widget/efl.ctxpopup.widget.xml">
+       <!ENTITY efl.ctxpopupitem SYSTEM "widget/efl.ctxpopupitem.widget.xml">
+       <!ENTITY efl.popup SYSTEM "widget/efl.popup.widget.xml">
+       <!ENTITY efl.map SYSTEM "widget/efl.map.widget.xml">
+       <!ENTITY efl.hoversel SYSTEM "widget/efl.hoversel.widget.xml">
+       <!ENTITY efl.hoverselitem SYSTEM "widget/efl.hoverselitem.widget.xml">
+
+       <!-- WIDGET : Container -->
+       <!ENTITY efl.grid SYSTEM "widget/efl.grid.widget.xml">
+       <!ENTITY efl.table SYSTEM "widget/efl.table.widget.xml">
+       <!ENTITY efl.box SYSTEM "widget/efl.box.widget.xml">
+       <!ENTITY efl.panes SYSTEM "widget/efl.panes.widget.xml">
+       <!ENTITY efl.panel SYSTEM "widget/efl.panel.widget.xml">
+       <!-- End of list -->
+]>
+
+<tizenFile>
+       <fileInfo>
+               <type>tizen-descriptor</type>
+               <version>2</version>
+               <desc>Tizen Native UI Builder Descriptor</desc>
+       </fileInfo>
+
+       <descriptors xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tizen="http://www.tizen.org/2012/uibuilder/descriptor">
+
+               <renderer id="EFL" />
+
+               <doc id="tizen.doc">
+
+                       <relations>
+                               <content ids="tizen.page" />
+                       </relations>
+               </doc>
+       
+       &tizen.uicomponent.categories;
+
+               <!-- default style edj -->
+       &efl.style.edj;
+
+               <!-- type & event type -->
+       &tizen.types;
+       &efl.types;
+       &tizen.eventtypes;
+
+               <!-- view -->
+       &tizen.view;
+
+       &efl.bg;
+       &efl.button;
+       &efl.check;
+       &efl.colorselector;
+       &efl.datetime; 
+       &efl.entry;
+       &efl.image;
+       &efl.label;
+       &efl.radio;
+       &efl.spinner;
+       &efl.slider;
+       &efl.progressbar;
+       &efl.list;
+       &efl.listitem;
+       &efl.genlist;
+       &efl.genlistitem;
+       &efl.scroller;
+       &efl.toolbar;
+       &efl.toolbaritem;
+       &efl.multibuttonentry;
+       &efl.multibuttonentryitem;
+       &efl.layout;
+       &efl.gengrid;
+       &efl.gengriditem;
+       &efl.hoversel;
+       &efl.hoverselitem;
+       &efl.index;
+       &efl.indexitem; 
+       &efl.grid;
+       &efl.table;
+       &efl.box;
+       &efl.panes;
+       &efl.panel;
+       &efl.ctxpopup;
+       &efl.ctxpopupitem;
+       &efl.popup; 
+       &efl.map;
+       &efl.calendar;
+       &efl.flipselector;
+       &efl.flipselectoritem;
+
+       </descriptors>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen.eventtypes.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen.eventtypes.xml
new file mode 100644 (file)
index 0000000..dea9f2c
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<eventTypes>
+       <eventType id="event.eflevent">
+               <defaultCode>%page%_%object%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+
+       <eventType id="event.viewevent">
+               <defaultCode>%page%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+</eventTypes>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen.types.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen.types.xml
new file mode 100644 (file)
index 0000000..5b5d28c
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<types>
+    <type id="text@databinding">
+        <constant value="text" displayName=""/>
+    </type>
+    <type id="foreach@databinding">
+        <constant value="foreach" displayName=""/>
+    </type>
+</types>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen.uicomponent.categories.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/tizen.uicomponent.categories.xml
new file mode 100644 (file)
index 0000000..d86fdb4
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<UIComponentCategories>
+       <UIComponentCategory name="Views" />
+       <UIComponentCategory name="UI containers" />
+       <UIComponentCategory name="UI components" />
+</UIComponentCategories>
+
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.bg.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.bg.widget.xml
new file mode 100644 (file)
index 0000000..d47615d
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="bg" displayName="Background" smallIcon="widget/32/pal_bg_nor.png" icon.16="widget/16/view_p_bg_nor.png" category="UI components"
+       description="Background object, used for setting a solid color, image or Edje group as a background to a window or any container object" helpCategory=""
+       helpContents="content" feedbackWidth="200" feedbackHeight="200" minWidth="1" minHeight="1" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="color" type="color" displayName="Color" default="#ffffff" category="General" tooltip="sets the color on a given background UI Component." />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="sets the file path of the image">
+               <!-- <condition name="enable-property" value="" target="option"/> -->
+       </property>
+       <property name="option" type="efl.bg@option" displayName="Option" default="scale" category="General"
+               tooltip="set the way how a background UI Component is to display its image.&#10;
+- center: Center the background image.&#10;
+- scale: Scale the background image, retaining the aspect ratio.&#10;
+- stretch: Stretch the background image to fill the UI Component's area.&#10;
+- tile: Tile background image at its original size.&#10;" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.box.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.box.widget.xml
new file mode 100644 (file)
index 0000000..d8dbc68
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="box" displayName="Box" smallIcon="widget/32/pal_box_nor.png" icon.16="widget/16/view_p_box_nor.png" category="UI containers"
+       description="A box arranges objects in a linear fashion, governed by a layout function that defines the details of this arrangement." layoutType="box"
+       helpCategory="" helpContents="box" feedbackWidth="200" feedbackHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the horizontal orientation." />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="sets the box to arrange its children homogeneously." />
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="sets the horizontal space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="300" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="sets the vertical space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="500" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <!-- Events -->
+       <!-- <event name="child,added" displayName="child,added" eventType="event.eflevent" eventInfo="@brief &#xA;&#xA;@param vc It is context of the view that this event 
+               occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Evas_Object 
+               *child = (Evas_Object *) event_info;" /> <event name="child,removed" displayName="child,removed" eventType="event.eflevent" eventInfo="@brief &#xA;&#xA;@param vc 
+               It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits 
+               the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Evas_Object *child = (Evas_Object *) event_info;" /> -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.button.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.button.widget.xml
new file mode 100644 (file)
index 0000000..77614da
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="button" displayName="Button" smallIcon="widget/32/pal_button_nor.png" icon.16="widget/16/view_p_button_nor.png" category="UI components"
+       description="This is a push-button. Press it and run some function. It can contain a simple label and icon object and it also has an autorepeat feature"
+       helpCategory="" helpContents="button" feedbackWidth="150" feedbackHeight="60" minWidth="70" minHeight="60" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Button" category="General" tooltip="sets the text of the UI Component." />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="style" type="efl.button@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief the user clicked the button (press/release).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="repeated" displayName="repeated" eventType="event.eflevent"
+               eventInfo="@brief the user pressed the button without releasing it.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent"
+               eventInfo="@brief button was pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="unpressed" displayName="unpressed" eventType="event.eflevent"
+               eventInfo="@brief button was released after being pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.calendar.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.calendar.widget.xml
new file mode 100644 (file)
index 0000000..baa9dd2
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="calendar" displayName="Calendar" smallIcon="widget/32/pal_calendar_nor.png" icon.16="widget/16/view_p_calendar_nor.png" category="UI components"
+       description="This is a calendar UI Component. It helps applications to flexibly display a calender with day of the week, date, year and month" helpCategory=""
+       helpContents="" feedbackWidth="480" feedbackHeight="450" minWidth="480" minHeight="400" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" />
+
+       <property name="min_year" type="integer" displayName="Min year" default="1902" category="General" />
+       <property name="max_year" type="integer" displayName="Max year" default="-1" category="General" />
+       <property name="select_mode" type="efl.calendar@selectmode" displayName="Select mode" default="default" category="General" />
+       <property name="interval" type="double" displayName="Interval" default="0.85" category="General">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="display,changed" displayName="display,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.check.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.check.widget.xml
new file mode 100644 (file)
index 0000000..020a320
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="check" displayName="Check" smallIcon="widget/32/pal_check_nor.png" icon.16="widget/16/view_p_check_nor.png" category="UI components"
+       description="The check UI Component allows for toggling a value between true and false" helpCategory="" helpContents="efl.datetime" feedbackWidth="150"
+       feedbackHeight="60" minWidth="40" minHeight="40" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Check" category="General" tooltip="sets the text of the UI Component." />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="state" type="efl@boolean" displayName="State" default="false" category="General" tooltip="sets the on/off state of the check UI Component." />
+       <property name="style" type="efl.check@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component."/>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief This is called whenever the user changes the state of the check objects (event_info is always NULL).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.colorselector.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.colorselector.widget.xml
new file mode 100644 (file)
index 0000000..bcc32c0
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="colorselector" displayName="ColorSelector" smallIcon="widget/32/pal_color_nor.png" icon.16="widget/16/view_p_color_nor.png" category="UI components"
+       description="A ColorSelector is a color selection widget. It allows application to set a series of colors" helpCategory="" helpContents="efl.colorselector"
+       feedbackWidth="480" feedbackHeight="160" minWidth="60" minHeight="160" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief When the color value changes on selector event_info is NULL.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="color,item,selected" displayName="color,item,selected" eventType="event.eflevent"
+               eventInfo="@brief When user clicks on color item. The event_info parameter of the callback will be the selected color item.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *colorselector_item = (Elm_Object_Item *) event_info;" />
+       <event name="color,item,longpressed" displayName="color,item,longpressed" eventType="event.eflevent"
+               eventInfo="@brief When user long presses on color item. The event info parameter of the callback contains selected color item.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *colorselector_item = (Elm_Object_Item *) event_info;" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.ctxpopup.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.ctxpopup.widget.xml
new file mode 100644 (file)
index 0000000..a152236
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopup" displayName="Ctxpopup" smallIcon="widget/32/pal_ctx_nor.png" icon.16="widget/16/view_p_ctxp_nor.png" category="Views"
+       description="Ctxpopup(Context popup)s are used to provide options for the currently selected objects. Ctxpopup is composed of popup and a list of items inside popup."
+       helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%"
+       xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="ctxpopupitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the direction orientation." />
+       <!-- <property name="style" type="efl.ctxpopup@style" displayName="Style" default="default" category="General" tooltip="sets the style of the widget."> <condition 
+               name="enable-property" value="default" target="disable"/> </property> -->
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="dismissed" displayName="dismissed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.ctxpopupitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.ctxpopupitem.widget.xml
new file mode 100644 (file)
index 0000000..dc6db61
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopupitem" displayName="CtxPopupItem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI containers" description=""
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="ctxpopup">
+
+       <relations>
+               <parent ids="ctxpopup" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="CtxPopupItem" category="General" tooltip="The text of the list item" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.datetime.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.datetime.widget.xml
new file mode 100644 (file)
index 0000000..6ec18aa
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="datetime" displayName="Datetime" smallIcon="widget/32/pal_date_nor.png" icon.16="widget/16/view_p_date_nor.png" category="UI components"
+       description="Datetime UI Component is used to display and input date time values" helpCategory="" helpContents="efl.datetime" feedbackWidth="380"
+       feedbackHeight="210" minWidth="380" minHeight="210" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.datetime@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+
+       <!-- <property name="format" type="string" displayName="Format" default="%b %d %Y %I : %M %p" tooltip="Sets the datetime format. Format is a combination of allowed 
+               LIBC date format specifiers like: &quot;%b %d, %Y %I : %M %p&quot;."/> -->
+       <!-- %Y : The year as a decimal number including the century.&#xA; %m : The month as a decimal number (range 01 to 12).&#xA; %b : The abbreviated month name according 
+               to the current locale.&#xA; %B : The full month name according to the current locale.&#xA; %h : The abbreviated month name according to the current locale(same as 
+               %b).&#xA; %d : The day of the month as a decimal number (range 01 to 31).&#xA; %e : The day of the month as a decimal number (range 1 to 31). Single digits are preceded 
+               by a blank.&#xA; %I : The hour as a decimal number using a 12-hour clock (range 01 to 12).&#xA; %H : The hour as a decimal number using a 24-hour clock (range 00 
+               to 23).&#xA; %k : The hour (24-hour clock) as a decimal number (range 0 to 23). Single digits are preceded by a blank.&#xA; %l : The hour (12-hour clock) as a decimal 
+               number (range 1 to 12). Single digits are preceded by a blank.&#xA; %M : The minute as a decimal number (range 00 to 59).&#xA; %p : Either 'AM' or 'PM' according 
+               to the given time value, or the corresponding strings for the current locale. Noon is treated as 'PM' and midnight as 'AM'.&#xA; %P : Like p, but in lower case: 
+               'am' or 'pm' or a corresponding string for the current locale.&#xA; %c : The preferred date and time representation for the current locale.&#xA; %x : The preferred 
+               date representation for the current locale without the time.&#xA; %X : The preferred time representation for the current locale without the date.&#xA; %r : The complete 
+               calendar time using the AM/PM format of the current locale.&#xA; %R : The hour and minute in decimal numbers using the format H:M.&#xA; %T : The time of the day 
+               in decimal numbers using the format H:M:S.&#xA; %F : The date using the format %Y-%m-%d." -->
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief whenever Datetime field value is changed, this signal is sent.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.entry.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.entry.widget.xml
new file mode 100644 (file)
index 0000000..6adcf99
--- /dev/null
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="entry" displayName="Entry" smallIcon="widget/32/pal_entry_nor.png" icon.16="widget/16/view_p_entry_nor.png" category="UI components"
+       description="An entry is a convenience UI Component which shows a box that the user can enter text into" helpCategory="" helpContents="button" feedbackWidth="150"
+       feedbackHeight="100" minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Entry" category="General" tooltip="Convenient macro for elm_object_part_text_set." />
+       <property name="single_line" type="efl@boolean" displayName="Single line" default="false" category="General" tooltip="Sets the entry to the single line mode." />
+       <property name="password" type="efl@boolean" displayName="Password" default="false" category="General" tooltip="Sets the entry to the password mode." >
+               <condition name="enable-property" value="false" target="single_line" />
+       </property>
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General" tooltip="Sets whether the entry is editable." />
+       <property name="context_menu" type="efl@boolean" displayName="Context menu enabled" default="true" category="General"
+               tooltip="Disables the entry's contextual (longpress) menu." />
+       <property name="scroll" type="efl@boolean" displayName="Scrollable" default="false" category="General" tooltip="Enables or disables scrolling in the entry." />
+
+       <property name="src" type="text-resource" displayName="File path" default="" category="General"
+               tooltip="Sets the file (and implicitly loads it) for the text to display and then allow edit. All changes are written back to the file after a short delay if the entry object is set to autosave (which is the default).">
+               <condition name="disable-property" value="" target="autosave" />
+               <condition name="disable-property" value="" target="text-format" />
+       </property>
+       <property name="file_text_format" type="efl.entry@textformat" displayName="Text Format" default="plain_utf8" category="General"
+               tooltip="Enumeration that defines the text format types.&#xD;
+       plain_utf8 : Plain UTF8 type&#xD;
+       markup_utf8 : Markup UTF8 type" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="aborted" displayName="aborted" eventType="event.eflevent"
+               eventInfo="@brief The escape key was pressed on a single line entry. (since 1.7)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="activated" displayName="activated" eventType="event.eflevent"
+               eventInfo="@brief The enter key was pressed on a single line entry.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="anchor,clicked" displayName="anchor,clicked" eventType="event.eflevent"
+               eventInfo="@brief An anchor has been clicked. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,down" displayName="anchor,down" eventType="event.eflevent"
+               eventInfo="@brief Mouse button has been pressed on an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,hover,opened" displayName="anchor,hover,opened" eventType="event.eflevent"
+               eventInfo="@brief The anchor is clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Hover_Info *entry_hover_info = (Elm_Entry_Anchor_Hover_Info *) event_info;" />
+       <event name="anchor,in" displayName="anchor,in" eventType="event.eflevent"
+               eventInfo="@brief Mouse cursor has moved into an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,out" displayName="anchor,out" eventType="event.eflevent"
+               eventInfo="@brief Mouse cursor has moved out of an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,up" displayName="anchor,up" eventType="event.eflevent"
+               eventInfo="@brief Mouse button has been unpressed on an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief The text within the entry was changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="changed,user" displayName="changed,user" eventType="event.eflevent"
+               eventInfo="@brief The text within the entry was changed because of user interaction.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Change_Info *entry_change_info = (Elm_Entry_Change_Info *) event_info;" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief The entry has been clicked (mouse press and release).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The entry has been double clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="clicked,triple" displayName="clicked,triple" eventType="event.eflevent"
+               eventInfo="@brief The entry has been triple clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="cursor,changed" displayName="cursor,changed" eventType="event.eflevent"
+               eventInfo="@brief The cursor has changed position.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="cursor,changed,manual" displayName="cursor,changed,manual" eventType="event.eflevent"
+               eventInfo="@brief The cursor has changed position manually.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent"
+               eventInfo="@brief The entry has received focus.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent"
+               eventInfo="@brief The entry has lost focus.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief A mouse button has been pressed and held for a couple&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="maxlength,reached" displayName="maxlength,reached" eventType="event.eflevent"
+               eventInfo="@brief Called when a maximum length is reached.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="preedit,changed" displayName="preedit,changed" eventType="event.eflevent"
+               eventInfo="@brief The preedit string has changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="press" displayName="press" eventType="event.eflevent"
+               eventInfo="@brief A mouse button has been pressed on the entry. seconds.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="redo,request" displayName="redo,request" eventType="event.eflevent"
+               eventInfo="@brief Called on redo request.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,changed" displayName="selection,changed" eventType="event.eflevent"
+               eventInfo="@brief The current selection has changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,cleared" displayName="selection,cleared" eventType="event.eflevent"
+               eventInfo="@brief The current selection has been cleared.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,copy" displayName="selection,copy" eventType="event.eflevent"
+               eventInfo="@brief A copy of the selected text into the clipboard was requested.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,cut" displayName="selection,cut" eventType="event.eflevent"
+               eventInfo="@brief A cut of the selected text into the clipboard was requested.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,paste" displayName="selection,paste" eventType="event.eflevent"
+               eventInfo="@brief A paste of the clipboard contents was requested.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,start" displayName="selection,start" eventType="event.eflevent"
+               eventInfo="@brief A selection has begun and no previous selection existed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="text,set,done" displayName="text,set,done" eventType="event.eflevent"
+               eventInfo="@brief Whole text has been set to the entry.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="theme,changed" displayName="theme,changed" eventType="event.eflevent"
+               eventInfo="@brief Called when the theme is changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="undo,request" displayName="undo,request" eventType="event.eflevent"
+               eventInfo="@brief Called on undo request.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="rejected" displayName="rejected" eventType="event.eflevent"
+               eventInfo="@brief Called when some of inputs are rejected by the filter. (since 1.9)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.flipselector.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.flipselector.widget.xml
new file mode 100644 (file)
index 0000000..0fd01b2
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="flipselector" displayName="Flipselector" smallIcon="widget/32/pal_filip_nor.png" icon.16="widget/16/view_p_filip_nor.png" category="UI components"
+       description="A flip selector is a UI Component to show a set of text items, one at a time, with the same sheet switching style as the clock UI Component, when one changes the current displaying sheet"
+       helpCategory="" helpContents="" feedbackWidth="140" feedbackHeight="180" minWidth="100" minHeight="140" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="flipselectoritem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" />
+       <property name="data_bind" type="foreach@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add flipselector item" unusedEditors="source_tab" />
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="overflowed" displayName="overflowed" eventType="event.eflevent" />
+       <event name="underflowed" displayName="underflowed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.flipselectoritem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.flipselectoritem.widget.xml
new file mode 100644 (file)
index 0000000..717bb94
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="flipselectoritem" displayName="Flipselectoritem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="FlipselectorItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="flipselector">
+
+       <relations>
+               <parent ids="flipselector" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.gengrid.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.gengrid.widget.xml
new file mode 100644 (file)
index 0000000..ffc2045
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="gengrid" displayName="Gengrid" smallIcon="widget/32/pal_gengrid_nor.png" icon.16="widget/16/view_p_gengrid_nor.png" category="UI components"
+       description="This UI Component aims to position objects in a grid layout while actually creating and rendering only the visible ones" helpCategory=""
+       helpContents="list" feedbackWidth="400" feedbackHeight="400" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="gengriditem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.gengrid@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add gengrid item" unusedEditors="source_tab" />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General"
+               tooltip="set the gengrid select mode.&#10;
+- default: Once an item is selected, it would stay highlighted and not going to call selected callback again even it was clicked. Items can get focus.&#10;
+- always: Item selected callbacks will be called every time for click events, even after the item was already selected. Items can get focus.&#10;
+- none: Items will never be highlighted and selected but the size will be adjusted by the finger size configuration. Items can't get focus.&#10;
+- display_only: Items will never be highlighted and selected and ignore the finger size. So the item size can be reduced below than the finger size configuration. Items can't get focus." />
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General"
+               tooltip="set the direction in which a given gengrid UI Component will expand while placing its items.&#10;
+       If true, items will be placed in columns, from top to bottom and, when the space for a column is filled, 
+       another one is started on the right, thus expanding the grid horizontally. &#10;If false, items will be placed in rows, 
+       from left to right and, when the space for a row is filled, another one is started below, thus expanding the grid vertically." />
+       <property name="item_size_w" type="integer" displayName="Item size W" default="200" category="General"
+               tooltip="sets the width size for the items of the gengrid UI Component.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="item_size_h" type="integer" displayName="Item size H" default="200" category="General"
+               tooltip="sets the height size for the items of the gengrid UI Component.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="multi_select" type="efl@boolean" displayName="Multi select" default="false" category="General"
+               tooltip="enables or disables multi-selection in the gengrid UI Component." />
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked or pressed (enter|return|spacebar) on an item. The event_info parameter is the gengrid item that was activated.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked an item. The event_info parameter is the gengrid item that was double-clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,right" displayName="clicked,right" eventType="event.eflevent"
+               eventInfo="@brief The user has right-clicked an item. The event_info parameter is the item that was right-clicked. (since 1.13)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item is pressed for a certain amount of time. By default it's 1 second.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief The user has made an item selected. The event_info parameter is the gengrid item that was selected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent"
+               eventInfo="@brief The user has made an item unselected. The event_info parameter is the gengrid item that was unselected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="realized" displayName="realized" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the gengrid has its implementing Evas object instantiated, de facto. event_info is the gengrid item that was created.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="unrealized" displayName="unrealized" eventType="event.eflevent"
+               eventInfo="@brief This is called when the implementing Evas object for this item is deleted. event_info is the gengrid item that was deleted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief Called when an item is added, removed, resized or moved and when the gengrid is resized or gets &quot;horizontal&quot; property changes.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="drag,start,up" displayName="drag,start,up" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) up.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,down" displayName="drag,start,down" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) down.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,left" displayName="drag,start,left" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) left.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,right" displayName="drag,start,right" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) right.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,stop" displayName="drag,stop" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has stopped being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag" displayName="drag" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid is being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief called when the content has been scrolled (moved).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent"
+               eventInfo="@brief called when dragging the content has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief called when dragging the content has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,page,changed" displayName="scroll,page,changed" eventType="event.eflevent"
+               eventInfo="@brief called when the visible page has changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the top edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the bottom edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the left edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the right edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="moved" displayName="moved" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item is moved by a user interaction in a reorder mode. The event_info parameter is the item that was moved.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="index,update" displayName="index,update" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item index is changed. Note that this callback is called while each item is being realized.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is highlighted. This is called when the user presses an item or keyboard selection is done so the item is physically highlighted. The event_info parameter is the item that was highlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is unhighlighted. This is called when the user releases an item or keyboard selection is moved so the item is physically unhighlighted. The event_info parameter is the item that was unhighlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the gengrid item has received focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the gengrid item has lost focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent"
+               eventInfo="@brief The user pressed the an item. The event_info parameter is the item that was pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="released" displayName="released" eventType="event.eflevent"
+               eventInfo="@brief The user released the an item. The event_info parameter is the item that was released.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,reorder,anim,start" displayName="item,reorder,anim,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item movement has just started by keys in reorder mode. The event_info parameter is the item that is going to move. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,reorder,anim,stop" displayName="item,reorder,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item movement just stopped in reorder mode. The event_info parameter is the item that was moved. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.gengriditem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.gengriditem.widget.xml
new file mode 100644 (file)
index 0000000..61128f3
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="gengriditem" displayName="Gengriditem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="gengridItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="gengrid">
+
+       <relations>
+               <parent ids="gengrid" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.gengrid@itemstyle" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="sets the text of item" />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="sets the file path of the image" />
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="sets the selected state of the UI Component." />
+       <property name="disabled" type="efl@boolean" displayName="Disabled" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.genlist.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.genlist.widget.xml
new file mode 100644 (file)
index 0000000..36cf7dd
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlist" displayName="Genlist" smallIcon="widget/32/pal_genlist_nor.png" icon.16="widget/16/view_p_genlist_nor.png" category="UI components"
+       description="This UI Component aims to have more expansive list than the simple list in Elementary that could have more flexible items and allow many more entries while still being fast and low on memory usage. At the same time it was also made to be able to do tree structures. But the price to pay is more complexity when it comes to usage. If all you want is a simple list with icons and a single text, use the normal List object"
+       helpCategory="" helpContents="list" feedbackWidth="480" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.genlist@style" displayName="Style" category="General" default="solid/default" tooltip="sets the style of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add genlist item" unusedEditors="source_tab" />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="enable/disable homogeneous mode&#10; If true ,
+               this will enable the homogeneous mode where items are of the same
+               height and width so that genlist may do the lazy-loading at its
+               maximum ( which increases the performance for scrolling the list )&#10;
+               In the normal mode , genlist will pre-calculate all the items ' sizes
+               even though they are not in use. So items ' callbacks are called many
+               times than expected. But homogeneous mode will skip the item size
+               pre-calculation process so items ' callbacks are called only when the
+               item is needed." />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General"
+               tooltip="set the genlist select mode.&#10;
+- default: Once an item is selected, it would stay highlighted and not going to call selected callback again even it was clicked. Items can get focus.&#10;
+- always: Item selected callbacks will be called every time for click events, even after the item was already selected. Items can get focus.&#10;
+- none: Items will never be highlighted and selected but the size will be adjusted by the finger size configuration. Items can't get focus.&#10;
+- display_only: Items will never be highlighted and selected and ignore the finger size. So the item size can be reduced below than the finger size configuration. Items can't get focus." />
+
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked or pressed (enter|return|spacebar) on an item. The event_info parameter is the item that was activated.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked an item. The event_info parameter is the item that was double-clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has made an item selected. The event_info parameter is the genlist item that was selected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has made an item unselected. The event_info parameter is the genlist item that was unselected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent"
+               eventInfo="@brief This is called when elm_genlist_item_expanded_set() is called and the item is now meant to be expanded. The event_info parameter is the genlist item that was indicated to expand. It is the job of this callback to then fill in the child items.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="contracted" displayName="contracted" eventType="event.eflevent"
+               eventInfo="@brief This is called when elm_genlist_item_expanded_set() is called and the item is now meant to be contracted. The event_info parameter is the genlist item that was indicated to contract. It is the job of this callback to then delete the child items.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="expand,request" displayName="expand,request" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has indicated they want to expand a tree branch item. The callback should decide if the item can expand (has any children) and then call elm_genlist_item_expanded_set() appropriately to set the state. The event_info parameter is the genlist item that was indicated to expand.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="contract,request" displayName="contract,request" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has indicated they want to contract a tree branch item. The callback should decide if the item can contract (has any children) and then call elm_genlist_item_expanded_set() appropriately to set the state. The event_info parameter is the genlist item that was indicated to contract.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="realized" displayName="realized" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list is created as a real evas object. event_info parameter is the genlist item that was created.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="unrealized" displayName="unrealized" eventType="event.eflevent"
+               eventInfo="@brief This is called just before an item is unrealized. After this call content objects provided will be deleted and the item object itself delete or be put into a floating cache.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,up" displayName="drag,start,up" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) up.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,down" displayName="drag,start,down" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) down.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,left" displayName="drag,start,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) left.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,right" displayName="drag,start,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) right.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,stop" displayName="drag,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has stopped being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag" displayName="drag" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list is being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item is pressed for a certain amount of time. By default it's 1 second. The event_info parameter is the longpressed genlist item.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when dragging the content has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when dragging the content has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) (since 1.13)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the top edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the bottom edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the left edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the right edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="multi,swipe,left" displayName="multi,swipe,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped left.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,swipe,right" displayName="multi,swipe,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped right.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,swipe,up" displayName="multi,swipe,up" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped up.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,swipe,down" displayName="multi,swipe,down" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped down.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,pinch,out" displayName="multi,pinch,out" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch pinched out.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,pinch,in" displayName="multi,pinch,in" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch pinched in.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="swipe" displayName="swipe" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is swiped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="moved" displayName="moved" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item is moved by a user interaction in a reorder mode. The event_info parameter is the item that was moved.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="moved,after" displayName="moved,after" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item is moved after another item in reorder mode. The event_info parameter is the reordered item. To get the relative previous item, use elm_genlist_item_prev_get(). This signal is called along with &quot;moved&quot; signal.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="moved,before" displayName="moved,before" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item is moved before another item in reorder mode. The event_info parameter is the reordered item. To get the relative previous item, use elm_genlist_item_next_get(). This signal is called along with &quot;moved&quot; signal.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="index,update" displayName="index,update" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item index is changed. Note that this callback is called while each item is being realized.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="tree,effect,finished" displayName="tree,effect,finished" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist tree effect is finished.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is highlighted. This is called when the user presses an item or keyboard selection is done so the item is physically highlighted. The event_info parameter is the item that was highlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is unhighlighted. This is called when the user releases an item or keyboard selection is moved so the item is physically unhighlighted. The event_info parameter is the item that was unhighlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the program's language is changed. Call the elm_genlist_realized_items_update() if items text should be translated.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent"
+               eventInfo="@brief The user pressed an item. The event_info parameter is the item that was pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="released" displayName="released" eventType="event.eflevent"
+               eventInfo="@brief The user released an item. The event_info parameter is the item that was released.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the genlist item has recieved focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the genlist item has lost focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,right" displayName="clicked,right" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.genlistitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.genlistitem.widget.xml
new file mode 100644 (file)
index 0000000..32a945d
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlistitem" displayName="Genlistitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="genlist">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.genlist@itemstyle" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="sets the text of item" />
+       <property name="sub_text" type="rm_string" displayName="Sub Text" default="Sub Text" category="General" tooltip="sets the text of item" />
+       <!-- <property name="item_type" type="efl.genlist@itemtype" displayName="Item type" default="none" category="General"
+               tooltip="sets the type of item&#10;
+- none: simple item&#10;
+- tree: this may be expanded and have child items.&#10;
+- group: an index item of a group of items. This item can have child items.">
+               <condition name="enable-property" value="1" target="item-add" />
+       </property>  -->
+
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="sets the selected state of the UI Component." />
+
+       <property name="standard_icon" type="efl.icon@standardicon" displayName="Standard icon" default="" category="Icon"
+               tooltip="sets the standard icon to be shown in the list item before label text&#10;" />
+       <property name="image_path" type="image" displayName="Image path" default="" category="Icon"
+               tooltip="sets the file path of the image to be shown in the list item before label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <property name="end_standard_icon" type="efl.icon@standardicon" displayName="Standard icon" default="" category="End Icon"
+               tooltip="sets the standard icon to be shown in the list item after label text&#10;" />
+       <property name="end_image_path" type="image" displayName="Image path" default="" category="End Icon"
+               tooltip="sets the file path of the image to be shown in the list item after label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.grid.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.grid.widget.xml
new file mode 100644 (file)
index 0000000..6a5ec36
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="grid" displayName="Grid" smallIcon="widget/32/pal_grid_nor.png" icon.16="widget/16/view_p_grid_nor.png" category="UI containers"
+       description="The grid is a grid layout UI Component that lays out a series of children as a fixed 'grid' of UI Components using a given percentage of the grid width and height each using the child object."
+       layoutType="grid" helpCategory="" helpContents="grid" feedbackWidth="300" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="vsize_w" type="integer" displayName="Col count" default="1000" category="General" tooltip="sets the virtual width of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+       <property name="vsize_h" type="integer" displayName="Row count" default="1000" category="General" tooltip="sets the virtual height of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack_x" type="integer" displayName="Left" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_w" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_y" type="integer" displayName="Top" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_h" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_w" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_x" targetValue="vsize_w" error="size-max" />
+               </property>
+               <property name="pack_h" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_y" targetValue="vsize_h" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.hoversel.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.hoversel.widget.xml
new file mode 100644 (file)
index 0000000..4818415
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="hoversel" displayName="Hoversel" smallIcon="widget/32/pal_hoversel_nor.png" icon.16="widget/16/view_p_hoversel_nor.png" category="UI components"
+       description="This UI Component is a button that pops up a list of items(automatically choosing the direction to display)." helpCategory=""
+       helpContents="list" feedbackWidth="400" feedbackHeight="400" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="hoverselitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="Hoversel" category="General" tooltip="sets the text of item" />
+       <property name="data_bind" type="foreach@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add hoversel item" unusedEditors="source_tab" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief The user clicked the hoversel button and popped up the sel.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief An item in the hoversel list is selected. event_info is the selected item.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+       <event name="dismissed" displayName="dismissed" eventType="event.eflevent"
+               eventInfo="@brief The hover is dismissed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent"
+               eventInfo="@brief This is called on clicking hoversel and elm_hoversel_hover_begin().&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent"
+               eventInfo="@brief The program's language changed (since 1.9).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the hoversel item has received focus. (since 1.10).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the hoversel item has lost focus. (since 1.10).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.hoverselitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.hoverselitem.widget.xml
new file mode 100644 (file)
index 0000000..0d6f862
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="hoverselitem" displayName="Hoverselitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="hoverselItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="hoversel">
+
+       <relations>
+               <parent ids="hoversel" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="Hoverselitem" category="General" tooltip="sets the text of item" />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.image.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.image.widget.xml
new file mode 100644 (file)
index 0000000..cb753b1
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="image" displayName="Image" smallIcon="widget/32/pal_image_nor.png" icon.16="widget/16/view_p_image_nor.png" category="UI components"
+       description="An Elementary image object is a direct realization of The Elementary Image Class, and it allows one to load and display an image file on it, be it from a disk file or from a memory region"
+       helpCategory="" helpContents="" feedbackWidth="50" feedbackHeight="50" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="Sets the file that is used as the image's source." />
+       <property name="no_scale" type="efl@boolean" displayName="No scale" default="false" category="General" tooltip="Disables scaling of this object." />
+       <property name="resizable_up" type="efl@boolean" displayName="Resizable(up)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable up" />
+       <property name="resizable_down" type="efl@boolean" displayName="Resizable(down)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable down" />
+       <!--<property name="orient" type="efl.image@orient" displayName="Orient" default="none" category="General" tooltip="Sets the image orientation.&#xD;&#xD; none&#xD; 
+               : No orientation change&#xD; orient_0&#xD; : No orientation change&#xD; rotate_90&#xD; : Rotate 90 degrees clockwise&#xD; rotate_180&#xD; : Rotate 180 degrees clockwise&#xD; 
+               rotate_270&#xD; : Rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise)&#xD; flip_horizontal&#xD; : Flip image horizontally&#xD; flip_vertical&#xD; : 
+               Flip image vertically&#xD; flip_transpose&#xD; : Flip the image along the y = (width - x) line (bottom-left to top-right)&#xD; flip_transverse&#xD; : Flip the image 
+               along the y = x line (top-left to bottom-right)" /> -->
+       <property name="aspect_fixed" type="efl@boolean" displayName="Aspect fixed" default="false" category="General"
+               tooltip="Set whether the original aspect ratio of the image should be kept on resize." />
+       <property name="fill_outside" type="efl@boolean" displayName="Fill outsize" default="false" category="General"
+               tooltip="Sets whether the image fills the entire object area, when keeping the aspect ratio." />
+       <!-- <property name="editable" type="efl@boolean" displayName="Editable" default="false" category="General" tooltip="Makes the image 'editable'." /> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="drop" displayName="drop" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has dropped an image typed object onto the object in question -- the event info argument is the path to that image file&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;const char *image_path = (const char *) event_info;" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has clicked the image&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.index.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.index.widget.xml
new file mode 100644 (file)
index 0000000..c3ab2e7
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="index" displayName="Index" smallIcon="widget/32/pal_index_nor.png" icon.16="widget/16/view_p_index_nor.png" category="UI components"
+       description="An index UI Component gives you an index for fast access to whichever group of other UI items one might have" helpCategory="" helpContents=""
+       feedbackWidth="200" feedbackHeight="150" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="indexitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="autohide" type="efl@boolean" displayName="Autohide enabled" default="false" category="General"
+               tooltip="Enables or disables the auto hiding feature for a given index UI Component." />
+       <property name="indicator" type="efl@boolean" displayName="Indicator enabled" default="true" category="General" tooltip="Sets the indicator to be enabled." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="Appends a new item on a given index UI Component."
+               unusedEditors="source_tab" />
+       <!-- <property name="style" type="efl.index@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component."/> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief When the selected index item changes. event_info is the selected item's data pointer.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *index_item = (Elm_Object_Item *) event_info;" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent"
+               eventInfo="@brief When the selected index item changes, but after a small idling period. event_info is the selected item's data pointer.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *index_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief When the user releases a mouse button and selects an item. event_info is the selected item's pointer.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *index_item = (Elm_Object_Item *) event_info;" />
+       <event name="level,up" displayName="level,up" eventType="event.eflevent"
+               eventInfo="@brief when the user moves a finger from the first level to the second level&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="level,down" displayName="level,down" eventType="event.eflevent"
+               eventInfo="@brief when the user moves a finger from the second level to the first level&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.indexitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.indexitem.widget.xml
new file mode 100644 (file)
index 0000000..3923abd
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="indexitem" displayName="Indexitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="IndexItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="index">
+
+       <relations>
+               <parent ids="index" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="The letter under which the item should be indexed" />
+       <!-- <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." /> -->
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.label.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.label.widget.xml
new file mode 100644 (file)
index 0000000..1ed6c6c
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="label" displayName="Label" smallIcon="widget/32/pal_label_nor.png" icon.16="widget/16/view_p_label_nor.png" category="UI components"
+       description="UI Component to display text, with simple html-like markup" helpCategory="" helpContents="efl.progressbar" feedbackWidth="100" feedbackHeight="30"
+       minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="Label" category="General" tooltip="sets the text of the UI Component." />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <!-- <property name="style" type="efl.label@style" displayName="Style" default="default" category="General" tooltip="Sets the style to be used by the label.&#10; 
+               if the text doesn't fit the geometry of the label, it is ellipsized or cut. Elementary provides several styles for this UI Component.&#10; - default: No animation.&#10; 
+               - marker: Centers the text in the label and makes it bold by default.&#10; - slide_long: The entire text appears from the right of the screen and slides until it 
+               disappears in the left of the screen(reappearing on the right again).&#10; - slide_short: The text appears in the left of the label and slides to the right to show 
+               the overflow. When all of the text has been shown the position is reset.&#10; - slide_bounce: The text appears in the left of the label and slides to the right to 
+               show the overflow. When all of the text has been shown the animation reverses, moving the text to the left."/> -->
+       <property name="line_wrap" type="efl.label@wraptype" displayName="Wrap type" default="none" category="General"
+               tooltip="sets the wrapping behavior of the label.&#10;
+- none: No wrapping.&#10;
+- char: Wrap between characters.&#10;
+- word: Wrap between words.&#10;
+- mixed: Word wrap, and if that fails, char wrap." />
+       <property name="wrap_width" type="integer" displayName="Wrap width" default="0" category="General" tooltip="sets the maximum width size hint of the label." />
+       <property name="ellipsis" type="efl@boolean" displayName="Ellipsis" default="true" category="General" tooltip="sets the ellipsis behavior of the label." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="slide,end" displayName="slide,end" eventType="event.eflevent"
+               eventInfo="@brief The slide is end.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.layout.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.layout.widget.xml
new file mode 100644 (file)
index 0000000..855be83
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="layout" displayName="Layout" smallIcon="widget/32/pal_layout_nor.png" icon.16="widget/16/view_p_layout_nor.png" category="UI components"
+       description="This is a container UI Component that takes a standard Edje design file and wraps it very thinly in a UI Component" helpCategory="" helpContents="button"
+       feedbackWidth="150" feedbackHeight="150" minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="src" type="layout-resource" displayName="File path" default="" category="General" tooltip="The path to the file (edj) that is used as a layout" />
+       <property name="group" type="dynamic-combo" displayName="Group name" default="" category="General" tooltip="The group that the layout belongs to in the edje file" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="theme,changed" displayName="theme,changed" eventType="event.eflevent"
+               eventInfo="@brief The theme was changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.list.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.list.widget.xml
new file mode 100644 (file)
index 0000000..3cbcf40
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="list" displayName="List" smallIcon="widget/32/pal_list_nor.png" icon.16="widget/16/view_p_list_nor.png" category="UI components"
+       description="A list UI Component is a container whose children are displayed vertically or horizontally, in order, and can be selected. The list can accept only one or multiple item selections. Also has many modes of items displaying."
+       helpCategory="" helpContents="" feedbackWidth="480" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="listitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="data_bind" type="foreach@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="mode" type="efl.list@mode" displayName="Mode" default="scroll" category="General" tooltip="Sets which mode to use for the list object. In Tizen default theme, scroll and limit modes are the same as compress mode." />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General" tooltip="Sets the list select mode." />
+       <property name="multi_select" type="efl@boolean" displayName="Multi select" default="false" category="General"
+               tooltip="Enables or disables multiple items selection on the list object.">
+               <condition name="enable-property" value="true" target="multi_select_mode" />
+       </property>
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked or pressed (enter|return|spacebar) on an item. The event_info parameter is the item that was activated.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked an item. The event_info parameter is the item that was double-clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,right" displayName="clicked,right" eventType="event.eflevent"
+               eventInfo="@brief The user has right-clicked an item. The event_info parameter is the item that was right-clicked. (since 1.13)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief when the user selected an item&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent"
+               eventInfo="@brief when the user unselected an item&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is long-pressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief the list is scrolled until the top edge&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief the list is scrolled until the bottom edge&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief the list is scrolled until the left edge&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief the list is scrolled until the right edge&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is highlighted. This is called when the user presses an item or keyboard selection is done so the item is physically highlighted. The event_info parameter is the item that was highlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is unhighlighted. This is called when the user releases an item or keyboard selection is moved so the item is physically unhighlighted. The event_info parameter is the item that was unhighlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the list item has received focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the list item has lost focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.listitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.listitem.widget.xml
new file mode 100644 (file)
index 0000000..7646508
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="listitem" displayName="Listitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="list">
+
+       <relations>
+               <parent ids="list" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="The text of the list item" />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.map.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.map.widget.xml
new file mode 100644 (file)
index 0000000..2b435bf
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="map" displayName="Map" smallIcon="widget/32/pal_map_nor.png" icon.16="widget/16/view_p_map_nor.png" category="UI components"
+       description="This is a widget specifically for displaying a map" helpCategory="" helpContents="" feedbackWidth="300" feedbackHeight="300" minWidth="100"
+       minHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="zoom_level" type="scale-integer" displayName="Zoom level" default="15" category="General" tooltip="Sets the zoom level of the map">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="20" error="integer-max" />
+       </property>
+
+       <property name="longitude" type="double" displayName="longitude" default="0" category="General" tooltip="The longitude to show at the center">
+               <condition name="integer-min" value="-180" error="integer-min" />
+               <condition name="integer-max" value="180" error="integer-max" />
+       </property>
+       <property name="latitude" type="double" displayName="latitude" default="0" category="General" tooltip="The latitude to show at the center">
+               <condition name="integer-min" value="-90" error="integer-min" />
+               <condition name="integer-max" value="90" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="press" displayName="press" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+       <event name="loaded" displayName="loaded" eventType="event.eflevent" />
+       <event name="zoom,start" displayName="zoom,start" eventType="event.eflevent" />
+       <event name="zoom,stop" displayName="zoom,stop" eventType="event.eflevent" />
+       <event name="zoom,change" displayName="zoom,change" eventType="event.eflevent" />
+       <event name="tile,load" displayName="tile,load" eventType="event.eflevent" />
+       <event name="tile,loaded" displayName="tile,loaded" eventType="event.eflevent" />
+       <event name="route,load" displayName="route,load" eventType="event.eflevent" />
+       <event name="route,loaded" displayName="route,loaded" eventType="event.eflevent" />
+       <event name="name,load" displayName="name,load" eventType="event.eflevent" />
+       <event name="name,loaded" displayName="name,loaded" eventType="event.eflevent" />
+       <event name="overlay,clicked" displayName="overlay,clicked" eventType="event.eflevent" />
+       <event name="tile,loaded,fail" displayName="tile,loaded,fail" eventType="event.eflevent" />
+       <event name="route,loaded,fail" displayName="route,loaded,fail" eventType="event.eflevent" />
+       <event name="name,loaded,fail" displayName="name,loaded,fail" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.multibuttonentry.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.multibuttonentry.widget.xml
new file mode 100644 (file)
index 0000000..739282b
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="multibuttonentry" displayName="Multibuttonentry" smallIcon="widget/32/pal_multi_nor.png" icon.16="widget/16/view_p_multi_nor.png" category="UI components"
+       description="multibuttonentry provides an extended functionality to text input. Multibuttonentry allows users to enter text and each chunk of text managed as a set of buttons. The typical use cases of multibuttonentry is composing emails/messages to a group of addresses, each of which is an item that can be clicked for further actions." helpCategory="" helpContents="" feedbackWidth="150" feedbackHeight="50" minWidth="10" minHeight="10" borderVisible="false"
+       uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="multibuttonentryitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <!--<property name="text" type="string" displayName="Text" default="" /> -->
+       <property name="expanded" type="efl@boolean" displayName="Expanded" default="false" category="General"
+               tooltip="set/unset the multibuttonentry to expanded state.&#10;
+In expanded state, the complete entry will be displayed. Otherwise, only single line of the entry will be displayed." />
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General"
+               tooltip="set/unset the multibuttonentry to editable state.&#10;
+If true, user can add/delete item in multibuttonentry.&#10;
+If not, the multibuttonentry is non-editable." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add multibuttonentry item" unusedEditors="source_tab" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="item,selected" displayName="item,selected" eventType="event.eflevent"
+               eventInfo="@brief this is called when an item is selected by api, user interaction, and etc. this is also called when a user press back space while cursor is on the first field of entry.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *multibuttonentry_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,added" displayName="item,added" eventType="event.eflevent"
+               eventInfo="@brief when a new multi-button entry item is added.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *multibuttonentry_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,deleted" displayName="item,deleted" eventType="event.eflevent"
+               eventInfo="@brief when a multi-button entry item is deleted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *multibuttonentry_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,clicked" displayName="item,clicked" eventType="event.eflevent"
+               eventInfo="@brief this is called when an item is clicked by user interaction. Both &quot;item,selected&quot; and &quot;item,clicked&quot; are needed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *multibuttonentry_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,longpressed" displayName="item,longpressed" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry item is pressed for a long time.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *multibuttonentry_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry is clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry is focused.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry is unfocused.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry is expanded.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="contracted" displayName="contracted" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry is contracted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="expand,state,changed" displayName="expand,state,changed" eventType="event.eflevent"
+               eventInfo="@brief when shrink mode state of multi-button entry is changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.multibuttonentryitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.multibuttonentryitem.widget.xml
new file mode 100644 (file)
index 0000000..6caaa32
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="multibuttonentryitem" displayName="Multibuttonentryitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components"
+       description="multibuttonentry" helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="multibuttonentry">
+
+       <relations>
+               <parent ids="multibuttonentry" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="sets the text of item" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.panel.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.panel.widget.xml
new file mode 100644 (file)
index 0000000..fe46958
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="panel" displayName="Panel" smallIcon="widget/32/pal_panel_nor.png" icon.16="widget/16/view_p_panel_nor.png" category="UI containers"
+       description="A panel is an animated side-panel that contains a sub-object. It can be expanded or contracted by clicking the button on its edge." layoutType="box"
+       helpCategory="" helpContents="panel" feedbackWidth="150" feedbackHeight="80" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" max="1" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="orient" type="efl.panel@orient" displayName="Orient" default="top" category="General"
+               tooltip="sets the orientation of the panel.&#10;
+- top: Panel (dis)appears from the top&#10;
+- bottom: Panel (dis)appears from the bottom&#10;
+- left: Panel (dis)appears from the left&#10;
+- right: Panel (dis)appears from the right" />
+       <!-- hidden API is not work -->
+       <property name="hidden" type="efl@boolean" displayName="Hidden" default="false" category="General"
+               tooltip="sets the state of the panel.&#10;
+If true, panel is in contracted state&#10;
+If false, panel is in expanded state" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <!-- Events -->
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief When the content has been scrolled (moved). (since 1.10) This signal is emitted only when the panel is scrollable. Elm_Panel_Scroll_Info will be passed by event_info argument.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Panel_Scroll_Info *scroll_info = (Elm_Panel_Scroll_Info *) event_info;" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.panes.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.panes.widget.xml
new file mode 100644 (file)
index 0000000..d0fd684
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="panes" displayName="Panes" smallIcon="widget/32/pal_panes_nor.png" icon.16="widget/16/view_p_panes_nor.png" category="UI containers"
+       description="The panes UI Component adds a draggable bar between two contents. When dragged this bar will resize contents' size." layoutType="panes"
+       helpCategory="" helpContents="panes" feedbackWidth="150" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General"
+               tooltip="Sets the orientation of a given panes UI Component." />
+       <property name="fixed" type="efl@boolean" displayName="Fixed" default="false" category="General" tooltip="Sets whether the left and right panes resize homogeneously." />
+       <property name="right_size" type="double" displayName="Right size" default="0.5" category="General"
+               tooltip="Sets the size proportion of the panes UI Component's right side.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack" type="efl.panes@pack" displayName="Pack" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events -->
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief The panes has been clicked>&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="press" displayName="press" eventType="event.eflevent"
+               eventInfo="@brief The panes has been pressed (button wasn't released yet).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="unpress" displayName="unpress" eventType="event.eflevent"
+               eventInfo="@brief The panes was released after being pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The panes has been double clicked&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.popup.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.popup.widget.xml
new file mode 100644 (file)
index 0000000..adb5c81
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="popup" displayName="Popup" smallIcon="widget/32/pal_popup_nor.png" icon.16="widget/16/view_p_popup_nor.png" category="Views" description="Popups are temporarily displayed on the screenb to provide information or to ask for user confirmation. Popup allows users to take instant action for events. Popup is an enhancement of Notify components and is composed of three areas: Title, Content and Action with up to 3 buttons(optional)." layoutType="Popup"
+       helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%"
+       xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+
+       <property name="title" type="string" displayName="Title" default="Title" category="General" tooltip="The title text of the popup widget">
+       </property>
+       <property name="style" type="efl.popup@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="height" type="scale-integer" displayName="Height" default="200" category="General"
+               tooltip="sets the x of left upper corner of the widget.&#10;
+But this depends on the container of the widget.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="400" error="integer-max" />
+       </property>
+       <property name="timeout" type="double" displayName="Timeout" default="0" category="General" tooltip="Sets a timeout to hide popup automatically">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="timeout" displayName="timeout" eventType="event.eflevent" />
+       <event name="block,clicked" displayName="block,clicked" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.progressbar.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.progressbar.widget.xml
new file mode 100644 (file)
index 0000000..20a264e
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="progressbar" displayName="Progressbar" smallIcon="widget/32/pal_progress_nor.png" icon.16="widget/16/view_p_progress_nor.png" category="UI components"
+       description="The progress bar is a UI Component for visually representing the progress status of a given job/task" helpCategory="" helpContents="efl.progressbar"
+       feedbackWidth="150" feedbackHeight="30" minWidth="50" minHeight="25" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.progressbar@style" displayName="Style" default="default" category="General"
+               tooltip="Sets the style to be used by a given UI Component.">
+               <condition name="enable-property" value="default" target="span_size" />
+       </property>
+
+       <property name="value" type="double" displayName="Value" default="0" category="General"
+               tooltip="Sets the progress value (in percentage) on a given progress bar UI Component. The progress value must be between 0.0 and 1.0">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="span_size" type="integer" displayName="Span Size" default="0" category="General" tooltip="The length of the progress bar's bar region">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <!-- <property name="format" type="efl.progressbar@format" displayName="Format" default="%.0f%%"/> -->
+       <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General"
+               tooltip="Inverts a given progress bar UI Component's displaying values order." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief &#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.radio.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.radio.widget.xml
new file mode 100644 (file)
index 0000000..6e9714d
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="radio" displayName="Radio" smallIcon="widget/32/pal_radio_nor.png" icon.16="widget/16/view_p_radio_nor.png" category="UI components"
+       description="Radio is a UI Component that allows for 1 or more options to be displayed and have the user choose only 1 of them" helpCategory="" helpContents="efl.datetime"
+       feedbackWidth="150" feedbackHeight="60" minWidth="40" minHeight="40" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Radio" category="General" tooltip="sets the text of the UI Component." />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="value" type="integer" displayName="Value" default="0" category="General"
+               tooltip="sets the value of the radio group.&#10;
+The radio group is initialized with this value. The value should be one of the radio buttons' state values in the group to be properly initialized." />
+       <property name="state_value" type="integer" displayName="State value" default="0" category="General" tooltip="sets the integer value that this radio object represents." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the radio object is selected. If you want to trace the state change of a radio group, you should add this callback to all the radio objects in that group.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.scroller.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.scroller.widget.xml
new file mode 100644 (file)
index 0000000..19edabb
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="scroller" displayName="Scroller" smallIcon="widget/32/pal_scroller_nor.png" icon.16="widget/16/view_p_scroller_nor.png" category="UI containers"
+       description="A scroller holds (and clips) a single object and scrolls it around. This means that it allows the user to use a scroll bar (or a finger) to drag the viewable region around, moving through a much larger object that is contained in the scroller. The scroller will always have a small minimum size by default as it won't be limited by the contents of the scroller"
+       layoutType="box" helpCategory="" helpContents="" feedbackWidth="200" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.scroller@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General"
+               tooltip="sets the horizontal scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General"
+               tooltip="sets the vertical scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="content_min_w" type="efl@boolean" displayName="Min limit(Width)" default="false" category="General"
+               tooltip="Make the scroller minimum width size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+       <property name="content_min_h" type="efl@boolean" displayName="Min limit(Height)" default="false" category="General"
+               tooltip="Make the scroller minimum heigth size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+
+       <property name="propagate_events" type="efl@boolean" displayName="Propagate events" default="true" category="General"
+               tooltip="sets event propagation on a scroller.&#10;
+This enables or disables event propagation from the scroller content to the scroller and its parent. By default event propagation is enabled" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,left" displayName="scroll,left" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) leftwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,right" displayName="scroll,right" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) rightwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,up" displayName="scroll,up" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) upwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,down" displayName="scroll,down" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) downwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent"
+               eventInfo="@brief scrolling animation has started&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief scrolling animation has stopped&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent"
+               eventInfo="@brief dragging the contents around has started&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief dragging the contents around has stopped&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief the left edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief the right edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief the top edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief the bottom edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="vbar,drag" displayName="vbar,drag" eventType="event.eflevent"
+               eventInfo="@brief the vertical scroll bar has been dragged&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="vbar,press" displayName="vbar,press" eventType="event.eflevent"
+               eventInfo="@brief the vertical scroll bar has been pressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="vbar,unpress" displayName="vbar,unpress" eventType="event.eflevent"
+               eventInfo="@brief the vertical scroll bar has been unpressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="hbar,drag" displayName="hbar,drag" eventType="event.eflevent"
+               eventInfo="@brief the horizontal scroll bar has been dragged&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="hbar,press" displayName="hbar,press" eventType="event.eflevent"
+               eventInfo="@brief the horizontal scroll bar has been pressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="hbar,unpress" displayName="hbar,unpress" eventType="event.eflevent"
+               eventInfo="@brief the horizontal scroll bar has been unpressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,page,changed" displayName="scroll,page,changed" eventType="event.eflevent"
+               eventInfo="@brief the visible page has changed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.slider.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.slider.widget.xml
new file mode 100644 (file)
index 0000000..4d7c6b3
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="slider" displayName="Slider" smallIcon="widget/32/pal_slider_nor.png" icon.16="widget/16/view_p_slider_nor.png" category="UI components"
+       description="The slider adds a draggable “slider” UI Component for selecting the value of something within a range" helpCategory="" helpContents=""
+       feedbackWidth="200" feedbackHeight="30" minWidth="70" minHeight="25" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="indicator_format" type="string" displayName="Indicator format" default="" category="General"
+               tooltip="sets the format string for the indicator label.&#10;
+The slider may display its value somewhere else for example, above the slider knob that is dragged around. 
+This function sets the format string used for this." />
+       <property name="direction" type="efl@direction" displayName="Direction" default="horizontal" category="General"
+               tooltip="sets the orientation of a given slider UI Component." />
+       <property name="style" type="efl.slider@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="min" type="double" displayName="Min" default="0.0" category="General" tooltip="sets the minimum value for the slider.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max-by" value="value" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max" default="1.0" category="General" tooltip="sets the maximum value for the slider.">
+               <condition name="integer-max" value="999999" error="integer-max" />
+               <condition name="integer-min-by" value="value" error="integer-min-by" />
+       </property>
+       <property name="value" type="double" displayName="Value" default="0.0" category="General" tooltip="sets the value the slider displays.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General"
+               tooltip="inverts a given slider UI Component's displaying values order." />
+       <property name="step" type="double" displayName="Step" default="0.05" category="General" tooltip="sets the step by which slider indicator will move.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="indicator" type="efl@boolean" displayName="Show indicator" default="false" category="General"
+               tooltip="sets whether to enlarge slider indicator (augmented knob) or not.&#10;
+By default, indicator will be bigger while dragged by the user. It won't display values set if you disable indicator." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief Whenever the slider value is changed by the user.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent"
+               eventInfo="@brief A short time after the value is changed by the user. This will be called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids possibly expensive reactions to the value change.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="slider,drag,start" displayName="slider,drag,start" eventType="event.eflevent"
+               eventInfo="@brief dragging the slider indicator around has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="slider,drag,stop" displayName="slider,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief dragging the slider indicator around has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.spinner.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.spinner.widget.xml
new file mode 100644 (file)
index 0000000..9320905
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="spinner" displayName="Spinner" smallIcon="widget/32/pal_spinner_nor.png" icon.16="widget/16/view_p_spinner_nor.png" category="UI components"
+       description="A spinner is a UI Component which allows the user to increase or decrease numeric values using arrow buttons, or edit values directly, clicking over it and typing the new value"
+       helpCategory="" helpContents="" feedbackWidth="150" feedbackHeight="150" minWidth="150" minHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.spinner@style" displayName="Style" default="horizontal" category="General"
+               tooltip="sets the style of the UI Component&#10;
+- horizontal: left/right buttons are used for changing the value.&#10;
+- vertical: up/down buttons are used for changing the value." />
+       <!-- <property name="label_format" type="string" displayName="Label format" default="%.0f" tooltip="sets the format string of the displayed label.&#10; If NULL, 
+               this sets the format to &quot;%.0f&quot;. If not it sets the format string for the label text. The label text is provided a floating point value, so the label text 
+               can display up to 1 floating point value. Note that this is optional. "/> -->
+       <property name="min" type="double" displayName="Min" default="0" category="General"
+               tooltip="sets the minimum value of the spinner.&#10;
+       If actual value is less than this value, it will be updated to this value.">
+               <condition name="integer-min" value="-9999999" error="integer-min" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max" default="100" category="General"
+               tooltip="sets the maximum value of the spinner.&#10;
+       If actual value is bigger than this value, it will be updated to this value.">
+               <condition name="integer-max" value="99999999" error="integer-max" />
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+       </property>
+       <property name="step" type="double" displayName="Step" default="1" category="General" tooltip="sets the step used to increment or decrement the spinner value.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General"
+               tooltip="sets whether the spinner can be directly edited by the user or not." />
+       <!-- <property name="interval" type="double" displayName="Interval" default="0.85" category="General" tooltip="Set the interval on time updates for an user mouse 
+               button hold on spinner UI Components' arrows.&#10; This interval value is decreased while the user holds the mouse pointer either incrementing or decrementing spinner's 
+               value. This helps the user to get to a given value distant from the current one easier/faster, as it will start to change quicker and quicker on mouse button holds. 
+               The calculation for the next change interval value, starting from the one set with this call, is the previous interval divided by 1.05, so it decreases a little 
+               bit. The default starting interval value for automatic changes is 0.85 seconds."/> <property name="base" type="double" displayName="Base" default="0" category="General" 
+               tooltip="sets the base for rounding.&#10; rounded_val = base + (double)(((value - base) / round) * round)"/> <property name="round" type="integer" displayName="Round" 
+               default="" category="General" tooltip="sets the round value for rounding.&#10; rounded_val = base + (double)(((value - base) / round) * round)"/> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief Whenever the spinner value is changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="spinner,drag,start" displayName="spinner,drag,start" eventType="event.eflevent"
+               eventInfo="@brief When dragging has started. (since 1.8)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="spinner,drag,stop" displayName="spinner,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief When dragging has stopped. (since 1.8)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent"
+               eventInfo="@brief A short time after the value is changed by the user. This will be called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids possibly expensive reactions to the value change.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.table.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.table.widget.xml
new file mode 100644 (file)
index 0000000..f506c0d
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="table" displayName="Table" smallIcon="widget/32/pal_table_nor.png" icon.16="widget/16/view_p_table_nor.png" category="UI containers"
+       description="A container UI Component to arrange other UI Components in a table where items can span multiple columns or rows" layoutType="table" helpCategory=""
+       helpContents="" feedbackWidth="300" feedbackHeight="300" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General" tooltip="Sets the homogeneous layout in the table." />
+
+       <!-- My -->
+       <property name="cols" type="integer" displayName="Col count" default="2" category="General" tooltip="The column count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="rows" type="integer" displayName="Row count" default="2" category="General" tooltip="The row count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="The horizontal padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="The vertical padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+       <childUIComponentProperty>
+               <property name="pack_col" type="integer" displayName="Column" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="cols" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_row" type="integer" displayName="Row" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="rows" error="integer-max-by-parent-property" />
+               </property>
+               <property name="col_span" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="col_span" targetValue="cols" error="size-max" />
+               </property>
+               <property name="row_span" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="row_span" targetValue="rows" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.toolbar.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.toolbar.widget.xml
new file mode 100644 (file)
index 0000000..e5d3d1f
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="toolbar" displayName="Toolbar" smallIcon="widget/32/pal_toolbar_nor.png" icon.16="widget/16/view_p_toolbar_nor.png" category="UI components"
+       description="A toolbar is a UI Component that displays a list of items inside a box. It can be scrollable, show a menu with items that don't fit to toolbar size or even crop them."
+       helpCategory="" helpContents="" feedbackWidth="480" feedbackHeight="50" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="toolbaritem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <!-- <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." 
+               /> -->
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="style" type="efl.toolbar@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="shrink_mode" type="efl.toolbar@shrinkmode" displayName="Shrink mode" default="none" category="General"
+               tooltip="Sets the item displaying mode of a given toolbar UI Component obj.">
+               <condition name="disable-property" value="1" target="homogeneous" />
+               <condition name="disable-property" value="3" target="homogeneous" />
+               <condition name="disable-property" value="4" target="homogeneous" />
+       </property>
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General" tooltip="Sets the toolbar select mode." />
+       <property name="icon_size" type="integer" displayName="Icon size" default="32" category="General" tooltip="Sets the icon size, in pixels, to be used by toolbar items.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="transverse_expand" type="efl@boolean" displayName="Transverse expanded" default="true" category="General"
+               tooltip="Sets the item's transverse expansion of a given toolbar UI Component obj." />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="true" category="General" tooltip="Enables or disables the homogeneous mode." />
+       <!-- <property name="align" type="double" displayName="align" default="0.5" category="General" tooltip="Sets the alignment of the items." > <condition name="integer-min" 
+               value="0" error="integer-min"/> <condition name="integer-max" value="1" error="integer-max"/> </property> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief when the user clicks on a toolbar item and becomes selected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief when an item is selected. event_info is a selected item. (since 1.11)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent"
+               eventInfo="@brief when an item is unselected. event_info is a unselected item. (since 1.11)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief when the toolbar is pressed for a certain amount of time.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the toolbar item has received focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the toolbar item has lost focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.toolbaritem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/efl.toolbaritem.widget.xml
new file mode 100644 (file)
index 0000000..f9c02e6
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="toolbaritem" displayName="Toolbaritem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="toolbar">
+
+       <relations>
+               <parent ids="toolbar" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component item." />
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="The text of the item when appends items to the toolbar." />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="A string with the absolute path of an image file" />
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/tizen.view.xml b/org.tizen.efluibuilder.descriptor/res/mobile-2.4/widget/tizen.view.xml
new file mode 100644 (file)
index 0000000..967878e
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="view" displayName="View" smallIcon="widget/32/pal_empty_nor.png" icon.16="widget/16/view_p_view_nor.png" category="Views" uiSelector="#%id%"
+       description="Empty View" layoutType="view" helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10"
+       borderVisible="false" xpath="">
+
+       <relations>
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+               <content ids="tabbar" max="1" exclusiveGroup="default" />
+               <content ids="panel" max="4" />
+               <content ids="popup" max="1" exclusiveGroup="default" />
+               <content ids="ctxpopup" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-page-id" />
+       </property>
+       <property name="type" type="string" displayName="type" initValue="view" category="General" />
+       <property name="indicator" type="efl@boolean" displayName="Indicator" default="true" category="General" tooltip="show or hide the indicator.">
+       </property>
+       <property name="screen_orientation" type="tizen.view@screen-orientation" displayName="Orientation" default="full_sensor" category="General"
+               tooltip="sets the style of the UI Component.">
+               <condition name="enable-property" value="full_sensor" target="disable" />
+       </property>
+       <property name="page_location_x" type="integer" displayName="location_x" category="Position" unusedEditors="properties">
+       </property>
+       <property name="page_location_y" type="integer" displayName="location_y" category="Position" unusedEditors="properties">
+       </property>
+       <event name="uib,view,create" displayName="uib,view,create" eventType="event.viewevent">
+               if (sizeof(uib_%page%_control_context)) {
+               vc->cc = calloc(1,
+               sizeof(uib_%page%_control_context));
+               }
+       </event>
+       <event name="uib,view,destroy" displayName="uib,view,destroy" eventType="event.viewevent">
+               if (vc->cc) {
+               /* destroy your Control_Context here */
+
+               free(vc->cc);
+               }
+       </event>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/efl.style.edj.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/efl.style.edj.xml
new file mode 100644 (file)
index 0000000..c9733c5
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<defaultStyleEDJs>
+       <!-- Order means priority -->
+       <styleEDJ name="efl-theme-tizen-mobile.edj" />
+       <styleEDJ name="default.edj" />
+</defaultStyleEDJs>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/efl.types.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/efl.types.xml
new file mode 100644 (file)
index 0000000..6977ec6
--- /dev/null
@@ -0,0 +1,438 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<types>
+       <type id="efl@boolean">
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@direction">
+               <constant value="horizontal" displayName="horizontal" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl@selectmode">
+               <constant value="default" displayName="default" />
+               <constant value="always" displayName="always" />
+               <constant value="none" displayName="none" />
+               <constant value="display_only" displayName="display_only" />
+       </type>
+
+       <type id="efl.progressbar@style">
+               <constant value="default" displayName="default" />
+               <constant value="pending" displayName="pending" />
+               <constant value="process_large" displayName="process_large" />
+               <constant value="process_medium" displayName="process_medium" />
+               <constant value="process_small" displayName="process_small" />
+       </type>
+
+       <type id="efl.spinner@style">
+               <constant value="horizontal" displayName="horizontal" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl.progressbar@format">
+               <constant value="%.0f%%" displayName="default" />
+               <constant value="%.1f%%" displayName="0.0" />
+               <constant value="%.2f%%" displayName="0.00" />
+               <constant value="%.3f%%" displayName="0.000" />
+               <constant value="%.4f%%" displayName="0.0000" />
+       </type>
+
+       <type id="efl.calendar@selectmode">
+               <constant value="default" displayName="default" />
+               <constant value="always" displayName="always" />
+               <constant value="none" displayName="none" />
+               <constant value="ondemand" displayName="ondemand" />
+       </type>
+
+       <type id="efl.colorselector@mode">
+               <constant value="palette" displayName="palette" />
+               <constant value="components" displayName="components" />
+               <constant value="both" displayName="both" />
+               <constant value="picker" displayName="picker" />
+               <constant value="plane" displayName="plane" />
+               <constant value="palette_plane" displayName="palette_plane" />
+               <constant value="all" displayName="all" />
+       </type>
+
+       <type id="efl.bg@option">
+               <constant value="center" displayName="center" />
+               <constant value="scale" displayName="scale" />
+               <constant value="stretch" displayName="stretch" />
+               <constant value="tile" displayName="tile" />
+       </type>
+
+       <type id="check-scale">
+               <constant value="fill" displayName="fill" />
+       </type>
+
+       <type id="efl.image@orient">
+               <constant value="none" displayName="none" />
+               <constant value="orient_0" displayName="orient_0" />
+               <constant value="orient_90" displayName="orient_90" />
+               <constant value="rotate_90" displayName="rotate_90" />
+               <constant value="orient_180" displayName="orient_180" />
+               <constant value="rotate_180" displayName="rotate_180" />
+               <constant value="orient_270" displayName="orient_270" />
+               <constant value="rotate_270" displayName="rotate_270" />
+               <constant value="flip_horizontal" displayName="flip_horizontal" />
+               <constant value="flip_vertical" displayName="flip_vertical" />
+               <constant value="flip_transpose" displayName="flip_transpose" />
+               <constant value="flip_transverse" displayName="flip_transverse" />
+       </type>
+
+       <type id="efl.index@style">
+               <constant value="default" displayName="default" />
+               <constant value="pagecontrol" displayName="pagecontrol" />
+       </type>
+
+       <type id="efl.label@wraptype">
+               <constant value="none" displayName="none" />
+               <constant value="char" displayName="char" />
+               <constant value="word" displayName="word" />
+               <constant value="mixed" displayName="mixed" />
+       </type>
+
+       <type id="efl.label@style">
+               <constant value="default" displayName="default" />
+               <constant value="marker" displayName="marker" />
+               <constant value="slide_long" displayName="slide_long" />
+               <constant value="slide_short" displayName="slide_short" />
+               <constant value="slide_bounce" displayName="slide_bounce" />
+       </type>
+
+       <type id="efl@scrollbar_h">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@scrollbar_v">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl.scroller@style">
+               <constant value="default" displayName="default" />
+               <constant value="handler" displayName="handler" />
+       </type>
+
+       <type id="efl.list@multiselectmode">
+               <constant value="default" displayName="default" />
+               <constant value="with_control" displayName="with_control" />
+       </type>
+
+       <type id="efl.list@mode">
+               <constant value="compress" displayName="compress" />
+               <constant value="scroll" displayName="scroll" />
+               <constant value="limit" displayName="limit" />
+               <constant value="expand" displayName="expand" />
+       </type>
+
+       <type id="efl.panel@orient">
+               <constant value="top" displayName="top" />
+               <constant value="bottom" displayName="bottom" />
+               <constant value="left" displayName="left" />
+               <constant value="right" displayName="right" />
+       </type>
+
+       <type id="efl.toolbar@shrinkmode">
+               <constant value="none" displayName="none" />
+               <constant value="hide" displayName="hide" />
+               <constant value="scroll" displayName="scroll" />
+               <constant value="menu" displayName="menu" />
+               <constant value="expand" displayName="expand" />
+       </type>
+
+       <type id="efl.toolbar@style">
+               <constant value="default" displayName="default" />
+               <constant value="navigationbar" displayName="navigationbar" />
+               <!--<constant value="tabbar_with_title" displayName="tabbar_with_title" /> -->
+       </type>
+
+       <type id="efl.entry@textformat">
+               <constant value="plain_utf8" displayName="plain_utf8" />
+               <constant value="markup_utf8" displayName="markup_utf8" />
+       </type>
+
+       <type id="efl.datetime@style">
+               <constant value="default" displayName="default" />
+               <constant value="date_layout" displayName="date_layout" />
+               <constant value="time_layout" displayName="time_layout" />
+               <constant value="time_layout_24hr" displayName="time_layout_24hr" />
+       </type>
+
+       <type id="efl.datetime@colors">
+               <constant value="bg" displayName="bg" required="default;date_layout;time_layout;time_layout_24hr;" />
+               <constant value="icon" displayName="icon" required="default;date_layout;time_layout;time_layout_24hr;" />
+               <constant value="icon_pressed" displayName="icon_pressed" required="default;date_layout;time_layout;time_layout_24hr;" />
+               <constant value="icon_disabled" displayName="icon_disabled" required="default;date_layout;time_layout;time_layout_24hr;" />
+               <constant value="effect_icon" displayName="effect_icon" required="default;date_layout;time_layout;time_layout_24hr;" />
+               <constant value="text" displayName="text" required="default;date_layout;time_layout;time_layout_24hr;" />
+               <constant value="text_pressed" displayName="text_pressed" required="default;date_layout;time_layout;time_layout_24hr;" />
+               <constant value="text_disabled" displayName="text_disabled" required="default;date_layout;time_layout;time_layout_24hr;" />
+               <constant value="cursor" displayName="cursor" required="default;date_layout;time_layout;time_layout_24hr;" />
+               <constant value="selection" displayName="selection" required="default;date_layout;time_layout;time_layout_24hr;" />
+               <constant value="bg_ampm" displayName="bg_ampm" required="time_layout;" />
+               <constant value="bg_ampm_pressed" displayName="bg_ampm_pressed" required="time_layout;" />
+               <constant value="bg_ampm_disabled" displayName="bg_ampm_disabled" required="time_layout;" />
+               <constant value="bg_ampm_unselected" displayName="bg_ampm_unselected" required="time_layout;" />
+               <constant value="text_ampm" displayName="text_ampm" required="time_layout;" />
+               <constant value="text_ampm_pressed" displayName="text_ampm_pressed" required="time_layout;" />
+               <constant value="text_ampm_disabled" displayName="text_ampm_disabled" required="time_layout;" />
+               <constant value="text_ampm_unselected" displayName="text_ampm_unselected" required="time_layout;" />
+       </type>
+
+       <type id="efl.button@style">
+               <constant value="default" displayName="default" />
+               <constant value="circle" displayName="circle" />
+               <constant value="editfield_clear" displayName="editfield_clear" />
+               <constant value="bottom" displayName="bottom" />
+               <constant value="icon_reorder" displayName="icon_reorder" />
+               <constant value="icon_expand_add" displayName="icon_expand_add" />
+               <constant value="icon_expand_delete" displayName="icon_expand_delete" />
+               <constant value="naviframe/title_left" displayName="naviframe/title_left" />
+               <constant value="naviframe/title_right" displayName="naviframe/title_right" />
+               <constant value="naviframe/back_btn" displayName="naviframe/back_btn" />
+               <constant value="dropdown" displayName="dropdown" />
+       </type>
+
+       <type id="efl.button@colors">
+               <constant value="bg" displayName="bg"
+                       required="default;circle;editfield_clear;bottom;icon_reorder;icon_expand_add;icon_expand_delete;naviframe/title_left;naviframe/title_right;naviframe/back_btn;dropdown" />
+               <constant value="bg_pressed" displayName="bg_pressed"
+                       required="default;circle;editfield_clear;bottom;icon_reorder;icon_expand_add;icon_expand_delete;naviframe/title_left;naviframe/title_right;naviframe/back_btn;dropdown" />
+               <constant value="bg_disabled" displayName="bg_disabled"
+                       required="default;circle;editfield_clear;bottom;icon_reorder;icon_expand_add;icon_expand_delete;naviframe/title_left;naviframe/title_right;naviframe/back_btn;dropdown" />
+               <constant value="effect" displayName="effect"
+                       required="default;circle;editfield_clear;bottom;icon_reorder;icon_expand_add;icon_expand_delete;naviframe/title_left;naviframe/title_right;naviframe/back_btn;dropdown" />
+               <constant value="text" displayName="text" required="default;circle;bottom;naviframe/title_left;naviframe/title_right" />
+               <constant value="text_pressed" displayName="text_pressed" required="default;circle;bottom;naviframe/title_left;naviframe/title_right" />
+               <constant value="text_disabled" displayName="text_disabled" required="default;circle;bottom;naviframe/title_left;naviframe/title_right" />
+               <constant value="icon" displayName="icon" required="icon_reorder;icon_cancel;icon_expand_add;icon_expand_delete;editfield_clear;naviframe/back_btn" />
+               <constant value="icon_pressed" displayName="icon_pressed" required="icon_reorder;icon_cancel;icon_expand_add;icon_expand_delete;editfield_clear;naviframe/back_btn" />
+               <constant value="icon_disabled" displayName="icon_disabled" required="icon_reorder;icon_cancel;icon_expand_add;icon_expand_delete;editfield_clear;naviframe/back_btn" />
+       </type>
+
+       <type id="efl.check@style">
+               <constant value="default" displayName="default" />
+               <constant value="favorite" displayName="favorite" />
+               <constant value="on&amp;off" displayName="on&amp;off" />
+       </type>
+
+       <type id="efl.popup@colors">
+               <constant value="bg_title" displayName="bg_title" required="default" />
+               <constant value="bg_content" displayName="bg_content" required="default" />
+               <constant value="bg_action" displayName="bg_action" required="default" />
+               <constant value="text_maintitle" displayName="text_maintitle" required="default" />
+               <constant value="text_maintitle_subtitle_enabled" displayName="text_maintitle_subtitle_enabled" required="default" />
+               <constant value="text_subtitle" displayName="text_subtitle" required="default" />
+               <constant value="text_content" displayName="text_content" required="default" />
+               <!--<constant value="bg" displayName="bg" required="toast" />
+               <constant value="text" displayName="text" required="toast" /> -->
+       </type>
+
+       <type id="efl.slider@style">
+               <constant value="default" displayName="default" />
+               <constant value="center_point" displayName="center_point" />
+               <constant value="warning" displayName="warning" />
+       </type>
+
+       <type id="efl.gengrid@style">
+               <constant value="default" displayName="default" />
+               <constant value="popup" displayName="popup" />
+       </type>
+
+       <type id="efl.gengrid@itemstyle">
+               <constant value="default" displayName="default" />
+               <constant value="type1" displayName="type1" />
+               <constant value="type2" displayName="type2" />
+       </type>
+
+       <type id="efl.genlist@style">
+               <constant value="solid/default" displayName="solid/default" />
+       </type>
+
+       <type id="efl.genlist@itemstyle">
+               <constant value="type1" displayName="type1" />
+               <constant value="type2" displayName="type2" />
+               <constant value="multiline" displayName="multiline" />
+               <constant value="full" displayName="full" />
+               <constant value="group_index" displayName="group_index" />
+               <constant value="group_index/expandable" displayName="group_index/expandable" />
+               <constant value="default" displayName="default" />
+               <constant value="double_label" displayName="double_label" />
+               <constant value="one_icon" displayName="one_icon" />
+               <constant value="end_icon" displayName="end_icon" />
+       </type>
+
+       <type id="efl.genlist@itemtype">
+               <constant value="none" displayName="none" />
+               <constant value="tree" displayName="tree" />
+               <constant value="group" displayName="group" />
+       </type>
+
+       <type id="efl.ctxpopup@style">
+               <constant value="default" displayName="default" />
+               <constant value="more/default" displayName="more/default" />
+       </type>
+
+       <type id="tizen.view@screen-orientation">
+               <constant value="no_sensor" displayName="no_sensor" />
+               <constant value="only_portrait" displayName="only_portrait" />
+               <constant value="only_landscape" displayName="only_landscape" />
+               <constant value="full_sensor" displayName="full_sensor" />
+       </type>
+
+       <type id="efl.panes@pack">
+               <constant value="left" displayName="left" />
+               <constant value="right" displayName="right" />
+       </type>
+
+       <type id="efl.popup@style">
+               <constant value="default" displayName="default" />
+               <constant value="theme_bg" displayName="theme_bg" />
+       </type>
+
+       <type id="efl.icon@standardicon">
+               <constant value="" displayName="(None)" />
+               <constant value="apps" displayName="apps" />
+               <constant value="arrow_down" displayName="arrow_down" />
+               <constant value="arrow_left" displayName="arrow_left" />
+               <constant value="arrow_right" displayName="arrow_right" />
+               <constant value="arrow_up" displayName="arrow_up" />
+               <constant value="chat" displayName="chat" />
+               <constant value="clock" displayName="clock" />
+               <constant value="close" displayName="close" />
+               <constant value="delete" displayName="delete" />
+               <constant value="edit" displayName="edit" />
+               <constant value="file" displayName="file" />
+               <constant value="home" displayName="home" />
+               <constant value="media_player/forward" displayName="media_player/forward" />
+               <constant value="media_player/info" displayName="media_player/info" />
+               <constant value="media_player/next" displayName="media_player/next" />
+               <constant value="media_player/pause" displayName="media_player/pause" />
+               <constant value="media_player/play" displayName="media_player/play" />
+               <constant value="media_player/prev" displayName="media_player/prev" />
+               <constant value="media_player/rewind" displayName="media_player/rewind" />
+               <constant value="media_player/stop" displayName="media_player/stop" />
+               <constant value="menu/apps" displayName="menu/apps" />
+               <constant value="menu/arrow_up" displayName="menu/arrow_up" />
+               <constant value="menu/arrow_down" displayName="menu/arrow_down" />
+               <constant value="menu/arrow_left" displayName="menu/arrow_left" />
+               <constant value="menu/arrow_right" displayName="menu/arrow_right" />
+               <constant value="menu/chat" displayName="menu/chat" />
+               <constant value="menu/clock" displayName="menu/clock" />
+               <constant value="menu/close" displayName="menu/close" />
+               <constant value="menu/delete" displayName="menu/delete" />
+               <constant value="menu/edit" displayName="menu/edit" />
+               <constant value="menu/folder" displayName="menu/folder" />
+               <constant value="menu/file" displayName="menu/file" />
+               <constant value="menu/home" displayName="menu/home" />
+               <constant value="menu/refresh" displayName="menu/refresh" />
+               <constant value="no_photo" displayName="no_photo" />
+               <constant value="photo/no_photo" displayName="photo/no_photo" />
+               <constant value="refresh" displayName="refresh" />
+       </type>
+
+       <type id="efl.progressbar@colors">
+               <constant value="bg" displayName="bg" required="default;pending" />
+               <constant value="bg_disabled" displayName="bg_disabled" required="default;pending" />
+               <constant value="bar" displayName="bar" required="default;pending" />
+               <constant value="bar_diabled" displayName="bar_diabled" required="default;pending" />
+               <constant value="text_bottom_left" displayName="text_bottom_left" required="default;pending" />
+               <constant value="text_bottom_left_diabled" displayName="text_bottom_left_diabled" required="default;pending" />
+               <constant value="text_bottom_right" displayName="text_bottom_right" required="default;pending" />
+               <constant value="text_bottom_right_disabled" displayName="text_bottom_right_disabled" required="default;pending" />
+               <constant value="text_top_right" displayName="text_top_right" required="default;pending" />
+               <constant value="text_top_right_disabled" displayName="text_top_right_disabled" required="default;pending" />
+               <constant value="text_status" displayName="text_status" required="default;pending" />
+       </type>
+
+       <type id="efl.scroller@colors">
+               <constant value="end_effect" displayName="end_effect" required="default;handler" />
+               <constant value="bar" displayName="bar" required="default;handler" />
+       </type>
+       <type id="efl.slider@colors">
+               <constant value="bg" displayName="bg" required="default;center_point;warning" />
+               <constant value="bg_disabled" displayName="bg_disabled" required="default;center_point;warning" />
+               <constant value="bar" displayName="bar" required="default;center_point;warning" />
+               <constant value="bar_pressed" displayName="bar_pressed" required="default;center_point;warning" />
+               <constant value="bar_disabled" displayName="bar_disabled" required="default;center_point;warning" />
+               <constant value="handler" displayName="handler" required="default;center_point;warning" />
+               <constant value="handler_pressed" displayName="handler_pressed" required="default;center_point;warning" />
+               <constant value="handler_disabled" displayName="handler_disabled" required="default;center_point;warning" />
+               <constant value="icon" displayName="icon" required="default;center_point;warning" />
+               <constant value="icon_disabled" displayName="icon_disabled" required="default;center_point;warning" />
+       </type>
+       <type id="efl.spinner@colors">
+               <constant value="icon" displayName="icon" required="default;horizontal;vertical" />
+               <constant value="icon_pressed" displayName="icon_pressed" required="default;horizontal;vertical" />
+               <constant value="icon_disabled" displayName="icon_disabled" required="default;horizontal;vertical" />
+               <constant value="effect_icon" displayName="effect_icon" required="default;horizontal;vertical" />
+               <constant value="text" displayName="text" required="default;horizontal;vertical" />
+               <constant value="text_pressed" displayName="text_pressed" required="default;horizontal;vertical" />
+               <constant value="text_disabled" displayName="text_disabled" required="default;horizontal;vertical" />
+               <constant value="cursor" displayName="cursor" required="default;horizontal;vertical" />
+               <constant value="selection" displayName="selection" required="default;horizontal;vertical" />
+       </type>
+       <type id="efl.toolbar@colors">
+               <constant value="bg" displayName="bg" required="default;tabbar_with_title" />
+       </type>
+       <type id="efl.toolbaritem@colors">
+               <constant value="text" displayName="text" required="default;tabbar_with_title;navigationbar" />
+               <constant value="text_pressed" displayName="text_pressed" required="default;tabbar_with_title;navigationbar" />
+               <constant value="text_disabled" displayName="text_disabled" required="default;tabbar_with_title;navigationbar" />
+               <constant value="text_selected" displayName="text_selected" required="default;tabbar_with_title;navigationbar" />
+       </type>
+       <type id="efl.gengriditem@colors">
+               <constant value="text" displayName="text" required="default;type1;type2;popup" />
+               <constant value="text_pressed" displayName="text_pressed" required="popup" />
+               <constant value="text_disabled" displayName="text_disabled" required="popup" />
+       </type>
+
+       <type id="efl.genlistitem@colors">
+               <constant value="bg" displayName="bg" required="default;one_icon;end_icon;double_label;type1;type2;multiline;full;group_index;group_index/expandable" />
+               <constant value="bg_pressed" displayName="bg_pressed" required="default;one_icon;end_icon;double_label;type1;type2;multiline;full;group_index;group_index/expandable" />
+               <constant value="bg_disabled" displayName="bg_disabled" required="default;one_icon;end_icon;double_label;type1;type2;multiline;full;group_index;group_index/expandable" />
+               <constant value="text" displayName="text" required="default;one_icon_end_icon;group_index/expandable;double_label;type1;type2;multiline;group_index" />
+               <constant value="text_pressed" displayName="text_pressed" required="default;one_icon_end_icon;group_index/expandable;double_label;type1;type2;multiline;group_index" />
+               <constant value="text_disabled" displayName="text_disabled" required="default;one_icon_end_icon;group_index/expandable;double_label;type1;type2;multiline;group_index" />
+               <constant value="text_sub" displayName="text_sub" required="double_label;type1;type2" />
+               <constant value="text_sub_pressed" displayName="text_sub_pressed" required="double_label;type1;type2" />
+               <constant value="text_sub_disabled" displayName="text_sub_disabled" required="double_label;type1;type2" />
+               <constant value="text_end" displayName="text_end" required="type1;type2;group_index" />
+               <constant value="text_end_pressed" displayName="text_end_pressed" required="type1;type2" />
+               <constant value="text_end_disabled" displayName="text_end_disabled" required="type1;type2" />
+               <constant value="text_sub_end" displayName="text_sub_end" required="type1;type2" />
+               <constant value="text_sub_end_pressed" displayName="text_sub_end" required="type1;type2" />
+               <constant value="text_sub_end_disabled" displayName="text_sub_end_disabled" required="type1;type2" />
+               <constant value="text_multiline" displayName="text_multiline" required="multiline" />
+               <constant value="text_multiline_pressed" displayName="text_multiline_pressed" required="multiline" />
+               <constant value="text_multiline_disabled" displayName="text_multiline_disabled" required="multiline" />
+       </type>
+
+       <type id="efl.hoversel@colors">
+               <constant value="text" displayName="text" required="default" />
+               <constant value="text_pressed" displayName="text_pressed" required="default" />
+               <constant value="text_disabled" displayName="text_disabled" required="default" />
+       </type>
+
+       <type id="efl.hoverselitem@colors">
+               <constant value="text" displayName="text" required="default" />
+               <constant value="text_pressed" displayName="text_pressed" required="default" />
+               <constant value="text_disabled" displayName="text_disabled" required="default" />
+       </type>
+
+       <type id="efl.index@colors">
+               <constant value="bg_popup" displayName="bg_popup" required="default" />
+               <constant value="text_popup" displayName="text_popup" required="default" />
+       </type>
+
+       <type id="efl.indexitem@colors">
+               <constant value="text" displayName="text" required="default" />
+               <constant value="text_pressed" displayName="text_pressed" required="default" />
+       </type>
+</types>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen-native-ui-fw.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen-native-ui-fw.xml
new file mode 100644 (file)
index 0000000..895660f
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE descriptors [
+       <!ENTITY tizen.types SYSTEM "tizen.types.xml">
+       <!ENTITY tizen.uicomponent.categories SYSTEM "tizen.uicomponent.categories.xml">
+       
+       <!-- default style edj -->
+       <!ENTITY efl.style.edj SYSTEM "efl.style.edj.xml">
+       
+       <!-- type & event type -->
+       <!ENTITY efl.types SYSTEM "efl.types.xml">
+       <!ENTITY tizen.eventtypes SYSTEM "tizen.eventtypes.xml">
+       
+       <!-- VIEW -->
+       <!ENTITY tizen.view SYSTEM "widget/tizen.view.xml">
+       <!ENTITY tizen.empty.view SYSTEM "widget/tizen.empty.view.xml">
+       
+       <!-- WIDGET -->
+       <!ENTITY efl.bg SYSTEM "widget/efl.bg.widget.xml">
+       <!ENTITY efl.button SYSTEM "widget/efl.button.widget.xml">
+       <!ENTITY efl.check SYSTEM "widget/efl.check.widget.xml">
+       <!ENTITY efl.colorselector SYSTEM "widget/efl.colorselector.widget.xml">
+       <!ENTITY efl.datetime SYSTEM "widget/efl.datetime.widget.xml"> 
+       <!ENTITY efl.entry SYSTEM "widget/efl.entry.widget.xml">
+       <!ENTITY efl.image SYSTEM "widget/efl.image.widget.xml">
+       <!ENTITY efl.label SYSTEM "widget/efl.label.widget.xml">
+       <!ENTITY efl.radio SYSTEM "widget/efl.radio.widget.xml">
+       <!ENTITY efl.spinner SYSTEM "widget/efl.spinner.widget.xml">
+       <!ENTITY efl.slider SYSTEM "widget/efl.slider.widget.xml">
+       <!ENTITY efl.progressbar SYSTEM "widget/efl.progressbar.widget.xml">
+       <!ENTITY efl.list SYSTEM "widget/efl.list.widget.xml">
+       <!ENTITY efl.listitem SYSTEM "widget/efl.listitem.widget.xml">
+       <!ENTITY efl.scroller SYSTEM "widget/efl.scroller.widget.xml">
+       <!ENTITY efl.genlist SYSTEM "widget/efl.genlist.widget.xml">
+       <!ENTITY efl.genlistitem SYSTEM "widget/efl.genlistitem.widget.xml">
+       <!ENTITY efl.toolbar SYSTEM "widget/efl.toolbar.widget.xml">
+       <!ENTITY efl.toolbaritem SYSTEM "widget/efl.toolbaritem.widget.xml">
+       <!ENTITY efl.multibuttonentry SYSTEM "widget/efl.multibuttonentry.widget.xml">
+       <!ENTITY efl.multibuttonentryitem SYSTEM "widget/efl.multibuttonentryitem.widget.xml">
+       <!ENTITY efl.layout SYSTEM "widget/efl.layout.widget.xml">
+       <!ENTITY efl.gengrid SYSTEM "widget/efl.gengrid.widget.xml">
+       <!ENTITY efl.gengriditem SYSTEM "widget/efl.gengriditem.widget.xml">
+       <!ENTITY efl.index SYSTEM "widget/efl.index.widget.xml">
+       <!ENTITY efl.indexitem SYSTEM "widget/efl.indexitem.widget.xml">
+       <!ENTITY efl.calendar SYSTEM "widget/efl.calendar.widget.xml">
+       <!ENTITY efl.flipselector SYSTEM "widget/efl.flipselector.widget.xml">
+       <!ENTITY efl.flipselectoritem SYSTEM "widget/efl.flipselectoritem.widget.xml">
+       <!ENTITY efl.ctxpopup SYSTEM "widget/efl.ctxpopup.widget.xml">
+       <!ENTITY efl.ctxpopupitem SYSTEM "widget/efl.ctxpopupitem.widget.xml">
+       <!ENTITY efl.popup SYSTEM "widget/efl.popup.widget.xml">
+       <!ENTITY efl.map SYSTEM "widget/efl.map.widget.xml">
+       <!ENTITY efl.hoversel SYSTEM "widget/efl.hoversel.widget.xml">
+       <!ENTITY efl.hoverselitem SYSTEM "widget/efl.hoverselitem.widget.xml">
+
+       <!-- WIDGET : Container -->
+       <!ENTITY efl.grid SYSTEM "widget/efl.grid.widget.xml">
+       <!ENTITY efl.table SYSTEM "widget/efl.table.widget.xml">
+       <!ENTITY efl.box SYSTEM "widget/efl.box.widget.xml">
+       <!ENTITY efl.panes SYSTEM "widget/efl.panes.widget.xml">
+       <!ENTITY efl.panel SYSTEM "widget/efl.panel.widget.xml">
+       <!-- End of list -->
+]>
+
+<tizenFile>
+       <fileInfo>
+               <type>tizen-descriptor</type>
+               <version>2</version>
+               <desc>Tizen Native UI Builder Descriptor</desc>
+       </fileInfo>
+
+       <descriptors xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tizen="http://www.tizen.org/2012/uibuilder/descriptor">
+
+               <renderer id="EFL" />
+
+               <doc id="tizen.doc">
+
+                       <relations>
+                               <content ids="tizen.page" />
+                       </relations>
+               </doc>
+       
+       &tizen.uicomponent.categories;
+
+               <!-- default style edj -->
+       &efl.style.edj;
+
+               <!-- type & event type -->
+       &tizen.types;
+       &efl.types;
+       &tizen.eventtypes;
+
+               <!-- view -->
+       &tizen.view;
+
+   &efl.popup;
+   &efl.ctxpopup;
+   &efl.ctxpopupitem;
+       
+       &efl.bg;
+       &efl.button;
+       &efl.check;
+       &efl.colorselector;
+       &efl.datetime; 
+       &efl.entry;
+       &efl.image;
+       &efl.label;
+       &efl.radio;
+       &efl.spinner;
+       &efl.slider;
+       &efl.progressbar;
+       &efl.list;
+       &efl.listitem;
+       &efl.genlist;
+       &efl.genlistitem;
+       &efl.scroller;
+       &efl.toolbar;
+       &efl.toolbaritem;
+       &efl.multibuttonentry;
+       &efl.multibuttonentryitem;
+       &efl.layout;
+       &efl.gengrid;
+       &efl.gengriditem;
+       &efl.hoversel;
+       &efl.hoverselitem;
+       &efl.index;
+       &efl.indexitem; 
+       &efl.grid;
+       &efl.table;
+       &efl.box;
+       &efl.panes;
+       &efl.panel;
+       &efl.map;
+       &efl.calendar;
+       &efl.flipselector;
+       &efl.flipselectoritem;
+
+       </descriptors>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen.eventtypes.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen.eventtypes.xml
new file mode 100644 (file)
index 0000000..dea9f2c
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<eventTypes>
+       <eventType id="event.eflevent">
+               <defaultCode>%page%_%object%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+
+       <eventType id="event.viewevent">
+               <defaultCode>%page%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+</eventTypes>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen.types.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen.types.xml
new file mode 100644 (file)
index 0000000..5b5d28c
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<types>
+    <type id="text@databinding">
+        <constant value="text" displayName=""/>
+    </type>
+    <type id="foreach@databinding">
+        <constant value="foreach" displayName=""/>
+    </type>
+</types>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen.uicomponent.categories.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/tizen.uicomponent.categories.xml
new file mode 100644 (file)
index 0000000..d86fdb4
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<UIComponentCategories>
+       <UIComponentCategory name="Views" />
+       <UIComponentCategory name="UI containers" />
+       <UIComponentCategory name="UI components" />
+</UIComponentCategories>
+
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.bg.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.bg.widget.xml
new file mode 100644 (file)
index 0000000..d47615d
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="bg" displayName="Background" smallIcon="widget/32/pal_bg_nor.png" icon.16="widget/16/view_p_bg_nor.png" category="UI components"
+       description="Background object, used for setting a solid color, image or Edje group as a background to a window or any container object" helpCategory=""
+       helpContents="content" feedbackWidth="200" feedbackHeight="200" minWidth="1" minHeight="1" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="color" type="color" displayName="Color" default="#ffffff" category="General" tooltip="sets the color on a given background UI Component." />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="sets the file path of the image">
+               <!-- <condition name="enable-property" value="" target="option"/> -->
+       </property>
+       <property name="option" type="efl.bg@option" displayName="Option" default="scale" category="General"
+               tooltip="set the way how a background UI Component is to display its image.&#10;
+- center: Center the background image.&#10;
+- scale: Scale the background image, retaining the aspect ratio.&#10;
+- stretch: Stretch the background image to fill the UI Component's area.&#10;
+- tile: Tile background image at its original size.&#10;" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.box.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.box.widget.xml
new file mode 100644 (file)
index 0000000..d8dbc68
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="box" displayName="Box" smallIcon="widget/32/pal_box_nor.png" icon.16="widget/16/view_p_box_nor.png" category="UI containers"
+       description="A box arranges objects in a linear fashion, governed by a layout function that defines the details of this arrangement." layoutType="box"
+       helpCategory="" helpContents="box" feedbackWidth="200" feedbackHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the horizontal orientation." />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="sets the box to arrange its children homogeneously." />
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="sets the horizontal space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="300" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="sets the vertical space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="500" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <!-- Events -->
+       <!-- <event name="child,added" displayName="child,added" eventType="event.eflevent" eventInfo="@brief &#xA;&#xA;@param vc It is context of the view that this event 
+               occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Evas_Object 
+               *child = (Evas_Object *) event_info;" /> <event name="child,removed" displayName="child,removed" eventType="event.eflevent" eventInfo="@brief &#xA;&#xA;@param vc 
+               It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits 
+               the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Evas_Object *child = (Evas_Object *) event_info;" /> -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.button.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.button.widget.xml
new file mode 100644 (file)
index 0000000..0dfe5b4
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="button" displayName="Button" smallIcon="widget/32/pal_button_nor.png" icon.16="widget/16/view_p_button_nor.png" category="UI components"
+       description="This is a push-button. Press it and run some function. It can contain a simple label and icon object and it also has an autorepeat feature"
+       helpCategory="" helpContents="button" feedbackWidth="150" feedbackHeight="60" minWidth="70" minHeight="60" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Button" category="General" tooltip="sets the text of the UI Component." />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="style" type="efl.button@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component.">
+               <condition name="notify-property" target="colors"/>
+       </property>
+       <property name="colors" type="efl.button@colors" displayName="" default="" category="Color" tooltip="sets the colors of the UI Component." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief the user clicked the button (press/release).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="repeated" displayName="repeated" eventType="event.eflevent"
+               eventInfo="@brief the user pressed the button without releasing it.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent"
+               eventInfo="@brief button was pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="unpressed" displayName="unpressed" eventType="event.eflevent"
+               eventInfo="@brief button was released after being pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.calendar.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.calendar.widget.xml
new file mode 100644 (file)
index 0000000..baa9dd2
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="calendar" displayName="Calendar" smallIcon="widget/32/pal_calendar_nor.png" icon.16="widget/16/view_p_calendar_nor.png" category="UI components"
+       description="This is a calendar UI Component. It helps applications to flexibly display a calender with day of the week, date, year and month" helpCategory=""
+       helpContents="" feedbackWidth="480" feedbackHeight="450" minWidth="480" minHeight="400" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" />
+
+       <property name="min_year" type="integer" displayName="Min year" default="1902" category="General" />
+       <property name="max_year" type="integer" displayName="Max year" default="-1" category="General" />
+       <property name="select_mode" type="efl.calendar@selectmode" displayName="Select mode" default="default" category="General" />
+       <property name="interval" type="double" displayName="Interval" default="0.85" category="General">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="display,changed" displayName="display,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.check.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.check.widget.xml
new file mode 100644 (file)
index 0000000..020a320
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="check" displayName="Check" smallIcon="widget/32/pal_check_nor.png" icon.16="widget/16/view_p_check_nor.png" category="UI components"
+       description="The check UI Component allows for toggling a value between true and false" helpCategory="" helpContents="efl.datetime" feedbackWidth="150"
+       feedbackHeight="60" minWidth="40" minHeight="40" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Check" category="General" tooltip="sets the text of the UI Component." />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="state" type="efl@boolean" displayName="State" default="false" category="General" tooltip="sets the on/off state of the check UI Component." />
+       <property name="style" type="efl.check@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component."/>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief This is called whenever the user changes the state of the check objects (event_info is always NULL).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.colorselector.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.colorselector.widget.xml
new file mode 100644 (file)
index 0000000..bcc32c0
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="colorselector" displayName="ColorSelector" smallIcon="widget/32/pal_color_nor.png" icon.16="widget/16/view_p_color_nor.png" category="UI components"
+       description="A ColorSelector is a color selection widget. It allows application to set a series of colors" helpCategory="" helpContents="efl.colorselector"
+       feedbackWidth="480" feedbackHeight="160" minWidth="60" minHeight="160" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief When the color value changes on selector event_info is NULL.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="color,item,selected" displayName="color,item,selected" eventType="event.eflevent"
+               eventInfo="@brief When user clicks on color item. The event_info parameter of the callback will be the selected color item.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *colorselector_item = (Elm_Object_Item *) event_info;" />
+       <event name="color,item,longpressed" displayName="color,item,longpressed" eventType="event.eflevent"
+               eventInfo="@brief When user long presses on color item. The event info parameter of the callback contains selected color item.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *colorselector_item = (Elm_Object_Item *) event_info;" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.ctxpopup.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.ctxpopup.widget.xml
new file mode 100644 (file)
index 0000000..fc839a5
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopup" displayName="Ctxpopup" smallIcon="widget/32/pal_ctx_nor.png" icon.16="widget/16/view_p_ctxp_nor.png" category="Views"
+       description="Ctxpopup(Context popup)s are used to provide options for the currently selected objects. Ctxpopup is composed of popup and a list of items inside popup." helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false"
+       uiSelector="#%id%" xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="ctxpopupitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the direction orientation." />
+       <!-- <property name="style" type="efl.ctxpopup@style" displayName="Style" default="default" category="General" tooltip="sets the style of the widget."> <condition 
+               name="enable-property" value="default" target="disable"/> </property> -->
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="dismissed" displayName="dismissed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.ctxpopupitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.ctxpopupitem.widget.xml
new file mode 100644 (file)
index 0000000..dc6db61
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopupitem" displayName="CtxPopupItem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI containers" description=""
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="ctxpopup">
+
+       <relations>
+               <parent ids="ctxpopup" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="CtxPopupItem" category="General" tooltip="The text of the list item" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.datetime.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.datetime.widget.xml
new file mode 100644 (file)
index 0000000..7a80e24
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="datetime" displayName="Datetime" smallIcon="widget/32/pal_date_nor.png" icon.16="widget/16/view_p_date_nor.png" category="UI components"
+       description="Datetime UI Component is used to display and input date time values" helpCategory="" helpContents="efl.datetime" feedbackWidth="380"
+       feedbackHeight="210" minWidth="380" minHeight="210" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.datetime@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." >
+               <condition name="notify-property" target="colors"/>
+       </property>
+       <property name="colors" type="efl.datetime@colors" displayName="" default="" category="Color" tooltip="sets the colors of the UI Component." />
+
+       <!-- <property name="format" type="string" displayName="Format" default="%b %d %Y %I : %M %p" tooltip="Sets the datetime format. Format is a combination of allowed 
+               LIBC date format specifiers like: &quot;%b %d, %Y %I : %M %p&quot;."/> -->
+       <!-- %Y : The year as a decimal number including the century.&#xA; %m : The month as a decimal number (range 01 to 12).&#xA; %b : The abbreviated month name according 
+               to the current locale.&#xA; %B : The full month name according to the current locale.&#xA; %h : The abbreviated month name according to the current locale(same as 
+               %b).&#xA; %d : The day of the month as a decimal number (range 01 to 31).&#xA; %e : The day of the month as a decimal number (range 1 to 31). Single digits are preceded 
+               by a blank.&#xA; %I : The hour as a decimal number using a 12-hour clock (range 01 to 12).&#xA; %H : The hour as a decimal number using a 24-hour clock (range 00 
+               to 23).&#xA; %k : The hour (24-hour clock) as a decimal number (range 0 to 23). Single digits are preceded by a blank.&#xA; %l : The hour (12-hour clock) as a decimal 
+               number (range 1 to 12). Single digits are preceded by a blank.&#xA; %M : The minute as a decimal number (range 00 to 59).&#xA; %p : Either 'AM' or 'PM' according 
+               to the given time value, or the corresponding strings for the current locale. Noon is treated as 'PM' and midnight as 'AM'.&#xA; %P : Like p, but in lower case: 
+               'am' or 'pm' or a corresponding string for the current locale.&#xA; %c : The preferred date and time representation for the current locale.&#xA; %x : The preferred 
+               date representation for the current locale without the time.&#xA; %X : The preferred time representation for the current locale without the date.&#xA; %r : The complete 
+               calendar time using the AM/PM format of the current locale.&#xA; %R : The hour and minute in decimal numbers using the format H:M.&#xA; %T : The time of the day 
+               in decimal numbers using the format H:M:S.&#xA; %F : The date using the format %Y-%m-%d." -->
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief whenever Datetime field value is changed, this signal is sent.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.entry.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.entry.widget.xml
new file mode 100644 (file)
index 0000000..6adcf99
--- /dev/null
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="entry" displayName="Entry" smallIcon="widget/32/pal_entry_nor.png" icon.16="widget/16/view_p_entry_nor.png" category="UI components"
+       description="An entry is a convenience UI Component which shows a box that the user can enter text into" helpCategory="" helpContents="button" feedbackWidth="150"
+       feedbackHeight="100" minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Entry" category="General" tooltip="Convenient macro for elm_object_part_text_set." />
+       <property name="single_line" type="efl@boolean" displayName="Single line" default="false" category="General" tooltip="Sets the entry to the single line mode." />
+       <property name="password" type="efl@boolean" displayName="Password" default="false" category="General" tooltip="Sets the entry to the password mode." >
+               <condition name="enable-property" value="false" target="single_line" />
+       </property>
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General" tooltip="Sets whether the entry is editable." />
+       <property name="context_menu" type="efl@boolean" displayName="Context menu enabled" default="true" category="General"
+               tooltip="Disables the entry's contextual (longpress) menu." />
+       <property name="scroll" type="efl@boolean" displayName="Scrollable" default="false" category="General" tooltip="Enables or disables scrolling in the entry." />
+
+       <property name="src" type="text-resource" displayName="File path" default="" category="General"
+               tooltip="Sets the file (and implicitly loads it) for the text to display and then allow edit. All changes are written back to the file after a short delay if the entry object is set to autosave (which is the default).">
+               <condition name="disable-property" value="" target="autosave" />
+               <condition name="disable-property" value="" target="text-format" />
+       </property>
+       <property name="file_text_format" type="efl.entry@textformat" displayName="Text Format" default="plain_utf8" category="General"
+               tooltip="Enumeration that defines the text format types.&#xD;
+       plain_utf8 : Plain UTF8 type&#xD;
+       markup_utf8 : Markup UTF8 type" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="aborted" displayName="aborted" eventType="event.eflevent"
+               eventInfo="@brief The escape key was pressed on a single line entry. (since 1.7)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="activated" displayName="activated" eventType="event.eflevent"
+               eventInfo="@brief The enter key was pressed on a single line entry.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="anchor,clicked" displayName="anchor,clicked" eventType="event.eflevent"
+               eventInfo="@brief An anchor has been clicked. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,down" displayName="anchor,down" eventType="event.eflevent"
+               eventInfo="@brief Mouse button has been pressed on an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,hover,opened" displayName="anchor,hover,opened" eventType="event.eflevent"
+               eventInfo="@brief The anchor is clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Hover_Info *entry_hover_info = (Elm_Entry_Anchor_Hover_Info *) event_info;" />
+       <event name="anchor,in" displayName="anchor,in" eventType="event.eflevent"
+               eventInfo="@brief Mouse cursor has moved into an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,out" displayName="anchor,out" eventType="event.eflevent"
+               eventInfo="@brief Mouse cursor has moved out of an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,up" displayName="anchor,up" eventType="event.eflevent"
+               eventInfo="@brief Mouse button has been unpressed on an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief The text within the entry was changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="changed,user" displayName="changed,user" eventType="event.eflevent"
+               eventInfo="@brief The text within the entry was changed because of user interaction.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Change_Info *entry_change_info = (Elm_Entry_Change_Info *) event_info;" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief The entry has been clicked (mouse press and release).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The entry has been double clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="clicked,triple" displayName="clicked,triple" eventType="event.eflevent"
+               eventInfo="@brief The entry has been triple clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="cursor,changed" displayName="cursor,changed" eventType="event.eflevent"
+               eventInfo="@brief The cursor has changed position.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="cursor,changed,manual" displayName="cursor,changed,manual" eventType="event.eflevent"
+               eventInfo="@brief The cursor has changed position manually.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent"
+               eventInfo="@brief The entry has received focus.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent"
+               eventInfo="@brief The entry has lost focus.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief A mouse button has been pressed and held for a couple&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="maxlength,reached" displayName="maxlength,reached" eventType="event.eflevent"
+               eventInfo="@brief Called when a maximum length is reached.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="preedit,changed" displayName="preedit,changed" eventType="event.eflevent"
+               eventInfo="@brief The preedit string has changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="press" displayName="press" eventType="event.eflevent"
+               eventInfo="@brief A mouse button has been pressed on the entry. seconds.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="redo,request" displayName="redo,request" eventType="event.eflevent"
+               eventInfo="@brief Called on redo request.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,changed" displayName="selection,changed" eventType="event.eflevent"
+               eventInfo="@brief The current selection has changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,cleared" displayName="selection,cleared" eventType="event.eflevent"
+               eventInfo="@brief The current selection has been cleared.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,copy" displayName="selection,copy" eventType="event.eflevent"
+               eventInfo="@brief A copy of the selected text into the clipboard was requested.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,cut" displayName="selection,cut" eventType="event.eflevent"
+               eventInfo="@brief A cut of the selected text into the clipboard was requested.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,paste" displayName="selection,paste" eventType="event.eflevent"
+               eventInfo="@brief A paste of the clipboard contents was requested.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,start" displayName="selection,start" eventType="event.eflevent"
+               eventInfo="@brief A selection has begun and no previous selection existed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="text,set,done" displayName="text,set,done" eventType="event.eflevent"
+               eventInfo="@brief Whole text has been set to the entry.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="theme,changed" displayName="theme,changed" eventType="event.eflevent"
+               eventInfo="@brief Called when the theme is changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="undo,request" displayName="undo,request" eventType="event.eflevent"
+               eventInfo="@brief Called on undo request.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="rejected" displayName="rejected" eventType="event.eflevent"
+               eventInfo="@brief Called when some of inputs are rejected by the filter. (since 1.9)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.flipselector.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.flipselector.widget.xml
new file mode 100644 (file)
index 0000000..0fd01b2
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="flipselector" displayName="Flipselector" smallIcon="widget/32/pal_filip_nor.png" icon.16="widget/16/view_p_filip_nor.png" category="UI components"
+       description="A flip selector is a UI Component to show a set of text items, one at a time, with the same sheet switching style as the clock UI Component, when one changes the current displaying sheet"
+       helpCategory="" helpContents="" feedbackWidth="140" feedbackHeight="180" minWidth="100" minHeight="140" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="flipselectoritem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" />
+       <property name="data_bind" type="foreach@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add flipselector item" unusedEditors="source_tab" />
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="overflowed" displayName="overflowed" eventType="event.eflevent" />
+       <event name="underflowed" displayName="underflowed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.flipselectoritem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.flipselectoritem.widget.xml
new file mode 100644 (file)
index 0000000..717bb94
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="flipselectoritem" displayName="Flipselectoritem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="FlipselectorItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="flipselector">
+
+       <relations>
+               <parent ids="flipselector" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.gengrid.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.gengrid.widget.xml
new file mode 100644 (file)
index 0000000..ffc2045
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="gengrid" displayName="Gengrid" smallIcon="widget/32/pal_gengrid_nor.png" icon.16="widget/16/view_p_gengrid_nor.png" category="UI components"
+       description="This UI Component aims to position objects in a grid layout while actually creating and rendering only the visible ones" helpCategory=""
+       helpContents="list" feedbackWidth="400" feedbackHeight="400" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="gengriditem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.gengrid@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add gengrid item" unusedEditors="source_tab" />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General"
+               tooltip="set the gengrid select mode.&#10;
+- default: Once an item is selected, it would stay highlighted and not going to call selected callback again even it was clicked. Items can get focus.&#10;
+- always: Item selected callbacks will be called every time for click events, even after the item was already selected. Items can get focus.&#10;
+- none: Items will never be highlighted and selected but the size will be adjusted by the finger size configuration. Items can't get focus.&#10;
+- display_only: Items will never be highlighted and selected and ignore the finger size. So the item size can be reduced below than the finger size configuration. Items can't get focus." />
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General"
+               tooltip="set the direction in which a given gengrid UI Component will expand while placing its items.&#10;
+       If true, items will be placed in columns, from top to bottom and, when the space for a column is filled, 
+       another one is started on the right, thus expanding the grid horizontally. &#10;If false, items will be placed in rows, 
+       from left to right and, when the space for a row is filled, another one is started below, thus expanding the grid vertically." />
+       <property name="item_size_w" type="integer" displayName="Item size W" default="200" category="General"
+               tooltip="sets the width size for the items of the gengrid UI Component.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="item_size_h" type="integer" displayName="Item size H" default="200" category="General"
+               tooltip="sets the height size for the items of the gengrid UI Component.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="multi_select" type="efl@boolean" displayName="Multi select" default="false" category="General"
+               tooltip="enables or disables multi-selection in the gengrid UI Component." />
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked or pressed (enter|return|spacebar) on an item. The event_info parameter is the gengrid item that was activated.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked an item. The event_info parameter is the gengrid item that was double-clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,right" displayName="clicked,right" eventType="event.eflevent"
+               eventInfo="@brief The user has right-clicked an item. The event_info parameter is the item that was right-clicked. (since 1.13)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item is pressed for a certain amount of time. By default it's 1 second.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief The user has made an item selected. The event_info parameter is the gengrid item that was selected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent"
+               eventInfo="@brief The user has made an item unselected. The event_info parameter is the gengrid item that was unselected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="realized" displayName="realized" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the gengrid has its implementing Evas object instantiated, de facto. event_info is the gengrid item that was created.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="unrealized" displayName="unrealized" eventType="event.eflevent"
+               eventInfo="@brief This is called when the implementing Evas object for this item is deleted. event_info is the gengrid item that was deleted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief Called when an item is added, removed, resized or moved and when the gengrid is resized or gets &quot;horizontal&quot; property changes.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="drag,start,up" displayName="drag,start,up" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) up.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,down" displayName="drag,start,down" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) down.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,left" displayName="drag,start,left" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) left.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,right" displayName="drag,start,right" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) right.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,stop" displayName="drag,stop" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has stopped being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag" displayName="drag" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid is being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief called when the content has been scrolled (moved).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent"
+               eventInfo="@brief called when dragging the content has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief called when dragging the content has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,page,changed" displayName="scroll,page,changed" eventType="event.eflevent"
+               eventInfo="@brief called when the visible page has changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the top edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the bottom edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the left edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the right edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="moved" displayName="moved" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item is moved by a user interaction in a reorder mode. The event_info parameter is the item that was moved.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="index,update" displayName="index,update" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item index is changed. Note that this callback is called while each item is being realized.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is highlighted. This is called when the user presses an item or keyboard selection is done so the item is physically highlighted. The event_info parameter is the item that was highlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is unhighlighted. This is called when the user releases an item or keyboard selection is moved so the item is physically unhighlighted. The event_info parameter is the item that was unhighlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the gengrid item has received focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the gengrid item has lost focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent"
+               eventInfo="@brief The user pressed the an item. The event_info parameter is the item that was pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="released" displayName="released" eventType="event.eflevent"
+               eventInfo="@brief The user released the an item. The event_info parameter is the item that was released.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,reorder,anim,start" displayName="item,reorder,anim,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item movement has just started by keys in reorder mode. The event_info parameter is the item that is going to move. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,reorder,anim,stop" displayName="item,reorder,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item movement just stopped in reorder mode. The event_info parameter is the item that was moved. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.gengriditem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.gengriditem.widget.xml
new file mode 100644 (file)
index 0000000..3cd7793
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="gengriditem" displayName="Gengriditem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="gengridItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="gengrid">
+
+       <relations>
+               <parent ids="gengrid" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.gengrid@itemstyle" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." >
+               <condition name="notify-property" target="colors"/>
+       </property>
+       <property name="colors" type="efl.gengriditem@colors" displayName="" default="" category="Color" tooltip="sets the colors of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="sets the text of item" />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="sets the file path of the image" />
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="sets the selected state of the UI Component." />
+       <property name="disabled" type="efl@boolean" displayName="Disabled" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.genlist.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.genlist.widget.xml
new file mode 100644 (file)
index 0000000..36cf7dd
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlist" displayName="Genlist" smallIcon="widget/32/pal_genlist_nor.png" icon.16="widget/16/view_p_genlist_nor.png" category="UI components"
+       description="This UI Component aims to have more expansive list than the simple list in Elementary that could have more flexible items and allow many more entries while still being fast and low on memory usage. At the same time it was also made to be able to do tree structures. But the price to pay is more complexity when it comes to usage. If all you want is a simple list with icons and a single text, use the normal List object"
+       helpCategory="" helpContents="list" feedbackWidth="480" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.genlist@style" displayName="Style" category="General" default="solid/default" tooltip="sets the style of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add genlist item" unusedEditors="source_tab" />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="enable/disable homogeneous mode&#10; If true ,
+               this will enable the homogeneous mode where items are of the same
+               height and width so that genlist may do the lazy-loading at its
+               maximum ( which increases the performance for scrolling the list )&#10;
+               In the normal mode , genlist will pre-calculate all the items ' sizes
+               even though they are not in use. So items ' callbacks are called many
+               times than expected. But homogeneous mode will skip the item size
+               pre-calculation process so items ' callbacks are called only when the
+               item is needed." />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General"
+               tooltip="set the genlist select mode.&#10;
+- default: Once an item is selected, it would stay highlighted and not going to call selected callback again even it was clicked. Items can get focus.&#10;
+- always: Item selected callbacks will be called every time for click events, even after the item was already selected. Items can get focus.&#10;
+- none: Items will never be highlighted and selected but the size will be adjusted by the finger size configuration. Items can't get focus.&#10;
+- display_only: Items will never be highlighted and selected and ignore the finger size. So the item size can be reduced below than the finger size configuration. Items can't get focus." />
+
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked or pressed (enter|return|spacebar) on an item. The event_info parameter is the item that was activated.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked an item. The event_info parameter is the item that was double-clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has made an item selected. The event_info parameter is the genlist item that was selected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has made an item unselected. The event_info parameter is the genlist item that was unselected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent"
+               eventInfo="@brief This is called when elm_genlist_item_expanded_set() is called and the item is now meant to be expanded. The event_info parameter is the genlist item that was indicated to expand. It is the job of this callback to then fill in the child items.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="contracted" displayName="contracted" eventType="event.eflevent"
+               eventInfo="@brief This is called when elm_genlist_item_expanded_set() is called and the item is now meant to be contracted. The event_info parameter is the genlist item that was indicated to contract. It is the job of this callback to then delete the child items.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="expand,request" displayName="expand,request" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has indicated they want to expand a tree branch item. The callback should decide if the item can expand (has any children) and then call elm_genlist_item_expanded_set() appropriately to set the state. The event_info parameter is the genlist item that was indicated to expand.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="contract,request" displayName="contract,request" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has indicated they want to contract a tree branch item. The callback should decide if the item can contract (has any children) and then call elm_genlist_item_expanded_set() appropriately to set the state. The event_info parameter is the genlist item that was indicated to contract.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="realized" displayName="realized" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list is created as a real evas object. event_info parameter is the genlist item that was created.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="unrealized" displayName="unrealized" eventType="event.eflevent"
+               eventInfo="@brief This is called just before an item is unrealized. After this call content objects provided will be deleted and the item object itself delete or be put into a floating cache.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,up" displayName="drag,start,up" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) up.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,down" displayName="drag,start,down" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) down.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,left" displayName="drag,start,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) left.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,right" displayName="drag,start,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) right.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,stop" displayName="drag,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has stopped being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag" displayName="drag" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list is being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item is pressed for a certain amount of time. By default it's 1 second. The event_info parameter is the longpressed genlist item.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when dragging the content has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when dragging the content has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) (since 1.13)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the top edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the bottom edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the left edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the right edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="multi,swipe,left" displayName="multi,swipe,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped left.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,swipe,right" displayName="multi,swipe,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped right.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,swipe,up" displayName="multi,swipe,up" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped up.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,swipe,down" displayName="multi,swipe,down" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped down.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,pinch,out" displayName="multi,pinch,out" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch pinched out.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,pinch,in" displayName="multi,pinch,in" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch pinched in.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="swipe" displayName="swipe" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is swiped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="moved" displayName="moved" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item is moved by a user interaction in a reorder mode. The event_info parameter is the item that was moved.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="moved,after" displayName="moved,after" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item is moved after another item in reorder mode. The event_info parameter is the reordered item. To get the relative previous item, use elm_genlist_item_prev_get(). This signal is called along with &quot;moved&quot; signal.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="moved,before" displayName="moved,before" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item is moved before another item in reorder mode. The event_info parameter is the reordered item. To get the relative previous item, use elm_genlist_item_next_get(). This signal is called along with &quot;moved&quot; signal.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="index,update" displayName="index,update" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item index is changed. Note that this callback is called while each item is being realized.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="tree,effect,finished" displayName="tree,effect,finished" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist tree effect is finished.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is highlighted. This is called when the user presses an item or keyboard selection is done so the item is physically highlighted. The event_info parameter is the item that was highlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is unhighlighted. This is called when the user releases an item or keyboard selection is moved so the item is physically unhighlighted. The event_info parameter is the item that was unhighlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the program's language is changed. Call the elm_genlist_realized_items_update() if items text should be translated.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent"
+               eventInfo="@brief The user pressed an item. The event_info parameter is the item that was pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="released" displayName="released" eventType="event.eflevent"
+               eventInfo="@brief The user released an item. The event_info parameter is the item that was released.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the genlist item has recieved focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the genlist item has lost focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,right" displayName="clicked,right" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.genlistitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.genlistitem.widget.xml
new file mode 100644 (file)
index 0000000..d085b38
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlistitem" displayName="Genlistitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="genlist">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.genlist@itemstyle" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." >
+               <condition name="notify-property" target="colors"/>
+       </property>
+       <property name="colors" type="efl.genlistitem@colors" displayName="" default="" category="Color" tooltip="sets the colors of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="sets the text of item" />
+       <property name="sub_text" type="rm_string" displayName="Sub Text" default="Sub Text" category="General" tooltip="sets the text of item" />
+
+
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="sets the selected state of the UI Component." />
+
+       <property name="standard_icon" type="efl.icon@standardicon" displayName="Standard icon" default="" category="Icon"
+               tooltip="sets the standard icon to be shown in the list item before label text&#10;" />
+       <property name="image_path" type="image" displayName="Image path" default="" category="Icon"
+               tooltip="sets the file path of the image to be shown in the list item before label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <property name="end_standard_icon" type="efl.icon@standardicon" displayName="Standard icon" default="" category="End Icon"
+               tooltip="sets the standard icon to be shown in the list item after label text&#10;" />
+       <property name="end_image_path" type="image" displayName="Image path" default="" category="End Icon"
+               tooltip="sets the file path of the image to be shown in the list item after label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.grid.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.grid.widget.xml
new file mode 100644 (file)
index 0000000..6a5ec36
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="grid" displayName="Grid" smallIcon="widget/32/pal_grid_nor.png" icon.16="widget/16/view_p_grid_nor.png" category="UI containers"
+       description="The grid is a grid layout UI Component that lays out a series of children as a fixed 'grid' of UI Components using a given percentage of the grid width and height each using the child object."
+       layoutType="grid" helpCategory="" helpContents="grid" feedbackWidth="300" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="vsize_w" type="integer" displayName="Col count" default="1000" category="General" tooltip="sets the virtual width of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+       <property name="vsize_h" type="integer" displayName="Row count" default="1000" category="General" tooltip="sets the virtual height of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack_x" type="integer" displayName="Left" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_w" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_y" type="integer" displayName="Top" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_h" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_w" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_x" targetValue="vsize_w" error="size-max" />
+               </property>
+               <property name="pack_h" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_y" targetValue="vsize_h" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.hoversel.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.hoversel.widget.xml
new file mode 100644 (file)
index 0000000..4818415
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="hoversel" displayName="Hoversel" smallIcon="widget/32/pal_hoversel_nor.png" icon.16="widget/16/view_p_hoversel_nor.png" category="UI components"
+       description="This UI Component is a button that pops up a list of items(automatically choosing the direction to display)." helpCategory=""
+       helpContents="list" feedbackWidth="400" feedbackHeight="400" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="hoverselitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="Hoversel" category="General" tooltip="sets the text of item" />
+       <property name="data_bind" type="foreach@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add hoversel item" unusedEditors="source_tab" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief The user clicked the hoversel button and popped up the sel.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief An item in the hoversel list is selected. event_info is the selected item.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+       <event name="dismissed" displayName="dismissed" eventType="event.eflevent"
+               eventInfo="@brief The hover is dismissed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent"
+               eventInfo="@brief This is called on clicking hoversel and elm_hoversel_hover_begin().&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent"
+               eventInfo="@brief The program's language changed (since 1.9).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the hoversel item has received focus. (since 1.10).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the hoversel item has lost focus. (since 1.10).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *hoversel_item = (Elm_Object_Item *) event_info;" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.hoverselitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.hoverselitem.widget.xml
new file mode 100644 (file)
index 0000000..0d6f862
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="hoverselitem" displayName="Hoverselitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="hoverselItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="hoversel">
+
+       <relations>
+               <parent ids="hoversel" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="Hoverselitem" category="General" tooltip="sets the text of item" />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.image.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.image.widget.xml
new file mode 100644 (file)
index 0000000..cb753b1
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="image" displayName="Image" smallIcon="widget/32/pal_image_nor.png" icon.16="widget/16/view_p_image_nor.png" category="UI components"
+       description="An Elementary image object is a direct realization of The Elementary Image Class, and it allows one to load and display an image file on it, be it from a disk file or from a memory region"
+       helpCategory="" helpContents="" feedbackWidth="50" feedbackHeight="50" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="Sets the file that is used as the image's source." />
+       <property name="no_scale" type="efl@boolean" displayName="No scale" default="false" category="General" tooltip="Disables scaling of this object." />
+       <property name="resizable_up" type="efl@boolean" displayName="Resizable(up)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable up" />
+       <property name="resizable_down" type="efl@boolean" displayName="Resizable(down)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable down" />
+       <!--<property name="orient" type="efl.image@orient" displayName="Orient" default="none" category="General" tooltip="Sets the image orientation.&#xD;&#xD; none&#xD; 
+               : No orientation change&#xD; orient_0&#xD; : No orientation change&#xD; rotate_90&#xD; : Rotate 90 degrees clockwise&#xD; rotate_180&#xD; : Rotate 180 degrees clockwise&#xD; 
+               rotate_270&#xD; : Rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise)&#xD; flip_horizontal&#xD; : Flip image horizontally&#xD; flip_vertical&#xD; : 
+               Flip image vertically&#xD; flip_transpose&#xD; : Flip the image along the y = (width - x) line (bottom-left to top-right)&#xD; flip_transverse&#xD; : Flip the image 
+               along the y = x line (top-left to bottom-right)" /> -->
+       <property name="aspect_fixed" type="efl@boolean" displayName="Aspect fixed" default="false" category="General"
+               tooltip="Set whether the original aspect ratio of the image should be kept on resize." />
+       <property name="fill_outside" type="efl@boolean" displayName="Fill outsize" default="false" category="General"
+               tooltip="Sets whether the image fills the entire object area, when keeping the aspect ratio." />
+       <!-- <property name="editable" type="efl@boolean" displayName="Editable" default="false" category="General" tooltip="Makes the image 'editable'." /> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="drop" displayName="drop" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has dropped an image typed object onto the object in question -- the event info argument is the path to that image file&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;const char *image_path = (const char *) event_info;" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has clicked the image&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.index.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.index.widget.xml
new file mode 100644 (file)
index 0000000..c3ab2e7
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="index" displayName="Index" smallIcon="widget/32/pal_index_nor.png" icon.16="widget/16/view_p_index_nor.png" category="UI components"
+       description="An index UI Component gives you an index for fast access to whichever group of other UI items one might have" helpCategory="" helpContents=""
+       feedbackWidth="200" feedbackHeight="150" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="indexitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="autohide" type="efl@boolean" displayName="Autohide enabled" default="false" category="General"
+               tooltip="Enables or disables the auto hiding feature for a given index UI Component." />
+       <property name="indicator" type="efl@boolean" displayName="Indicator enabled" default="true" category="General" tooltip="Sets the indicator to be enabled." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="Appends a new item on a given index UI Component."
+               unusedEditors="source_tab" />
+       <!-- <property name="style" type="efl.index@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component."/> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief When the selected index item changes. event_info is the selected item's data pointer.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *index_item = (Elm_Object_Item *) event_info;" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent"
+               eventInfo="@brief When the selected index item changes, but after a small idling period. event_info is the selected item's data pointer.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *index_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief When the user releases a mouse button and selects an item. event_info is the selected item's pointer.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *index_item = (Elm_Object_Item *) event_info;" />
+       <event name="level,up" displayName="level,up" eventType="event.eflevent"
+               eventInfo="@brief when the user moves a finger from the first level to the second level&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="level,down" displayName="level,down" eventType="event.eflevent"
+               eventInfo="@brief when the user moves a finger from the second level to the first level&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.indexitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.indexitem.widget.xml
new file mode 100644 (file)
index 0000000..3923abd
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="indexitem" displayName="Indexitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="IndexItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="index">
+
+       <relations>
+               <parent ids="index" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="The letter under which the item should be indexed" />
+       <!-- <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." /> -->
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.label.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.label.widget.xml
new file mode 100644 (file)
index 0000000..1ed6c6c
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="label" displayName="Label" smallIcon="widget/32/pal_label_nor.png" icon.16="widget/16/view_p_label_nor.png" category="UI components"
+       description="UI Component to display text, with simple html-like markup" helpCategory="" helpContents="efl.progressbar" feedbackWidth="100" feedbackHeight="30"
+       minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="Label" category="General" tooltip="sets the text of the UI Component." />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <!-- <property name="style" type="efl.label@style" displayName="Style" default="default" category="General" tooltip="Sets the style to be used by the label.&#10; 
+               if the text doesn't fit the geometry of the label, it is ellipsized or cut. Elementary provides several styles for this UI Component.&#10; - default: No animation.&#10; 
+               - marker: Centers the text in the label and makes it bold by default.&#10; - slide_long: The entire text appears from the right of the screen and slides until it 
+               disappears in the left of the screen(reappearing on the right again).&#10; - slide_short: The text appears in the left of the label and slides to the right to show 
+               the overflow. When all of the text has been shown the position is reset.&#10; - slide_bounce: The text appears in the left of the label and slides to the right to 
+               show the overflow. When all of the text has been shown the animation reverses, moving the text to the left."/> -->
+       <property name="line_wrap" type="efl.label@wraptype" displayName="Wrap type" default="none" category="General"
+               tooltip="sets the wrapping behavior of the label.&#10;
+- none: No wrapping.&#10;
+- char: Wrap between characters.&#10;
+- word: Wrap between words.&#10;
+- mixed: Word wrap, and if that fails, char wrap." />
+       <property name="wrap_width" type="integer" displayName="Wrap width" default="0" category="General" tooltip="sets the maximum width size hint of the label." />
+       <property name="ellipsis" type="efl@boolean" displayName="Ellipsis" default="true" category="General" tooltip="sets the ellipsis behavior of the label." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="slide,end" displayName="slide,end" eventType="event.eflevent"
+               eventInfo="@brief The slide is end.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.layout.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.layout.widget.xml
new file mode 100644 (file)
index 0000000..855be83
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="layout" displayName="Layout" smallIcon="widget/32/pal_layout_nor.png" icon.16="widget/16/view_p_layout_nor.png" category="UI components"
+       description="This is a container UI Component that takes a standard Edje design file and wraps it very thinly in a UI Component" helpCategory="" helpContents="button"
+       feedbackWidth="150" feedbackHeight="150" minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="src" type="layout-resource" displayName="File path" default="" category="General" tooltip="The path to the file (edj) that is used as a layout" />
+       <property name="group" type="dynamic-combo" displayName="Group name" default="" category="General" tooltip="The group that the layout belongs to in the edje file" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="theme,changed" displayName="theme,changed" eventType="event.eflevent"
+               eventInfo="@brief The theme was changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.list.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.list.widget.xml
new file mode 100644 (file)
index 0000000..3cbcf40
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="list" displayName="List" smallIcon="widget/32/pal_list_nor.png" icon.16="widget/16/view_p_list_nor.png" category="UI components"
+       description="A list UI Component is a container whose children are displayed vertically or horizontally, in order, and can be selected. The list can accept only one or multiple item selections. Also has many modes of items displaying."
+       helpCategory="" helpContents="" feedbackWidth="480" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="listitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="data_bind" type="foreach@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="mode" type="efl.list@mode" displayName="Mode" default="scroll" category="General" tooltip="Sets which mode to use for the list object. In Tizen default theme, scroll and limit modes are the same as compress mode." />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General" tooltip="Sets the list select mode." />
+       <property name="multi_select" type="efl@boolean" displayName="Multi select" default="false" category="General"
+               tooltip="Enables or disables multiple items selection on the list object.">
+               <condition name="enable-property" value="true" target="multi_select_mode" />
+       </property>
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked or pressed (enter|return|spacebar) on an item. The event_info parameter is the item that was activated.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked an item. The event_info parameter is the item that was double-clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,right" displayName="clicked,right" eventType="event.eflevent"
+               eventInfo="@brief The user has right-clicked an item. The event_info parameter is the item that was right-clicked. (since 1.13)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief when the user selected an item&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent"
+               eventInfo="@brief when the user unselected an item&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is long-pressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief the list is scrolled until the top edge&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief the list is scrolled until the bottom edge&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief the list is scrolled until the left edge&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief the list is scrolled until the right edge&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is highlighted. This is called when the user presses an item or keyboard selection is done so the item is physically highlighted. The event_info parameter is the item that was highlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is unhighlighted. This is called when the user releases an item or keyboard selection is moved so the item is physically unhighlighted. The event_info parameter is the item that was unhighlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the list item has received focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the list item has lost focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *list_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.listitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.listitem.widget.xml
new file mode 100644 (file)
index 0000000..7646508
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="listitem" displayName="Listitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="list">
+
+       <relations>
+               <parent ids="list" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="The text of the list item" />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.map.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.map.widget.xml
new file mode 100644 (file)
index 0000000..2b435bf
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="map" displayName="Map" smallIcon="widget/32/pal_map_nor.png" icon.16="widget/16/view_p_map_nor.png" category="UI components"
+       description="This is a widget specifically for displaying a map" helpCategory="" helpContents="" feedbackWidth="300" feedbackHeight="300" minWidth="100"
+       minHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="zoom_level" type="scale-integer" displayName="Zoom level" default="15" category="General" tooltip="Sets the zoom level of the map">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="20" error="integer-max" />
+       </property>
+
+       <property name="longitude" type="double" displayName="longitude" default="0" category="General" tooltip="The longitude to show at the center">
+               <condition name="integer-min" value="-180" error="integer-min" />
+               <condition name="integer-max" value="180" error="integer-max" />
+       </property>
+       <property name="latitude" type="double" displayName="latitude" default="0" category="General" tooltip="The latitude to show at the center">
+               <condition name="integer-min" value="-90" error="integer-min" />
+               <condition name="integer-max" value="90" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="press" displayName="press" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+       <event name="loaded" displayName="loaded" eventType="event.eflevent" />
+       <event name="zoom,start" displayName="zoom,start" eventType="event.eflevent" />
+       <event name="zoom,stop" displayName="zoom,stop" eventType="event.eflevent" />
+       <event name="zoom,change" displayName="zoom,change" eventType="event.eflevent" />
+       <event name="tile,load" displayName="tile,load" eventType="event.eflevent" />
+       <event name="tile,loaded" displayName="tile,loaded" eventType="event.eflevent" />
+       <event name="route,load" displayName="route,load" eventType="event.eflevent" />
+       <event name="route,loaded" displayName="route,loaded" eventType="event.eflevent" />
+       <event name="name,load" displayName="name,load" eventType="event.eflevent" />
+       <event name="name,loaded" displayName="name,loaded" eventType="event.eflevent" />
+       <event name="overlay,clicked" displayName="overlay,clicked" eventType="event.eflevent" />
+       <event name="tile,loaded,fail" displayName="tile,loaded,fail" eventType="event.eflevent" />
+       <event name="route,loaded,fail" displayName="route,loaded,fail" eventType="event.eflevent" />
+       <event name="name,loaded,fail" displayName="name,loaded,fail" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.multibuttonentry.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.multibuttonentry.widget.xml
new file mode 100644 (file)
index 0000000..739282b
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="multibuttonentry" displayName="Multibuttonentry" smallIcon="widget/32/pal_multi_nor.png" icon.16="widget/16/view_p_multi_nor.png" category="UI components"
+       description="multibuttonentry provides an extended functionality to text input. Multibuttonentry allows users to enter text and each chunk of text managed as a set of buttons. The typical use cases of multibuttonentry is composing emails/messages to a group of addresses, each of which is an item that can be clicked for further actions." helpCategory="" helpContents="" feedbackWidth="150" feedbackHeight="50" minWidth="10" minHeight="10" borderVisible="false"
+       uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="multibuttonentryitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <!--<property name="text" type="string" displayName="Text" default="" /> -->
+       <property name="expanded" type="efl@boolean" displayName="Expanded" default="false" category="General"
+               tooltip="set/unset the multibuttonentry to expanded state.&#10;
+In expanded state, the complete entry will be displayed. Otherwise, only single line of the entry will be displayed." />
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General"
+               tooltip="set/unset the multibuttonentry to editable state.&#10;
+If true, user can add/delete item in multibuttonentry.&#10;
+If not, the multibuttonentry is non-editable." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add multibuttonentry item" unusedEditors="source_tab" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="item,selected" displayName="item,selected" eventType="event.eflevent"
+               eventInfo="@brief this is called when an item is selected by api, user interaction, and etc. this is also called when a user press back space while cursor is on the first field of entry.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *multibuttonentry_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,added" displayName="item,added" eventType="event.eflevent"
+               eventInfo="@brief when a new multi-button entry item is added.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *multibuttonentry_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,deleted" displayName="item,deleted" eventType="event.eflevent"
+               eventInfo="@brief when a multi-button entry item is deleted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *multibuttonentry_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,clicked" displayName="item,clicked" eventType="event.eflevent"
+               eventInfo="@brief this is called when an item is clicked by user interaction. Both &quot;item,selected&quot; and &quot;item,clicked&quot; are needed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *multibuttonentry_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,longpressed" displayName="item,longpressed" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry item is pressed for a long time.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *multibuttonentry_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry is clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry is focused.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry is unfocused.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry is expanded.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="contracted" displayName="contracted" eventType="event.eflevent"
+               eventInfo="@brief when multi-button entry is contracted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="expand,state,changed" displayName="expand,state,changed" eventType="event.eflevent"
+               eventInfo="@brief when shrink mode state of multi-button entry is changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.multibuttonentryitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.multibuttonentryitem.widget.xml
new file mode 100644 (file)
index 0000000..6caaa32
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="multibuttonentryitem" displayName="Multibuttonentryitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components"
+       description="multibuttonentry" helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="multibuttonentry">
+
+       <relations>
+               <parent ids="multibuttonentry" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="sets the text of item" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.panel.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.panel.widget.xml
new file mode 100644 (file)
index 0000000..fe46958
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="panel" displayName="Panel" smallIcon="widget/32/pal_panel_nor.png" icon.16="widget/16/view_p_panel_nor.png" category="UI containers"
+       description="A panel is an animated side-panel that contains a sub-object. It can be expanded or contracted by clicking the button on its edge." layoutType="box"
+       helpCategory="" helpContents="panel" feedbackWidth="150" feedbackHeight="80" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" max="1" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="orient" type="efl.panel@orient" displayName="Orient" default="top" category="General"
+               tooltip="sets the orientation of the panel.&#10;
+- top: Panel (dis)appears from the top&#10;
+- bottom: Panel (dis)appears from the bottom&#10;
+- left: Panel (dis)appears from the left&#10;
+- right: Panel (dis)appears from the right" />
+       <!-- hidden API is not work -->
+       <property name="hidden" type="efl@boolean" displayName="Hidden" default="false" category="General"
+               tooltip="sets the state of the panel.&#10;
+If true, panel is in contracted state&#10;
+If false, panel is in expanded state" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <!-- Events -->
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief When the content has been scrolled (moved). (since 1.10) This signal is emitted only when the panel is scrollable. Elm_Panel_Scroll_Info will be passed by event_info argument.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Panel_Scroll_Info *scroll_info = (Elm_Panel_Scroll_Info *) event_info;" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.panes.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.panes.widget.xml
new file mode 100644 (file)
index 0000000..d0fd684
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="panes" displayName="Panes" smallIcon="widget/32/pal_panes_nor.png" icon.16="widget/16/view_p_panes_nor.png" category="UI containers"
+       description="The panes UI Component adds a draggable bar between two contents. When dragged this bar will resize contents' size." layoutType="panes"
+       helpCategory="" helpContents="panes" feedbackWidth="150" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General"
+               tooltip="Sets the orientation of a given panes UI Component." />
+       <property name="fixed" type="efl@boolean" displayName="Fixed" default="false" category="General" tooltip="Sets whether the left and right panes resize homogeneously." />
+       <property name="right_size" type="double" displayName="Right size" default="0.5" category="General"
+               tooltip="Sets the size proportion of the panes UI Component's right side.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack" type="efl.panes@pack" displayName="Pack" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events -->
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief The panes has been clicked>&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="press" displayName="press" eventType="event.eflevent"
+               eventInfo="@brief The panes has been pressed (button wasn't released yet).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="unpress" displayName="unpress" eventType="event.eflevent"
+               eventInfo="@brief The panes was released after being pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The panes has been double clicked&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.popup.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.popup.widget.xml
new file mode 100644 (file)
index 0000000..50136e6
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="popup" displayName="Popup" smallIcon="widget/32/pal_popup_nor.png" icon.16="widget/16/view_p_popup_nor.png" category="Views"
+       description="Popups are temporarily displayed on the screenb to provide information or to ask for user confirmation. Popup allows users to take instant action for events. Popup is an enhancement of Notify components and is composed of three areas: Title, Content and Action with up to 3 buttons(optional)."
+       layoutType="Popup" helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false"
+       uiSelector="#%id%" xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+
+       <property name="title" type="string" displayName="Title" default="Title" category="General" tooltip="The title text of the popup widget">
+       </property>
+       <property name="style" type="efl.popup@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." >
+               <condition name="notify-property" target="colors"/>
+       </property>
+
+       <property name="colors" type="efl.popup@colors" displayName="" default="" category="Color" tooltip="sets the colors of the UI Component." />
+
+       <property name="height" type="scale-integer" displayName="Height" default="200" category="General"
+               tooltip="sets the x of left upper corner of the widget.&#10;
+But this depends on the container of the widget.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="400" error="integer-max" />
+       </property>
+       <property name="timeout" type="double" displayName="Timeout" default="0" category="General" tooltip="Sets a timeout to hide popup automatically">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="timeout" displayName="timeout" eventType="event.eflevent" />
+       <event name="block,clicked" displayName="block,clicked" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.progressbar.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.progressbar.widget.xml
new file mode 100644 (file)
index 0000000..0d27fb2
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="progressbar" displayName="Progressbar" smallIcon="widget/32/pal_progress_nor.png" icon.16="widget/16/view_p_progress_nor.png" category="UI components"
+       description="The progress bar is a UI Component for visually representing the progress status of a given job/task" helpCategory="" helpContents="efl.progressbar"
+       feedbackWidth="150" feedbackHeight="30" minWidth="50" minHeight="25" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.progressbar@style" displayName="Style" default="default" category="General"
+               tooltip="Sets the style to be used by a given UI Component.">
+               <condition name="enable-property" value="default" target="span_size" />
+               <condition name="notify-property" target="colors"/>
+       </property>
+       <property name="colors" type="efl.progressbar@colors" displayName="" default="" category="Color" tooltip="sets the colors of the UI Component." />
+
+       <property name="value" type="double" displayName="Value" default="0" category="General"
+               tooltip="Sets the progress value (in percentage) on a given progress bar UI Component. The progress value must be between 0.0 and 1.0">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="span_size" type="integer" displayName="Span Size" default="0" category="General" tooltip="The length of the progress bar's bar region">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General"
+               tooltip="Inverts a given progress bar UI Component's displaying values order." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief &#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.radio.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.radio.widget.xml
new file mode 100644 (file)
index 0000000..6e9714d
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="radio" displayName="Radio" smallIcon="widget/32/pal_radio_nor.png" icon.16="widget/16/view_p_radio_nor.png" category="UI components"
+       description="Radio is a UI Component that allows for 1 or more options to be displayed and have the user choose only 1 of them" helpCategory="" helpContents="efl.datetime"
+       feedbackWidth="150" feedbackHeight="60" minWidth="40" minHeight="40" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Radio" category="General" tooltip="sets the text of the UI Component." />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="value" type="integer" displayName="Value" default="0" category="General"
+               tooltip="sets the value of the radio group.&#10;
+The radio group is initialized with this value. The value should be one of the radio buttons' state values in the group to be properly initialized." />
+       <property name="state_value" type="integer" displayName="State value" default="0" category="General" tooltip="sets the integer value that this radio object represents." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the radio object is selected. If you want to trace the state change of a radio group, you should add this callback to all the radio objects in that group.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.scroller.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.scroller.widget.xml
new file mode 100644 (file)
index 0000000..4603442
--- /dev/null
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="scroller" displayName="Scroller" smallIcon="widget/32/pal_scroller_nor.png" icon.16="widget/16/view_p_scroller_nor.png" category="UI containers"
+       description="A scroller holds (and clips) a single object and scrolls it around. This means that it allows the user to use a scroll bar (or a finger) to drag the viewable region around, moving through a much larger object that is contained in the scroller. The scroller will always have a small minimum size by default as it won't be limited by the contents of the scroller"
+       layoutType="box" helpCategory="" helpContents="" feedbackWidth="200" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.scroller@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." >
+               <condition name="notify-property" target="colors"/>
+       </property>
+       <property name="colors" type="efl.scroller@colors" displayName="" default="" category="Color" tooltip="sets the colors of the UI Component." />
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General"
+               tooltip="sets the horizontal scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General"
+               tooltip="sets the vertical scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="content_min_w" type="efl@boolean" displayName="Min limit(Width)" default="false" category="General"
+               tooltip="Make the scroller minimum width size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+       <property name="content_min_h" type="efl@boolean" displayName="Min limit(Height)" default="false" category="General"
+               tooltip="Make the scroller minimum heigth size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+
+       <property name="propagate_events" type="efl@boolean" displayName="Propagate events" default="true" category="General"
+               tooltip="sets event propagation on a scroller.&#10;
+This enables or disables event propagation from the scroller content to the scroller and its parent. By default event propagation is enabled" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,left" displayName="scroll,left" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) leftwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,right" displayName="scroll,right" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) rightwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,up" displayName="scroll,up" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) upwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,down" displayName="scroll,down" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) downwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent"
+               eventInfo="@brief scrolling animation has started&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief scrolling animation has stopped&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent"
+               eventInfo="@brief dragging the contents around has started&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief dragging the contents around has stopped&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief the left edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief the right edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief the top edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief the bottom edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="vbar,drag" displayName="vbar,drag" eventType="event.eflevent"
+               eventInfo="@brief the vertical scroll bar has been dragged&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="vbar,press" displayName="vbar,press" eventType="event.eflevent"
+               eventInfo="@brief the vertical scroll bar has been pressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="vbar,unpress" displayName="vbar,unpress" eventType="event.eflevent"
+               eventInfo="@brief the vertical scroll bar has been unpressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="hbar,drag" displayName="hbar,drag" eventType="event.eflevent"
+               eventInfo="@brief the horizontal scroll bar has been dragged&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="hbar,press" displayName="hbar,press" eventType="event.eflevent"
+               eventInfo="@brief the horizontal scroll bar has been pressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="hbar,unpress" displayName="hbar,unpress" eventType="event.eflevent"
+               eventInfo="@brief the horizontal scroll bar has been unpressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,page,changed" displayName="scroll,page,changed" eventType="event.eflevent"
+               eventInfo="@brief the visible page has changed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.slider.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.slider.widget.xml
new file mode 100644 (file)
index 0000000..2eaf5c6
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="slider" displayName="Slider" smallIcon="widget/32/pal_slider_nor.png" icon.16="widget/16/view_p_slider_nor.png" category="UI components"
+       description="The slider adds a draggable “slider” UI Component for selecting the value of something within a range" helpCategory="" helpContents=""
+       feedbackWidth="200" feedbackHeight="30" minWidth="70" minHeight="25" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="indicator_format" type="string" displayName="Indicator format" default="" category="General"
+               tooltip="sets the format string for the indicator label.&#10;
+The slider may display its value somewhere else for example, above the slider knob that is dragged around. 
+This function sets the format string used for this." />
+       <property name="direction" type="efl@direction" displayName="Direction" default="horizontal" category="General"
+               tooltip="sets the orientation of a given slider UI Component." />
+       <property name="style" type="efl.slider@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." >
+               <condition name="notify-property" target="colors"/>
+       </property>
+       <property name="colors" type="efl.slider@colors" displayName="" default="" category="Color" tooltip="sets the colors of the UI Component." />
+       <property name="min" type="double" displayName="Min" default="0.0" category="General" tooltip="sets the minimum value for the slider.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max-by" value="value" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max" default="1.0" category="General" tooltip="sets the maximum value for the slider.">
+               <condition name="integer-max" value="999999" error="integer-max" />
+               <condition name="integer-min-by" value="value" error="integer-min-by" />
+       </property>
+       <property name="value" type="double" displayName="Value" default="0.0" category="General" tooltip="sets the value the slider displays.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General"
+               tooltip="inverts a given slider UI Component's displaying values order." />
+       <property name="step" type="double" displayName="Step" default="0.05" category="General" tooltip="sets the step by which slider indicator will move.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="indicator" type="efl@boolean" displayName="Show indicator" default="false" category="General"
+               tooltip="sets whether to enlarge slider indicator (augmented knob) or not.&#10;
+By default, indicator will be bigger while dragged by the user. It won't display values set if you disable indicator." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief Whenever the slider value is changed by the user.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent"
+               eventInfo="@brief A short time after the value is changed by the user. This will be called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids possibly expensive reactions to the value change.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="slider,drag,start" displayName="slider,drag,start" eventType="event.eflevent"
+               eventInfo="@brief dragging the slider indicator around has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="slider,drag,stop" displayName="slider,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief dragging the slider indicator around has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.spinner.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.spinner.widget.xml
new file mode 100644 (file)
index 0000000..f87976c
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="spinner" displayName="Spinner" smallIcon="widget/32/pal_spinner_nor.png" icon.16="widget/16/view_p_spinner_nor.png" category="UI components"
+       description="A spinner is a UI Component which allows the user to increase or decrease numeric values using arrow buttons, or edit values directly, clicking over it and typing the new value"
+       helpCategory="" helpContents="" feedbackWidth="150" feedbackHeight="150" minWidth="150" minHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.spinner@style" displayName="Style" default="horizontal" category="General"
+               tooltip="sets the style of the UI Component&#10;
+- horizontal: left/right buttons are used for changing the value.&#10;
+- vertical: up/down buttons are used for changing the value." >
+               <condition name="notify-property" target="colors"/>
+       </property>
+       <property name="colors" type="efl.spinner@colors" displayName="" default="" category="Color" tooltip="sets the colors of the UI Component." />
+       <property name="min" type="double" displayName="Min" default="0" category="General"
+               tooltip="sets the minimum value of the spinner.&#10;
+       If actual value is less than this value, it will be updated to this value.">
+               <condition name="integer-min" value="-9999999" error="integer-min" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max" default="100" category="General"
+               tooltip="sets the maximum value of the spinner.&#10;
+       If actual value is bigger than this value, it will be updated to this value.">
+               <condition name="integer-max" value="99999999" error="integer-max" />
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+       </property>
+       <property name="step" type="double" displayName="Step" default="1" category="General" tooltip="sets the step used to increment or decrement the spinner value.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General"
+               tooltip="sets whether the spinner can be directly edited by the user or not." />
+       <!-- <property name="interval" type="double" displayName="Interval" default="0.85" category="General" tooltip="Set the interval on time updates for an user mouse 
+               button hold on spinner UI Components' arrows.&#10; This interval value is decreased while the user holds the mouse pointer either incrementing or decrementing spinner's 
+               value. This helps the user to get to a given value distant from the current one easier/faster, as it will start to change quicker and quicker on mouse button holds. 
+               The calculation for the next change interval value, starting from the one set with this call, is the previous interval divided by 1.05, so it decreases a little 
+               bit. The default starting interval value for automatic changes is 0.85 seconds."/> <property name="base" type="double" displayName="Base" default="0" category="General" 
+               tooltip="sets the base for rounding.&#10; rounded_val = base + (double)(((value - base) / round) * round)"/> <property name="round" type="integer" displayName="Round" 
+               default="" category="General" tooltip="sets the round value for rounding.&#10; rounded_val = base + (double)(((value - base) / round) * round)"/> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief Whenever the spinner value is changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="spinner,drag,start" displayName="spinner,drag,start" eventType="event.eflevent"
+               eventInfo="@brief When dragging has started. (since 1.8)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="spinner,drag,stop" displayName="spinner,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief When dragging has stopped. (since 1.8)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent"
+               eventInfo="@brief A short time after the value is changed by the user. This will be called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids possibly expensive reactions to the value change.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.table.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.table.widget.xml
new file mode 100644 (file)
index 0000000..f506c0d
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="table" displayName="Table" smallIcon="widget/32/pal_table_nor.png" icon.16="widget/16/view_p_table_nor.png" category="UI containers"
+       description="A container UI Component to arrange other UI Components in a table where items can span multiple columns or rows" layoutType="table" helpCategory=""
+       helpContents="" feedbackWidth="300" feedbackHeight="300" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General" tooltip="Sets the homogeneous layout in the table." />
+
+       <!-- My -->
+       <property name="cols" type="integer" displayName="Col count" default="2" category="General" tooltip="The column count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="rows" type="integer" displayName="Row count" default="2" category="General" tooltip="The row count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="The horizontal padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="The vertical padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+       <childUIComponentProperty>
+               <property name="pack_col" type="integer" displayName="Column" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="cols" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_row" type="integer" displayName="Row" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="rows" error="integer-max-by-parent-property" />
+               </property>
+               <property name="col_span" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="col_span" targetValue="cols" error="size-max" />
+               </property>
+               <property name="row_span" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="row_span" targetValue="rows" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.toolbar.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.toolbar.widget.xml
new file mode 100644 (file)
index 0000000..e5d3d1f
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="toolbar" displayName="Toolbar" smallIcon="widget/32/pal_toolbar_nor.png" icon.16="widget/16/view_p_toolbar_nor.png" category="UI components"
+       description="A toolbar is a UI Component that displays a list of items inside a box. It can be scrollable, show a menu with items that don't fit to toolbar size or even crop them."
+       helpCategory="" helpContents="" feedbackWidth="480" feedbackHeight="50" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="toolbaritem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <!-- <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." 
+               /> -->
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="style" type="efl.toolbar@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="shrink_mode" type="efl.toolbar@shrinkmode" displayName="Shrink mode" default="none" category="General"
+               tooltip="Sets the item displaying mode of a given toolbar UI Component obj.">
+               <condition name="disable-property" value="1" target="homogeneous" />
+               <condition name="disable-property" value="3" target="homogeneous" />
+               <condition name="disable-property" value="4" target="homogeneous" />
+       </property>
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General" tooltip="Sets the toolbar select mode." />
+       <property name="icon_size" type="integer" displayName="Icon size" default="32" category="General" tooltip="Sets the icon size, in pixels, to be used by toolbar items.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="transverse_expand" type="efl@boolean" displayName="Transverse expanded" default="true" category="General"
+               tooltip="Sets the item's transverse expansion of a given toolbar UI Component obj." />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="true" category="General" tooltip="Enables or disables the homogeneous mode." />
+       <!-- <property name="align" type="double" displayName="align" default="0.5" category="General" tooltip="Sets the alignment of the items." > <condition name="integer-min" 
+               value="0" error="integer-min"/> <condition name="integer-max" value="1" error="integer-max"/> </property> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="0" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief when the user clicks on a toolbar item and becomes selected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief when an item is selected. event_info is a selected item. (since 1.11)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent"
+               eventInfo="@brief when an item is unselected. event_info is a unselected item. (since 1.11)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief when the toolbar is pressed for a certain amount of time.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the toolbar item has received focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the toolbar item has lost focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *toolbar_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.toolbaritem.widget.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/efl.toolbaritem.widget.xml
new file mode 100644 (file)
index 0000000..f9c02e6
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="toolbaritem" displayName="Toolbaritem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="toolbar">
+
+       <relations>
+               <parent ids="toolbar" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component item." />
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="The text of the item when appends items to the toolbar." />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="A string with the absolute path of an image file" />
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/tizen.view.xml b/org.tizen.efluibuilder.descriptor/res/mobile-3.0/widget/tizen.view.xml
new file mode 100644 (file)
index 0000000..304f109
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="view" displayName="View" smallIcon="widget/32/pal_empty_nor.png" icon.16="widget/16/view_p_view_nor.png" category="Views"
+       uiSelector="#%id%" layoutType="view"
+       description="Empty View"
+       helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false"
+       xpath="">
+
+       <relations>
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+               <content ids="tabbar" max="1" exclusiveGroup="default" />
+               <content ids="panel" max="4" />
+               <content ids="popup" max="1" exclusiveGroup="default" />
+               <content ids="ctxpopup" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-page-id" />
+       </property>
+       <property name="type" type="string" displayName="type" initValue="view" category="General" />
+       <property name="indicator" type="efl@boolean" displayName="Indicator" default="true" category="General" tooltip="show or hide the indicator.">
+       </property>
+       <property name="screen_orientation" type="tizen.view@screen-orientation" displayName="Orientation" default="full_sensor" category="General"
+               tooltip="sets the style of the UI Component.">
+               <condition name="enable-property" value="full_sensor" target="disable" />
+       </property>
+       <property name="page_location_x" type="integer" displayName="location_x" category="Position" unusedEditors="properties">
+       </property>
+       <property name="page_location_y" type="integer" displayName="location_y" category="Position" unusedEditors="properties">
+       </property>
+       <event name="uib,view,create" displayName="uib,view,create" eventType="event.viewevent">
+               if (sizeof(uib_%page%_control_context)) {
+               vc->cc = calloc(1,
+               sizeof(uib_%page%_control_context));
+               }
+       </event>
+       <event name="uib,view,destroy" displayName="uib,view,destroy" eventType="event.viewevent">
+               if (vc->cc) {
+               /* destroy your Control_Context here */
+
+               free(vc->cc);
+               }
+       </event>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/efl.style.edj.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/efl.style.edj.xml
new file mode 100644 (file)
index 0000000..8bff4fe
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<defaultStyleEDJs>
+       <!-- Order means priority -->
+       <styleEDJ name="default.edj" />
+</defaultStyleEDJs>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/efl.types.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/efl.types.xml
new file mode 100644 (file)
index 0000000..edc4570
--- /dev/null
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<types>
+       <type id="efl@boolean">
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@direction">
+               <constant value="horizontal" displayName="horizontal" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl@selectmode">
+               <constant value="default" displayName="default" />
+               <constant value="always" displayName="always" />
+               <constant value="none" displayName="none" />
+               <constant value="display_only" displayName="display_only" />
+       </type>
+
+       <type id="efl.progressbar@style">
+               <constant value="default" displayName="default" />
+               <constant value="pending" displayName="pending" />
+       </type>
+
+       <type id="efl.spinner@style">
+               <constant value="default" displayName="default" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl.progressbar@format">
+               <constant value="%.0f%%" displayName="default" />
+               <constant value="%.1f%%" displayName="0.0" />
+               <constant value="%.2f%%" displayName="0.00" />
+               <constant value="%.3f%%" displayName="0.000" />
+               <constant value="%.4f%%" displayName="0.0000" />
+       </type>
+
+       <type id="efl.calendar@selectmode">
+               <constant value="default" displayName="default" />
+               <constant value="always" displayName="always" />
+               <constant value="none" displayName="none" />
+               <constant value="ondemand" displayName="ondemand" />
+       </type>
+
+       <type id="efl.bg@option">
+               <constant value="center" displayName="center" />
+               <constant value="scale" displayName="scale" />
+               <constant value="stretch" displayName="stretch" />
+               <constant value="tile" displayName="tile" />
+       </type>
+
+       <type id="check-scale">
+               <constant value="fill" displayName="fill" />
+       </type>
+
+       <type id="efl.image@orient">
+               <constant value="none" displayName="none" />
+               <constant value="orient_0" displayName="orient_0" />
+               <constant value="orient_90" displayName="orient_90" />
+               <constant value="rotate_90" displayName="rotate_90" />
+               <constant value="orient_180" displayName="orient_180" />
+               <constant value="rotate_180" displayName="rotate_180" />
+               <constant value="orient_270" displayName="orient_270" />
+               <constant value="rotate_270" displayName="rotate_270" />
+               <constant value="flip_horizontal" displayName="flip_horizontal" />
+               <constant value="flip_vertical" displayName="flip_vertical" />
+               <constant value="flip_transpose" displayName="flip_transpose" />
+               <constant value="flip_transverse" displayName="flip_transverse" />
+       </type>
+
+       <type id="efl.label@wraptype">
+               <constant value="none" displayName="none" />
+               <constant value="char" displayName="char" />
+               <constant value="word" displayName="word" />
+               <constant value="mixed" displayName="mixed" />
+       </type>
+
+       <type id="efl.label@style">
+               <constant value="default" displayName="default" />
+               <constant value="marker" displayName="marker" />
+               <constant value="slide_long" displayName="slide_long" />
+               <constant value="slide_short" displayName="slide_short" />
+               <constant value="slide_bounce" displayName="slide_bounce" />
+       </type>
+
+       <type id="efl@scrollbar_h">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@scrollbar_v">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl.entry@textformat">
+               <constant value="plain_utf8" displayName="plain_utf8" />
+               <constant value="markup_utf8" displayName="markup_utf8" />
+       </type>
+
+       <type id="efl.datetime@style">
+               <constant value="date_layout" displayName="date_layout" />
+               <constant value="time_layout" displayName="time_layout" />
+               <constant value="time_layout_24hr" displayName="time_layout_24hr" />
+       </type>
+
+       <type id="efl.button@style">
+               <constant value="default" displayName="default" />
+               <constant value="anchor" displayName="anchor" />
+               <constant value="bottom" displayName="bottom" />
+               <constant value="circle" displayName="circle" />
+               <constant value="dropdown" displayName="dropdown" />
+               <constant value="icon_reorder" displayName="icon_reorder" />
+               <constant value="option" displayName="option" />
+       </type>
+
+       <type id="efl.check@style">
+               <constant value="default" displayName="default" />
+               <constant value="favorite" displayName="favorite" />
+               <constant value="on&amp;off" displayName="on&amp;off" />
+       </type>
+
+       <type id="efl.slider@style">
+               <constant value="default" displayName="default" />
+               <constant value="center_point" displayName="center_point" />
+       </type>
+
+       <type id="efl.gengrid@style">
+               <constant value="default" displayName="default" />
+               <constant value="popup" displayName="popup" />
+       </type>
+
+       <type id="efl.gengrid@itemstyle">
+               <constant value="default" displayName="default" />
+               <constant value="type1" displayName="type1" />
+               <constant value="type2" displayName="type2" />
+       </type>
+
+       <type id="efl.genericitem@align">
+               <constant value="none" displayName="none" />
+               <constant value="in" displayName="in" />
+               <constant value="left" displayName="left" />
+               <constant value="center" displayName="center" />
+               <!--<constant value="right" displayName="right" /> -->
+       </type>
+
+       <type id="efl.genlist@style">
+               <constant value="solid/default" displayName="solid/default" />
+       </type>
+
+       <type id="efl.genlist@itemstyle">
+               <constant value="type1" displayName="type1" />
+               <constant value="type2" displayName="type2" />
+               <constant value="multiline" displayName="multiline" />
+               <constant value="full" displayName="full" />
+               <constant value="group_index" displayName="group_index" />
+               <constant value="group_index/expandable" displayName="group_index/expandable" />
+               <constant value="default" displayName="default" />
+               <constant value="double_label" displayName="double_label" />
+               <constant value="one_icon" displayName="one_icon" />
+               <constant value="end_icon" displayName="end_icon" />
+       </type>
+
+       <type id="efl.genlist@itemtype">
+               <constant value="none" displayName="none" />
+               <constant value="tree" displayName="tree" />
+               <constant value="group" displayName="group" />
+       </type>
+
+       <type id="efl.ctxpopup@style">
+               <constant value="default" displayName="default" />
+               <constant value="more/default" displayName="more/default" />
+       </type>
+
+       <type id="tizen.view@screen-orientation">
+               <constant value="no_sensor" displayName="no_sensor" />
+               <constant value="only_portrait" displayName="only_portrait" />
+               <constant value="only_landscape" displayName="only_landscape" />
+               <constant value="full_sensor" displayName="full_sensor" />
+       </type>
+
+       <type id="efl.icon@standardicon">
+               <constant value="" displayName="(None)" />
+               <constant value="apps" displayName="apps" />
+               <constant value="arrow_down" displayName="arrow_down" />
+               <constant value="arrow_left" displayName="arrow_left" />
+               <constant value="arrow_right" displayName="arrow_right" />
+               <constant value="arrow_up" displayName="arrow_up" />
+               <constant value="chat" displayName="chat" />
+               <constant value="clock" displayName="clock" />
+               <constant value="close" displayName="close" />
+               <constant value="delete" displayName="delete" />
+               <constant value="edit" displayName="edit" />
+               <constant value="file" displayName="file" />
+               <constant value="home" displayName="home" />
+               <constant value="media_player/forward" displayName="media_player/forward" />
+               <constant value="media_player/info" displayName="media_player/info" />
+               <constant value="media_player/next" displayName="media_player/next" />
+               <constant value="media_player/pause" displayName="media_player/pause" />
+               <constant value="media_player/play" displayName="media_player/play" />
+               <constant value="media_player/prev" displayName="media_player/prev" />
+               <constant value="media_player/rewind" displayName="media_player/rewind" />
+               <constant value="media_player/stop" displayName="media_player/stop" />
+               <constant value="menu/apps" displayName="menu/apps" />
+               <constant value="menu/arrow_up" displayName="menu/arrow_up" />
+               <constant value="menu/arrow_down" displayName="menu/arrow_down" />
+               <constant value="menu/arrow_left" displayName="menu/arrow_left" />
+               <constant value="menu/arrow_right" displayName="menu/arrow_right" />
+               <constant value="menu/chat" displayName="menu/chat" />
+               <constant value="menu/clock" displayName="menu/clock" />
+               <constant value="menu/close" displayName="menu/close" />
+               <constant value="menu/delete" displayName="menu/delete" />
+               <constant value="menu/edit" displayName="menu/edit" />
+               <constant value="menu/folder" displayName="menu/folder" />
+               <constant value="menu/file" displayName="menu/file" />
+               <constant value="menu/home" displayName="menu/home" />
+               <constant value="menu/refresh" displayName="menu/refresh" />
+               <constant value="no_photo" displayName="no_photo" />
+               <constant value="photo/no_photo" displayName="photo/no_photo" />
+               <constant value="refresh" displayName="refresh" />
+       </type>
+</types>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/tizen-native-ui-fw.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/tizen-native-ui-fw.xml
new file mode 100644 (file)
index 0000000..b6cc884
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE descriptors [
+       <!ENTITY tizen.uicomponent.categories SYSTEM "tizen.uicomponent.categories.xml">
+
+       <!-- default style edj -->
+       <!ENTITY efl.style.edj SYSTEM "efl.style.edj.xml">
+
+       <!-- type & event type -->
+       <!ENTITY efl.types SYSTEM "efl.types.xml">
+       <!ENTITY tizen.eventtypes SYSTEM "tizen.eventtypes.xml">
+       
+       <!-- VIEW -->
+       <!ENTITY tizen.view SYSTEM "widget/tizen.view.xml">
+       
+       <!-- WIDGET -->
+       <!ENTITY efl.bg SYSTEM "widget/efl.bg.widget.xml">
+       <!ENTITY efl.button SYSTEM "widget/efl.button.widget.xml">
+       <!ENTITY efl.check SYSTEM "widget/efl.check.widget.xml">
+       <!ENTITY efl.datetime SYSTEM "widget/efl.datetime.widget.xml"> 
+       <!ENTITY efl.entry SYSTEM "widget/efl.entry.widget.xml">
+       <!ENTITY efl.image SYSTEM "widget/efl.image.widget.xml">
+       <!ENTITY efl.label SYSTEM "widget/efl.label.widget.xml">
+       <!ENTITY efl.radio SYSTEM "widget/efl.radio.widget.xml">
+       <!ENTITY efl.spinner SYSTEM "widget/efl.spinner.widget.xml">
+       <!ENTITY efl.slider SYSTEM "widget/efl.slider.widget.xml">
+       <!ENTITY efl.progressbar SYSTEM "widget/efl.progressbar.widget.xml">
+       <!ENTITY efl.scroller SYSTEM "widget/efl.scroller.widget.xml">
+       <!ENTITY efl.genlist SYSTEM "widget/efl.genlist.widget.xml">
+       <!ENTITY efl.genlistitem SYSTEM "widget/efl.genlistitem.widget.xml">
+       <!ENTITY efl.layout SYSTEM "widget/efl.layout.widget.xml">
+       <!ENTITY efl.gengrid SYSTEM "widget/efl.gengrid.widget.xml">
+       <!ENTITY efl.gengriditem SYSTEM "widget/efl.gengriditem.widget.xml">
+       <!ENTITY efl.calendar SYSTEM "widget/efl.calendar.widget.xml">
+       <!ENTITY efl.ctxpopup SYSTEM "widget/efl.ctxpopup.widget.xml">
+       <!ENTITY efl.ctxpopupitem SYSTEM "widget/efl.ctxpopupitem.widget.xml">
+       <!ENTITY efl.popup SYSTEM "widget/efl.popup.widget.xml">
+
+       <!-- WIDGET : Container -->
+       <!ENTITY efl.grid SYSTEM "widget/efl.grid.widget.xml">
+       <!ENTITY efl.table SYSTEM "widget/efl.table.widget.xml">
+       <!ENTITY efl.box SYSTEM "widget/efl.box.widget.xml">
+       <!-- End of list -->
+]>
+
+<tizenFile>
+       <fileInfo>
+               <type>tizen-descriptor</type>
+               <version>2</version>
+               <desc>Tizen Native UI Builder Descriptor</desc>
+       </fileInfo>
+
+       <descriptors xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tizen="http://www.tizen.org/2012/uibuilder/descriptor">
+
+               <renderer id="EFL" />
+
+               <doc id="tizen.doc">
+
+                       <relations>
+                               <content ids="tizen.page" />
+                       </relations>
+               </doc>
+       
+       &tizen.uicomponent.categories;
+
+               <!-- default style edj -->
+       &efl.style.edj;
+
+               <!-- type & event type -->
+       &efl.types;
+       &tizen.eventtypes;
+
+               <!-- view -->
+       &tizen.view;
+
+       &efl.bg;
+       &efl.button;    
+       &efl.check;
+       &efl.datetime; 
+       &efl.entry;
+       &efl.image;
+       &efl.label;
+       &efl.radio;
+       &efl.spinner;
+       &efl.slider;
+       &efl.progressbar;
+       &efl.genlist;
+       &efl.genlistitem;
+       &efl.scroller;
+       &efl.layout;
+       &efl.gengrid;
+       &efl.gengriditem;
+       &efl.grid;
+       &efl.table;
+       &efl.box;
+       &efl.ctxpopup;
+       &efl.ctxpopupitem;
+       &efl.popup; 
+       &efl.calendar;
+
+       </descriptors>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/tizen.eventtypes.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/tizen.eventtypes.xml
new file mode 100644 (file)
index 0000000..dea9f2c
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<eventTypes>
+       <eventType id="event.eflevent">
+               <defaultCode>%page%_%object%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+
+       <eventType id="event.viewevent">
+               <defaultCode>%page%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+</eventTypes>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/tizen.uicomponent.categories.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/tizen.uicomponent.categories.xml
new file mode 100644 (file)
index 0000000..02cf155
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<UIComponentCategories>
+       <UIComponentCategory name="UI containers" />
+       <UIComponentCategory name="UI components" />
+</UIComponentCategories>
+
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.bg.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.bg.widget.xml
new file mode 100644 (file)
index 0000000..8306877
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="bg" displayName="Background" smallIcon="widget/32/pal_bg_nor.png" icon.16="widget/16/view_p_bg_nor.png" category="UI components"
+       description="Background object, used for setting a solid color, image or Edje group as a background to a window or any container object" helpCategory=""
+       helpContents="content" feedbackWidth="200" feedbackHeight="200" minWidth="1" minHeight="1" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="color" type="color" displayName="Color" default="" category="General" tooltip="sets the color on a given background UI Component." />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="sets the file path of the image">
+               <!-- <condition name="enable-property" value="" target="option"/> -->
+       </property>
+       <property name="option" type="efl.bg@option" displayName="Option" default="scale" category="General"
+               tooltip="set the way how a background UI Component is to display its image.&#10;
+- center: Center the background image.&#10;
+- scale: Scale the background image, retaining the aspect ratio.&#10;
+- stretch: Stretch the background image to fill the UI Component's area.&#10;
+- tile: Tile background image at its original size.&#10;" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.box.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.box.widget.xml
new file mode 100644 (file)
index 0000000..b89dbf2
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="box" displayName="Box" smallIcon="widget/32/pal_box_nor.png" icon.16="widget/16/view_p_box_nor.png" category="UI containers"
+       description="A box arranges objects in a linear fashion, governed by a layout function that defines the details of this arrangement." layoutType="box"
+       helpCategory="" helpContents="box" feedbackWidth="200" feedbackHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the horizontal orientation." />
+       <property name="transparency" type="efl@boolean" displayName="transparency" default="false" category="General" tooltip="sets the transparency." />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="sets the box to arrange its children homogeneously." />
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="sets the horizontal space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="sets the vertical space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <!-- Events -->
+       <!-- <event name="child,added" displayName="child,added" eventType="event.eflevent" eventInfo="@brief &#xA;&#xA;@param vc It is context of the view that this event 
+               occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Evas_Object 
+               *child = (Evas_Object *) event_info;" /> <event name="child,removed" displayName="child,removed" eventType="event.eflevent" eventInfo="@brief &#xA;&#xA;@param vc 
+               It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits 
+               the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Evas_Object *child = (Evas_Object *) event_info;" /> -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.button.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.button.widget.xml
new file mode 100644 (file)
index 0000000..7bb426d
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="button" displayName="Button" smallIcon="widget/32/pal_button_nor.png" icon.16="widget/16/view_p_button_nor.png" category="UI components"
+       description="This is a push-button. Press it and run some function. It can contain a simple label and icon object and it also has an autorepeat feature"
+       helpCategory="" helpContents="button" feedbackWidth="150" feedbackHeight="60" minWidth="70" minHeight="60" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Button" category="General" tooltip="sets the text of the UI Component." />
+       <property name="style" type="efl.button@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief the user clicked the button (press/release).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="repeated" displayName="repeated" eventType="event.eflevent"
+               eventInfo="@brief the user pressed the button without releasing it.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent"
+               eventInfo="@brief button was pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="unpressed" displayName="unpressed" eventType="event.eflevent"
+               eventInfo="@brief button was released after being pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.calendar.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.calendar.widget.xml
new file mode 100644 (file)
index 0000000..baa9dd2
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="calendar" displayName="Calendar" smallIcon="widget/32/pal_calendar_nor.png" icon.16="widget/16/view_p_calendar_nor.png" category="UI components"
+       description="This is a calendar UI Component. It helps applications to flexibly display a calender with day of the week, date, year and month" helpCategory=""
+       helpContents="" feedbackWidth="480" feedbackHeight="450" minWidth="480" minHeight="400" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" />
+
+       <property name="min_year" type="integer" displayName="Min year" default="1902" category="General" />
+       <property name="max_year" type="integer" displayName="Max year" default="-1" category="General" />
+       <property name="select_mode" type="efl.calendar@selectmode" displayName="Select mode" default="default" category="General" />
+       <property name="interval" type="double" displayName="Interval" default="0.85" category="General">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="display,changed" displayName="display,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.check.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.check.widget.xml
new file mode 100644 (file)
index 0000000..8818742
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="check" displayName="Check" smallIcon="widget/32/pal_check_nor.png" icon.16="widget/16/view_p_check_nor.png" category="UI components"
+       description="The check UI Component allows for toggling a value between true and false" helpCategory="" helpContents="efl.datetime" feedbackWidth="150"
+       feedbackHeight="60" minWidth="40" minHeight="40" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Check" category="General" tooltip="sets the text of the UI Component." />
+       <property name="state" type="efl@boolean" displayName="State" default="false" category="General" tooltip="sets the on/off state of the check UI Component." />
+       <property name="style" type="efl.check@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component.">
+               <condition name="enable-property" value="default" target="disable" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief This is called whenever the user changes the state of the check objects (event_info is always NULL).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.ctxpopup.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.ctxpopup.widget.xml
new file mode 100644 (file)
index 0000000..f3bf22f
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopup" displayName="CtxPopup" smallIcon="widget/32/pal_list_nor.png" icon.16="widget/16/view_p_ctxp_nor.png" category="UI containers"
+       description="Ctxpopup(Context popup)s are used to provide options for the currently selected objects. Ctxpopup is composed of popup and a list of items inside popup." helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false"
+       uiSelector="#%id%" paletteVisible="false" xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="ctxpopupitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the direction orientation." />
+       <!-- <property name="style" type="efl.ctxpopup@style" displayName="Style" default="default" category="General" tooltip="sets the style of the widget."> <condition 
+               name="enable-property" value="default" target="disable"/> </property> -->
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="dismissed" displayName="dismissed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.ctxpopupitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.ctxpopupitem.widget.xml
new file mode 100644 (file)
index 0000000..dc6db61
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopupitem" displayName="CtxPopupItem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI containers" description=""
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="ctxpopup">
+
+       <relations>
+               <parent ids="ctxpopup" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="CtxPopupItem" category="General" tooltip="The text of the list item" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.datetime.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.datetime.widget.xml
new file mode 100644 (file)
index 0000000..bf29c9e
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="datetime" displayName="Datetime" smallIcon="widget/32/pal_date_nor.png" icon.16="widget/16/view_p_date_nor.png" category="UI components"
+       description="Datetime UI Component is used to display and input date time values" helpCategory="" helpContents="efl.datetime" feedbackWidth="380"
+       feedbackHeight="210" minWidth="380" minHeight="210" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.datetime@style" displayName="Style" default="date_layout" category="General" tooltip="sets the style of the UI Component." />
+
+       <!-- <property name="format" type="string" displayName="Format" default="%b %d %Y %I : %M %p" tooltip="Sets the datetime format. Format is a combination of allowed 
+               LIBC date format specifiers like: &quot;%b %d, %Y %I : %M %p&quot;."/> -->
+       <!-- %Y : The year as a decimal number including the century.&#xA; %m : The month as a decimal number (range 01 to 12).&#xA; %b : The abbreviated month name according 
+               to the current locale.&#xA; %B : The full month name according to the current locale.&#xA; %h : The abbreviated month name according to the current locale(same as 
+               %b).&#xA; %d : The day of the month as a decimal number (range 01 to 31).&#xA; %e : The day of the month as a decimal number (range 1 to 31). Single digits are preceded 
+               by a blank.&#xA; %I : The hour as a decimal number using a 12-hour clock (range 01 to 12).&#xA; %H : The hour as a decimal number using a 24-hour clock (range 00 
+               to 23).&#xA; %k : The hour (24-hour clock) as a decimal number (range 0 to 23). Single digits are preceded by a blank.&#xA; %l : The hour (12-hour clock) as a decimal 
+               number (range 1 to 12). Single digits are preceded by a blank.&#xA; %M : The minute as a decimal number (range 00 to 59).&#xA; %p : Either 'AM' or 'PM' according 
+               to the given time value, or the corresponding strings for the current locale. Noon is treated as 'PM' and midnight as 'AM'.&#xA; %P : Like p, but in lower case: 
+               'am' or 'pm' or a corresponding string for the current locale.&#xA; %c : The preferred date and time representation for the current locale.&#xA; %x : The preferred 
+               date representation for the current locale without the time.&#xA; %X : The preferred time representation for the current locale without the date.&#xA; %r : The complete 
+               calendar time using the AM/PM format of the current locale.&#xA; %R : The hour and minute in decimal numbers using the format H:M.&#xA; %T : The time of the day 
+               in decimal numbers using the format H:M:S.&#xA; %F : The date using the format %Y-%m-%d." -->
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief whenever Datetime field value is changed, this signal is sent.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.entry.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.entry.widget.xml
new file mode 100644 (file)
index 0000000..a6f5df9
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="entry" displayName="Entry" smallIcon="widget/32/pal_entry_nor.png" icon.16="widget/16/view_p_entry_nor.png" category="UI components"
+       description="An entry is a convenience UI Component which shows a box that the user can enter text into" helpCategory="" helpContents="button" feedbackWidth="150"
+       feedbackHeight="100" minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Entry" category="General" tooltip="Convenient macro for elm_object_part_text_set." />
+       <property name="single_line" type="efl@boolean" displayName="Single line" default="false" category="General" tooltip="Sets the entry to the single line mode." />
+       <property name="password" type="efl@boolean" displayName="Password" default="false" category="General" tooltip="Sets the entry to the password mode." />
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General" tooltip="Sets whether the entry is editable." />
+       <property name="context_menu" type="efl@boolean" displayName="Context menu enabled" default="true" category="General"
+               tooltip="Disables the entry's contextual (longpress) menu." />
+       <property name="scroll" type="efl@boolean" displayName="Scrollable" default="false" category="General" tooltip="Enables or disables scrolling in the entry." />
+
+       <property name="src" type="text-resource" displayName="File path" default="" category="General"
+               tooltip="Sets the file (and implicitly loads it) for the text to display and then allow edit. All changes are written back to the file after a short delay if the entry object is set to autosave (which is the default).">
+               <condition name="disable-property" value="" target="autosave" />
+               <condition name="disable-property" value="" target="text-format" />
+       </property>
+       <property name="file_text_format" type="efl.entry@textformat" displayName="Text Format" default="plain_utf8" category="General"
+               tooltip="Enumeration that defines the text format types.&#xD;
+       plain_utf8 : Plain UTF8 type&#xD;
+       markup_utf8 : Markup UTF8 type" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="aborted" displayName="aborted" eventType="event.eflevent"
+               eventInfo="@brief The escape key was pressed on a single line entry. (since 1.7)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="activated" displayName="activated" eventType="event.eflevent"
+               eventInfo="@brief The enter key was pressed on a single line entry.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="anchor,clicked" displayName="anchor,clicked" eventType="event.eflevent"
+               eventInfo="@brief An anchor has been clicked. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,down" displayName="anchor,down" eventType="event.eflevent"
+               eventInfo="@brief Mouse button has been pressed on an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,hover,opened" displayName="anchor,hover,opened" eventType="event.eflevent"
+               eventInfo="@brief The anchor is clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Hover_Info *entry_hover_info = (Elm_Entry_Anchor_Hover_Info *) event_info;" />
+       <event name="anchor,in" displayName="anchor,in" eventType="event.eflevent"
+               eventInfo="@brief Mouse cursor has moved into an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,out" displayName="anchor,out" eventType="event.eflevent"
+               eventInfo="@brief Mouse cursor has moved out of an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="anchor,up" displayName="anchor,up" eventType="event.eflevent"
+               eventInfo="@brief Mouse button has been unpressed on an anchor. The event_info parameter for the callback will be an Elm_Entry_Anchor_Info.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Anchor_Info *entry_anchor_info = (Elm_Entry_Anchor_Info *) event_info;" />
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief The text within the entry was changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="changed,user" displayName="changed,user" eventType="event.eflevent"
+               eventInfo="@brief The text within the entry was changed because of user interaction.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Entry_Change_Info *entry_change_info = (Elm_Entry_Change_Info *) event_info;" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief The entry has been clicked (mouse press and release).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The entry has been double clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="clicked,triple" displayName="clicked,triple" eventType="event.eflevent"
+               eventInfo="@brief The entry has been triple clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="cursor,changed" displayName="cursor,changed" eventType="event.eflevent"
+               eventInfo="@brief The cursor has changed position.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="cursor,changed,manual" displayName="cursor,changed,manual" eventType="event.eflevent"
+               eventInfo="@brief The cursor has changed position manually.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent"
+               eventInfo="@brief The entry has received focus.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent"
+               eventInfo="@brief The entry has lost focus.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief A mouse button has been pressed and held for a couple&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="maxlength,reached" displayName="maxlength,reached" eventType="event.eflevent"
+               eventInfo="@brief Called when a maximum length is reached.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="preedit,changed" displayName="preedit,changed" eventType="event.eflevent"
+               eventInfo="@brief The preedit string has changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="press" displayName="press" eventType="event.eflevent"
+               eventInfo="@brief A mouse button has been pressed on the entry. seconds.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="redo,request" displayName="redo,request" eventType="event.eflevent"
+               eventInfo="@brief Called on redo request.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,changed" displayName="selection,changed" eventType="event.eflevent"
+               eventInfo="@brief The current selection has changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,cleared" displayName="selection,cleared" eventType="event.eflevent"
+               eventInfo="@brief The current selection has been cleared.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,copy" displayName="selection,copy" eventType="event.eflevent"
+               eventInfo="@brief A copy of the selected text into the clipboard was requested.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,cut" displayName="selection,cut" eventType="event.eflevent"
+               eventInfo="@brief A cut of the selected text into the clipboard was requested.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,paste" displayName="selection,paste" eventType="event.eflevent"
+               eventInfo="@brief A paste of the clipboard contents was requested.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="selection,start" displayName="selection,start" eventType="event.eflevent"
+               eventInfo="@brief A selection has begun and no previous selection existed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="text,set,done" displayName="text,set,done" eventType="event.eflevent"
+               eventInfo="@brief Whole text has been set to the entry.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="theme,changed" displayName="theme,changed" eventType="event.eflevent"
+               eventInfo="@brief Called when the theme is changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="undo,request" displayName="undo,request" eventType="event.eflevent"
+               eventInfo="@brief Called on undo request.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="rejected" displayName="rejected" eventType="event.eflevent"
+               eventInfo="@brief Called when some of inputs are rejected by the filter. (since 1.9)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.gengrid.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.gengrid.widget.xml
new file mode 100644 (file)
index 0000000..212b5ec
--- /dev/null
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="gengrid" displayName="Gengrid" smallIcon="widget/32/pal_gengrid_nor.png" icon.16="widget/16/view_p_gengrid_nor.png" category="UI components"
+       description="This UI Component aims to position objects in a grid layout while actually creating and rendering only the visible ones" helpCategory=""
+       helpContents="list" feedbackWidth="400" feedbackHeight="400" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="gengriditem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.gengrid@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add gengrid item" unusedEditors="source_tab" />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General"
+               tooltip="set the gengrid select mode.&#10;
+- default: Once an item is selected, it would stay highlighted and not going to call selected callback again even it was clicked. Items can get focus.&#10;
+- always: Item selected callbacks will be called every time for click events, even after the item was already selected. Items can get focus.&#10;
+- none: Items will never be highlighted and selected but the size will be adjusted by the finger size configuration. Items can't get focus.&#10;
+- display_only: Items will never be highlighted and selected and ignore the finger size. So the item size can be reduced below than the finger size configuration. Items can't get focus." />
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General"
+               tooltip="set the direction in which a given gengrid UI Component will expand while placing its items.&#10;
+       If true, items will be placed in columns, from top to bottom and, when the space for a column is filled, 
+       another one is started on the right, thus expanding the grid horizontally. &#10;If false, items will be placed in rows, 
+       from left to right and, when the space for a row is filled, another one is started below, thus expanding the grid vertically." />
+       <property name="item_size_w" type="integer" displayName="Item size W" default="200" category="General"
+               tooltip="sets the width size for the items of the gengrid UI Component.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="item_size_h" type="integer" displayName="Item size H" default="200" category="General"
+               tooltip="sets the height size for the items of the gengrid UI Component.">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="multi_select" type="efl@boolean" displayName="Multi select" default="false" category="General"
+               tooltip="enables or disables multi-selection in the gengrid UI Component." />
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+       <property name="scroll_loop" type="efl@boolean" displayName="Scroll loop" default="false" category="General" tooltip="Enable item loop feature" />
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked or pressed (enter|return|spacebar) on an item. The event_info parameter is the gengrid item that was activated.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked an item. The event_info parameter is the gengrid item that was double-clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,right" displayName="clicked,right" eventType="event.eflevent"
+               eventInfo="@brief The user has right-clicked an item. The event_info parameter is the item that was right-clicked. (since 1.13)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item is pressed for a certain amount of time. By default it's 1 second.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief The user has made an item selected. The event_info parameter is the gengrid item that was selected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent"
+               eventInfo="@brief The user has made an item unselected. The event_info parameter is the gengrid item that was unselected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="realized" displayName="realized" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the gengrid has its implementing Evas object instantiated, de facto. event_info is the gengrid item that was created.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="unrealized" displayName="unrealized" eventType="event.eflevent"
+               eventInfo="@brief This is called when the implementing Evas object for this item is deleted. event_info is the gengrid item that was deleted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief Called when an item is added, removed, resized or moved and when the gengrid is resized or gets &quot;horizontal&quot; property changes.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="drag,start,up" displayName="drag,start,up" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) up.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,down" displayName="drag,start,down" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) down.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,left" displayName="drag,start,left" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) left.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,right" displayName="drag,start,right" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has been dragged (not scrolled) right.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,stop" displayName="drag,stop" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid has stopped being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag" displayName="drag" eventType="event.eflevent"
+               eventInfo="@brief Called when the item in the gengrid is being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief called when the content has been scrolled (moved).&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent"
+               eventInfo="@brief called when dragging the content has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief called when dragging the content has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,page,changed" displayName="scroll,page,changed" eventType="event.eflevent"
+               eventInfo="@brief called when the visible page has changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the top edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the bottom edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the left edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the gengrid is scrolled until the right edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="moved" displayName="moved" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item is moved by a user interaction in a reorder mode. The event_info parameter is the item that was moved.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="index,update" displayName="index,update" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item index is changed. Note that this callback is called while each item is being realized.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is highlighted. This is called when the user presses an item or keyboard selection is done so the item is physically highlighted. The event_info parameter is the item that was highlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is unhighlighted. This is called when the user releases an item or keyboard selection is moved so the item is physically unhighlighted. The event_info parameter is the item that was unhighlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the gengrid item has received focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the gengrid item has lost focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent"
+               eventInfo="@brief The user pressed the an item. The event_info parameter is the item that was pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="released" displayName="released" eventType="event.eflevent"
+               eventInfo="@brief The user released the an item. The event_info parameter is the item that was released.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,reorder,anim,start" displayName="item,reorder,anim,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item movement has just started by keys in reorder mode. The event_info parameter is the item that is going to move. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,reorder,anim,stop" displayName="item,reorder,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when a gengrid item movement just stopped in reorder mode. The event_info parameter is the item that was moved. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *gengrid_item = (Elm_Object_Item *) event_info;" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.gengriditem.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.gengriditem.widget.xml
new file mode 100644 (file)
index 0000000..0e7aafd
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="gengriditem" displayName="Gengriditem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="gengridItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="gengrid">
+
+       <relations>
+               <parent ids="gengrid" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.gengrid@itemstyle" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="sets the text of item" />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="sets the file path of the image" />
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="sets the selected state of the UI Component." />
+       <property name="disabled" type="efl@boolean" displayName="Disabled" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="align" type="efl.genericitem@align" displayName="Align" default="none" category="General" tooltip="sets the align state of the UI Component." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.genlist.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.genlist.widget.xml
new file mode 100644 (file)
index 0000000..6730242
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlist" displayName="Genlist" smallIcon="widget/32/pal_genlist_nor.png" icon.16="widget/16/view_p_genlist_nor.png" category="UI components"
+       description="This UI Component aims to have more expansive list than the simple list in Elementary that could have more flexible items and allow many more entries while still being fast and low on memory usage. At the same time it was also made to be able to do tree structures. But the price to pay is more complexity when it comes to usage. If all you want is a simple list with icons and a single text, use the normal List object"
+       helpCategory="" helpContents="list" feedbackWidth="480" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.genlist@style" displayName="Style" default="solid/default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add genlist item" unusedEditors="source_tab" />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="enable/disable homogeneous mode&#10; If true ,
+               this will enable the homogeneous mode where items are of the same
+               height and width so that genlist may do the lazy-loading at its
+               maximum ( which increases the performance for scrolling the list )&#10;
+               In the normal mode , genlist will pre-calculate all the items ' sizes
+               even though they are not in use. So items ' callbacks are called many
+               times than expected. But homogeneous mode will skip the item size
+               pre-calculation process so items ' callbacks are called only when the
+               item is needed." />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General"
+               tooltip="set the genlist select mode.&#10;
+- default: Once an item is selected, it would stay highlighted and not going to call selected callback again even it was clicked. Items can get focus.&#10;
+- always: Item selected callbacks will be called every time for click events, even after the item was already selected. Items can get focus.&#10;
+- none: Items will never be highlighted and selected but the size will be adjusted by the finger size configuration. Items can't get focus.&#10;
+- display_only: Items will never be highlighted and selected and ignore the finger size. So the item size can be reduced below than the finger size configuration. Items can't get focus." />
+
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+       <property name="scroll_loop" type="efl@boolean" displayName="Scroll loop" default="false" category="General" tooltip="Enable item loop feature" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked or pressed (enter|return|spacebar) on an item. The event_info parameter is the item that was activated.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent"
+               eventInfo="@brief The user has double-clicked an item. The event_info parameter is the item that was double-clicked.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="selected" displayName="selected" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has made an item selected. The event_info parameter is the genlist item that was selected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has made an item unselected. The event_info parameter is the genlist item that was unselected.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent"
+               eventInfo="@brief This is called when elm_genlist_item_expanded_set() is called and the item is now meant to be expanded. The event_info parameter is the genlist item that was indicated to expand. It is the job of this callback to then fill in the child items.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="contracted" displayName="contracted" eventType="event.eflevent"
+               eventInfo="@brief This is called when elm_genlist_item_expanded_set() is called and the item is now meant to be contracted. The event_info parameter is the genlist item that was indicated to contract. It is the job of this callback to then delete the child items.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="expand,request" displayName="expand,request" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has indicated they want to expand a tree branch item. The callback should decide if the item can expand (has any children) and then call elm_genlist_item_expanded_set() appropriately to set the state. The event_info parameter is the genlist item that was indicated to expand.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="contract,request" displayName="contract,request" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has indicated they want to contract a tree branch item. The callback should decide if the item can contract (has any children) and then call elm_genlist_item_expanded_set() appropriately to set the state. The event_info parameter is the genlist item that was indicated to contract.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="realized" displayName="realized" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list is created as a real evas object. event_info parameter is the genlist item that was created.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="unrealized" displayName="unrealized" eventType="event.eflevent"
+               eventInfo="@brief This is called just before an item is unrealized. After this call content objects provided will be deleted and the item object itself delete or be put into a floating cache.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,up" displayName="drag,start,up" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) up.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,down" displayName="drag,start,down" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) down.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,left" displayName="drag,start,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) left.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,start,right" displayName="drag,start,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has been dragged (not scrolled) right.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag,stop" displayName="drag,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list has stopped being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="drag" displayName="drag" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item in the list is being dragged.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the item is pressed for a certain amount of time. By default it's 1 second. The event_info parameter is the longpressed genlist item.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when scrolling animation has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent"
+               eventInfo="@brief This is called when dragging the content has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief This is called when dragging the content has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) (since 1.13)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the top edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the bottom edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the left edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is scrolled until the right edge.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="multi,swipe,left" displayName="multi,swipe,left" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped left.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,swipe,right" displayName="multi,swipe,right" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped right.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,swipe,up" displayName="multi,swipe,up" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped up.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,swipe,down" displayName="multi,swipe,down" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch swiped down.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,pinch,out" displayName="multi,pinch,out" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch pinched out.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="multi,pinch,in" displayName="multi,pinch,in" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is multi-touch pinched in.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="swipe" displayName="swipe" eventType="event.eflevent"
+               eventInfo="@brief This is called when the genlist is swiped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="moved" displayName="moved" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item is moved by a user interaction in a reorder mode. The event_info parameter is the item that was moved.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="moved,after" displayName="moved,after" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item is moved after another item in reorder mode. The event_info parameter is the reordered item. To get the relative previous item, use elm_genlist_item_prev_get(). This signal is called along with &quot;moved&quot; signal.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="moved,before" displayName="moved,before" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item is moved before another item in reorder mode. The event_info parameter is the reordered item. To get the relative previous item, use elm_genlist_item_next_get(). This signal is called along with &quot;moved&quot; signal.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="index,update" displayName="index,update" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist item index is changed. Note that this callback is called while each item is being realized.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="tree,effect,finished" displayName="tree,effect,finished" eventType="event.eflevent"
+               eventInfo="@brief This is called when a genlist tree effect is finished.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is highlighted. This is called when the user presses an item or keyboard selection is done so the item is physically highlighted. The event_info parameter is the item that was highlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent"
+               eventInfo="@brief an item in the list is unhighlighted. This is called when the user releases an item or keyboard selection is moved so the item is physically unhighlighted. The event_info parameter is the item that was unhighlighted.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the program's language is changed. Call the elm_genlist_realized_items_update() if items text should be translated.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent"
+               eventInfo="@brief The user pressed an item. The event_info parameter is the item that was pressed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="released" displayName="released" eventType="event.eflevent"
+               eventInfo="@brief The user released an item. The event_info parameter is the item that was released.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent"
+               eventInfo="@brief When the genlist item has recieved focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent"
+               eventInfo="@brief When the genlist item has lost focus. (since 1.10)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;Elm_Object_Item *genlist_item = (Elm_Object_Item *) event_info;" />
+       <event name="clicked,right" displayName="clicked,right" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.genlistitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.genlistitem.widget.xml
new file mode 100644 (file)
index 0000000..a1e43a4
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlistitem" displayName="Genlistitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="genlist">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.genlist@itemstyle" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="sets the text of item" />
+       <property name="sub_text" type="rm_string" displayName="Sub Text" default="Sub Text" category="General" tooltip="sets the text of item" />
+       <property name="item_type" type="efl.genlist@itemtype" displayName="Item type" default="none" category="General"
+               tooltip="sets the type of item&#10;
+- none: simple item&#10;
+- tree: this may be expanded and have child items.&#10;
+- group: an index item of a group of items. This item can have child items.">
+               <condition name="enable-property" value="1" target="item-add" />
+       </property>
+
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="sets the selected state of the UI Component." />
+       <property name="align" type="efl.genericitem@align" displayName="Align" default="none" category="General" tooltip="sets the align state of the UI Component." />
+
+       <property name="standard_icon" type="efl.icon@standardicon" displayName="Standard icon" default="" category="Icon"
+               tooltip="sets the standard icon to be shown in the list item before label text&#10;" />
+       <property name="image_path" type="image" displayName="Image path" default="" category="Icon"
+               tooltip="sets the file path of the image to be shown in the list item before label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <property name="end_standard_icon" type="efl.icon@standardicon" displayName="Standard icon" default="" category="End Icon"
+               tooltip="sets the standard icon to be shown in the list item after label text&#10;" />
+       <property name="end_image_path" type="image" displayName="Image path" default="" category="End Icon"
+               tooltip="sets the file path of the image to be shown in the list item after label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.grid.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.grid.widget.xml
new file mode 100644 (file)
index 0000000..6a5ec36
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="grid" displayName="Grid" smallIcon="widget/32/pal_grid_nor.png" icon.16="widget/16/view_p_grid_nor.png" category="UI containers"
+       description="The grid is a grid layout UI Component that lays out a series of children as a fixed 'grid' of UI Components using a given percentage of the grid width and height each using the child object."
+       layoutType="grid" helpCategory="" helpContents="grid" feedbackWidth="300" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="vsize_w" type="integer" displayName="Col count" default="1000" category="General" tooltip="sets the virtual width of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+       <property name="vsize_h" type="integer" displayName="Row count" default="1000" category="General" tooltip="sets the virtual height of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack_x" type="integer" displayName="Left" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_w" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_y" type="integer" displayName="Top" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_h" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_w" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_x" targetValue="vsize_w" error="size-max" />
+               </property>
+               <property name="pack_h" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_y" targetValue="vsize_h" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.image.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.image.widget.xml
new file mode 100644 (file)
index 0000000..cb753b1
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="image" displayName="Image" smallIcon="widget/32/pal_image_nor.png" icon.16="widget/16/view_p_image_nor.png" category="UI components"
+       description="An Elementary image object is a direct realization of The Elementary Image Class, and it allows one to load and display an image file on it, be it from a disk file or from a memory region"
+       helpCategory="" helpContents="" feedbackWidth="50" feedbackHeight="50" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="Sets the file that is used as the image's source." />
+       <property name="no_scale" type="efl@boolean" displayName="No scale" default="false" category="General" tooltip="Disables scaling of this object." />
+       <property name="resizable_up" type="efl@boolean" displayName="Resizable(up)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable up" />
+       <property name="resizable_down" type="efl@boolean" displayName="Resizable(down)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable down" />
+       <!--<property name="orient" type="efl.image@orient" displayName="Orient" default="none" category="General" tooltip="Sets the image orientation.&#xD;&#xD; none&#xD; 
+               : No orientation change&#xD; orient_0&#xD; : No orientation change&#xD; rotate_90&#xD; : Rotate 90 degrees clockwise&#xD; rotate_180&#xD; : Rotate 180 degrees clockwise&#xD; 
+               rotate_270&#xD; : Rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise)&#xD; flip_horizontal&#xD; : Flip image horizontally&#xD; flip_vertical&#xD; : 
+               Flip image vertically&#xD; flip_transpose&#xD; : Flip the image along the y = (width - x) line (bottom-left to top-right)&#xD; flip_transverse&#xD; : Flip the image 
+               along the y = x line (top-left to bottom-right)" /> -->
+       <property name="aspect_fixed" type="efl@boolean" displayName="Aspect fixed" default="false" category="General"
+               tooltip="Set whether the original aspect ratio of the image should be kept on resize." />
+       <property name="fill_outside" type="efl@boolean" displayName="Fill outsize" default="false" category="General"
+               tooltip="Sets whether the image fills the entire object area, when keeping the aspect ratio." />
+       <!-- <property name="editable" type="efl@boolean" displayName="Editable" default="false" category="General" tooltip="Makes the image 'editable'." /> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="drop" displayName="drop" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has dropped an image typed object onto the object in question -- the event info argument is the path to that image file&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;const char *image_path = (const char *) event_info;" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent"
+               eventInfo="@brief This is called when a user has clicked the image&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.label.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.label.widget.xml
new file mode 100644 (file)
index 0000000..5347b70
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="label" displayName="Label" smallIcon="widget/32/pal_label_nor.png" icon.16="widget/16/view_p_label_nor.png" category="UI components"
+       description="UI Component to display text, with simple html-like markup" helpCategory="" helpContents="efl.progressbar" feedbackWidth="100" feedbackHeight="30"
+       minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Label" category="General" tooltip="sets the text of the UI Component." />
+       <!-- <property name="style" type="efl.label@style" displayName="Style" default="default" category="General" tooltip="Sets the style to be used by the label.&#10; 
+               if the text doesn't fit the geometry of the label, it is ellipsized or cut. Elementary provides several styles for this UI Component.&#10; - default: No animation.&#10; 
+               - marker: Centers the text in the label and makes it bold by default.&#10; - slide_long: The entire text appears from the right of the screen and slides until it 
+               disappears in the left of the screen(reappearing on the right again).&#10; - slide_short: The text appears in the left of the label and slides to the right to show 
+               the overflow. When all of the text has been shown the position is reset.&#10; - slide_bounce: The text appears in the left of the label and slides to the right to 
+               show the overflow. When all of the text has been shown the animation reverses, moving the text to the left."/> -->
+       <property name="line_wrap" type="efl.label@wraptype" displayName="Wrap type" default="none" category="General"
+               tooltip="sets the wrapping behavior of the label.&#10;
+- none: No wrapping.&#10;
+- char: Wrap between characters.&#10;
+- word: Wrap between words.&#10;
+- mixed: Word wrap, and if that fails, char wrap." />
+       <property name="wrap_width" type="integer" displayName="Wrap width" default="0" category="General" tooltip="sets the maximum width size hint of the label." />
+       <property name="ellipsis" type="efl@boolean" displayName="Ellipsis" default="false" category="General" tooltip="sets the ellipsis behavior of the label." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="slide,end" displayName="slide,end" eventType="event.eflevent"
+               eventInfo="@brief The slide is end.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.layout.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.layout.widget.xml
new file mode 100644 (file)
index 0000000..855be83
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="layout" displayName="Layout" smallIcon="widget/32/pal_layout_nor.png" icon.16="widget/16/view_p_layout_nor.png" category="UI components"
+       description="This is a container UI Component that takes a standard Edje design file and wraps it very thinly in a UI Component" helpCategory="" helpContents="button"
+       feedbackWidth="150" feedbackHeight="150" minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="src" type="layout-resource" displayName="File path" default="" category="General" tooltip="The path to the file (edj) that is used as a layout" />
+       <property name="group" type="dynamic-combo" displayName="Group name" default="" category="General" tooltip="The group that the layout belongs to in the edje file" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="theme,changed" displayName="theme,changed" eventType="event.eflevent"
+               eventInfo="@brief The theme was changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.popup.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.popup.widget.xml
new file mode 100644 (file)
index 0000000..8e7f8fe
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="popup" displayName="Popup" smallIcon="" icon.16="widget/16/view_p_popup_nor.png" category="UI containers" description="Popups are temporarily displayed on the screenb to provide information or to ask for user confirmation. Popup allows users to take instant action for events. Popup is an enhancement of Notify components and is composed of three areas: Title, Content and Action with up to 3 buttons(optional)." layoutType="Popup"
+       helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%"
+       paletteVisible="false" xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+
+       <property name="title" type="string" displayName="Title" default="Title" category="General" tooltip="The title text of the popup widget">
+       </property>
+       <property name="height" type="scale-integer" displayName="Height" default="200" category="General"
+               tooltip="sets the x of left upper corner of the widget.&#10;
+But this depends on the container of the widget.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="400" error="integer-max" />
+       </property>
+       <property name="timeout" type="double" displayName="Timeout" default="0" category="General" tooltip="Sets a timeout to hide popup automatically">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="timeout" displayName="timeout" eventType="event.eflevent" />
+       <event name="block,clicked" displayName="block,clicked" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.progressbar.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.progressbar.widget.xml
new file mode 100644 (file)
index 0000000..2191ef2
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="progressbar" displayName="Progressbar" smallIcon="widget/32/pal_progress_nor.png" icon.16="widget/16/view_p_progress_nor.png" category="UI components"
+       description="The progress bar is a UI Component for visually representing the progress status of a given job/task" helpCategory="" helpContents="efl.progressbar"
+       feedbackWidth="150" feedbackHeight="30" minWidth="50" minHeight="25" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.progressbar@style" displayName="Style" default="default" category="General"
+               tooltip="Sets the style to be used by a given UI Component.">
+               <condition name="enable-property" value="default" target="span_size" />
+       </property>
+       <property name="direction" type="efl@direction" displayName="Direction" default="horizontal" category="General"
+               tooltip="Sets the orientation of a given progress bar UI Component." />
+       <property name="value" type="double" displayName="Value" default="0" category="General"
+               tooltip="Sets the progress value (in percentage) on a given progress bar UI Component. The progress value must be between 0.0 and 1.0">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="span_size" type="integer" displayName="Span Size" default="0" category="General" tooltip="The length of the progress bar's bar region">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <!-- <property name="format" type="efl.progressbar@format" displayName="Format" default="%.0f%%"/> -->
+       <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General"
+               tooltip="Inverts a given progress bar UI Component's displaying values order." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief &#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.radio.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.radio.widget.xml
new file mode 100644 (file)
index 0000000..e132ac2
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="radio" displayName="Radio" smallIcon="widget/32/pal_radio_nor.png" icon.16="widget/16/view_p_radio_nor.png" category="UI components"
+       description="Radio is a UI Component that allows for 1 or more options to be displayed and have the user choose only 1 of them" helpCategory="" helpContents="efl.datetime"
+       feedbackWidth="150" feedbackHeight="60" minWidth="40" minHeight="40" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Radio" category="General" tooltip="sets the text of the UI Component." />
+       <property name="value" type="integer" displayName="Value" default="0" category="General"
+               tooltip="sets the value of the radio group.&#10;
+The radio group is initialized with this value. The value should be one of the radio buttons' state values in the group to be properly initialized." />
+       <property name="state_value" type="integer" displayName="State value" default="0" category="General" tooltip="sets the integer value that this radio object represents." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief This is called when the radio object is selected. If you want to trace the state change of a radio group, you should add this callback to all the radio objects in that group.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.scroller.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.scroller.widget.xml
new file mode 100644 (file)
index 0000000..d0df3e6
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="scroller" displayName="Scroller" smallIcon="widget/32/pal_scroller_nor.png" icon.16="widget/16/view_p_scroller_nor.png" category="UI containers"
+       description="A scroller holds (and clips) a single object and scrolls it around. This means that it allows the user to use a scroll bar (or a finger) to drag the viewable region around, moving through a much larger object that is contained in the scroller. The scroller will always have a small minimum size by default as it won't be limited by the contents of the scroller"
+       layoutType="box" helpCategory="" helpContents="" feedbackWidth="200" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General"
+               tooltip="sets the horizontal scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General"
+               tooltip="sets the vertical scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="content_min_w" type="efl@boolean" displayName="Min limit(Width)" default="false" category="General"
+               tooltip="Make the scroller minimum width size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+       <property name="content_min_h" type="efl@boolean" displayName="Min limit(Height)" default="false" category="General"
+               tooltip="Make the scroller minimum heigth size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+
+       <property name="propagate_events" type="efl@boolean" displayName="Propagate events" default="true" category="General"
+               tooltip="sets event propagation on a scroller.&#10;
+This enables or disables event propagation from the scroller content to the scroller and its parent. By default event propagation is enabled" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="scroll" displayName="scroll" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,left" displayName="scroll,left" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) leftwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,right" displayName="scroll,right" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) rightwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,up" displayName="scroll,up" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) upwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,down" displayName="scroll,down" eventType="event.eflevent"
+               eventInfo="@brief the content has been scrolled (moved) downwards&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent"
+               eventInfo="@brief scrolling animation has started&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent"
+               eventInfo="@brief scrolling animation has stopped&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent"
+               eventInfo="@brief dragging the contents around has started&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief dragging the contents around has stopped&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent"
+               eventInfo="@brief the left edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent"
+               eventInfo="@brief the right edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent"
+               eventInfo="@brief the top edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent"
+               eventInfo="@brief the bottom edge of the content has been reached&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="vbar,drag" displayName="vbar,drag" eventType="event.eflevent"
+               eventInfo="@brief the vertical scroll bar has been dragged&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="vbar,press" displayName="vbar,press" eventType="event.eflevent"
+               eventInfo="@brief the vertical scroll bar has been pressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="vbar,unpress" displayName="vbar,unpress" eventType="event.eflevent"
+               eventInfo="@brief the vertical scroll bar has been unpressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="hbar,drag" displayName="hbar,drag" eventType="event.eflevent"
+               eventInfo="@brief the horizontal scroll bar has been dragged&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="hbar,press" displayName="hbar,press" eventType="event.eflevent"
+               eventInfo="@brief the horizontal scroll bar has been pressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="hbar,unpress" displayName="hbar,unpress" eventType="event.eflevent"
+               eventInfo="@brief the horizontal scroll bar has been unpressed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="scroll,page,changed" displayName="scroll,page,changed" eventType="event.eflevent"
+               eventInfo="@brief the visible page has changed&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.slider.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.slider.widget.xml
new file mode 100644 (file)
index 0000000..4d7c6b3
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="slider" displayName="Slider" smallIcon="widget/32/pal_slider_nor.png" icon.16="widget/16/view_p_slider_nor.png" category="UI components"
+       description="The slider adds a draggable “slider” UI Component for selecting the value of something within a range" helpCategory="" helpContents=""
+       feedbackWidth="200" feedbackHeight="30" minWidth="70" minHeight="25" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="indicator_format" type="string" displayName="Indicator format" default="" category="General"
+               tooltip="sets the format string for the indicator label.&#10;
+The slider may display its value somewhere else for example, above the slider knob that is dragged around. 
+This function sets the format string used for this." />
+       <property name="direction" type="efl@direction" displayName="Direction" default="horizontal" category="General"
+               tooltip="sets the orientation of a given slider UI Component." />
+       <property name="style" type="efl.slider@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="min" type="double" displayName="Min" default="0.0" category="General" tooltip="sets the minimum value for the slider.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max-by" value="value" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max" default="1.0" category="General" tooltip="sets the maximum value for the slider.">
+               <condition name="integer-max" value="999999" error="integer-max" />
+               <condition name="integer-min-by" value="value" error="integer-min-by" />
+       </property>
+       <property name="value" type="double" displayName="Value" default="0.0" category="General" tooltip="sets the value the slider displays.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General"
+               tooltip="inverts a given slider UI Component's displaying values order." />
+       <property name="step" type="double" displayName="Step" default="0.05" category="General" tooltip="sets the step by which slider indicator will move.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="indicator" type="efl@boolean" displayName="Show indicator" default="false" category="General"
+               tooltip="sets whether to enlarge slider indicator (augmented knob) or not.&#10;
+By default, indicator will be bigger while dragged by the user. It won't display values set if you disable indicator." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief Whenever the slider value is changed by the user.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent"
+               eventInfo="@brief A short time after the value is changed by the user. This will be called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids possibly expensive reactions to the value change.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="slider,drag,start" displayName="slider,drag,start" eventType="event.eflevent"
+               eventInfo="@brief dragging the slider indicator around has started.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="slider,drag,stop" displayName="slider,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief dragging the slider indicator around has stopped.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.spinner.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.spinner.widget.xml
new file mode 100644 (file)
index 0000000..16af9b9
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="spinner" displayName="Spinner" smallIcon="widget/32/pal_spinner_nor.png" icon.16="widget/16/view_p_spinner_nor.png" category="UI components"
+       description="A spinner is a UI Component which allows the user to increase or decrease numeric values using arrow buttons, or edit values directly, clicking over it and typing the new value"
+       helpCategory="" helpContents="" feedbackWidth="150" feedbackHeight="150" minWidth="150" minHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.spinner@style" displayName="Style" default="horizontal" category="General"
+               tooltip="sets the style of the UI Component&#10;
+- horizontal: left/right buttons are used for changing the value.&#10;
+- vertical: up/down buttons are used for changing the value." />
+       <!-- <property name="label_format" type="string" displayName="Label format" default="%.0f" tooltip="sets the format string of the displayed label.&#10; If NULL, 
+               this sets the format to &quot;%.0f&quot;. If not it sets the format string for the label text. The label text is provided a floating point value, so the label text 
+               can display up to 1 floating point value. Note that this is optional. "/> -->
+       <property name="min" type="double" displayName="Min" default="0" category="General"
+               tooltip="sets the minimum value of the spinner.&#10;
+       If actual value is less than this value, it will be updated to this value.">
+               <condition name="integer-min" value="-9999999" error="integer-min" />
+       </property>
+       <property name="max" type="double" displayName="Max" default="100" category="General"
+               tooltip="sets the maximum value of the spinner.&#10;
+       If actual value is bigger than this value, it will be updated to this value.">
+               <condition name="integer-max" value="99999999" error="integer-max" />
+       </property>
+       <property name="step" type="double" displayName="Step" default="1" category="General" tooltip="sets the step used to increment or decrement the spinner value.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General"
+               tooltip="sets whether the spinner can be directly edited by the user or not." />
+       <!-- <property name="interval" type="double" displayName="Interval" default="0.85" category="General" tooltip="Set the interval on time updates for an user mouse 
+               button hold on spinner UI Components' arrows.&#10; This interval value is decreased while the user holds the mouse pointer either incrementing or decrementing spinner's 
+               value. This helps the user to get to a given value distant from the current one easier/faster, as it will start to change quicker and quicker on mouse button holds. 
+               The calculation for the next change interval value, starting from the one set with this call, is the previous interval divided by 1.05, so it decreases a little 
+               bit. The default starting interval value for automatic changes is 0.85 seconds."/> <property name="base" type="double" displayName="Base" default="0" category="General" 
+               tooltip="sets the base for rounding.&#10; rounded_val = base + (double)(((value - base) / round) * round)"/> <property name="round" type="integer" displayName="Round" 
+               default="" category="General" tooltip="sets the round value for rounding.&#10; rounded_val = base + (double)(((value - base) / round) * round)"/> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent"
+               eventInfo="@brief Whenever the spinner value is changed.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="spinner,drag,start" displayName="spinner,drag,start" eventType="event.eflevent"
+               eventInfo="@brief When dragging has started. (since 1.8)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="spinner,drag,stop" displayName="spinner,drag,stop" eventType="event.eflevent"
+               eventInfo="@brief When dragging has stopped. (since 1.8)&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent"
+               eventInfo="@brief A short time after the value is changed by the user. This will be called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids possibly expensive reactions to the value change.&#xA;&#xA;@param vc It is context of the view that this event occurred on. It has all of UI components that this view consist of.&#xA;@param obj It is UI component itself that emits the event signal.&#xA;@param event_info &#xA;&#x9;&#x9;event_info is NULL" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.table.widget.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/efl.table.widget.xml
new file mode 100644 (file)
index 0000000..5383d12
--- /dev/null
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="table" displayName="Table" smallIcon="widget/32/pal_table_nor.png" icon.16="widget/16/view_p_table_nor.png" category="UI containers"
+       description="A container UI Component to arrange other UI Components in a table where items can span multiple columns or rows" layoutType="table" helpCategory=""
+       helpContents="" feedbackWidth="300" feedbackHeight="300" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General" tooltip="Sets the homogeneous layout in the table." />
+
+       <!-- My -->
+       <property name="cols" type="integer" displayName="Col count" default="2" category="General" tooltip="The column count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+       <property name="rows" type="integer" displayName="Row count" default="2" category="General" tooltip="The row count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="The horizontal padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="The vertical padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+       <childUIComponentProperty>
+               <property name="pack_col" type="integer" displayName="Column" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="cols" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_row" type="integer" displayName="Row" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="rows" error="integer-max-by-parent-property" />
+               </property>
+               <property name="col_span" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="col_span" targetValue="cols" error="size-max" />
+               </property>
+               <property name="row_span" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="row_span" targetValue="rows" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/tizen.view.xml b/org.tizen.efluibuilder.descriptor/res/tv-3.0/widget/tizen.view.xml
new file mode 100644 (file)
index 0000000..6847d4c
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<page id="view" displayName="View" icon.16="widget/16/view_p_view_nor.png" uiSelector="#%id%" layoutType="view" xpath="">
+
+       <relations>
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+               <content ids="tabbar" max="1" exclusiveGroup="default" />
+               <content ids="panel" max="4" />
+               <content ids="popup" max="1" exclusiveGroup="default" />
+               <content ids="ctxpopup" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-page-id" />
+       </property>
+       <property name="type" type="string" displayName="type" initValue="view" category="General" />
+       <property name="indicator" type="efl@boolean" displayName="Indicator" default="true" category="General" tooltip="show or hide the indicator.">
+       </property>
+       <property name="screen_orientation" type="tizen.view@screen-orientation" displayName="Orientation" default="full_sensor" category="General"
+               tooltip="sets the style of the UI Component.">
+               <condition name="enable-property" value="full_sensor" target="disable" />
+       </property>
+       <property name="page_location_x" type="integer" displayName="location_x" category="Position" unusedEditors="properties">
+       </property>
+       <property name="page_location_y" type="integer" displayName="location_y" category="Position" unusedEditors="properties">
+       </property>
+       <event name="uib,view,create" displayName="uib,view,create" eventType="event.viewevent">
+               if (sizeof(uib_%page%_control_context)) {
+               vc->cc = calloc(1,
+               sizeof(uib_%page%_control_context));
+               }
+       </event>
+       <event name="uib,view,destroy" displayName="uib,view,destroy" eventType="event.viewevent">
+               if (vc->cc) {
+               /* destroy your Control_Context here */
+
+               free(vc->cc);
+               }
+       </event>
+</page>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/efl.style.edj.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/efl.style.edj.xml
new file mode 100644 (file)
index 0000000..9e0a3c9
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<defaultStyleEDJs>
+       <!-- Order means priority -->
+       <styleEDJ name="tizen-2.3-wearable-HVGA.edj" />
+       <styleEDJ name="default.edj" />
+</defaultStyleEDJs>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/efl.types.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/efl.types.xml
new file mode 100644 (file)
index 0000000..5cc18bd
--- /dev/null
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<types>
+       <type id="efl@boolean">
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@direction">
+               <constant value="horizontal" displayName="horizontal" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl.progressbar@style">
+               <constant value="default" displayName="default" />
+               <constant value="pending_list" displayName="pending_list" />
+               <constant value="process" displayName="process" />
+               <constant value="process/groupindex" displayName="process/groupindex" />
+       </type>
+
+       <type id="efl.spinner@style">
+               <constant value="default" displayName="default" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl.bg@option">
+               <constant value="center" displayName="center" />
+               <constant value="scale" displayName="scale" />
+               <constant value="stretch" displayName="stretch" />
+               <constant value="tile" displayName="tile" />
+       </type>
+
+       <type id="check-scale">
+               <constant value="fill" displayName="fill" />
+       </type>
+
+       <type id="efl.image@orient">
+               <constant value="none" displayName="none" />
+               <constant value="orient_0" displayName="orient_0" />
+               <constant value="orient_90" displayName="orient_90" />
+               <constant value="rotate_90" displayName="rotate_90" />
+               <constant value="orient_180" displayName="orient_180" />
+               <constant value="rotate_180" displayName="rotate_180" />
+               <constant value="orient_270" displayName="orient_270" />
+               <constant value="rotate_270" displayName="rotate_270" />
+               <constant value="flip_horizontal" displayName="flip_horizontal" />
+               <constant value="flip_vertical" displayName="flip_vertical" />
+               <constant value="flip_transpose" displayName="flip_transpose" />
+               <constant value="flip_transverse" displayName="flip_transverse" />
+       </type>
+
+       <type id="efl.label@wraptype">
+               <constant value="none" displayName="none" />
+               <constant value="char" displayName="char" />
+               <constant value="word" displayName="word" />
+               <constant value="mixed" displayName="mixed" />
+       </type>
+
+       <type id="efl.label@style">
+               <constant value="default" displayName="default" />
+               <constant value="marker" displayName="marker" />
+               <constant value="slide_long" displayName="slide_long" />
+               <constant value="slide_short" displayName="slide_short" />
+               <constant value="slide_bounce" displayName="slide_bounce" />
+       </type>
+
+       <type id="efl@scrollbar_h">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@scrollbar_v">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl.scroller@movementblock">
+               <constant value="no_block" displayName="ELM_SCROLLER_MOVEMENT_NO_BLOCK" />
+               <constant value="block_vertical" displayName="ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL" />
+               <constant value="block_horizontal" displayName="ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL" />
+               <constant value="block_vertical_horizontal" displayName="ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL_HORIZONTAL" />
+       </type>
+
+       <type id="efl.list@multiselectmode">
+               <constant value="default" displayName="default" />
+               <constant value="with_control" displayName="with_control" />
+       </type>
+
+       <type id="efl@selectmode">
+               <constant value="default" displayName="default" />
+               <constant value="always" displayName="always" />
+               <constant value="none" displayName="none" />
+               <constant value="display_only" displayName="display_only" />
+       </type>
+
+       <type id="efl.list@mode">
+               <constant value="compress" displayName="compress" />
+               <constant value="scroll" displayName="scroll" />
+               <constant value="limit" displayName="limit" />
+               <constant value="expand" displayName="expand" />
+       </type>
+
+       <type id="efl.genlist@itemstyle">
+               <constant value="default" displayName="default" />
+               <constant value="groupindex" displayName="groupindex" />
+               <constant value="1text" displayName="1text" />
+               <constant value="1text.1icon" displayName="1text.1icon" />
+               <constant value="2text" displayName="2text" />
+               <constant value="2text.1" displayName="2text.1" />
+               <constant value="1text.1icon.divider" displayName="1text.1icon.divider" />
+               <constant value="1text.1icon.1" displayName="1text.1icon.1" />
+               <constant value="2text.1icon.1" displayName="2text.1icon.1" />
+               <constant value="multiline/1text" displayName="multiline/1text" />
+               <constant value="multiline/2text" displayName="multiline/2text" />
+       </type>
+
+       <type id="efl.genlist@itemtype">
+               <constant value="none" displayName="none" />
+               <constant value="tree" displayName="tree" />
+               <constant value="group" displayName="group" />
+       </type>
+
+       <type id="efl.entry@textformat">
+               <constant value="plain_utf8" displayName="plain_utf8" />
+               <constant value="markup_utf8" displayName="markup_utf8" />
+       </type>
+
+       <type id="efl.datetime@style">
+               <constant value="datepicker_layout" displayName="datepicker_layout" />
+               <constant value="timepicker_layout" displayName="timepicker_layout" />
+       </type>
+
+       <type id="efl.button@style">
+               <constant value="default" displayName="default" />
+               <constant value="green" displayName="green" />
+               <constant value="orange" displayName="orange" />
+               <constant value="red" displayName="red" />
+               <constant value="nextdepth" displayName="nextdepth" />
+       </type>
+
+       <type id="efl.check@style">
+               <constant value="default" displayName="default" />
+               <constant value="on&amp;off" displayName="on&amp;off" />
+       </type>
+
+       <type id="efl.slider@style">
+               <constant value="horizontal/default" displayName="default" />
+       </type>
+
+       <type id="efl.index@style">
+               <constant value="thumbnail" displayName="thumbnail" />
+               <constant value="tab" displayName="tab" />
+       </type>
+
+       <type id="efl.popup@style">
+               <constant value="default" displayName="default" />
+               <constant value="toast" displayName="toast" />
+       </type>
+
+       <type id="efl.icon@standardicon">
+               <constant value="" displayName="(None)" />
+               <constant value="apps" displayName="apps" />
+               <constant value="arrow_down" displayName="arrow_down" />
+               <constant value="arrow_left" displayName="arrow_left" />
+               <constant value="arrow_right" displayName="arrow_right" />
+               <constant value="arrow_up" displayName="arrow_up" />
+               <constant value="chat" displayName="chat" />
+               <constant value="clock" displayName="clock" />
+               <constant value="close" displayName="close" />
+               <constant value="delete" displayName="delete" />
+               <constant value="edit" displayName="edit" />
+               <constant value="file" displayName="file" />
+               <constant value="home" displayName="home" />
+               <constant value="media_player/forward" displayName="media_player/forward" />
+               <constant value="media_player/info" displayName="media_player/info" />
+               <constant value="media_player/next" displayName="media_player/next" />
+               <constant value="media_player/pause" displayName="media_player/pause" />
+               <constant value="media_player/play" displayName="media_player/play" />
+               <constant value="media_player/prev" displayName="media_player/prev" />
+               <constant value="media_player/rewind" displayName="media_player/rewind" />
+               <constant value="media_player/stop" displayName="media_player/stop" />
+               <constant value="menu/apps" displayName="menu/apps" />
+               <constant value="menu/arrow_up" displayName="menu/arrow_up" />
+               <constant value="menu/arrow_down" displayName="menu/arrow_down" />
+               <constant value="menu/arrow_left" displayName="menu/arrow_left" />
+               <constant value="menu/arrow_right" displayName="menu/arrow_right" />
+               <constant value="menu/chat" displayName="menu/chat" />
+               <constant value="menu/clock" displayName="menu/clock" />
+               <constant value="menu/close" displayName="menu/close" />
+               <constant value="menu/delete" displayName="menu/delete" />
+               <constant value="menu/edit" displayName="menu/edit" />
+               <constant value="menu/folder" displayName="menu/folder" />
+               <constant value="menu/file" displayName="menu/file" />
+               <constant value="menu/home" displayName="menu/home" />
+               <constant value="menu/refresh" displayName="menu/refresh" />
+               <constant value="no_photo" displayName="no_photo" />
+               <constant value="photo/no_photo" displayName="photo/no_photo" />
+               <constant value="refresh" displayName="refresh" />
+       </type>
+</types>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/tizen-native-ui-fw.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/tizen-native-ui-fw.xml
new file mode 100644 (file)
index 0000000..fa80c53
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE descriptors [
+       <!ENTITY tizen.uicomponent.categories SYSTEM "tizen.uicomponent.categories.xml">
+
+       <!-- default style edj -->
+       <!ENTITY efl.style.edj SYSTEM "efl.style.edj.xml">
+       
+       <!-- type & event type -->
+       <!ENTITY efl.types SYSTEM "efl.types.xml">
+       <!ENTITY tizen.eventtypes SYSTEM "tizen.eventtypes.xml">
+
+       <!-- VIEW -->
+       <!ENTITY tizen.view SYSTEM "widget/tizen.view.xml">
+       <!ENTITY tizen.empty.view SYSTEM "widget/tizen.empty.view.xml">
+
+       <!-- WIDGET -->
+       <!ENTITY efl.bg SYSTEM "widget/efl.bg.widget.xml">
+       <!ENTITY efl.button SYSTEM "widget/efl.button.widget.xml">
+       <!ENTITY efl.check SYSTEM "widget/efl.check.widget.xml">
+       <!ENTITY efl.datetime SYSTEM "widget/efl.datetime.widget.xml"> 
+       <!ENTITY efl.entry SYSTEM "widget/efl.entry.widget.xml">
+       <!ENTITY efl.image SYSTEM "widget/efl.image.widget.xml">
+       <!ENTITY efl.label SYSTEM "widget/efl.label.widget.xml">
+       <!ENTITY efl.radio SYSTEM "widget/efl.radio.widget.xml">
+       <!ENTITY efl.spinner SYSTEM "widget/efl.spinner.widget.xml">
+       <!ENTITY efl.slider SYSTEM "widget/efl.slider.widget.xml">
+       <!ENTITY efl.progressbar SYSTEM "widget/efl.progressbar.widget.xml">
+       <!ENTITY efl.list SYSTEM "widget/efl.list.widget.xml">
+       <!ENTITY efl.listitem SYSTEM "widget/efl.listitem.widget.xml">
+       <!ENTITY efl.scroller SYSTEM "widget/efl.scroller.widget.xml">
+       <!ENTITY efl.genlist SYSTEM "widget/efl.genlist.widget.xml">
+       <!ENTITY efl.genlistitem SYSTEM "widget/efl.genlistitem.widget.xml">
+       <!ENTITY efl.layout SYSTEM "widget/efl.layout.widget.xml">
+       <!ENTITY efl.index SYSTEM "widget/efl.index.widget.xml">
+       <!ENTITY efl.indexitem SYSTEM "widget/efl.indexitem.widget.xml">
+       <!ENTITY efl.ctxpopup SYSTEM "widget/efl.ctxpopup.widget.xml">
+       <!ENTITY efl.ctxpopupitem SYSTEM "widget/efl.ctxpopupitem.widget.xml">
+       <!ENTITY efl.popup SYSTEM "widget/efl.popup.widget.xml">
+
+       <!-- WIDGET : Container -->
+       <!ENTITY efl.grid SYSTEM "widget/efl.grid.widget.xml">
+       <!ENTITY efl.table SYSTEM "widget/efl.table.widget.xml">
+       <!ENTITY efl.box SYSTEM "widget/efl.box.widget.xml">
+       <!-- End of list -->
+]>
+
+<tizenFile>
+       <fileInfo>
+               <type>tizen-descriptor</type>
+               <version>2</version>
+               <desc>Tizen Native UI Builder Descriptor</desc>
+       </fileInfo>
+
+       <descriptors xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tizen="http://www.tizen.org/2012/uibuilder/descriptor">
+
+               <renderer id="EFL" />
+
+               <doc id="tizen.doc">
+                       <relations>
+                               <content ids="tizen.page" />
+                       </relations>
+               </doc>
+  
+       &tizen.uicomponent.categories;
+
+               <!-- default style edj -->
+       &efl.style.edj;
+
+               <!-- type & event type -->
+       &tizen.eventtypes;
+       &efl.types;
+
+               <!-- view -->
+       &tizen.view;
+
+       &efl.bg;
+       &efl.button;
+       &efl.check;
+       &efl.datetime; 
+       &efl.entry;
+       &efl.image;
+       &efl.label;
+       &efl.radio;
+       &efl.spinner;
+       &efl.slider;
+       &efl.progressbar;
+       &efl.list;
+       &efl.listitem;
+       &efl.genlist;
+       &efl.genlistitem;
+       &efl.scroller;
+       &efl.layout;
+       &efl.index;
+       &efl.indexitem;  
+       &efl.grid;
+       &efl.table;
+       &efl.box;
+
+       </descriptors>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/tizen.eventtypes.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/tizen.eventtypes.xml
new file mode 100644 (file)
index 0000000..dea9f2c
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<eventTypes>
+       <eventType id="event.eflevent">
+               <defaultCode>%page%_%object%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+
+       <eventType id="event.viewevent">
+               <defaultCode>%page%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+</eventTypes>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/tizen.uicomponent.categories.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/tizen.uicomponent.categories.xml
new file mode 100644 (file)
index 0000000..d86fdb4
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<UIComponentCategories>
+       <UIComponentCategory name="Views" />
+       <UIComponentCategory name="UI containers" />
+       <UIComponentCategory name="UI components" />
+</UIComponentCategories>
+
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.bg.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.bg.widget.xml
new file mode 100644 (file)
index 0000000..adc10b3
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="bg" displayName="Background" smallIcon="widget/32/pal_bg_nor.png" icon.16="widget/16/view_p_bg_nor.png" category="UI components"
+       description="Background object, used for setting a solid color, image or Edje group as a background to a window or any container object" helpCategory=""
+       helpContents="" feedbackWidth="200" feedbackHeight="200" minWidth="1" minHeight="1" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="color" type="color" displayName="Color" default="#ffffff" category="General" tooltip="sets the color on a given background UI Component." />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="sets the file path of the image" />
+       <property name="option" type="efl.bg@option" displayName="Option" default="scale" category="General"
+               tooltip="set the way how a background UI Component is to display its image.&#10;
+- center: Center the background image.&#10;
+- scale: Scale the background image, retaining the aspect ratio.&#10;
+- stretch: Stretch the background image to fill the UI Component's area.&#10;
+- tile: Tile background image at its original size.&#10;" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.box.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.box.widget.xml
new file mode 100644 (file)
index 0000000..47bf9ec
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="box" displayName="Box" smallIcon="widget/32/pal_box_nor.png" icon.16="widget/16/view_p_box_nor.png" category="UI containers"
+       description="A box arranges objects in a linear fashion, governed by a layout function that defines the details of this arrangement." layoutType="box"
+       helpCategory="" helpContents="" feedbackWidth="200" feedbackHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the horizontal orientation." />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="sets the box to arrange its children homogeneously." />
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="sets the horizontal space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="150" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="sets the vertical space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="250" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.button.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.button.widget.xml
new file mode 100644 (file)
index 0000000..76187c1
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="button" displayName="Button" smallIcon="widget/32/pal_button_nor.png" icon.16="widget/16/view_p_button_nor.png" category="UI components"
+       description="This is a push-button. Press it and run some function. It can contain a simple label and icon object and it also has an autorepeat feature"
+       helpCategory="" helpContents="button" feedbackWidth="130" feedbackHeight="100" minWidth="80" minHeight="80" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Button" category="General" tooltip="sets the text of the UI Component.">
+       </property>
+       <property name="style" type="efl.button@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component.">
+               <condition name="disable-property" value="nextdepth" target="text" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="repeated" displayName="repeated" eventType="event.eflevent" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent" />
+       <event name="unpressed" displayName="unpressed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.check.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.check.widget.xml
new file mode 100644 (file)
index 0000000..935ed51
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="check" displayName="Check" smallIcon="widget/32/pal_check_nor.png" icon.16="widget/16/view_p_check_nor.png" category="UI components"
+       description="The check UI Component allows for toggling a value between true and false" helpCategory="" helpContents="" feedbackWidth="60" feedbackHeight="60"
+       minWidth="50" minHeight="50" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="state" type="efl@boolean" displayName="State" default="false" category="General" tooltip="sets the on/off state of the check UI Component." />
+       <property name="style" type="efl.check@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component."/>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.ctxpopup.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.ctxpopup.widget.xml
new file mode 100644 (file)
index 0000000..46b51bc
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopup" displayName="Ctxpopup" smallIcon="widget/32/pal_list_nor.png" icon.16="widget/16/view_p_ctxp_nor.png" category="UI containers"
+       description="Ctxpopup(Context popup)s are used to provide options for the currently selected objects. Ctxpopup is composed of popup and a list of items inside popup." helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false"
+       uiSelector="#%id%" paletteVisible="false" xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="ctxpopupitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the direction orientation." />
+       <!-- <property name="style" type="efl.ctxpopup@style" displayName="Style" default="default" category="General" tooltip="sets the style of the widget."> <condition 
+               name="enable-property" value="default" target="disable"/> </property> -->
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="dismissed" displayName="dismissed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.ctxpopupitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.ctxpopupitem.widget.xml
new file mode 100644 (file)
index 0000000..dc6db61
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopupitem" displayName="CtxPopupItem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI containers" description=""
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="ctxpopup">
+
+       <relations>
+               <parent ids="ctxpopup" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="CtxPopupItem" category="General" tooltip="The text of the list item" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.datetime.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.datetime.widget.xml
new file mode 100644 (file)
index 0000000..5870f71
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="datetime" displayName="Datetime" smallIcon="widget/32/pal_date_nor.png" icon.16="widget/16/view_p_date_nor.png" category="UI components"
+       description="Datetime UI Component is used to display and input date time values" helpCategory="" helpContents="" feedbackWidth="320" feedbackHeight="260"
+       minWidth="280" minHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.datetime@style" displayName="Style" default="datepicker_layout" category="General" tooltip="sets the style of the UI Component." />
+
+       <!-- <property name="format" type="string" displayName="Format" default="%b %d %Y %I : %M %p" tooltip="Sets the datetime format. Format is a combination of allowed 
+               LIBC date format specifiers like: &quot;%b %d, %Y %I : %M %p&quot;."/> -->
+       <!-- %Y : The year as a decimal number including the century.&#xA; %m : The month as a decimal number (range 01 to 12).&#xA; %b : The abbreviated month name according 
+               to the current locale.&#xA; %B : The full month name according to the current locale.&#xA; %h : The abbreviated month name according to the current locale(same as 
+               %b).&#xA; %d : The day of the month as a decimal number (range 01 to 31).&#xA; %e : The day of the month as a decimal number (range 1 to 31). Single digits are preceded 
+               by a blank.&#xA; %I : The hour as a decimal number using a 12-hour clock (range 01 to 12).&#xA; %H : The hour as a decimal number using a 24-hour clock (range 00 
+               to 23).&#xA; %k : The hour (24-hour clock) as a decimal number (range 0 to 23). Single digits are preceded by a blank.&#xA; %l : The hour (12-hour clock) as a decimal 
+               number (range 1 to 12). Single digits are preceded by a blank.&#xA; %M : The minute as a decimal number (range 00 to 59).&#xA; %p : Either 'AM' or 'PM' according 
+               to the given time value, or the corresponding strings for the current locale. Noon is treated as 'PM' and midnight as 'AM'.&#xA; %P : Like p, but in lower case: 
+               'am' or 'pm' or a corresponding string for the current locale.&#xA; %c : The preferred date and time representation for the current locale.&#xA; %x : The preferred 
+               date representation for the current locale without the time.&#xA; %X : The preferred time representation for the current locale without the date.&#xA; %r : The complete 
+               calendar time using the AM/PM format of the current locale.&#xA; %R : The hour and minute in decimal numbers using the format H:M.&#xA; %T : The time of the day 
+               in decimal numbers using the format H:M:S.&#xA; %F : The date using the format %Y-%m-%d." -->
+
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.entry.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.entry.widget.xml
new file mode 100644 (file)
index 0000000..46d3c5f
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="entry" displayName="Entry" smallIcon="widget/32/pal_entry_nor.png" icon.16="widget/16/view_p_entry_nor.png" category="UI components"
+       description="An entry is a convenience UI Component which shows a box that the user can enter text into" helpCategory="" helpContents="" feedbackWidth="150"
+       feedbackHeight="100" minWidth="50" minHeight="50" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Entry" category="General" tooltip="Convenient macro for elm_object_part_text_set." />
+       <property name="single_line" type="efl@boolean" displayName="Single line" default="false" category="General" tooltip="Sets the entry to the single line mode." />
+       <property name="password" type="efl@boolean" displayName="Password" default="false" category="General" tooltip="Sets the entry to the password mode.">
+               <condition name="enable-property" value="false" target="single_line" />
+               <condition name="enable-property" value="false" target="editable" />
+       </property>
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General" tooltip="Sets whether the entry is editable." />
+       <property name="scroll" type="efl@boolean" displayName="Scrollable" default="false" category="General" tooltip="Enables or disables scrolling in the entry." />
+
+       <property name="src" type="text-resource" displayName="File path" default="" category="General"
+               tooltip="Sets the file (and implicitly loads it) for the text to display and then allow edit. All changes are written back to the file after a short delay if the entry object is set to autosave (which is the default).">
+               <condition name="disable-property" value="" target="autosave" />
+               <condition name="disable-property" value="" target="text-format" />
+       </property>
+       <property name="file_text_format" type="efl.entry@textformat" displayName="Text Format" default="plain_utf8" category="General"
+               tooltip="Enumeration that defines the text format types.&#xD;
+       plain_utf8 : Plain UTF8 type&#xD;
+       markup_utf8 : Markup UTF8 type" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="changed,user" displayName="changed,user" eventType="event.eflevent" />
+       <event name="aborted" displayName="aborted" eventType="event.eflevent" />
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="press" displayName="press" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="clicked,triple" displayName="clicked,triple" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="selection,changed" displayName="selection,changed" eventType="event.eflevent" />
+       <event name="selection,cleared" displayName="selection,cleared" eventType="event.eflevent" />
+       <event name="selection,copy" displayName="selection,copy" eventType="event.eflevent" />
+       <event name="selection,cut" displayName="selection,cut" eventType="event.eflevent" />
+       <event name="selection,paste" displayName="selection,paste" eventType="event.eflevent" />
+       <event name="selection,start" displayName="selection,start" eventType="event.eflevent" />
+       <event name="cursor,changed" displayName="cursor,changed" eventType="event.eflevent" />
+       <event name="anchor,clicked" displayName="anchor,clicked" eventType="event.eflevent" />
+       <event name="anchor,down" displayName="anchor,down" eventType="event.eflevent" />
+       <event name="anchor,in" displayName="anchor,in" eventType="event.eflevent" />
+       <event name="anchor,out" displayName="anchor,out" eventType="event.eflevent" />
+       <event name="anchor,up" displayName="anchor,up" eventType="event.eflevent" />
+       <event name="preedit,changed" displayName="preedit,changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.genlist.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.genlist.widget.xml
new file mode 100644 (file)
index 0000000..a0cf26f
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlist" displayName="Genlist" smallIcon="widget/32/pal_genlist_nor.png" icon.16="widget/16/view_p_genlist_nor.png" category="UI components"
+       description="This UI Component aims to have more expansive list than the simple list in Elementary that could have more flexible items and allow many more entries while still being fast and low on memory usage. At the same time it was also made to be able to do tree structures. But the price to pay is more complexity when it comes to usage. If all you want is a simple list with icons and a single text, use the normal List object"
+       helpCategory="" helpContents="" feedbackWidth="320" feedbackHeight="320" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add genlist item" unusedEditors="source_tab" />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="enable/disable homogeneous mode&#10; If true ,
+               this will enable the homogeneous mode where items are of the same
+               height and width so that genlist may do the lazy-loading at its
+               maximum ( which increases the performance for scrolling the list )&#10;
+               In the normal mode , genlist will pre-calculate all the items ' sizes
+               even though they are not in use. So items ' callbacks are called many
+               times than expected. But homogeneous mode will skip the item size
+               pre-calculation process so items ' callbacks are called only when the
+               item is needed." />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General"
+               tooltip="set the genlist select mode.&#10;
+- default: Once an item is selected, it would stay highlighted and not going to call selected callback again even it was clicked. Items can get focus.&#10;
+- always: Item selected callbacks will be called every time for click events, even after the item was already selected. Items can get focus.&#10;
+- none: Items will never be highlighted and selected but the size will be adjusted by the finger size configuration. Items can't get focus.&#10;
+- display_only: Items will never be highlighted and selected and ignore the finger size. So the item size can be reduced below than the finger size configuration. Items can't get focus." />
+
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent" />
+       <event name="released" displayName="released" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent" />
+       <event name="contracted" displayName="contracted" eventType="event.eflevent" />
+       <event name="expand,request" displayName="expand,request" eventType="event.eflevent" />
+       <event name="contract,request" displayName="contract,request" eventType="event.eflevent" />
+       <event name="realized" displayName="realized" eventType="event.eflevent" />
+       <event name="unrealized" displayName="unrealized" eventType="event.eflevent" />
+       <event name="drag,start,up" displayName="drag,start,up" eventType="event.eflevent" />
+       <event name="drag,start,down" displayName="drag,start,down" eventType="event.eflevent" />
+       <event name="drag,start,left" displayName="drag,start,left" eventType="event.eflevent" />
+       <event name="drag,start,right" displayName="drag,start,right" eventType="event.eflevent" />
+       <event name="drag,stop" displayName="drag,stop" eventType="event.eflevent" />
+       <event name="drag" displayName="drag" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="multi,swipe,left" displayName="multi,swipe,left" eventType="event.eflevent" />
+       <event name="multi,swipe,right" displayName="multi,swipe,right" eventType="event.eflevent" />
+       <event name="multi,swipe,up" displayName="multi,swipe,up" eventType="event.eflevent" />
+       <event name="multi,swipe,down" displayName="multi,swipe,down" eventType="event.eflevent" />
+       <event name="multi,pinch,out" displayName="multi,pinch,out" eventType="event.eflevent" />
+       <event name="multi,pinch,in" displayName="multi,pinch,in" eventType="event.eflevent" />
+       <event name="swipe" displayName="swipe" eventType="event.eflevent" />
+       <event name="moved" displayName="moved" eventType="event.eflevent" />
+       <event name="moved,after" displayName="moved,after" eventType="event.eflevent" />
+       <event name="moved,before" displayName="moved,before" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="tree,effect,finished" displayName="tree,effect,finished" eventType="event.eflevent" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.genlistitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.genlistitem.widget.xml
new file mode 100644 (file)
index 0000000..85cdb94
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlistitem" displayName="Genlistitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="genlist">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.genlist@itemstyle" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="sets the text of item" />
+       <property name="sub_text" type="rm_string" displayName="Sub Text" default="Sub Text" category="General" tooltip="sets the text of item" />
+       <!-- <property name="item_type" type="efl.genlist@itemtype" displayName="Item type" default="none" category="General"
+               tooltip="sets the type of item&#10;
+- none: simple item&#10;
+- tree: this may be expanded and have child items.&#10;
+- group: an index item of a group of items. This item can have child items.">
+               <condition name="enable-property" value="1" target="item-add" />
+       </property>  -->
+
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="sets the selected state of the UI Component." />
+
+       <!-- <property name="standard-icon" type="efl.icon@standardicon" displayName="Standard icon" default="" category="Icon" tooltip="sets the standard icon to be shown 
+               in the list item before label text&#10;"/> -->
+       <property name="image_path" type="image" displayName="Image path" default="" category="Icon"
+               tooltip="sets the file path of the image to be shown in the list item before label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <property name="end_standard_icon" type="efl.icon@standardicon" displayName="Standard icon" default="" category="End Icon"
+               tooltip="sets the standard icon to be shown in the list item after label text&#10;" />
+       <property name="end_image_path" type="image" displayName="Image path" default="" category="End Icon"
+               tooltip="sets the file path of the image to be shown in the list item after label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.grid.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.grid.widget.xml
new file mode 100644 (file)
index 0000000..d4b6560
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="grid" displayName="Grid" smallIcon="widget/32/pal_grid_nor.png" icon.16="widget/16/view_p_grid_nor.png" category="UI containers"
+       description="The grid is a grid layout UI Component that lays out a series of children as a fixed 'grid' of UI Components using a given percentage of the grid width and height each using the child object."
+       layoutType="grid" helpCategory="" helpContents="" feedbackWidth="300" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="vsize_w" type="integer" displayName="Col count" default="1000" category="General" tooltip="sets the virtual width of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+       <property name="vsize_h" type="integer" displayName="Row count" default="1000" category="General" tooltip="sets the virtual height of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack_x" type="integer" displayName="Left" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_w" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_y" type="integer" displayName="Top" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_h" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_w" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_x" targetValue="vsize_w" error="size-max" />
+               </property>
+               <property name="pack_h" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_y" targetValue="vsize_h" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.image.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.image.widget.xml
new file mode 100644 (file)
index 0000000..2ef465f
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="image" displayName="Image" smallIcon="widget/32/pal_image_nor.png" icon.16="widget/16/view_p_image_nor.png" category="UI components"
+       description="An Elementary image object is a direct realization of The Elementary Image Class, and it allows one to load and display an image file on it, be it from a disk file or from a memory region"
+       helpCategory="" helpContents="" feedbackWidth="100" feedbackHeight="100" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="Sets the file that is used as the image's source." />
+       <property name="no_scale" type="efl@boolean" displayName="No scale" default="false" category="General" tooltip="Disables scaling of this object." />
+       <property name="resizable_up" type="efl@boolean" displayName="Resizable(up)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable up" />
+       <property name="resizable_down" type="efl@boolean" displayName="Resizable(down)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable down" />
+       <!--<property name="orient" type="efl.image@orient" displayName="Orient" default="none" category="General" tooltip="Sets the image orientation.&#xD;&#xD; none&#xD; 
+               : No orientation change&#xD; orient_0&#xD; : No orientation change&#xD; rotate_90&#xD; : Rotate 90 degrees clockwise&#xD; rotate_180&#xD; : Rotate 180 degrees clockwise&#xD; 
+               rotate_270&#xD; : Rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise)&#xD; flip_horizontal&#xD; : Flip image horizontally&#xD; flip_vertical&#xD; : 
+               Flip image vertically&#xD; flip_transpose&#xD; : Flip the image along the y = (width - x) line (bottom-left to top-right)&#xD; flip_transverse&#xD; : Flip the image 
+               along the y = x line (top-left to bottom-right)" /> -->
+       <property name="aspect_fixed" type="efl@boolean" displayName="Aspect fixed" default="false" category="General"
+               tooltip="Set whether the original aspect ratio of the image should be kept on resize." />
+       <property name="fill_outside" type="efl@boolean" displayName="Fill outsize" default="false" category="General"
+               tooltip="Sets whether the image fills the entire object area, when keeping the aspect ratio." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+       <event name="drop" displayName="drop" eventType="event.eflevent" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.index.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.index.widget.xml
new file mode 100644 (file)
index 0000000..0e7858a
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="index" displayName="Index" smallIcon="widget/32/pal_index_nor.png" icon.16="widget/16/view_p_index_nor.png" category="UI components"
+       description="An index UI Component gives you an index for fast access to whichever group of other UI items one might have" helpCategory="" helpContents=""
+       feedbackWidth="80" feedbackHeight="320" minWidth="80" minHeight="50" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="indexitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.index@style" displayName="Style" default="thumbnail" category="General" tooltip="sets the style of the UI Component." />
+       <property name="autohide" type="efl@boolean" displayName="Autohide enabled" default="false" category="General"
+               tooltip="Enables or disables the auto hiding feature for a given index UI Component." unusedEditors="properties" />
+       <property name="indicator" type="efl@boolean" displayName="Indicator enabled" default="true" category="General" tooltip="Sets the indicator to be enabled."
+               unusedEditors="properties" />
+       <property name="direction" type="efl@direction" displayName="Direction" default="horizontal" category="General" tooltip="sets the horizontal orientation." unusedEditors="properties" />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="Appends a new item on a given index UI Component."
+               unusedEditors="source_tab" />
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="level,up" displayName="level,up" eventType="event.eflevent" />
+       <event name="level,down" displayName="level,down" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.indexitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.indexitem.widget.xml
new file mode 100644 (file)
index 0000000..3267fd1
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="indexitem" displayName="Indexitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="IndexItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="index">
+
+       <relations>
+               <parent ids="index" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <!-- <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="The letter under which the item should be indexed" /> -->
+
+       <!-- <event name="itemselected" displayName="itemselected" eventType="event.eflevent" /> -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.label.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.label.widget.xml
new file mode 100644 (file)
index 0000000..3e902c6
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="label" displayName="Label" smallIcon="widget/32/pal_label_nor.png" icon.16="widget/16/view_p_label_nor.png" category="UI components"
+       description="UI Component to display text, with simple html-like markup" helpCategory="" helpContents="" feedbackWidth="100" feedbackHeight="30" minWidth="50"
+       minHeight="30" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="Label" category="General" tooltip="sets the text of the UI Component." />
+       <!-- <property name="style" type="efl.label@style" displayName="Style" default="default" category="General" tooltip="Sets the style to be used by the label.&#10; 
+               if the text doesn't fit the geometry of the label, it is ellipsized or cut. Elementary provides several styles for this UI Component.&#10; - default: No animation.&#10; 
+               - marker: Centers the text in the label and makes it bold by default.&#10; - slide_long: The entire text appears from the right of the screen and slides until it 
+               disappears in the left of the screen(reappearing on the right again).&#10; - slide_short: The text appears in the left of the label and slides to the right to show 
+               the overflow. When all of the text has been shown the position is reset.&#10; - slide_bounce: The text appears in the left of the label and slides to the right to 
+               show the overflow. When all of the text has been shown the animation reverses, moving the text to the left."/> -->
+       <property name="line_wrap" type="efl.label@wraptype" displayName="Wrap type" default="none" category="General"
+               tooltip="sets the wrapping behavior of the label.&#10;
+- none: No wrapping.&#10;
+- char: Wrap between characters.&#10;
+- word: Wrap between words.&#10;
+- mixed: Word wrap, and if that fails, char wrap." />
+       <property name="wrap_width" type="integer" displayName="Wrap width" default="0" category="General" tooltip="sets the maximum width size hint of the label." />
+       <property name="ellipsis" type="efl@boolean" displayName="Ellipsis" default="true" category="General" tooltip="sets the ellipsis behavior of the label." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="slide,end" displayName="slide,end" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.layout.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.layout.widget.xml
new file mode 100644 (file)
index 0000000..27b65c2
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="layout" displayName="Layout" smallIcon="widget/32/pal_layout_nor.png" icon.16="widget/16/view_p_layout_nor.png" category="UI components"
+       description="This is a container UI Component that takes a standard Edje design file and wraps it very thinly in a UI Component" helpCategory="" helpContents=""
+       feedbackWidth="150" feedbackHeight="150" minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="src" type="layout-resource" displayName="File path" default="" category="General" tooltip="The path to the file (edj) that is used as a layout" />
+       <property name="group" type="dynamic-combo" displayName="Group name" default="" category="General" tooltip="The group that the layout belongs to in the edje file" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="theme,changed" displayName="theme,changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.list.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.list.widget.xml
new file mode 100644 (file)
index 0000000..7945ee7
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="list" displayName="List" smallIcon="widget/32/pal_list_nor.png" icon.16="widget/16/view_p_list_nor.png" category="UI components"
+       description="A list UI Component is a container whose children are displayed vertically or horizontally, in order, and can be selected. The list can accept only one or multiple item selections. Also has many modes of items displaying."
+       helpCategory="" helpContents="" feedbackWidth="320" feedbackHeight="320" minWidth="50" minHeight="110" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="listitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="mode" type="efl.list@mode" displayName="Mode" default="scroll" category="General" tooltip="Sets which mode to use for the list object." />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General" tooltip="Sets the list select mode." />
+       <property name="multi_select" type="efl@boolean" displayName="Multi select" default="false" category="General"
+               tooltip="Enables or disables multiple items selection on the list object.">
+               <condition name="enable-property" value="true" target="multi_select_mode" />
+       </property>
+       <!-- <property name="multi-select-mode" type="efl.list@multiselectmode" displayName="Multi select mode" default=""/> -->
+
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.listitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.listitem.widget.xml
new file mode 100644 (file)
index 0000000..3b68af2
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="listitem" displayName="Listitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="list">
+
+       <relations>
+               <parent ids="list" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="The text of the list item" />
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.map.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.map.widget.xml
new file mode 100644 (file)
index 0000000..2b435bf
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="map" displayName="Map" smallIcon="widget/32/pal_map_nor.png" icon.16="widget/16/view_p_map_nor.png" category="UI components"
+       description="This is a widget specifically for displaying a map" helpCategory="" helpContents="" feedbackWidth="300" feedbackHeight="300" minWidth="100"
+       minHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="zoom_level" type="scale-integer" displayName="Zoom level" default="15" category="General" tooltip="Sets the zoom level of the map">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="20" error="integer-max" />
+       </property>
+
+       <property name="longitude" type="double" displayName="longitude" default="0" category="General" tooltip="The longitude to show at the center">
+               <condition name="integer-min" value="-180" error="integer-min" />
+               <condition name="integer-max" value="180" error="integer-max" />
+       </property>
+       <property name="latitude" type="double" displayName="latitude" default="0" category="General" tooltip="The latitude to show at the center">
+               <condition name="integer-min" value="-90" error="integer-min" />
+               <condition name="integer-max" value="90" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="press" displayName="press" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+       <event name="loaded" displayName="loaded" eventType="event.eflevent" />
+       <event name="zoom,start" displayName="zoom,start" eventType="event.eflevent" />
+       <event name="zoom,stop" displayName="zoom,stop" eventType="event.eflevent" />
+       <event name="zoom,change" displayName="zoom,change" eventType="event.eflevent" />
+       <event name="tile,load" displayName="tile,load" eventType="event.eflevent" />
+       <event name="tile,loaded" displayName="tile,loaded" eventType="event.eflevent" />
+       <event name="route,load" displayName="route,load" eventType="event.eflevent" />
+       <event name="route,loaded" displayName="route,loaded" eventType="event.eflevent" />
+       <event name="name,load" displayName="name,load" eventType="event.eflevent" />
+       <event name="name,loaded" displayName="name,loaded" eventType="event.eflevent" />
+       <event name="overlay,clicked" displayName="overlay,clicked" eventType="event.eflevent" />
+       <event name="tile,loaded,fail" displayName="tile,loaded,fail" eventType="event.eflevent" />
+       <event name="route,loaded,fail" displayName="route,loaded,fail" eventType="event.eflevent" />
+       <event name="name,loaded,fail" displayName="name,loaded,fail" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.popup.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.popup.widget.xml
new file mode 100644 (file)
index 0000000..c8e7355
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="popup" displayName="Popup" smallIcon="" icon.16="widget/16/view_p_popup_nor.png" category="UI containers" description="Popups are temporarily displayed on the screenb to provide information or to ask for user confirmation. Popup allows users to take instant action for events. Popup is an enhancement of Notify components and is composed of three areas: Title, Content and Action with up to 3 buttons(optional)." layoutType="Popup"
+       helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%"
+       paletteVisible="false" xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+
+       <property name="title" type="string" displayName="Title" default="Title" category="General" tooltip="The title text of the popup widget">
+       </property>
+       <property name="style" type="efl.popup@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="height" type="scale-integer" displayName="Height" default="200" category="General"
+               tooltip="sets the x of left upper corner of the widget.&#10;
+But this depends on the container of the widget.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="400" error="integer-max" />
+       </property>
+       <property name="timeout" type="double" displayName="Timeout" default="0" category="General" tooltip="Sets a timeout to hide popup automatically">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="timeout" displayName="timeout" eventType="event.eflevent" />
+       <event name="block,clicked" displayName="block,clicked" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.progressbar.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.progressbar.widget.xml
new file mode 100644 (file)
index 0000000..fe3e5d8
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="progressbar" displayName="Progressbar" smallIcon="widget/32/pal_progress_nor.png" icon.16="widget/16/view_p_progress_nor.png" category="UI components"
+       description="The progress bar is a UI Component for visually representing the progress status of a given job/task" helpCategory="" helpContents=""
+       feedbackWidth="150" feedbackHeight="30" minWidth="50" minHeight="25" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.progressbar@style" displayName="Style" default="default" category="General"
+               tooltip="Sets the style to be used by a given UI Component.">
+               <condition name="enable-property" value="default" target="span_size" />
+       </property>
+
+       <property name="value" type="double" displayName="Value" default="0" category="General"
+               tooltip="Sets the progress value (in percentage) on a given progress bar UI Component. The progress value must be between 0.0 and 1.0">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="span_size" type="integer" displayName="Span Size" default="0" category="General" tooltip="The length of the progress bar's bar region">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General"
+               tooltip="Inverts a given progress bar UI Component's displaying values order." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.radio.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.radio.widget.xml
new file mode 100644 (file)
index 0000000..aa40eea
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="radio" displayName="Radio" smallIcon="widget/32/pal_radio_nor.png" icon.16="widget/16/view_p_radio_nor.png" category="UI components"
+       description="Radio is a UI Component that allows for 1 or more options to be displayed and have the user choose only 1 of them" helpCategory="" helpContents=""
+       feedbackWidth="60" feedbackHeight="60" minWidth="40" minHeight="40" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="value" type="integer" displayName="Value" default="0" category="General"
+               tooltip="sets the value of the radio group.&#10;
+The radio group is initialized with this value. The value should be one of the radio buttons' state values in the group to be properly initialized." />
+       <property name="state_value" type="integer" displayName="State value" default="0" category="General" tooltip="sets the integer value that this radio object represents." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.scroller.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.scroller.widget.xml
new file mode 100644 (file)
index 0000000..dfeee6b
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="scroller" displayName="Scroller" smallIcon="widget/32/pal_scroller_nor.png" icon.16="widget/16/view_p_scroller_nor.png" category="UI containers"
+       description="A scroller holds (and clips) a single object and scrolls it around. This means that it allows the user to use a scroll bar (or a finger) to drag the viewable region around, moving through a much larger object that is contained in the scroller. The scroller will always have a small minimum size by default as it won't be limited by the contents of the scroller"
+       layoutType="box" helpCategory="" helpContents="" feedbackWidth="200" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General"
+               tooltip="sets the horizontal scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General"
+               tooltip="sets the vertical scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="content_min_w" type="efl@boolean" displayName="Min limit(Width)" default="false" category="General"
+               tooltip="Make the scroller minimum width size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+       <property name="content_min_h" type="efl@boolean" displayName="Min limit(Height)" default="false" category="General"
+               tooltip="Make the scroller minimum heigth size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+
+       <property name="propagate_events" type="efl@boolean" displayName="Propagate events" default="true" category="General"
+               tooltip="sets event propagation on a scroller.&#10;
+This enables or disables event propagation from the scroller content to the scroller and its parent. By default event propagation is enabled" />
+       <!-- <property name="gravity-x" type="double" displayName="Gravity(Horizontal)" default="0"> <condition name="integer-min" value="0" error="integer-min"/> <condition 
+               name="integer-max" value="1" error="integer-max"/> </property> <property name="gravity-y" type="double" displayName="Gravity(Vertical)" default="0"> <condition name="integer-min" 
+               value="0" error="integer-min"/> <condition name="integer-max" value="1" error="integer-max"/> </property> <property name="movement-block" type="efl.scroller@movementblock" 
+               displayName="Movement block" default="no_block"/> <property name="page-size-h" type="integer" displayName="Page size(Horizontal)" default="0"> <condition name="enable-property" 
+               value="true" target="page-h-snap"/> <condition name="enable-property" value="true" target="h-pagerel"/> <condition name="enable-property" value="true" target="page-limit-h"/> 
+               </property> <property name="page-size-v" type="integer" displayName="Page size(Vertical)" default="0"> <condition name="enable-property" value="true" target="page-v-snap"/> 
+               <condition name="enable-property" value="true" target="v-pagerel"/> <condition name="enable-property" value="true" target="page-limit-v"/> </property> <property 
+               name="page-h-snap" type="efl@boolean" displayName="Page snap(Horizontal)" default="false"/> <property name="page-v-snap" type="efl@boolean" displayName="Page snap(Vertical)" 
+               default="false"/> <property name="h-pagerel" type="double" displayName="Page relative(Horizontal)" default="0"> <condition name="integer-min" value="0" error="integer-min"/> 
+               <condition name="integer-max" value="1" error="integer-max"/> </property> <property name="v-pagerel" type="double" displayName="Page relative(Vertical)" default="0"> 
+               <condition name="integer-min" value="0" error="integer-min"/> <condition name="integer-max" value="1" error="integer-max"/> </property> <property name="page-limit-h" 
+               type="integer" displayName="Page scroll limit(Horizontal)" default="1"> <condition name="integer-min" value="1" error="integer-min"/> </property> <property name="page-limit-v" 
+               type="integer" displayName="Page scroll limit(Vertical)" default="1"> <condition name="integer-min" value="1" error="integer-min"/> </property> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.slider.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.slider.widget.xml
new file mode 100644 (file)
index 0000000..92b10a1
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="slider" displayName="Slider" smallIcon="widget/32/pal_slider_nor.png" icon.16="widget/16/view_p_slider_nor.png" category="UI components"
+       description="The slider adds a draggable “slider” UI Component for selecting the value of something within a range" helpCategory="" helpContents=""
+       feedbackWidth="200" feedbackHeight="30" minWidth="70" minHeight="25" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="indicator_format" type="string" displayName="Indicator format" default="" category="General"
+               tooltip="sets the format string for the indicator label.&#10;
+The slider may display its value somewhere else for example, above the slider knob that is dragged around. 
+This function sets the format string used for this." />
+       <!-- <property name="span_size" type="integer" displayName="Span Size" default="" category="General" tooltip="sets the length of the bar region of a given slider 
+               UI Component.&#10; This sets the minimum width (when in horizontal mode) or height (when in vertical mode) of the actual bar area of the slider obj."> <condition 
+               name="integer-min" value="0" error="integer-min"/> </property> -->
+       <property name="direction" type="efl@direction" displayName="Direction" default="horizontal" category="General"
+               tooltip="sets the orientation of a given slider UI Component." />
+       <property name="style" type="efl.slider@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+       <property name="min" type="double" displayName="Min" default="0.0" category="General" tooltip="sets the minimum value for the slider.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max-by" value="value" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max" default="1.0" category="General" tooltip="sets the maximum value for the slider.">
+               <condition name="integer-max" value="999999" error="integer-max" />
+               <condition name="integer-min-by" value="value" error="integer-min-by" />
+       </property>
+       <property name="value" type="double" displayName="Value" default="0.0" category="General" tooltip="sets the value the slider displays.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General"
+               tooltip="inverts a given slider UI Component's displaying values order." />
+       <property name="step" type="double" displayName="Step" default="0.05" category="General" tooltip="sets the step by which slider indicator will move.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="indicator" type="efl@boolean" displayName="Show indicator" default="false" category="General"
+               tooltip="sets whether to enlarge slider indicator (augmented knob) or not.&#10;
+By default, indicator will be bigger while dragged by the user. It won't display values set if you disable indicator." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="slider,drag,start" displayName="slider,drag,start" eventType="event.eflevent" />
+       <event name="slider,drag,stop" displayName="slider,drag,stop" eventType="event.eflevent" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.spinner.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.spinner.widget.xml
new file mode 100644 (file)
index 0000000..20111a2
--- /dev/null
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="spinner" displayName="Spinner" smallIcon="widget/32/pal_spinner_nor.png" icon.16="widget/16/view_p_spinner_nor.png" category="UI components"
+       description="A spinner is a UI Component which allows the user to increase or decrease numeric values using arrow buttons, or edit values directly, clicking over it and typing the new value"
+       helpCategory="" helpContents="" feedbackWidth="150" feedbackHeight="150" minWidth="100" minHeight="120" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <!-- <property name="style" type="efl.spinner@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component&#10; - 
+               default: left/right buttons are used for changing the value.&#10; - vertical: up/down buttons are used for changing the value."/> -->
+       <!-- <property name="label_format" type="string" displayName="Label format" default="%.0f" tooltip="sets the format string of the displayed label.&#10; If NULL, 
+               this sets the format to &quot;%.0f&quot;. If not it sets the format string for the label text. The label text is provided a floating point value, so the label text 
+               can display up to 1 floating point value. Note that this is optional. "/> -->
+       <property name="min" type="double" displayName="Min" default="0" category="General"
+               tooltip="sets the minimum value of the spinner.&#10;
+       If actual value is less than this value, it will be updated to this value.">
+               <condition name="integer-min" value="-9999999" error="integer-min" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max" default="100" category="General"
+               tooltip="sets the maximum value of the spinner.&#10;
+       If actual value is bigger than this value, it will be updated to this value.">
+               <condition name="integer-max" value="99999999" error="integer-max" />
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+       </property>
+       <property name="step" type="double" displayName="Step" default="1" category="General" tooltip="sets the step used to increment or decrement the spinner value.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General"
+               tooltip="sets whether the spinner can be directly edited by the user or not." />
+       <!-- <property name="interval" type="double" displayName="Interval" default="0.85" category="General" tooltip="Set the interval on time updates for an user mouse 
+               button hold on spinner UI Components' arrows.&#10; This interval value is decreased while the user holds the mouse pointer either incrementing or decrementing spinner's 
+               value. This helps the user to get to a given value distant from the current one easier/faster, as it will start to change quicker and quicker on mouse button holds. 
+               The calculation for the next change interval value, starting from the one set with this call, is the previous interval divided by 1.05, so it decreases a little 
+               bit. The default starting interval value for automatic changes is 0.85 seconds."/> <property name="base" type="double" displayName="Base" default="0" category="General" 
+               tooltip="sets the base for rounding.&#10; rounded_val = base + (double)(((value - base) / round) * round)"/> <property name="round" type="integer" displayName="Round" 
+               default="" category="General" tooltip="sets the round value for rounding.&#10; rounded_val = base + (double)(((value - base) / round) * round)"/> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.table.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/efl.table.widget.xml
new file mode 100644 (file)
index 0000000..2ca416d
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="table" displayName="Table" smallIcon="widget/32/pal_table_nor.png" icon.16="widget/16/view_p_table_nor.png" category="UI containers"
+       description="A container UI Component to arrange other UI Components in a table where items can span multiple columns or rows" layoutType="table" helpCategory=""
+       helpContents="" feedbackWidth="300" feedbackHeight="300" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General" tooltip="Sets the homogeneous layout in the table." />
+
+       <!-- My -->
+       <property name="cols" type="integer" displayName="Col count" default="2" category="General" tooltip="The column count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="rows" type="integer" displayName="Row count" default="2" category="General" tooltip="The row count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="The horizontal padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="The vertical padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack_col" type="integer" displayName="Column" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="cols" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_row" type="integer" displayName="Row" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="rows" error="integer-max-by-parent-property" />
+               </property>
+               <property name="col_span" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="col_span" targetValue="cols" error="size-max" />
+               </property>
+               <property name="row_span" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="row_span" targetValue="rows" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/tizen.view.xml b/org.tizen.efluibuilder.descriptor/res/wearable-2.3.1/widget/tizen.view.xml
new file mode 100644 (file)
index 0000000..eb79bf6
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="view" displayName="View"  smallIcon="widget/32/pal_empty_nor.png" icon.16="widget/16/view_p_view_nor.png" uiSelector="#%id%" layoutType="view"
+       category="Views" description="Empty View" xpath="">
+
+       <relations>
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+               <content ids="tabbar" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-page-id" />
+       </property>
+       <property name="type" type="string" displayName="type" initValue="view" category="General" />
+       <property name="indicator" type="efl@boolean" displayName="Indicator" default="true" category="General" tooltip="show or hide the indicator.">
+       </property>
+       <property name="page_location_x" type="integer" displayName="location_x" category="Position" unusedEditors="properties">
+       </property>
+       <property name="page_location_y" type="integer" displayName="location_y" category="Position" unusedEditors="properties">
+       </property>
+       <event name="uib,view,create" displayName="uib,view,create" eventType="event.viewevent">
+               if (sizeof(uib_%page%_control_context)) {
+               vc->cc = calloc(1,
+               sizeof(uib_%page%_control_context));
+               }
+       </event>
+       <event name="uib,view,destroy" displayName="uib,view,destroy" eventType="event.viewevent">
+               if (vc->cc) {
+               /* destroy your Control_Context here */
+
+               free(vc->cc);
+               }
+       </event>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/efl.style.edj.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/efl.style.edj.xml
new file mode 100644 (file)
index 0000000..3165fc4
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<defaultStyleEDJs>
+       <!-- Order means priority -->
+       <styleEDJ name="tizen-2.3-wearable-circle-HVGA.edj" />
+       <styleEDJ name="default.edj" />
+</defaultStyleEDJs>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/efl.types.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/efl.types.xml
new file mode 100644 (file)
index 0000000..179f947
--- /dev/null
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<types>
+       <type id="efl@boolean">
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@direction">
+               <constant value="horizontal" displayName="horizontal" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl@position">
+               <constant value="absolute" displayName="absolute" />
+               <constant value="relative" displayName="relative" />
+       </type>
+
+
+       <type id="efl.bg@option">
+               <constant value="center" displayName="center" />
+               <constant value="scale" displayName="scale" />
+               <constant value="stretch" displayName="stretch" />
+               <constant value="tile" displayName="tile" />
+       </type>
+
+       <type id="check-scale">
+               <constant value="fill" displayName="fill" />
+       </type>
+
+       <type id="efl.image@orient">
+               <constant value="none" displayName="none" />
+               <constant value="orient_0" displayName="orient_0" />
+               <constant value="orient_90" displayName="orient_90" />
+               <constant value="rotate_90" displayName="rotate_90" />
+               <constant value="orient_180" displayName="orient_180" />
+               <constant value="rotate_180" displayName="rotate_180" />
+               <constant value="orient_270" displayName="orient_270" />
+               <constant value="rotate_270" displayName="rotate_270" />
+               <constant value="flip_horizontal" displayName="flip_horizontal" />
+               <constant value="flip_vertical" displayName="flip_vertical" />
+               <constant value="flip_transpose" displayName="flip_transpose" />
+               <constant value="flip_transverse" displayName="flip_transverse" />
+       </type>
+
+       <type id="efl.label@wraptype">
+               <constant value="none" displayName="none" />
+               <constant value="char" displayName="char" />
+               <constant value="word" displayName="word" />
+               <constant value="mixed" displayName="mixed" />
+       </type>
+
+       <type id="efl.label@style">
+               <constant value="default" displayName="default" />
+               <constant value="marker" displayName="marker" />
+               <constant value="slide_long" displayName="slide_long" />
+               <constant value="slide_short" displayName="slide_short" />
+               <constant value="slide_bounce" displayName="slide_bounce" />
+       </type>
+
+       <type id="efl@scrollbar_h">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@scrollbar_v">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl.scroller@movementblock">
+               <constant value="no_block" displayName="ELM_SCROLLER_MOVEMENT_NO_BLOCK" />
+               <constant value="block_vertical" displayName="ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL" />
+               <constant value="block_horizontal" displayName="ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL" />
+               <constant value="block_vertical_horizontal" displayName="ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL_HORIZONTAL" />
+       </type>
+
+       <type id="efl.list@multiselectmode">
+               <constant value="default" displayName="default" />
+               <constant value="with_control" displayName="with_control" />
+       </type>
+
+       <type id="efl@selectmode">
+               <constant value="default" displayName="default" />
+               <constant value="always" displayName="always" />
+               <constant value="none" displayName="none" />
+               <constant value="display_only" displayName="display_only" />
+       </type>
+
+       <type id="efl.list@mode">
+               <constant value="compress" displayName="compress" />
+               <constant value="scroll" displayName="scroll" />
+               <constant value="limit" displayName="limit" />
+               <constant value="expand" displayName="expand" />
+       </type>
+
+       <type id="efl.circlegenlist@itemstyle">
+               <constant value="default" displayName="default" />
+               <constant value="title" displayName="title" />
+               <constant value="groupindex" displayName="groupindex" />
+               <constant value="1text" displayName="1text" />
+               <constant value="1text.1icon" displayName="1text.1icon" />
+               <constant value="2text" displayName="2text" />
+               <constant value="1text.1icon.divider" displayName="1text.1icon.divider" />
+               <constant value="1text.1icon.1" displayName="1text.1icon.1" />
+               <constant value="2text.1icon.1" displayName="2text.1icon.1" />
+               <constant value="editfield" displayName="editfield" />
+       </type>
+
+       <type id="efl.entry@textformat">
+               <constant value="plain_utf8" displayName="plain_utf8" />
+               <constant value="markup_utf8" displayName="markup_utf8" />
+       </type>
+
+       <type id="efl.circledatetime@style">
+               <constant value="datepicker/circle" displayName="datepicker/circle" />
+               <constant value="timepicker/circle" displayName="timepicker/circle" />
+       </type>
+
+       <type id="efl.button@style">
+               <constant value="default" displayName="default" />
+               <constant value="bottom" displayName="bottom" />
+       </type>
+
+       <type id="efl.check@style">
+               <constant value="default" displayName="default" />
+               <constant value="small" displayName="small" />
+               <constant value="on&amp;off" displayName="on&amp;off" />
+       </type>
+
+       <type id="efl.ctxpopup@style">
+               <constant value="select_mode" displayName="select_mode" />
+               <constant value="select_mode/top" displayName="select_mode/top" />
+               <constant value="select_mode/bottom" displayName="select_mode/bottom" />
+       </type>
+
+       <type id="efl.slider@style">
+               <constant value="horizontal/default" displayName="default" />
+       </type>
+
+       <type id="efl.index@style">
+               <constant value="thumbnail" displayName="thumbnail" />
+               <constant value="circle" displayName="circle" />
+       </type>
+
+       <type id="efl.popup@style">
+               <constant value="circle" displayName="circle" />
+               <constant value="toast/circle" displayName="toast/circle" />
+       </type>
+
+       <type id="efl.icon@standardicon">
+               <constant value="" displayName="(None)" />
+               <constant value="apps" displayName="apps" />
+               <constant value="arrow_down" displayName="arrow_down" />
+               <constant value="arrow_left" displayName="arrow_left" />
+               <constant value="arrow_right" displayName="arrow_right" />
+               <constant value="arrow_up" displayName="arrow_up" />
+               <constant value="chat" displayName="chat" />
+               <constant value="clock" displayName="clock" />
+               <constant value="close" displayName="close" />
+               <constant value="delete" displayName="delete" />
+               <constant value="edit" displayName="edit" />
+               <constant value="file" displayName="file" />
+               <constant value="home" displayName="home" />
+               <constant value="media_player/forward" displayName="media_player/forward" />
+               <constant value="media_player/info" displayName="media_player/info" />
+               <constant value="media_player/next" displayName="media_player/next" />
+               <constant value="media_player/pause" displayName="media_player/pause" />
+               <constant value="media_player/play" displayName="media_player/play" />
+               <constant value="media_player/prev" displayName="media_player/prev" />
+               <constant value="media_player/rewind" displayName="media_player/rewind" />
+               <constant value="media_player/stop" displayName="media_player/stop" />
+               <constant value="menu/apps" displayName="menu/apps" />
+               <constant value="menu/arrow_up" displayName="menu/arrow_up" />
+               <constant value="menu/arrow_down" displayName="menu/arrow_down" />
+               <constant value="menu/arrow_left" displayName="menu/arrow_left" />
+               <constant value="menu/arrow_right" displayName="menu/arrow_right" />
+               <constant value="menu/chat" displayName="menu/chat" />
+               <constant value="menu/clock" displayName="menu/clock" />
+               <constant value="menu/close" displayName="menu/close" />
+               <constant value="menu/delete" displayName="menu/delete" />
+               <constant value="menu/edit" displayName="menu/edit" />
+               <constant value="menu/folder" displayName="menu/folder" />
+               <constant value="menu/file" displayName="menu/file" />
+               <constant value="menu/home" displayName="menu/home" />
+               <constant value="menu/refresh" displayName="menu/refresh" />
+               <constant value="no_photo" displayName="no_photo" />
+               <constant value="photo/no_photo" displayName="photo/no_photo" />
+               <constant value="refresh" displayName="refresh" />
+       </type>
+
+</types>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/tizen-native-ui-fw.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/tizen-native-ui-fw.xml
new file mode 100644 (file)
index 0000000..00337ed
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE descriptors [
+       <!ENTITY tizen.uicomponent.categories SYSTEM "tizen.uicomponent.categories.xml">
+
+       <!-- default style edj -->
+       <!ENTITY efl.style.edj SYSTEM "efl.style.edj.xml">
+       
+       <!-- type & event type -->
+       <!ENTITY efl.types SYSTEM "efl.types.xml">
+       <!ENTITY tizen.eventtypes SYSTEM "tizen.eventtypes.xml">
+
+       <!-- VIEW -->
+       <!ENTITY tizen.view SYSTEM "widget/tizen.view.xml">
+       <!ENTITY tizen.empty.view SYSTEM "widget/tizen.empty.view.xml">
+
+       <!-- WIDGET -->
+       <!ENTITY efl.bg SYSTEM "widget/efl.bg.widget.xml">
+       <!ENTITY efl.button SYSTEM "widget/efl.button.widget.xml">
+       <!ENTITY efl.check SYSTEM "widget/efl.check.widget.xml">
+       <!ENTITY efl.entry SYSTEM "widget/efl.entry.widget.xml">
+       <!ENTITY efl.image SYSTEM "widget/efl.image.widget.xml">
+       <!ENTITY efl.label SYSTEM "widget/efl.label.widget.xml">
+       <!ENTITY efl.radio SYSTEM "widget/efl.radio.widget.xml">
+       <!ENTITY efl.list SYSTEM "widget/efl.list.widget.xml">
+       <!ENTITY efl.listitem SYSTEM "widget/efl.listitem.widget.xml">
+       <!ENTITY efl.layout SYSTEM "widget/efl.layout.widget.xml">
+       <!ENTITY efl.index SYSTEM "widget/efl.index.widget.xml">
+       <!ENTITY efl.indexitem SYSTEM "widget/efl.indexitem.widget.xml">
+       <!ENTITY efl.ctxpopup SYSTEM "widget/efl.ctxpopup.widget.xml">
+       <!ENTITY efl.ctxpopupitem SYSTEM "widget/efl.ctxpopupitem.widget.xml">
+       <!ENTITY efl.popup SYSTEM "widget/efl.popup.widget.xml">
+               
+       <!-- WIDGET : Circle -->
+       <!ENTITY efl.progressbar SYSTEM "widget/efl.progressbar.widget.xml">
+       <!ENTITY efl.slider SYSTEM "widget/efl.slider.widget.xml">
+       <!ENTITY efl.genlist SYSTEM "widget/efl.genlist.widget.xml">
+       <!ENTITY efl.genlistitem SYSTEM "widget/efl.genlistitem.widget.xml">
+       <!ENTITY efl.datetime SYSTEM "widget/efl.datetime.widget.xml">
+       <!ENTITY efl.scroller SYSTEM "widget/efl.scroller.widget.xml">
+
+       <!-- WIDGET : Container -->
+       <!ENTITY efl.grid SYSTEM "widget/efl.grid.widget.xml">
+       <!ENTITY efl.table SYSTEM "widget/efl.table.widget.xml">
+       <!ENTITY efl.box SYSTEM "widget/efl.box.widget.xml">
+       <!-- End of list -->
+]>
+
+<tizenFile>
+       <fileInfo>
+               <type>tizen-descriptor</type>
+               <version>2</version>
+               <desc>Tizen Native UI Builder Descriptor</desc>
+       </fileInfo>
+
+       <descriptors xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tizen="http://www.tizen.org/2012/uibuilder/descriptor">
+
+               <renderer id="EFL" />
+
+               <doc id="tizen.doc">
+                       <relations>
+                               <content ids="tizen.page" />
+                       </relations>
+               </doc>
+  
+       &tizen.uicomponent.categories;
+
+               <!-- default style edj -->
+       &efl.style.edj;
+
+               <!-- type & event type -->
+       &efl.types;
+       &tizen.eventtypes;
+
+               <!-- view -->
+       &tizen.view;
+
+       &efl.bg;
+       &efl.button;
+       &efl.check;
+       &efl.entry;
+       &efl.image;
+       &efl.label;
+       &efl.radio;
+       &efl.list;
+       &efl.listitem;
+       &efl.layout;
+       &efl.index;
+       &efl.indexitem;
+       &efl.grid;
+       &efl.table;
+       &efl.box;
+       &efl.progressbar;
+       &efl.slider;
+       &efl.genlist;
+       &efl.genlistitem;
+       &efl.datetime;
+       &efl.scroller;
+
+       </descriptors>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/tizen.eventtypes.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/tizen.eventtypes.xml
new file mode 100644 (file)
index 0000000..dea9f2c
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<eventTypes>
+       <eventType id="event.eflevent">
+               <defaultCode>%page%_%object%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+
+       <eventType id="event.viewevent">
+               <defaultCode>%page%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+</eventTypes>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/tizen.uicomponent.categories.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/tizen.uicomponent.categories.xml
new file mode 100644 (file)
index 0000000..d86fdb4
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<UIComponentCategories>
+       <UIComponentCategory name="Views" />
+       <UIComponentCategory name="UI containers" />
+       <UIComponentCategory name="UI components" />
+</UIComponentCategories>
+
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.bg.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.bg.widget.xml
new file mode 100644 (file)
index 0000000..adc10b3
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="bg" displayName="Background" smallIcon="widget/32/pal_bg_nor.png" icon.16="widget/16/view_p_bg_nor.png" category="UI components"
+       description="Background object, used for setting a solid color, image or Edje group as a background to a window or any container object" helpCategory=""
+       helpContents="" feedbackWidth="200" feedbackHeight="200" minWidth="1" minHeight="1" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="color" type="color" displayName="Color" default="#ffffff" category="General" tooltip="sets the color on a given background UI Component." />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="sets the file path of the image" />
+       <property name="option" type="efl.bg@option" displayName="Option" default="scale" category="General"
+               tooltip="set the way how a background UI Component is to display its image.&#10;
+- center: Center the background image.&#10;
+- scale: Scale the background image, retaining the aspect ratio.&#10;
+- stretch: Stretch the background image to fill the UI Component's area.&#10;
+- tile: Tile background image at its original size.&#10;" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.box.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.box.widget.xml
new file mode 100644 (file)
index 0000000..08cb5e8
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="box" displayName="Box" smallIcon="widget/32/pal_box_nor.png" icon.16="widget/16/view_p_box_nor.png" category="UI containers"
+       description="A box arranges objects in a linear fashion, governed by a layout function that defines the details of this arrangement." layoutType="box"
+       helpCategory="" helpContents="" feedbackWidth="200" feedbackHeight="200" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the horizontal orientation." />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="sets the box to arrange its children homogeneously." />
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="sets the horizontal space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="150" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="sets the vertical space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="150" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.button.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.button.widget.xml
new file mode 100644 (file)
index 0000000..2b8eb4e
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="button" displayName="Button" smallIcon="widget/32/pal_button_nor.png" icon.16="widget/16/view_p_button_nor.png" category="UI components"
+       description="This is a push-button. Press it and run some function. It can contain a simple label and icon object and it also has an autorepeat feature"
+       helpCategory="" helpContents="" feedbackWidth="130" feedbackHeight="130" minWidth="80" minHeight="130" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Button" category="General" tooltip="sets the text of the UI Component.">
+       </property>
+       <property name="style" type="efl.button@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="repeated" displayName="repeated" eventType="event.eflevent" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent" />
+       <event name="unpressed" displayName="unpressed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.check.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.check.widget.xml
new file mode 100644 (file)
index 0000000..e7064b8
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="check" displayName="Check" smallIcon="widget/32/pal_check_nor.png" icon.16="widget/16/view_p_check_nor.png" category="UI components"
+       description="The check UI Component allows for toggling a value between true and false" helpCategory="" helpContents="" feedbackWidth="90" feedbackHeight="90"
+       minWidth="90" minHeight="90" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="state" type="efl@boolean" displayName="State" default="false" category="General" tooltip="sets the on/off state of the check UI Component." />
+       <property name="style" type="efl.check@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.ctxpopup.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.ctxpopup.widget.xml
new file mode 100644 (file)
index 0000000..1955115
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopup" displayName="Ctxpopup" smallIcon="widget/32/pal_ctx_nor.png" icon.16="widget/16/view_p_ctxp_nor.png" category="Views"
+       description="Ctxpopup(Context popup)s are used to provide options for the currently selected objects. Ctxpopup is composed of popup and a list of items inside popup."
+       helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%"
+       xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="ctxpopupitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the direction orientation." />
+
+       <property name="style" type="efl.ctxpopup@style" displayName="Style" default="select_mode" category="General" tooltip="sets the style of the widget.">
+               <condition name="enable-property" value="select_mode" target="disable" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="dismissed" displayName="dismissed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.ctxpopupitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.ctxpopupitem.widget.xml
new file mode 100644 (file)
index 0000000..dc6db61
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopupitem" displayName="CtxPopupItem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI containers" description=""
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="ctxpopup">
+
+       <relations>
+               <parent ids="ctxpopup" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="CtxPopupItem" category="General" tooltip="The text of the list item" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.datetime.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.datetime.widget.xml
new file mode 100644 (file)
index 0000000..df49123
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="datetime" displayName="Datetime" smallIcon="widget/32/pal_date_nor.png" icon.16="widget/16/view_p_date_nor.png" category="UI components"
+       description="Datetime UI Component is used to display and input date time values" helpCategory="" helpContents="" feedbackWidth="320" feedbackHeight="180"
+       minWidth="280" minHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.circledatetime@style" displayName="Style" default="datepicker/circle" category="General" tooltip="sets the style of the UI Component." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.entry.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.entry.widget.xml
new file mode 100644 (file)
index 0000000..46d3c5f
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="entry" displayName="Entry" smallIcon="widget/32/pal_entry_nor.png" icon.16="widget/16/view_p_entry_nor.png" category="UI components"
+       description="An entry is a convenience UI Component which shows a box that the user can enter text into" helpCategory="" helpContents="" feedbackWidth="150"
+       feedbackHeight="100" minWidth="50" minHeight="50" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Entry" category="General" tooltip="Convenient macro for elm_object_part_text_set." />
+       <property name="single_line" type="efl@boolean" displayName="Single line" default="false" category="General" tooltip="Sets the entry to the single line mode." />
+       <property name="password" type="efl@boolean" displayName="Password" default="false" category="General" tooltip="Sets the entry to the password mode.">
+               <condition name="enable-property" value="false" target="single_line" />
+               <condition name="enable-property" value="false" target="editable" />
+       </property>
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General" tooltip="Sets whether the entry is editable." />
+       <property name="scroll" type="efl@boolean" displayName="Scrollable" default="false" category="General" tooltip="Enables or disables scrolling in the entry." />
+
+       <property name="src" type="text-resource" displayName="File path" default="" category="General"
+               tooltip="Sets the file (and implicitly loads it) for the text to display and then allow edit. All changes are written back to the file after a short delay if the entry object is set to autosave (which is the default).">
+               <condition name="disable-property" value="" target="autosave" />
+               <condition name="disable-property" value="" target="text-format" />
+       </property>
+       <property name="file_text_format" type="efl.entry@textformat" displayName="Text Format" default="plain_utf8" category="General"
+               tooltip="Enumeration that defines the text format types.&#xD;
+       plain_utf8 : Plain UTF8 type&#xD;
+       markup_utf8 : Markup UTF8 type" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="changed,user" displayName="changed,user" eventType="event.eflevent" />
+       <event name="aborted" displayName="aborted" eventType="event.eflevent" />
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="press" displayName="press" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="clicked,triple" displayName="clicked,triple" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="selection,changed" displayName="selection,changed" eventType="event.eflevent" />
+       <event name="selection,cleared" displayName="selection,cleared" eventType="event.eflevent" />
+       <event name="selection,copy" displayName="selection,copy" eventType="event.eflevent" />
+       <event name="selection,cut" displayName="selection,cut" eventType="event.eflevent" />
+       <event name="selection,paste" displayName="selection,paste" eventType="event.eflevent" />
+       <event name="selection,start" displayName="selection,start" eventType="event.eflevent" />
+       <event name="cursor,changed" displayName="cursor,changed" eventType="event.eflevent" />
+       <event name="anchor,clicked" displayName="anchor,clicked" eventType="event.eflevent" />
+       <event name="anchor,down" displayName="anchor,down" eventType="event.eflevent" />
+       <event name="anchor,in" displayName="anchor,in" eventType="event.eflevent" />
+       <event name="anchor,out" displayName="anchor,out" eventType="event.eflevent" />
+       <event name="anchor,up" displayName="anchor,up" eventType="event.eflevent" />
+       <event name="preedit,changed" displayName="preedit,changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.genlist.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.genlist.widget.xml
new file mode 100644 (file)
index 0000000..50df898
--- /dev/null
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlist" displayName="Genlist" smallIcon="widget/32/pal_genlist_nor.png" icon.16="widget/16/view_p_genlist_nor.png" category="UI components"
+       description="This UI Component aims to have more expansive list than the simple list in Elementary that could have more flexible items and allow many more entries while still being fast and low on memory usage. At the same time it was also made to be able to do tree structures. But the price to pay is more complexity when it comes to usage. If all you want is a simple list with icons and a single text, use the normal List object"
+       helpCategory="" helpContents="" feedbackWidth="360" feedbackHeight="360" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add genlist item" unusedEditors="source_tab" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent" />
+       <event name="released" displayName="released" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent" />
+       <event name="contracted" displayName="contracted" eventType="event.eflevent" />
+       <event name="expand,request" displayName="expand,request" eventType="event.eflevent" />
+       <event name="contract,request" displayName="contract,request" eventType="event.eflevent" />
+       <event name="realized" displayName="realized" eventType="event.eflevent" />
+       <event name="unrealized" displayName="unrealized" eventType="event.eflevent" />
+       <event name="drag,start,up" displayName="drag,start,up" eventType="event.eflevent" />
+       <event name="drag,start,down" displayName="drag,start,down" eventType="event.eflevent" />
+       <event name="drag,start,left" displayName="drag,start,left" eventType="event.eflevent" />
+       <event name="drag,start,right" displayName="drag,start,right" eventType="event.eflevent" />
+       <event name="drag,stop" displayName="drag,stop" eventType="event.eflevent" />
+       <event name="drag" displayName="drag" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="multi,swipe,left" displayName="multi,swipe,left" eventType="event.eflevent" />
+       <event name="multi,swipe,right" displayName="multi,swipe,right" eventType="event.eflevent" />
+       <event name="multi,swipe,up" displayName="multi,swipe,up" eventType="event.eflevent" />
+       <event name="multi,swipe,down" displayName="multi,swipe,down" eventType="event.eflevent" />
+       <event name="multi,pinch,out" displayName="multi,pinch,in" eventType="event.eflevent" />
+       <event name="multi,pinch,in" displayName="multi,pinch,in" eventType="event.eflevent" />
+       <event name="swipe" displayName="swipe" eventType="event.eflevent" />
+       <event name="moved" displayName="moved" eventType="event.eflevent" />
+       <event name="moved,after" displayName="moved,after" eventType="event.eflevent" />
+       <event name="moved,before" displayName="moved,before" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="tree,effect,finished" displayName="tree,effect,finished" eventType="event.eflevent" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.genlistitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.genlistitem.widget.xml
new file mode 100644 (file)
index 0000000..c771cab
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlistitem" displayName="Genlistitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="genlist">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="sets the text of item" />
+       <property name="sub_text" type="rm_string" displayName="Sub Text" default="Sub Text" category="General" tooltip="sets the sub text of item" />
+       <property name="style" type="efl.circlegenlist@itemstyle" displayName="Style" default="default" category="General"
+               tooltip="sets the item style&#10;
+An item in a genlist can have 0 or more texts, 0 or more contents and 0 or more boolean states. This is up to the item style defined here.
+- default: 1 text part, 2 content parts, and no state parts are used.&#10;
+- default_style: same as default but text part is a textblock.&#10;
+- double_label: this is not specified in the document" />
+
+       <property name="image_path" type="image" displayName="Image path" default="" category="Icon"
+               tooltip="sets the file path of the image to be shown in the list item before label text&#10;
+       If standard icon is set, this will be ignored" />
+       <property name="end_image_path" type="image" displayName="Image path" default="" category="End Icon"
+               tooltip="sets the file path of the image to be shown in the list item after label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.grid.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.grid.widget.xml
new file mode 100644 (file)
index 0000000..6ea095a
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="grid" displayName="Grid" smallIcon="widget/32/pal_grid_nor.png" icon.16="widget/16/view_p_grid_nor.png" category="UI containers"
+       description="The grid is a grid layout UI Component that lays out a series of children as a fixed 'grid' of UI Components using a given percentage of the grid width and height each using the child object."
+       layoutType="grid" helpCategory="" helpContents="" feedbackWidth="300" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="vsize_w" type="integer" displayName="Col count" default="1000" category="General" tooltip="sets the virtual width of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+       <property name="vsize_h" type="integer" displayName="Row count" default="1000" category="General" tooltip="sets the virtual height of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack_x" type="integer" displayName="Left" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_w" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_y" type="integer" displayName="Top" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_h" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_w" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_x" targetValue="vsize_w" error="size-max" />
+               </property>
+               <property name="pack_h" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_y" targetValue="vsize_h" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.image.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.image.widget.xml
new file mode 100644 (file)
index 0000000..26fafc6
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="image" displayName="Image" smallIcon="widget/32/pal_image_nor.png" icon.16="widget/16/view_p_image_nor.png" category="UI components"
+       description="An Elementary image object is a direct realization of The Elementary Image Class, and it allows one to load and display an image file on it, be it from a disk file or from a memory region"
+       helpCategory="" helpContents="" feedbackWidth="100" feedbackHeight="100" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="Sets the file that is used as the image's source." />
+       <property name="no_scale" type="efl@boolean" displayName="No scale" default="false" category="General" tooltip="Disables scaling of this object." />
+       <property name="resizable_up" type="efl@boolean" displayName="Resizable(up)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable up" />
+       <property name="resizable_down" type="efl@boolean" displayName="Resizable(down)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable down" />
+       <!-- <property name="orient" type="efl.image@orient" displayName="Orient" default="none" category="General" tooltip="Sets the image orientation.&#xD;&#xD; none&#xD; 
+               : No orientation change&#xD; orient_0&#xD; : No orientation change&#xD; rotate_90&#xD; : Rotate 90 degrees clockwise&#xD; rotate_180&#xD; : Rotate 180 degrees clockwise&#xD; 
+               rotate_270&#xD; : Rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise)&#xD; flip_horizontal&#xD; : Flip image horizontally&#xD; flip_vertical&#xD; : 
+               Flip image vertically&#xD; flip_transpose&#xD; : Flip the image along the y = (width - x) line (bottom-left to top-right)&#xD; flip_transverse&#xD; : Flip the image 
+               along the y = x line (top-left to bottom-right)" /> -->
+       <property name="aspect_fixed" type="efl@boolean" displayName="Aspect fixed" default="false" category="General"
+               tooltip="Set whether the original aspect ratio of the image should be kept on resize." />
+       <property name="fill_outside" type="efl@boolean" displayName="Fill outsize" default="false" category="General"
+               tooltip="Sets whether the image fills the entire object area, when keeping the aspect ratio." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+       <event name="drop" displayName="drop" eventType="event.eflevent" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.index.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.index.widget.xml
new file mode 100644 (file)
index 0000000..d029e31
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="index" displayName="Index" smallIcon="widget/32/pal_index_nor.png" icon.16="widget/16/view_p_index_nor.png" category="UI components"
+       description="An index UI Component gives you an index for fast access to whichever group of other UI items one might have" helpCategory="" helpContents=""
+       feedbackWidth="80" feedbackHeight="360" minWidth="80" minHeight="50" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="indexitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.index@style" displayName="Style" default="thumbnail" category="General" tooltip="sets the style of the UI Component." />
+       <property name="autohide" type="efl@boolean" displayName="Autohide enabled" default="false" category="General"
+               tooltip="Enables or disables the auto hiding feature for a given index UI Component." unusedEditors="properties" />
+       <property name="indicator" type="efl@boolean" displayName="Indicator enabled" default="true" category="General" tooltip="Sets the indicator to be enabled."
+               unusedEditors="properties" />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="Appends a new item on a given index UI Component."
+               unusedEditors="source_tab" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="level,up" displayName="level,up" eventType="event.eflevent" />
+       <event name="level,down" displayName="level,down" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.indexitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.indexitem.widget.xml
new file mode 100644 (file)
index 0000000..3267fd1
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="indexitem" displayName="Indexitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="IndexItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="index">
+
+       <relations>
+               <parent ids="index" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <!-- <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="The letter under which the item should be indexed" /> -->
+
+       <!-- <event name="itemselected" displayName="itemselected" eventType="event.eflevent" /> -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.label.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.label.widget.xml
new file mode 100644 (file)
index 0000000..874d524
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="label" displayName="Label" smallIcon="widget/32/pal_label_nor.png" icon.16="widget/16/view_p_label_nor.png" category="UI components"
+       description="UI Component to display text, with simple html-like markup" helpCategory="" helpContents="" feedbackWidth="120" feedbackHeight="50" minWidth="50"
+       minHeight="30" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="Label" category="General" tooltip="sets the text of the UI Component." />
+       <!-- <property name="style" type="efl.label@style" displayName="Style" default="default" category="General" tooltip="Sets the style to be used by the label.&#10; 
+               if the text doesn't fit the geometry of the label, it is ellipsized or cut. Elementary provides several styles for this UI Component.&#10; - default: No animation.&#10; 
+               - marker: Centers the text in the label and makes it bold by default.&#10; - slide_long: The entire text appears from the right of the screen and slides until it 
+               disappears in the left of the screen(reappearing on the right again).&#10; - slide_short: The text appears in the left of the label and slides to the right to show 
+               the overflow. When all of the text has been shown the position is reset.&#10; - slide_bounce: The text appears in the left of the label and slides to the right to 
+               show the overflow. When all of the text has been shown the animation reverses, moving the text to the left."/> -->
+       <property name="line_wrap" type="efl.label@wraptype" displayName="Wrap type" default="none" category="General"
+               tooltip="sets the wrapping behavior of the label.&#10;
+- none: No wrapping.&#10;
+- char: Wrap between characters.&#10;
+- word: Wrap between words.&#10;
+- mixed: Word wrap, and if that fails, char wrap." />
+       <property name="wrap_width" type="integer" displayName="Wrap width" default="0" category="General" tooltip="sets the maximum width size hint of the label." />
+       <property name="ellipsis" type="efl@boolean" displayName="Ellipsis" default="true" category="General" tooltip="sets the ellipsis behavior of the label." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="slide,end" displayName="slide,end" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.layout.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.layout.widget.xml
new file mode 100644 (file)
index 0000000..fbb25dc
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="layout" displayName="Layout" smallIcon="widget/32/pal_layout_nor.png" icon.16="widget/16/view_p_layout_nor.png" category="UI components"
+       description="This is a container UI Component that takes a standard Edje design file and wraps it very thinly in a UI Component" helpCategory="" helpContents=""
+       feedbackWidth="150" feedbackHeight="150" minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="src" type="layout-resource" displayName="File path" default="" category="General" tooltip="The path to the file (edj) that is used as a layout" />
+       <property name="group" type="dynamic-combo" displayName="Group name" default="" category="General" tooltip="The group that the layout belongs to in the edje file" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="theme,changed" displayName="theme,changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.list.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.list.widget.xml
new file mode 100644 (file)
index 0000000..8c22ea2
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="list" displayName="List" smallIcon="widget/32/pal_list_nor.png" icon.16="widget/16/view_p_list_nor.png" category="UI components"
+       description="A list UI Component is a container whose children are displayed vertically or horizontally, in order, and can be selected. The list can accept only one or multiple item selections. Also has many modes of items displaying."
+       helpCategory="" helpContents="" feedbackWidth="360" feedbackHeight="360" minWidth="50" minHeight="110" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="listitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="mode" type="efl.list@mode" displayName="Mode" default="scroll" category="General" tooltip="Sets which mode to use for the list object." />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General" tooltip="Sets the list select mode." />
+       <property name="multi_select" type="efl@boolean" displayName="Multi select" default="false" category="General"
+               tooltip="Enables or disables multiple items selection on the list object.">
+               <condition name="enable-property" value="true" target="multi-select-mode" />
+       </property>
+       <!-- <property name="multi-select-mode" type="efl.list@multiselectmode" displayName="Multi select mode" default=""/> -->
+
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.listitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.listitem.widget.xml
new file mode 100644 (file)
index 0000000..3b68af2
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="listitem" displayName="Listitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="list">
+
+       <relations>
+               <parent ids="list" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="The text of the list item" />
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.map.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.map.widget.xml
new file mode 100644 (file)
index 0000000..2b435bf
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="map" displayName="Map" smallIcon="widget/32/pal_map_nor.png" icon.16="widget/16/view_p_map_nor.png" category="UI components"
+       description="This is a widget specifically for displaying a map" helpCategory="" helpContents="" feedbackWidth="300" feedbackHeight="300" minWidth="100"
+       minHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="zoom_level" type="scale-integer" displayName="Zoom level" default="15" category="General" tooltip="Sets the zoom level of the map">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="20" error="integer-max" />
+       </property>
+
+       <property name="longitude" type="double" displayName="longitude" default="0" category="General" tooltip="The longitude to show at the center">
+               <condition name="integer-min" value="-180" error="integer-min" />
+               <condition name="integer-max" value="180" error="integer-max" />
+       </property>
+       <property name="latitude" type="double" displayName="latitude" default="0" category="General" tooltip="The latitude to show at the center">
+               <condition name="integer-min" value="-90" error="integer-min" />
+               <condition name="integer-max" value="90" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="press" displayName="press" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+       <event name="loaded" displayName="loaded" eventType="event.eflevent" />
+       <event name="zoom,start" displayName="zoom,start" eventType="event.eflevent" />
+       <event name="zoom,stop" displayName="zoom,stop" eventType="event.eflevent" />
+       <event name="zoom,change" displayName="zoom,change" eventType="event.eflevent" />
+       <event name="tile,load" displayName="tile,load" eventType="event.eflevent" />
+       <event name="tile,loaded" displayName="tile,loaded" eventType="event.eflevent" />
+       <event name="route,load" displayName="route,load" eventType="event.eflevent" />
+       <event name="route,loaded" displayName="route,loaded" eventType="event.eflevent" />
+       <event name="name,load" displayName="name,load" eventType="event.eflevent" />
+       <event name="name,loaded" displayName="name,loaded" eventType="event.eflevent" />
+       <event name="overlay,clicked" displayName="overlay,clicked" eventType="event.eflevent" />
+       <event name="tile,loaded,fail" displayName="tile,loaded,fail" eventType="event.eflevent" />
+       <event name="route,loaded,fail" displayName="route,loaded,fail" eventType="event.eflevent" />
+       <event name="name,loaded,fail" displayName="name,loaded,fail" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.popup.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.popup.widget.xml
new file mode 100644 (file)
index 0000000..6d4f9ed
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="popup" displayName="Popup" smallIcon="widget/32/pal_popup_nor.png" icon.16="widget/16/view_p_popup_nor.png" category="Views" description="Popups are temporarily displayed on the screenb to provide information or to ask for user confirmation. Popup allows users to take instant action for events. Popup is an enhancement of Notify components and is composed of three areas: Title, Content and Action with up to 3 buttons(optional)." layoutType="Popup"
+       helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%"
+       xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+
+       <property name="title" type="string" displayName="Title" default="Title" category="General" tooltip="The title text of the popup widget">
+       </property>
+       <property name="style" type="efl.popup@style" displayName="Style" default="circle" category="General" tooltip="sets the style of the UI Component." />
+       <property name="height" type="scale-integer" displayName="Height" default="200" category="General"
+               tooltip="sets the x of left upper corner of the widget.&#10;
+But this depends on the container of the widget.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="400" error="integer-max" />
+       </property>
+       <property name="timeout" type="double" displayName="Timeout" default="0" category="General" tooltip="Sets a timeout to hide popup automatically">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="timeout" displayName="timeout" eventType="event.eflevent" />
+       <event name="block,clicked" displayName="block,clicked" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.progressbar.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.progressbar.widget.xml
new file mode 100644 (file)
index 0000000..d824e5b
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="progressbar" displayName="Progressbar" smallIcon="widget/32/pal_progress_nor.png" icon.16="widget/16/view_p_progress_nor.png" category="UI components"
+       description="The progress bar is a UI Component for visually representing the progress status of a given job/task" helpCategory="" helpContents=""
+       feedbackWidth="360" feedbackHeight="360" minWidth="360" minHeight="360" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+
+       <property name="min" type="double" displayName="Min Value" default="0" category="General" tooltip="sets the minimum value for the progressbar.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max-by" value="value" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max Value" default="100" category="General" tooltip="sets the minimum value for the progressbar.">
+               <condition name="integer-max" value="999999" error="integer-max" />
+               <condition name="integer-min-by" value="value" error="integer-min-by" />
+       </property>
+       <property name="value" type="double" displayName="Value" default="0" category="General" tooltip="Sets the progress value on a given progress bar UI Component.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.radio.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.radio.widget.xml
new file mode 100644 (file)
index 0000000..0172d8c
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="radio" displayName="Radio" smallIcon="widget/32/pal_radio_nor.png" icon.16="widget/16/view_p_radio_nor.png" category="UI components"
+       description="Radio is a UI Component that allows for 1 or more options to be displayed and have the user choose only 1 of them" helpCategory="" helpContents=""
+       feedbackWidth="100" feedbackHeight="100" minWidth="100" minHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="value" type="integer" displayName="Value" default="0" category="General"
+               tooltip="sets the value of the radio group.&#10;
+The radio group is initialized with this value. The value should be one of the radio buttons' state values in the group to be properly initialized." />
+       <property name="state_value" type="integer" displayName="State value" default="0" category="General" tooltip="sets the integer value that this radio object represents." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.scroller.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.scroller.widget.xml
new file mode 100644 (file)
index 0000000..0ab08a4
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="scroller" displayName="Scroller" smallIcon="widget/32/pal_scroller_nor.png" icon.16="widget/16/view_p_scroller_nor.png" category="UI containers"
+       description="A scroller holds (and clips) a single object and scrolls it around. This means that it allows the user to use a scroll bar (or a finger) to drag the viewable region around, moving through a much larger object that is contained in the scroller. The scroller will always have a small minimum size by default as it won't be limited by the contents of the scroller"
+       layoutType="box" helpCategory="" helpContents="" feedbackWidth="200" feedbackHeight="200" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General"
+               tooltip="sets the horizontal scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General"
+               tooltip="sets the vertical scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="content_min_w" type="efl@boolean" displayName="Min limit(Width)" default="false" category="General"
+               tooltip="Make the scroller minimum width size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+       <property name="content_min_h" type="efl@boolean" displayName="Min limit(Height)" default="false" category="General"
+               tooltip="Make the scroller minimum heigth size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+       <property name="propagate_events" type="efl@boolean" displayName="Propagate events" default="true" category="General"
+               tooltip="sets event propagation on a scroller.&#10;
+This enables or disables event propagation from the scroller content to the scroller and its parent. By default event propagation is enabled" />
+       <!-- <property name="gravity-x" type="double" displayName="Gravity(Horizontal)" default="0"> <condition name="integer-min" value="0" error="integer-min"/> <condition 
+               name="integer-max" value="1" error="integer-max"/> </property> <property name="gravity-y" type="double" displayName="Gravity(Vertical)" default="0"> <condition name="integer-min" 
+               value="0" error="integer-min"/> <condition name="integer-max" value="1" error="integer-max"/> </property> <property name="movement-block" type="efl.scroller@movementblock" 
+               displayName="Movement block" default="1"/> <property name="page-size-h" type="integer" displayName="Page size(Horizontal)" default="0"> <condition name="enable-property" 
+               value="true" target="page-h-snap"/> <condition name="enable-property" value="true" target="h-pagerel"/> <condition name="enable-property" value="true" target="page-limit-h"/> 
+               </property> <property name="page-size-v" type="integer" displayName="Page size(Vertical)" default="0"> <condition name="enable-property" value="true" target="page-v-snap"/> 
+               <condition name="enable-property" value="true" target="v-pagerel"/> <condition name="enable-property" value="true" target="page-limit-v"/> </property> <property 
+               name="page-h-snap" type="efl@boolean" displayName="Page snap(Horizontal)" default="false"/> <property name="page-v-snap" type="efl@boolean" displayName="Page snap(Vertical)" 
+               default="false"/> <property name="h-pagerel" type="double" displayName="Page relative(Horizontal)" default="0"> <condition name="integer-min" value="0" error="integer-min"/> 
+               <condition name="integer-max" value="1" error="integer-max"/> </property> <property name="v-pagerel" type="double" displayName="Page relative(Vertical)" default="0"> 
+               <condition name="integer-min" value="0" error="integer-min"/> <condition name="integer-max" value="1" error="integer-max"/> </property> <property name="page-limit-h" 
+               type="integer" displayName="Page scroll limit(Horizontal)" default="1"> <condition name="integer-min" value="1" error="integer-min"/> </property> <property name="page-limit-v" 
+               type="integer" displayName="Page scroll limit(Vertical)" default="1"> <condition name="integer-min" value="1" error="integer-min"/> </property> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.slider.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.slider.widget.xml
new file mode 100644 (file)
index 0000000..4f3c51f
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="slider" displayName="Slider" smallIcon="widget/32/pal_slider_nor.png" icon.16="widget/16/view_p_slider_nor.png" category="UI components"
+       description="The slider adds a draggable “slider” UI Component for selecting the value of something within a range" helpCategory="" helpContents=""
+       feedbackWidth="360" feedbackHeight="360" minWidth="360" minHeight="360" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+
+       <!-- <property name="direction" type="efl@boolean" displayName="Direction" default="vertical" category="General" tooltip="sets the orientation of a given slider 
+               UI Component."/> -->
+       <!-- <property name="style" type="efl.slider@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component."/> -->
+       <property name="min" type="double" displayName="Min Value" default="0.0" category="General" tooltip="sets the minimum value for the slider.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max-by" value="value" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max Value" default="1.0" category="General" tooltip="sets the maximum value for the slider.">
+               <condition name="integer-max" value="999999" error="integer-max" />
+               <condition name="integer-min-by" value="value" error="integer-min-by" />
+       </property>
+       <property name="value" type="double" displayName="Value" default="0.0" category="General" tooltip="sets the value the slider displays.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <!-- <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General" tooltip="inverts a given slider UI Component's displaying 
+               values order."/> -->
+       <property name="step" type="double" displayName="Step" default="0.05" category="General" tooltip="sets the step by which slider indicator will move.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="slider,drag,start" displayName="slider,drag,start" eventType="event.eflevent" />
+       <event name="slider,drag,stop" displayName="slider,drag,stop" eventType="event.eflevent" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.table.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/efl.table.widget.xml
new file mode 100644 (file)
index 0000000..2ca416d
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="table" displayName="Table" smallIcon="widget/32/pal_table_nor.png" icon.16="widget/16/view_p_table_nor.png" category="UI containers"
+       description="A container UI Component to arrange other UI Components in a table where items can span multiple columns or rows" layoutType="table" helpCategory=""
+       helpContents="" feedbackWidth="300" feedbackHeight="300" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General" tooltip="Sets the homogeneous layout in the table." />
+
+       <!-- My -->
+       <property name="cols" type="integer" displayName="Col count" default="2" category="General" tooltip="The column count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="rows" type="integer" displayName="Row count" default="2" category="General" tooltip="The row count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="The horizontal padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="The vertical padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack_col" type="integer" displayName="Column" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="cols" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_row" type="integer" displayName="Row" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="rows" error="integer-max-by-parent-property" />
+               </property>
+               <property name="col_span" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="col_span" targetValue="cols" error="size-max" />
+               </property>
+               <property name="row_span" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="row_span" targetValue="rows" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/tizen.view.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-2.3.1/widget/tizen.view.xml
new file mode 100644 (file)
index 0000000..2fd5a5c
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="view" displayName="View" smallIcon="widget/32/pal_empty_nor.png" icon.16="widget/16/view_p_view_nor.png" uiSelector="#%id%" category="Views"
+       description="Empty View" layoutType="view" xpath="">
+
+       <relations>
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+               <content ids="tabbar" max="1" exclusiveGroup="default" />
+               <!--<content ids="circlescroller" max="1" exclusiveGroup="default"/> -->
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-page-id" />
+       </property>
+       <property name="type" type="string" displayName="type" initValue="view" category="General" />
+       <property name="indicator" type="efl@boolean" displayName="Indicator" default="true" category="General" tooltip="show or hide the indicator.">
+       </property>
+       <property name="page_location_x" type="integer" displayName="location_x" category="Position" unusedEditors="properties">
+       </property>
+       <property name="page_location_y" type="integer" displayName="location_y" category="Position" unusedEditors="properties">
+       </property>
+       <event name="uib,view,create" displayName="view,create" eventType="event.viewevent">
+               if (sizeof(uib_%page%_control_context)) {
+               vc->cc = calloc(1,
+               sizeof(uib_%page%_control_context));
+               }
+       </event>
+       <event name="uib,view,destroy" displayName="view,destroy" eventType="event.viewevent">
+               if (vc->cc) {
+               /* destroy your Control_Context here */
+
+               free(vc->cc);
+               }
+       </event>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/efl.style.edj.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/efl.style.edj.xml
new file mode 100644 (file)
index 0000000..798bafa
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<defaultStyleEDJs>
+       <!-- Order means priority -->
+       <styleEDJ name="efl-theme-tizen-wearable-circle.edj" />
+</defaultStyleEDJs>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/efl.types.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/efl.types.xml
new file mode 100644 (file)
index 0000000..633dbfb
--- /dev/null
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<types>
+       <type id="efl@boolean">
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@direction">
+               <constant value="horizontal" displayName="horizontal" />
+               <constant value="vertical" displayName="vertical" />
+       </type>
+
+       <type id="efl@position">
+               <constant value="absolute" displayName="absolute" />
+               <constant value="relative" displayName="relative" />
+       </type>
+
+
+       <type id="efl.bg@option">
+               <constant value="center" displayName="center" />
+               <constant value="scale" displayName="scale" />
+               <constant value="stretch" displayName="stretch" />
+               <constant value="tile" displayName="tile" />
+       </type>
+
+       <type id="check-scale">
+               <constant value="fill" displayName="fill" />
+       </type>
+
+       <type id="efl.image@orient">
+               <constant value="none" displayName="none" />
+               <constant value="orient_0" displayName="orient_0" />
+               <constant value="orient_90" displayName="orient_90" />
+               <constant value="rotate_90" displayName="rotate_90" />
+               <constant value="orient_180" displayName="orient_180" />
+               <constant value="rotate_180" displayName="rotate_180" />
+               <constant value="orient_270" displayName="orient_270" />
+               <constant value="rotate_270" displayName="rotate_270" />
+               <constant value="flip_horizontal" displayName="flip_horizontal" />
+               <constant value="flip_vertical" displayName="flip_vertical" />
+               <constant value="flip_transpose" displayName="flip_transpose" />
+               <constant value="flip_transverse" displayName="flip_transverse" />
+       </type>
+
+       <type id="efl.label@wraptype">
+               <constant value="none" displayName="none" />
+               <constant value="char" displayName="char" />
+               <constant value="word" displayName="word" />
+               <constant value="mixed" displayName="mixed" />
+       </type>
+
+       <type id="efl.label@style">
+               <constant value="default" displayName="default" />
+               <constant value="marker" displayName="marker" />
+               <constant value="slide_long" displayName="slide_long" />
+               <constant value="slide_short" displayName="slide_short" />
+               <constant value="slide_bounce" displayName="slide_bounce" />
+       </type>
+
+       <type id="efl@scrollbar_h">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl@scrollbar_v">
+               <constant value="auto" displayName="auto" />
+               <constant value="true" displayName="true" />
+               <constant value="false" displayName="false" />
+       </type>
+
+       <type id="efl.scroller@movementblock">
+               <constant value="no_block" displayName="ELM_SCROLLER_MOVEMENT_NO_BLOCK" />
+               <constant value="block_vertical" displayName="ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL" />
+               <constant value="block_horizontal" displayName="ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL" />
+               <constant value="block_vertical_horizontal" displayName="ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL_HORIZONTAL" />
+       </type>
+
+       <type id="efl.list@multiselectmode">
+               <constant value="default" displayName="default" />
+               <constant value="with_control" displayName="with_control" />
+       </type>
+
+       <type id="efl@selectmode">
+               <constant value="default" displayName="default" />
+               <constant value="always" displayName="always" />
+               <constant value="none" displayName="none" />
+               <constant value="display_only" displayName="display_only" />
+       </type>
+
+       <type id="efl.list@mode">
+               <constant value="compress" displayName="compress" />
+               <constant value="scroll" displayName="scroll" />
+               <constant value="limit" displayName="limit" />
+               <constant value="expand" displayName="expand" />
+       </type>
+
+       <type id="efl.circlegenlist@itemstyle">
+               <constant value="default" displayName="default" />
+               <constant value="title" displayName="title" />
+               <constant value="groupindex" displayName="groupindex" />
+               <constant value="1text" displayName="1text" />
+               <constant value="1text.1icon" displayName="1text.1icon" />
+               <constant value="2text" displayName="2text" />
+               <constant value="1text.1icon.divider" displayName="1text.1icon.divider" />
+               <constant value="1text.1icon.1" displayName="1text.1icon.1" />
+               <constant value="2text.1icon.1" displayName="2text.1icon.1" />
+               <constant value="editfield" displayName="editfield" />
+       </type>
+
+       <type id="efl.entry@textformat">
+               <constant value="plain_utf8" displayName="plain_utf8" />
+               <constant value="markup_utf8" displayName="markup_utf8" />
+       </type>
+
+       <type id="efl.circledatetime@style">
+               <constant value="datepicker/circle" displayName="datepicker/circle" />
+               <constant value="timepicker/circle" displayName="timepicker/circle" />
+       </type>
+
+       <type id="efl.button@style">
+               <constant value="default" displayName="default" />
+               <constant value="bottom" displayName="bottom" />
+       </type>
+       
+       <type id="efl.button@colors">
+               <constant value="bg" displayName="bg" required="default;bottom" />
+               <constant value="bg_pressed" displayName="bg_pressed" required="default;bottom" />
+               <constant value="bg_disabled" displayName="bg_disabled" required="default;bottom" />
+               <constant value="effect" displayName="effect" required="default;bottom" />
+               <constant value="text" displayName="text" required="default;bottom" />
+               <constant value="text_pressed" displayName="text_pressed" required="default;bottom" />
+               <constant value="text_disabled" displayName="text_disabled" required="default;bottom" />
+       </type>
+
+       <type id="efl.check@style">
+               <constant value="default" displayName="default" />
+               <constant value="small" displayName="small" />
+               <constant value="on&amp;off" displayName="on&amp;off" />
+       </type>
+
+       <type id="efl.ctxpopup@style">
+               <constant value="select_mode" displayName="select_mode" />
+               <constant value="select_mode/top" displayName="select_mode/top" />
+               <constant value="select_mode/bottom" displayName="select_mode/bottom" />
+       </type>
+
+       <type id="efl.slider@style">
+               <constant value="horizontal/default" displayName="default" />
+       </type>
+
+       <type id="efl.index@style">
+               <constant value="thumbnail" displayName="thumbnail" />
+               <constant value="circle" displayName="circle" />
+       </type>
+
+       <type id="efl.popup@style">
+               <constant value="circle" displayName="circle" />
+               <constant value="toast/circle" displayName="toast/circle" />
+       </type>
+
+       <type id="efl.icon@standardicon">
+               <constant value="" displayName="(None)" />
+               <constant value="apps" displayName="apps" />
+               <constant value="arrow_down" displayName="arrow_down" />
+               <constant value="arrow_left" displayName="arrow_left" />
+               <constant value="arrow_right" displayName="arrow_right" />
+               <constant value="arrow_up" displayName="arrow_up" />
+               <constant value="chat" displayName="chat" />
+               <constant value="clock" displayName="clock" />
+               <constant value="close" displayName="close" />
+               <constant value="delete" displayName="delete" />
+               <constant value="edit" displayName="edit" />
+               <constant value="file" displayName="file" />
+               <constant value="home" displayName="home" />
+               <constant value="media_player/forward" displayName="media_player/forward" />
+               <constant value="media_player/info" displayName="media_player/info" />
+               <constant value="media_player/next" displayName="media_player/next" />
+               <constant value="media_player/pause" displayName="media_player/pause" />
+               <constant value="media_player/play" displayName="media_player/play" />
+               <constant value="media_player/prev" displayName="media_player/prev" />
+               <constant value="media_player/rewind" displayName="media_player/rewind" />
+               <constant value="media_player/stop" displayName="media_player/stop" />
+               <constant value="menu/apps" displayName="menu/apps" />
+               <constant value="menu/arrow_up" displayName="menu/arrow_up" />
+               <constant value="menu/arrow_down" displayName="menu/arrow_down" />
+               <constant value="menu/arrow_left" displayName="menu/arrow_left" />
+               <constant value="menu/arrow_right" displayName="menu/arrow_right" />
+               <constant value="menu/chat" displayName="menu/chat" />
+               <constant value="menu/clock" displayName="menu/clock" />
+               <constant value="menu/close" displayName="menu/close" />
+               <constant value="menu/delete" displayName="menu/delete" />
+               <constant value="menu/edit" displayName="menu/edit" />
+               <constant value="menu/folder" displayName="menu/folder" />
+               <constant value="menu/file" displayName="menu/file" />
+               <constant value="menu/home" displayName="menu/home" />
+               <constant value="menu/refresh" displayName="menu/refresh" />
+               <constant value="no_photo" displayName="no_photo" />
+               <constant value="photo/no_photo" displayName="photo/no_photo" />
+               <constant value="refresh" displayName="refresh" />
+       </type>
+
+</types>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen-native-ui-fw.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen-native-ui-fw.xml
new file mode 100644 (file)
index 0000000..92ab7a2
--- /dev/null
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE descriptors [
+    <!ENTITY tizen.types SYSTEM "tizen.types.xml">
+       <!ENTITY tizen.uicomponent.categories SYSTEM "tizen.uicomponent.categories.xml">
+
+       <!-- default style edj -->
+       <!ENTITY efl.style.edj SYSTEM "efl.style.edj.xml">
+       
+       <!-- type & event type -->
+       <!ENTITY efl.types SYSTEM "efl.types.xml">
+       <!ENTITY tizen.eventtypes SYSTEM "tizen.eventtypes.xml">
+
+       <!-- VIEW -->
+       <!ENTITY tizen.view SYSTEM "widget/tizen.view.xml">
+       <!ENTITY tizen.empty.view SYSTEM "widget/tizen.empty.view.xml">
+
+       <!-- WIDGET -->
+       <!ENTITY efl.bg SYSTEM "widget/efl.bg.widget.xml">
+       <!ENTITY efl.button SYSTEM "widget/efl.button.widget.xml">
+       <!ENTITY efl.check SYSTEM "widget/efl.check.widget.xml">
+       <!ENTITY efl.entry SYSTEM "widget/efl.entry.widget.xml">
+       <!ENTITY efl.image SYSTEM "widget/efl.image.widget.xml">
+       <!ENTITY efl.label SYSTEM "widget/efl.label.widget.xml">
+       <!ENTITY efl.radio SYSTEM "widget/efl.radio.widget.xml">
+       <!ENTITY efl.list SYSTEM "widget/efl.list.widget.xml">
+       <!ENTITY efl.listitem SYSTEM "widget/efl.listitem.widget.xml">
+       <!ENTITY efl.layout SYSTEM "widget/efl.layout.widget.xml">
+       <!ENTITY efl.index SYSTEM "widget/efl.index.widget.xml">
+       <!ENTITY efl.indexitem SYSTEM "widget/efl.indexitem.widget.xml">
+       <!ENTITY efl.ctxpopup SYSTEM "widget/efl.ctxpopup.widget.xml">
+       <!ENTITY efl.ctxpopupitem SYSTEM "widget/efl.ctxpopupitem.widget.xml">
+       <!ENTITY efl.popup SYSTEM "widget/efl.popup.widget.xml">
+               
+       <!-- WIDGET : Circle -->
+       <!ENTITY efl.progressbar SYSTEM "widget/efl.progressbar.widget.xml">
+       <!ENTITY efl.slider SYSTEM "widget/efl.slider.widget.xml">
+       <!ENTITY efl.genlist SYSTEM "widget/efl.genlist.widget.xml">
+       <!ENTITY efl.genlistitem SYSTEM "widget/efl.genlistitem.widget.xml">
+       <!ENTITY efl.datetime SYSTEM "widget/efl.datetime.widget.xml">
+       <!ENTITY efl.scroller SYSTEM "widget/efl.scroller.widget.xml">
+
+       <!-- WIDGET : Container -->
+       <!ENTITY efl.grid SYSTEM "widget/efl.grid.widget.xml">
+       <!ENTITY efl.table SYSTEM "widget/efl.table.widget.xml">
+       <!ENTITY efl.box SYSTEM "widget/efl.box.widget.xml">
+       <!-- End of list -->
+]>
+
+<tizenFile>
+       <fileInfo>
+               <type>tizen-descriptor</type>
+               <version>2</version>
+               <desc>Tizen Native UI Builder Descriptor</desc>
+       </fileInfo>
+
+       <descriptors xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tizen="http://www.tizen.org/2012/uibuilder/descriptor">
+
+               <renderer id="EFL" />
+
+               <doc id="tizen.doc">
+                       <relations>
+                               <content ids="tizen.page" />
+                       </relations>
+               </doc>
+  
+       &tizen.uicomponent.categories;
+
+               <!-- default style edj -->
+       &efl.style.edj;
+
+               <!-- type & event type -->
+       &tizen.types;
+       &efl.types;
+       &tizen.eventtypes;
+
+               <!-- view -->
+       &tizen.view;
+
+       &efl.bg;
+       &efl.button;
+       &efl.check;
+       &efl.entry;
+       &efl.image;
+       &efl.label;
+       &efl.radio;
+       &efl.list;
+       &efl.listitem;
+       &efl.layout;
+       &efl.index;
+       &efl.indexitem;
+       &efl.grid;
+       &efl.table;
+       &efl.box;
+       &efl.progressbar;
+       &efl.slider;
+       &efl.genlist;
+       &efl.genlistitem;
+       &efl.datetime;
+       &efl.scroller;
+
+       </descriptors>
+</tizenFile>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen.eventtypes.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen.eventtypes.xml
new file mode 100644 (file)
index 0000000..dea9f2c
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<eventTypes>
+       <eventType id="event.eflevent">
+               <defaultCode>%page%_%object%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+
+       <eventType id="event.viewevent">
+               <defaultCode>%page%_%event%</defaultCode>
+               <param name="uib_$(page_name)_view_context *vc" type="" />
+               <param name="Evas_Object *obj" type="" />
+               <param name="void *event_info" type="" />
+       </eventType>
+</eventTypes>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen.types.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen.types.xml
new file mode 100644 (file)
index 0000000..5b5d28c
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<types>
+    <type id="text@databinding">
+        <constant value="text" displayName=""/>
+    </type>
+    <type id="foreach@databinding">
+        <constant value="foreach" displayName=""/>
+    </type>
+</types>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen.uicomponent.categories.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/tizen.uicomponent.categories.xml
new file mode 100644 (file)
index 0000000..d86fdb4
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<UIComponentCategories>
+       <UIComponentCategory name="Views" />
+       <UIComponentCategory name="UI containers" />
+       <UIComponentCategory name="UI components" />
+</UIComponentCategories>
+
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.bg.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.bg.widget.xml
new file mode 100644 (file)
index 0000000..adc10b3
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="bg" displayName="Background" smallIcon="widget/32/pal_bg_nor.png" icon.16="widget/16/view_p_bg_nor.png" category="UI components"
+       description="Background object, used for setting a solid color, image or Edje group as a background to a window or any container object" helpCategory=""
+       helpContents="" feedbackWidth="200" feedbackHeight="200" minWidth="1" minHeight="1" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="color" type="color" displayName="Color" default="#ffffff" category="General" tooltip="sets the color on a given background UI Component." />
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="sets the file path of the image" />
+       <property name="option" type="efl.bg@option" displayName="Option" default="scale" category="General"
+               tooltip="set the way how a background UI Component is to display its image.&#10;
+- center: Center the background image.&#10;
+- scale: Scale the background image, retaining the aspect ratio.&#10;
+- stretch: Stretch the background image to fill the UI Component's area.&#10;
+- tile: Tile background image at its original size.&#10;" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.box.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.box.widget.xml
new file mode 100644 (file)
index 0000000..08cb5e8
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="box" displayName="Box" smallIcon="widget/32/pal_box_nor.png" icon.16="widget/16/view_p_box_nor.png" category="UI containers"
+       description="A box arranges objects in a linear fashion, governed by a layout function that defines the details of this arrangement." layoutType="box"
+       helpCategory="" helpContents="" feedbackWidth="200" feedbackHeight="200" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the horizontal orientation." />
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General"
+               tooltip="sets the box to arrange its children homogeneously." />
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="sets the horizontal space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="150" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="sets the vertical space between the box's elements.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="150" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.button.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.button.widget.xml
new file mode 100644 (file)
index 0000000..b9f964c
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="button" displayName="Button" smallIcon="widget/32/pal_button_nor.png" icon.16="widget/16/view_p_button_nor.png" category="UI components"
+       description="This is a push-button. Press it and run some function. It can contain a simple label and icon object and it also has an autorepeat feature"
+       helpCategory="" helpContents="" feedbackWidth="130" feedbackHeight="130" minWidth="80" minHeight="130" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Button" category="General" tooltip="sets the text of the UI Component.">
+       </property>
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="style" type="efl.button@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component.">
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="repeated" displayName="repeated" eventType="event.eflevent" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent" />
+       <event name="unpressed" displayName="unpressed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.check.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.check.widget.xml
new file mode 100644 (file)
index 0000000..e7064b8
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="check" displayName="Check" smallIcon="widget/32/pal_check_nor.png" icon.16="widget/16/view_p_check_nor.png" category="UI components"
+       description="The check UI Component allows for toggling a value between true and false" helpCategory="" helpContents="" feedbackWidth="90" feedbackHeight="90"
+       minWidth="90" minHeight="90" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="state" type="efl@boolean" displayName="State" default="false" category="General" tooltip="sets the on/off state of the check UI Component." />
+       <property name="style" type="efl.check@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.ctxpopup.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.ctxpopup.widget.xml
new file mode 100644 (file)
index 0000000..bf84a91
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopup" displayName="Ctxpopup" smallIcon="widget/32/pal_ctx_nor.png" icon.16="widget/16/view_p_ctxp_nor.png" category="Views"
+       description="Ctxpopup(Context popup)s are used to provide options for the currently selected objects. Ctxpopup is composed of popup and a list of items inside popup." helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false"
+       uiSelector="#%id%" paletteVisible="false" xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="ctxpopupitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="direction" type="efl@direction" displayName="Direction" default="vertical" category="General" tooltip="sets the direction orientation." />
+
+       <property name="style" type="efl.ctxpopup@style" displayName="Style" default="select_mode" category="General" tooltip="sets the style of the widget.">
+               <condition name="enable-property" value="select_mode" target="disable" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="dismissed" displayName="dismissed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.ctxpopupitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.ctxpopupitem.widget.xml
new file mode 100644 (file)
index 0000000..dc6db61
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="ctxpopupitem" displayName="CtxPopupItem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI containers" description=""
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="ctxpopup">
+
+       <relations>
+               <parent ids="ctxpopup" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="CtxPopupItem" category="General" tooltip="The text of the list item" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.datetime.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.datetime.widget.xml
new file mode 100644 (file)
index 0000000..df49123
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="datetime" displayName="Datetime" smallIcon="widget/32/pal_date_nor.png" icon.16="widget/16/view_p_date_nor.png" category="UI components"
+       description="Datetime UI Component is used to display and input date time values" helpCategory="" helpContents="" feedbackWidth="320" feedbackHeight="180"
+       minWidth="280" minHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="style" type="efl.circledatetime@style" displayName="Style" default="datepicker/circle" category="General" tooltip="sets the style of the UI Component." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.entry.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.entry.widget.xml
new file mode 100644 (file)
index 0000000..46d3c5f
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="entry" displayName="Entry" smallIcon="widget/32/pal_entry_nor.png" icon.16="widget/16/view_p_entry_nor.png" category="UI components"
+       description="An entry is a convenience UI Component which shows a box that the user can enter text into" helpCategory="" helpContents="" feedbackWidth="150"
+       feedbackHeight="100" minWidth="50" minHeight="50" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="text" type="rm_string" displayName="Text" default="Entry" category="General" tooltip="Convenient macro for elm_object_part_text_set." />
+       <property name="single_line" type="efl@boolean" displayName="Single line" default="false" category="General" tooltip="Sets the entry to the single line mode." />
+       <property name="password" type="efl@boolean" displayName="Password" default="false" category="General" tooltip="Sets the entry to the password mode.">
+               <condition name="enable-property" value="false" target="single_line" />
+               <condition name="enable-property" value="false" target="editable" />
+       </property>
+       <property name="editable" type="efl@boolean" displayName="Editable" default="true" category="General" tooltip="Sets whether the entry is editable." />
+       <property name="scroll" type="efl@boolean" displayName="Scrollable" default="false" category="General" tooltip="Enables or disables scrolling in the entry." />
+
+       <property name="src" type="text-resource" displayName="File path" default="" category="General"
+               tooltip="Sets the file (and implicitly loads it) for the text to display and then allow edit. All changes are written back to the file after a short delay if the entry object is set to autosave (which is the default).">
+               <condition name="disable-property" value="" target="autosave" />
+               <condition name="disable-property" value="" target="text-format" />
+       </property>
+       <property name="file_text_format" type="efl.entry@textformat" displayName="Text Format" default="plain_utf8" category="General"
+               tooltip="Enumeration that defines the text format types.&#xD;
+       plain_utf8 : Plain UTF8 type&#xD;
+       markup_utf8 : Markup UTF8 type" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="changed,user" displayName="changed,user" eventType="event.eflevent" />
+       <event name="aborted" displayName="aborted" eventType="event.eflevent" />
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="press" displayName="press" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="clicked,triple" displayName="clicked,triple" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="selection,changed" displayName="selection,changed" eventType="event.eflevent" />
+       <event name="selection,cleared" displayName="selection,cleared" eventType="event.eflevent" />
+       <event name="selection,copy" displayName="selection,copy" eventType="event.eflevent" />
+       <event name="selection,cut" displayName="selection,cut" eventType="event.eflevent" />
+       <event name="selection,paste" displayName="selection,paste" eventType="event.eflevent" />
+       <event name="selection,start" displayName="selection,start" eventType="event.eflevent" />
+       <event name="cursor,changed" displayName="cursor,changed" eventType="event.eflevent" />
+       <event name="anchor,clicked" displayName="anchor,clicked" eventType="event.eflevent" />
+       <event name="anchor,down" displayName="anchor,down" eventType="event.eflevent" />
+       <event name="anchor,in" displayName="anchor,in" eventType="event.eflevent" />
+       <event name="anchor,out" displayName="anchor,out" eventType="event.eflevent" />
+       <event name="anchor,up" displayName="anchor,up" eventType="event.eflevent" />
+       <event name="preedit,changed" displayName="preedit,changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.genlist.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.genlist.widget.xml
new file mode 100644 (file)
index 0000000..50df898
--- /dev/null
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlist" displayName="Genlist" smallIcon="widget/32/pal_genlist_nor.png" icon.16="widget/16/view_p_genlist_nor.png" category="UI components"
+       description="This UI Component aims to have more expansive list than the simple list in Elementary that could have more flexible items and allow many more entries while still being fast and low on memory usage. At the same time it was also made to be able to do tree structures. But the price to pay is more complexity when it comes to usage. If all you want is a simple list with icons and a single text, use the normal List object"
+       helpCategory="" helpContents="" feedbackWidth="360" feedbackHeight="360" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="genlistitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="add genlist item" unusedEditors="source_tab" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="pressed" displayName="pressed" eventType="event.eflevent" />
+       <event name="released" displayName="released" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent" />
+       <event name="expanded" displayName="expanded" eventType="event.eflevent" />
+       <event name="contracted" displayName="contracted" eventType="event.eflevent" />
+       <event name="expand,request" displayName="expand,request" eventType="event.eflevent" />
+       <event name="contract,request" displayName="contract,request" eventType="event.eflevent" />
+       <event name="realized" displayName="realized" eventType="event.eflevent" />
+       <event name="unrealized" displayName="unrealized" eventType="event.eflevent" />
+       <event name="drag,start,up" displayName="drag,start,up" eventType="event.eflevent" />
+       <event name="drag,start,down" displayName="drag,start,down" eventType="event.eflevent" />
+       <event name="drag,start,left" displayName="drag,start,left" eventType="event.eflevent" />
+       <event name="drag,start,right" displayName="drag,start,right" eventType="event.eflevent" />
+       <event name="drag,stop" displayName="drag,stop" eventType="event.eflevent" />
+       <event name="drag" displayName="drag" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="multi,swipe,left" displayName="multi,swipe,left" eventType="event.eflevent" />
+       <event name="multi,swipe,right" displayName="multi,swipe,right" eventType="event.eflevent" />
+       <event name="multi,swipe,up" displayName="multi,swipe,up" eventType="event.eflevent" />
+       <event name="multi,swipe,down" displayName="multi,swipe,down" eventType="event.eflevent" />
+       <event name="multi,pinch,out" displayName="multi,pinch,in" eventType="event.eflevent" />
+       <event name="multi,pinch,in" displayName="multi,pinch,in" eventType="event.eflevent" />
+       <event name="swipe" displayName="swipe" eventType="event.eflevent" />
+       <event name="moved" displayName="moved" eventType="event.eflevent" />
+       <event name="moved,after" displayName="moved,after" eventType="event.eflevent" />
+       <event name="moved,before" displayName="moved,before" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="tree,effect,finished" displayName="tree,effect,finished" eventType="event.eflevent" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.genlistitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.genlistitem.widget.xml
new file mode 100644 (file)
index 0000000..c771cab
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="genlistitem" displayName="Genlistitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="genlist">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="sets the text of item" />
+       <property name="sub_text" type="rm_string" displayName="Sub Text" default="Sub Text" category="General" tooltip="sets the sub text of item" />
+       <property name="style" type="efl.circlegenlist@itemstyle" displayName="Style" default="default" category="General"
+               tooltip="sets the item style&#10;
+An item in a genlist can have 0 or more texts, 0 or more contents and 0 or more boolean states. This is up to the item style defined here.
+- default: 1 text part, 2 content parts, and no state parts are used.&#10;
+- default_style: same as default but text part is a textblock.&#10;
+- double_label: this is not specified in the document" />
+
+       <property name="image_path" type="image" displayName="Image path" default="" category="Icon"
+               tooltip="sets the file path of the image to be shown in the list item before label text&#10;
+       If standard icon is set, this will be ignored" />
+       <property name="end_image_path" type="image" displayName="Image path" default="" category="End Icon"
+               tooltip="sets the file path of the image to be shown in the list item after label text&#10;
+       If standard icon is set, this will be ignored" />
+
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.grid.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.grid.widget.xml
new file mode 100644 (file)
index 0000000..6ea095a
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="grid" displayName="Grid" smallIcon="widget/32/pal_grid_nor.png" icon.16="widget/16/view_p_grid_nor.png" category="UI containers"
+       description="The grid is a grid layout UI Component that lays out a series of children as a fixed 'grid' of UI Components using a given percentage of the grid width and height each using the child object."
+       layoutType="grid" helpCategory="" helpContents="" feedbackWidth="300" feedbackHeight="150" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="vsize_w" type="integer" displayName="Col count" default="1000" category="General" tooltip="sets the virtual width of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+       <property name="vsize_h" type="integer" displayName="Row count" default="1000" category="General" tooltip="sets the virtual height of the grid.">
+               <condition name="integer-min" value="1" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack_x" type="integer" displayName="Left" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_w" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_y" type="integer" displayName="Top" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="vsize_h" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_w" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_x" targetValue="vsize_w" error="size-max" />
+               </property>
+               <property name="pack_h" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="pack_y" targetValue="vsize_h" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.image.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.image.widget.xml
new file mode 100644 (file)
index 0000000..26fafc6
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="image" displayName="Image" smallIcon="widget/32/pal_image_nor.png" icon.16="widget/16/view_p_image_nor.png" category="UI components"
+       description="An Elementary image object is a direct realization of The Elementary Image Class, and it allows one to load and display an image file on it, be it from a disk file or from a memory region"
+       helpCategory="" helpContents="" feedbackWidth="100" feedbackHeight="100" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="src" type="image" displayName="Image path" default="" category="General" tooltip="Sets the file that is used as the image's source." />
+       <property name="no_scale" type="efl@boolean" displayName="No scale" default="false" category="General" tooltip="Disables scaling of this object." />
+       <property name="resizable_up" type="efl@boolean" displayName="Resizable(up)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable up" />
+       <property name="resizable_down" type="efl@boolean" displayName="Resizable(down)" default="true" category="General"
+               tooltip="The boolean value to set if the object is resizeable down" />
+       <!-- <property name="orient" type="efl.image@orient" displayName="Orient" default="none" category="General" tooltip="Sets the image orientation.&#xD;&#xD; none&#xD; 
+               : No orientation change&#xD; orient_0&#xD; : No orientation change&#xD; rotate_90&#xD; : Rotate 90 degrees clockwise&#xD; rotate_180&#xD; : Rotate 180 degrees clockwise&#xD; 
+               rotate_270&#xD; : Rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise)&#xD; flip_horizontal&#xD; : Flip image horizontally&#xD; flip_vertical&#xD; : 
+               Flip image vertically&#xD; flip_transpose&#xD; : Flip the image along the y = (width - x) line (bottom-left to top-right)&#xD; flip_transverse&#xD; : Flip the image 
+               along the y = x line (top-left to bottom-right)" /> -->
+       <property name="aspect_fixed" type="efl@boolean" displayName="Aspect fixed" default="false" category="General"
+               tooltip="Set whether the original aspect ratio of the image should be kept on resize." />
+       <property name="fill_outside" type="efl@boolean" displayName="Fill outsize" default="false" category="General"
+               tooltip="Sets whether the image fills the entire object area, when keeping the aspect ratio." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+       <event name="drop" displayName="drop" eventType="event.eflevent" />
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.index.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.index.widget.xml
new file mode 100644 (file)
index 0000000..d029e31
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="index" displayName="Index" smallIcon="widget/32/pal_index_nor.png" icon.16="widget/16/view_p_index_nor.png" category="UI components"
+       description="An index UI Component gives you an index for fast access to whichever group of other UI items one might have" helpCategory="" helpContents=""
+       feedbackWidth="80" feedbackHeight="360" minWidth="80" minHeight="50" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="indexitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="style" type="efl.index@style" displayName="Style" default="thumbnail" category="General" tooltip="sets the style of the UI Component." />
+       <property name="autohide" type="efl@boolean" displayName="Autohide enabled" default="false" category="General"
+               tooltip="Enables or disables the auto hiding feature for a given index UI Component." unusedEditors="properties" />
+       <property name="indicator" type="efl@boolean" displayName="Indicator enabled" default="true" category="General" tooltip="Sets the indicator to be enabled."
+               unusedEditors="properties" />
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="Appends a new item on a given index UI Component."
+               unusedEditors="source_tab" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="level,up" displayName="level,up" eventType="event.eflevent" />
+       <event name="level,down" displayName="level,down" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.indexitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.indexitem.widget.xml
new file mode 100644 (file)
index 0000000..3267fd1
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="indexitem" displayName="Indexitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="IndexItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="index">
+
+       <relations>
+               <parent ids="index" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <!-- <property name="text" type="rm_string" displayName="Text" default="item" category="General" tooltip="The letter under which the item should be indexed" /> -->
+
+       <!-- <event name="itemselected" displayName="itemselected" eventType="event.eflevent" /> -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.label.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.label.widget.xml
new file mode 100644 (file)
index 0000000..8c1d17d
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="label" displayName="Label" smallIcon="widget/32/pal_label_nor.png" icon.16="widget/16/view_p_label_nor.png" category="UI components"
+       description="UI Component to display text, with simple html-like markup" helpCategory="" helpContents="" feedbackWidth="120" feedbackHeight="50" minWidth="50"
+       minHeight="30" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="Label" category="General" tooltip="sets the text of the UI Component." />
+       <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <!-- <property name="style" type="efl.label@style" displayName="Style" default="default" category="General" tooltip="Sets the style to be used by the label.&#10; 
+               if the text doesn't fit the geometry of the label, it is ellipsized or cut. Elementary provides several styles for this UI Component.&#10; - default: No animation.&#10; 
+               - marker: Centers the text in the label and makes it bold by default.&#10; - slide_long: The entire text appears from the right of the screen and slides until it 
+               disappears in the left of the screen(reappearing on the right again).&#10; - slide_short: The text appears in the left of the label and slides to the right to show 
+               the overflow. When all of the text has been shown the position is reset.&#10; - slide_bounce: The text appears in the left of the label and slides to the right to 
+               show the overflow. When all of the text has been shown the animation reverses, moving the text to the left."/> -->
+       <property name="line_wrap" type="efl.label@wraptype" displayName="Wrap type" default="none" category="General"
+               tooltip="sets the wrapping behavior of the label.&#10;
+- none: No wrapping.&#10;
+- char: Wrap between characters.&#10;
+- word: Wrap between words.&#10;
+- mixed: Word wrap, and if that fails, char wrap." />
+       <property name="wrap_width" type="integer" displayName="Wrap width" default="0" category="General" tooltip="sets the maximum width size hint of the label." />
+       <property name="ellipsis" type="efl@boolean" displayName="Ellipsis" default="true" category="General" tooltip="sets the ellipsis behavior of the label." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="slide,end" displayName="slide,end" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.layout.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.layout.widget.xml
new file mode 100644 (file)
index 0000000..fbb25dc
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="layout" displayName="Layout" smallIcon="widget/32/pal_layout_nor.png" icon.16="widget/16/view_p_layout_nor.png" category="UI components"
+       description="This is a container UI Component that takes a standard Edje design file and wraps it very thinly in a UI Component" helpCategory="" helpContents=""
+       feedbackWidth="150" feedbackHeight="150" minWidth="50" minHeight="20" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="src" type="layout-resource" displayName="File path" default="" category="General" tooltip="The path to the file (edj) that is used as a layout" />
+       <property name="group" type="dynamic-combo" displayName="Group name" default="" category="General" tooltip="The group that the layout belongs to in the edje file" />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="theme,changed" displayName="theme,changed" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.list.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.list.widget.xml
new file mode 100644 (file)
index 0000000..3de6eac
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="list" displayName="List" smallIcon="widget/32/pal_list_nor.png" icon.16="widget/16/view_p_list_nor.png" category="UI components"
+       description="A list UI Component is a container whose children are displayed vertically or horizontally, in order, and can be selected. The list can accept only one or multiple item selections. Also has many modes of items displaying."
+       helpCategory="" helpContents="" feedbackWidth="360" feedbackHeight="360" minWidth="50" minHeight="110" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content ids="listitem" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="data_bind" type="foreach@databinding" displayName="Data Binding" default="" initValue=""/>
+       <property name="item-add" type="item-add" displayName="Add Item" category="General" tooltip="" unusedEditors="source_tab" />
+       <property name="mode" type="efl.list@mode" displayName="Mode" default="scroll" category="General" tooltip="Sets which mode to use for the list object." />
+       <property name="select_mode" type="efl@selectmode" displayName="Select mode" default="default" category="General" tooltip="Sets the list select mode." />
+       <property name="multi_select" type="efl@boolean" displayName="Multi select" default="false" category="General"
+               tooltip="Enables or disables multiple items selection on the list object.">
+               <condition name="enable-property" value="true" target="multi-select-mode" />
+       </property>
+       <!-- <property name="multi-select-mode" type="efl.list@multiselectmode" displayName="Multi select mode" default=""/> -->
+
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General" tooltip="The horizontal scrollbar policy " />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General" tooltip="The vertical scrollbar policy " />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="activated" displayName="activated" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="selected" displayName="selected" eventType="event.eflevent" />
+       <event name="unselected" displayName="unselected" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="highlighted" displayName="highlighted" eventType="event.eflevent" />
+       <event name="unhighlighted" displayName="unhighlighted" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.listitem.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.listitem.widget.xml
new file mode 100644 (file)
index 0000000..3614efa
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="listitem" displayName="Listitem" smallIcon="" icon.16="widget/16/view_p_item_nor.png" category="UI components" description="listItem"
+       helpCategory="" helpContents="" borderVisible="false" uiSelector="#%id%" paletteVisible="false" xpath="" containerID="list">
+
+       <relations>
+               <parent ids="list" />
+               <content ids="icon" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="text" type="rm_string" displayName="Text" default="List item" category="General" tooltip="The text of the list item" />
+       <property name="selected" type="efl@boolean" displayName="Selected" default="false" category="General" tooltip="Sets the selected state of an item." />
+    <property name="data_bind" type="text@databinding" displayName="Data Binding" default="" initValue=""/>
+       <event name="itemselected" displayName="itemselected" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.map.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.map.widget.xml
new file mode 100644 (file)
index 0000000..2b435bf
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="map" displayName="Map" smallIcon="widget/32/pal_map_nor.png" icon.16="widget/16/view_p_map_nor.png" category="UI components"
+       description="This is a widget specifically for displaying a map" helpCategory="" helpContents="" feedbackWidth="300" feedbackHeight="300" minWidth="100"
+       minHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="zoom_level" type="scale-integer" displayName="Zoom level" default="15" category="General" tooltip="Sets the zoom level of the map">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="20" error="integer-max" />
+       </property>
+
+       <property name="longitude" type="double" displayName="longitude" default="0" category="General" tooltip="The longitude to show at the center">
+               <condition name="integer-min" value="-180" error="integer-min" />
+               <condition name="integer-max" value="180" error="integer-max" />
+       </property>
+       <property name="latitude" type="double" displayName="latitude" default="0" category="General" tooltip="The latitude to show at the center">
+               <condition name="integer-min" value="-90" error="integer-min" />
+               <condition name="integer-max" value="90" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="clicked" displayName="clicked" eventType="event.eflevent" />
+       <event name="press" displayName="press" eventType="event.eflevent" />
+       <event name="longpressed" displayName="longpressed" eventType="event.eflevent" />
+       <event name="clicked,double" displayName="clicked,double" eventType="event.eflevent" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+       <event name="loaded" displayName="loaded" eventType="event.eflevent" />
+       <event name="zoom,start" displayName="zoom,start" eventType="event.eflevent" />
+       <event name="zoom,stop" displayName="zoom,stop" eventType="event.eflevent" />
+       <event name="zoom,change" displayName="zoom,change" eventType="event.eflevent" />
+       <event name="tile,load" displayName="tile,load" eventType="event.eflevent" />
+       <event name="tile,loaded" displayName="tile,loaded" eventType="event.eflevent" />
+       <event name="route,load" displayName="route,load" eventType="event.eflevent" />
+       <event name="route,loaded" displayName="route,loaded" eventType="event.eflevent" />
+       <event name="name,load" displayName="name,load" eventType="event.eflevent" />
+       <event name="name,loaded" displayName="name,loaded" eventType="event.eflevent" />
+       <event name="overlay,clicked" displayName="overlay,clicked" eventType="event.eflevent" />
+       <event name="tile,loaded,fail" displayName="tile,loaded,fail" eventType="event.eflevent" />
+       <event name="route,loaded,fail" displayName="route,loaded,fail" eventType="event.eflevent" />
+       <event name="name,loaded,fail" displayName="name,loaded,fail" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.popup.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.popup.widget.xml
new file mode 100644 (file)
index 0000000..6d4f9ed
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="popup" displayName="Popup" smallIcon="widget/32/pal_popup_nor.png" icon.16="widget/16/view_p_popup_nor.png" category="Views" description="Popups are temporarily displayed on the screenb to provide information or to ask for user confirmation. Popup allows users to take instant action for events. Popup is an enhancement of Notify components and is composed of three areas: Title, Content and Action with up to 3 buttons(optional)." layoutType="Popup"
+       helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false" uiSelector="#%id%"
+       xpath="">
+
+       <relations>
+               <parent ids="view" />
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the widget in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the widget." />
+
+       <property name="title" type="string" displayName="Title" default="Title" category="General" tooltip="The title text of the popup widget">
+       </property>
+       <property name="style" type="efl.popup@style" displayName="Style" default="circle" category="General" tooltip="sets the style of the UI Component." />
+       <property name="height" type="scale-integer" displayName="Height" default="200" category="General"
+               tooltip="sets the x of left upper corner of the widget.&#10;
+But this depends on the container of the widget.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="400" error="integer-max" />
+       </property>
+       <property name="timeout" type="double" displayName="Timeout" default="0" category="General" tooltip="Sets a timeout to hide popup automatically">
+               <condition name="integer-min" value="0" error="integer-min" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the widget.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="timeout" displayName="timeout" eventType="event.eflevent" />
+       <event name="block,clicked" displayName="block,clicked" eventType="event.eflevent" />
+       <event name="language,changed" displayName="language,changed" eventType="event.eflevent" />
+       <event name="focused" displayName="focused" eventType="event.eflevent" />
+       <event name="unfocused" displayName="unfocused" eventType="event.eflevent" />
+       <event name="item,focused" displayName="item,focused" eventType="event.eflevent" />
+       <event name="item,unfocused" displayName="item,unfocused" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.progressbar.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.progressbar.widget.xml
new file mode 100644 (file)
index 0000000..d824e5b
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="progressbar" displayName="Progressbar" smallIcon="widget/32/pal_progress_nor.png" icon.16="widget/16/view_p_progress_nor.png" category="UI components"
+       description="The progress bar is a UI Component for visually representing the progress status of a given job/task" helpCategory="" helpContents=""
+       feedbackWidth="360" feedbackHeight="360" minWidth="360" minHeight="360" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+
+       <property name="min" type="double" displayName="Min Value" default="0" category="General" tooltip="sets the minimum value for the progressbar.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max-by" value="value" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max Value" default="100" category="General" tooltip="sets the minimum value for the progressbar.">
+               <condition name="integer-max" value="999999" error="integer-max" />
+               <condition name="integer-min-by" value="value" error="integer-min-by" />
+       </property>
+       <property name="value" type="double" displayName="Value" default="0" category="General" tooltip="Sets the progress value on a given progress bar UI Component.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.radio.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.radio.widget.xml
new file mode 100644 (file)
index 0000000..0172d8c
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="radio" displayName="Radio" smallIcon="widget/32/pal_radio_nor.png" icon.16="widget/16/view_p_radio_nor.png" category="UI components"
+       description="Radio is a UI Component that allows for 1 or more options to be displayed and have the user choose only 1 of them" helpCategory="" helpContents=""
+       feedbackWidth="100" feedbackHeight="100" minWidth="100" minHeight="100" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+       <property name="value" type="integer" displayName="Value" default="0" category="General"
+               tooltip="sets the value of the radio group.&#10;
+The radio group is initialized with this value. The value should be one of the radio buttons' state values in the group to be properly initialized." />
+       <property name="state_value" type="integer" displayName="State value" default="0" category="General" tooltip="sets the integer value that this radio object represents." />
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.scroller.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.scroller.widget.xml
new file mode 100644 (file)
index 0000000..0ab08a4
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="scroller" displayName="Scroller" smallIcon="widget/32/pal_scroller_nor.png" icon.16="widget/16/view_p_scroller_nor.png" category="UI containers"
+       description="A scroller holds (and clips) a single object and scrolls it around. This means that it allows the user to use a scroll bar (or a finger) to drag the viewable region around, moving through a much larger object that is contained in the scroller. The scroller will always have a small minimum size by default as it won't be limited by the contents of the scroller"
+       layoutType="box" helpCategory="" helpContents="" feedbackWidth="200" feedbackHeight="200" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" max="1" />
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="scrollbar_h" type="efl@scrollbar_h" displayName="Policy(Horizontal)" default="auto" category="General"
+               tooltip="sets the horizontal scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="scrollbar_v" type="efl@scrollbar_v" displayName="Policy(Vertical)" default="auto" category="General"
+               tooltip="sets the vertical scrollbar visibility policy.&#10;
+- auto: Show scrollbars as needed.&#10;
+- on: Always show scrollbars.&#10;
+- off: Never show scrollbars." />
+       <property name="content_min_w" type="efl@boolean" displayName="Min limit(Width)" default="false" category="General"
+               tooltip="Make the scroller minimum width size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+       <property name="content_min_h" type="efl@boolean" displayName="Min limit(Height)" default="false" category="General"
+               tooltip="Make the scroller minimum heigth size limited to the minimum size of the content.&#10;
+By default the scroller will be as small as its design allows, irrespective of its content. 
+This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction." />
+       <property name="propagate_events" type="efl@boolean" displayName="Propagate events" default="true" category="General"
+               tooltip="sets event propagation on a scroller.&#10;
+This enables or disables event propagation from the scroller content to the scroller and its parent. By default event propagation is enabled" />
+       <!-- <property name="gravity-x" type="double" displayName="Gravity(Horizontal)" default="0"> <condition name="integer-min" value="0" error="integer-min"/> <condition 
+               name="integer-max" value="1" error="integer-max"/> </property> <property name="gravity-y" type="double" displayName="Gravity(Vertical)" default="0"> <condition name="integer-min" 
+               value="0" error="integer-min"/> <condition name="integer-max" value="1" error="integer-max"/> </property> <property name="movement-block" type="efl.scroller@movementblock" 
+               displayName="Movement block" default="1"/> <property name="page-size-h" type="integer" displayName="Page size(Horizontal)" default="0"> <condition name="enable-property" 
+               value="true" target="page-h-snap"/> <condition name="enable-property" value="true" target="h-pagerel"/> <condition name="enable-property" value="true" target="page-limit-h"/> 
+               </property> <property name="page-size-v" type="integer" displayName="Page size(Vertical)" default="0"> <condition name="enable-property" value="true" target="page-v-snap"/> 
+               <condition name="enable-property" value="true" target="v-pagerel"/> <condition name="enable-property" value="true" target="page-limit-v"/> </property> <property 
+               name="page-h-snap" type="efl@boolean" displayName="Page snap(Horizontal)" default="false"/> <property name="page-v-snap" type="efl@boolean" displayName="Page snap(Vertical)" 
+               default="false"/> <property name="h-pagerel" type="double" displayName="Page relative(Horizontal)" default="0"> <condition name="integer-min" value="0" error="integer-min"/> 
+               <condition name="integer-max" value="1" error="integer-max"/> </property> <property name="v-pagerel" type="double" displayName="Page relative(Vertical)" default="0"> 
+               <condition name="integer-min" value="0" error="integer-min"/> <condition name="integer-max" value="1" error="integer-max"/> </property> <property name="page-limit-h" 
+               type="integer" displayName="Page scroll limit(Horizontal)" default="1"> <condition name="integer-min" value="1" error="integer-min"/> </property> <property name="page-limit-v" 
+               type="integer" displayName="Page scroll limit(Vertical)" default="1"> <condition name="integer-min" value="1" error="integer-min"/> </property> -->
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+
+       <event name="edge,left" displayName="edge,left" eventType="event.eflevent" />
+       <event name="edge,right" displayName="edge,right" eventType="event.eflevent" />
+       <event name="edge,top" displayName="edge,top" eventType="event.eflevent" />
+       <event name="edge,bottom" displayName="edge,bottom" eventType="event.eflevent" />
+       <event name="scroll" displayName="scroll" eventType="event.eflevent" />
+       <event name="scroll,anim,start" displayName="scroll,anim,start" eventType="event.eflevent" />
+       <event name="scroll,anim,stop" displayName="scroll,anim,stop" eventType="event.eflevent" />
+       <event name="scroll,drag,start" displayName="scroll,drag,start" eventType="event.eflevent" />
+       <event name="scroll,drag,stop" displayName="scroll,drag,stop" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.slider.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.slider.widget.xml
new file mode 100644 (file)
index 0000000..4f3c51f
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="slider" displayName="Slider" smallIcon="widget/32/pal_slider_nor.png" icon.16="widget/16/view_p_slider_nor.png" category="UI components"
+       description="The slider adds a draggable “slider” UI Component for selecting the value of something within a range" helpCategory="" helpContents=""
+       feedbackWidth="360" feedbackHeight="360" minWidth="360" minHeight="360" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+       <property name="disable" type="efl@boolean" displayName="Disable" default="false" category="General" tooltip="sets the disabled state of the UI Component." />
+
+       <!-- <property name="direction" type="efl@boolean" displayName="Direction" default="vertical" category="General" tooltip="sets the orientation of a given slider 
+               UI Component."/> -->
+       <!-- <property name="style" type="efl.slider@style" displayName="Style" default="default" category="General" tooltip="sets the style of the UI Component."/> -->
+       <property name="min" type="double" displayName="Min Value" default="0.0" category="General" tooltip="sets the minimum value for the slider.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max-by" value="value" error="integer-max-by" />
+       </property>
+       <property name="max" type="double" displayName="Max Value" default="1.0" category="General" tooltip="sets the maximum value for the slider.">
+               <condition name="integer-max" value="999999" error="integer-max" />
+               <condition name="integer-min-by" value="value" error="integer-min-by" />
+       </property>
+       <property name="value" type="double" displayName="Value" default="0.0" category="General" tooltip="sets the value the slider displays.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+       <!-- <property name="inverted" type="efl@boolean" displayName="Inverted" default="false" category="General" tooltip="inverts a given slider UI Component's displaying 
+               values order."/> -->
+       <property name="step" type="double" displayName="Step" default="0.05" category="General" tooltip="sets the step by which slider indicator will move.">
+               <condition name="integer-min-by" value="min" error="integer-min-by" />
+               <condition name="integer-max-by" value="max" error="integer-max-by" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <event name="changed" displayName="changed" eventType="event.eflevent" />
+       <event name="slider,drag,start" displayName="slider,drag,start" eventType="event.eflevent" />
+       <event name="slider,drag,stop" displayName="slider,drag,stop" eventType="event.eflevent" />
+       <event name="delay,changed" displayName="delay,changed" eventType="event.eflevent" />
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.table.widget.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/efl.table.widget.xml
new file mode 100644 (file)
index 0000000..2ca416d
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="table" displayName="Table" smallIcon="widget/32/pal_table_nor.png" icon.16="widget/16/view_p_table_nor.png" category="UI containers"
+       description="A container UI Component to arrange other UI Components in a table where items can span multiple columns or rows" layoutType="table" helpCategory=""
+       helpContents="" feedbackWidth="300" feedbackHeight="300" borderVisible="false" uiSelector="#%id%" xpath="">
+
+       <relations>
+               <content type="widget" />
+       </relations>
+
+       <!-- Common -->
+       <property name="id" type="string" displayName="ID" default="" category="General" tooltip="represents the id of the UI Component in the generated code.">
+               <condition name="string-id" error="string-id" />
+       </property>
+
+       <property name="homogeneous" type="efl@boolean" displayName="Homogeneous" default="false" category="General" tooltip="Sets the homogeneous layout in the table." />
+
+       <!-- My -->
+       <property name="cols" type="integer" displayName="Col count" default="2" category="General" tooltip="The column count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="rows" type="integer" displayName="Row count" default="2" category="General" tooltip="The row count of the table UI Component">
+               <condition name="integer-min" value="1" error="integer-min" />
+               <condition name="integer-max" value="10" error="integer-max" />
+       </property>
+       <property name="padding_h" type="integer" displayName="Padding H" default="0" category="General" tooltip="The horizontal padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+       <property name="padding_v" type="integer" displayName="Padding V" default="0" category="General" tooltip="The vertical padding">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="50" error="integer-max" />
+       </property>
+
+       <property name="align_h" type="check-scale" displayName="X" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="align_v" type="check-scale" displayName="Y" default="fill" category="Align Hint" tooltip="sets the hints for an object's alignment">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_h" type="scale" displayName="X" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="weight_v" type="scale" displayName="Y" default="1" category="Weight Hint" tooltip="sets the hints for an object's weight.">
+               <condition name="integer-min" value="0" error="integer-min" />
+               <condition name="integer-max" value="1" error="integer-max" />
+       </property>
+       <property name="visible" type="efl@boolean" displayName="Visible" default="true" category="Variation attributes" tooltip="show or hide the UI Component.">
+               <condition name="show-property-by-parent" value="table" />
+               <condition name="show-property-by-parent" value="grid" />
+               <condition name="show-property-by-parent" value="box" />
+       </property>
+
+       <childUIComponentProperty>
+               <property name="pack_col" type="integer" displayName="Column" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the x of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="cols" error="integer-max-by-parent-property" />
+               </property>
+               <property name="pack_row" type="integer" displayName="Row" default="" inline="true" category="Variation attributes"
+                       tooltip="sets the y of left upper corner of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="0" error="integer-min" />
+                       <condition name="integer-max-by-parent-property" targetValue="rows" error="integer-max-by-parent-property" />
+               </property>
+               <property name="col_span" type="integer" displayName="Width" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the width of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="col_span" targetValue="cols" error="size-max" />
+               </property>
+               <property name="row_span" type="integer" displayName="Height" inline="true" default="" category="Variation attributes"
+                       tooltip="sets the height of the UI Component.&#10;
+But this depends on the container of the UI Component.">
+                       <condition name="integer-min" value="1" error="integer-min" />
+                       <condition name="size-max" value="row_span" targetValue="rows" error="size-max" />
+               </property>
+       </childUIComponentProperty>
+
+       <!-- Events : N/A -->
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/tizen.view.xml b/org.tizen.efluibuilder.descriptor/res/wearable-circle-3.0/widget/tizen.view.xml
new file mode 100644 (file)
index 0000000..27e5787
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget id="view" displayName="View" smallIcon="widget/32/pal_empty_nor.png" icon.16="widget/16/view_p_view_nor.png" uiSelector="#%id%" layoutType="view" xpath=""
+category="Views" description="Empty View" helpCategory="EFL_Widget" helpContents="list" feedbackWidth="300" feedbackHeight="300" minWidth="10" minHeight="10" borderVisible="false"
+>
+
+       <relations>
+               <content ids="scroller" max="1" exclusiveGroup="default" />
+               <content ids="grid" max="1" exclusiveGroup="default" />
+               <content ids="table" max="1" exclusiveGroup="default" />
+               <content ids="box" max="1" exclusiveGroup="default" />
+               <content ids="panes" max="1" exclusiveGroup="default" />
+               <content ids="tabbar" max="1" exclusiveGroup="default" />
+               <!--<content ids="circlescroller" max="1" exclusiveGroup="default"/> -->
+       </relations>
+
+       <property name="id" type="string" displayName="ID" default="" category="General">
+               <condition name="string-id" error="string-page-id" />
+       </property>
+       <property name="type" type="string" displayName="type" initValue="view" category="General" />
+       <property name="indicator" type="efl@boolean" displayName="Indicator" default="true" category="General" tooltip="show or hide the indicator.">
+       </property>
+       <property name="page_location_x" type="integer" displayName="location_x" category="Position" unusedEditors="properties">
+       </property>
+       <property name="page_location_y" type="integer" displayName="location_y" category="Position" unusedEditors="properties">
+       </property>
+       <event name="uib,view,create" displayName="view,create" eventType="event.viewevent">
+               if (sizeof(uib_%page%_control_context)) {
+               vc->cc = calloc(1,
+               sizeof(uib_%page%_control_context));
+               }
+       </event>
+       <event name="uib,view,destroy" displayName="view,destroy" eventType="event.viewevent">
+               if (vc->cc) {
+               /* destroy your Control_Context here */
+
+               free(vc->cc);
+               }
+       </event>
+</widget>
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/descriptor/Activator.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/descriptor/Activator.java
new file mode 100644 (file)
index 0000000..118de88
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.descriptor;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.tizen.efluibuilder.descriptor"; //$NON-NLS-1$
+
+    // The shared instance
+    private static Activator plugin;
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     * 
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/descriptor/DescriptorConstants.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/descriptor/DescriptorConstants.java
new file mode 100644 (file)
index 0000000..e2e4049
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.descriptor;
+
+/**
+ * A ui builder constants class.
+ */
+public class DescriptorConstants {
+
+    // Special character
+    public static final String EMPTY = ""; //$NON-NLS-1$
+    public static final String SPACE = " "; //$NON-NLS-1$
+    public static final String TAB = "  "; //$NON-NLS-1$
+    public static final String SLASH = "/"; //$NON-NLS-1$
+    public static final String BSLASH = "\\"; //$NON-NLS-1$
+    public static final String NEW_LINE = "\n"; //$NON-NLS-1$
+    public static final String DOT = "."; //$NON-NLS-1$
+    public static final String COMMA = ","; //$NON-NLS-1$
+    public static final String COLON = ":"; //$NON-NLS-1$
+    public static final String SEMICOLON = ";"; //$NON-NLS-1$
+    public static final String DASH = "-"; //$NON-NLS-1$
+    public static final String UNDERBAR = "_"; //$NON-NLS-1$
+    public static final String OPEN_BRACKET = "("; //$NON-NLS-1$
+    public static final String CLOSE_BRACKET = ")"; //$NON-NLS-1$
+    public static final String OPEN_CURLY_BRACKET = "{"; //$NON-NLS-1$
+    public static final String CLOSE_CURLY_BRACKET = "}"; //$NON-NLS-1$
+    public static final String OPEN_SQUARE_BRACKET = "["; //$NON-NLS-1$
+    public static final String CLOSE_SQUARE_BRACKET = "]"; //$NON-NLS-1$
+    public static final String OPEN_TRI_BRACKET = "<"; //$NON-NLS-1$
+    public static final String CLOSE_TRI_BRACKET = ">"; //$NON-NLS-1$
+    public static final String TILDE = "~"; //$NON-NLS-1$
+    public static final String ELLIPSIS = "..."; //$NON-NLS-1$
+    public static final String EQUAL = "="; //$NON-NLS-1$
+    public static final String ASTERISK = "*"; //$NON-NLS-1$
+    public static final String GRAVE_ACCENT = "`"; //$NON-NLS-1$
+    public static final String QUOTATION_MARK = "\""; //$NON-NLS-1$
+    public static final String SHARP = "#"; //$NON-NLS-1$
+    public static final String AT = "@"; //$NON-NLS-1$
+    public static final String AUTO = "auto"; //$NON-NLS-1$
+
+    // Project file attribute value
+    public static final String TRUE = "true"; //$NON-NLS-1$
+
+    // widget folder in res
+    public static final String DESCRIPTOR_WIDGET_FOLDER = "widget"; //$NON-NLS-1$
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ChildPropertyDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ChildPropertyDescriptor.java
new file mode 100644 (file)
index 0000000..90ee228
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+/**
+ * A child property descriptor.
+ */
+public class ChildPropertyDescriptor extends PropertyDescriptor {
+
+    /**
+     * A css property selector.
+     */
+    private String selector;
+
+    /**
+     * Constructor.
+     * 
+     * @param name
+     *            a property name
+     * @param type
+     *            a property type
+     * @param displayName
+     *            a property name on display in Properties view
+     * @param tooltip
+     *            a property tooltip
+     * @param defaultValue
+     *            a default property value
+     * @param initValue
+     *            a initial property value
+     * @param category
+     *            a property category
+     * @param xpath
+     *            a xpath
+     * @param selector
+     *            a css property selector
+     * @param manager
+     *            a {@link DescriptorManager}
+     */
+    public ChildPropertyDescriptor(String name, String type, String displayName, String tooltip, String defaultValue, String initValue, String category,
+            String xpath, String attrXpath, String selector, String inline, String unusedEditors, DescriptorManager manager) {
+        super(name, type, displayName, tooltip, defaultValue, initValue, category, xpath, attrXpath, inline, unusedEditors, manager);
+        this.selector = selector;
+    }
+
+    /**
+     * Gets a css property selector.
+     * 
+     * @return css property selector
+     */
+    public String getSelector() {
+        return selector;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ConditionDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ConditionDescriptor.java
new file mode 100644 (file)
index 0000000..6d10891
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+/**
+ * A condition descriptor.
+ */
+public class ConditionDescriptor {
+
+    /**
+     * A name of condition.
+     */
+    private String name;
+
+    /**
+     * A value of condition.
+     */
+    private String value;
+
+    /**
+     * A target of condition.
+     */
+    private String target;
+
+    /**
+     * A value of target of condition.
+     */
+    private String targetValue;
+
+    /**
+     * Constructor.
+     * 
+     * @param name
+     *            a name of condition
+     * @param value
+     *            a value of condition
+     * @param target
+     *            a target of condition
+     * @param targetValue
+     *            a value of target of condition
+     */
+    public ConditionDescriptor(String name, String value, String target, String targetValue) {
+        this.name = name;
+        this.value = value;
+        this.target = target;
+        this.targetValue = targetValue;
+    }
+
+    /**
+     * Gets a name of condition.
+     * 
+     * @return name of condition
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Gets a value of condition.
+     * 
+     * @return value of condition
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Gets a target of condition.
+     * 
+     * @return target of condition
+     */
+    public String getTarget() {
+        return target;
+    }
+
+    /**
+     * Gets a value of target of condition.
+     * 
+     * @return value of target of condition
+     */
+    public String getTargetValue() {
+        return targetValue;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ConstantDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ConstantDescriptor.java
new file mode 100644 (file)
index 0000000..7b5ae26
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+/**
+ * A type constant descriptor.
+ */
+public class ConstantDescriptor {
+
+    /**
+     * A type constant value.
+     */
+    private String value;
+
+    /**
+     * A type constant on display in Properties view.
+     */
+    private String displayName;
+
+    /**
+     * A type constant icon.
+     */
+    private String icon;
+    /**
+     * A type constant required.
+     */
+    private String required;
+
+    /**
+     * Constructor.
+     * 
+     * @param value
+     *            a type constant value
+     * @param displayName
+     *            a type constant on display in Properties view
+     */
+    public ConstantDescriptor(String value, String displayName) {
+        this.value = value;
+        this.displayName = displayName;
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param value
+     *            a type constant value
+     * @param displayName
+     *            a type constant on display in Properties view
+     * @param icon
+     *            a type constant icon
+     */
+    public ConstantDescriptor(String value, String displayName, String icon) {
+        this(value, displayName);
+        this.icon = icon;
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param value
+     *            a type constant value
+     * @param displayName
+     *            a type constant on display in Properties view
+     * @param icon
+     *            a type constant icon
+     * @param required
+     *            a type constant required
+     */
+    public ConstantDescriptor(String value, String displayName, String icon, String required) {
+        this(value, displayName, icon);
+        this.required = required;
+    }
+
+    /**
+     * Gets a type constant value.
+     * 
+     * @return type constant value
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Gets a type constant on display in Properties view.
+     * 
+     * @return type constant on display in Properties view
+     */
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    /**
+     * Gets a type constant icon.
+     * 
+     * @return type constant icon
+     */
+    public String getIcon() {
+        return icon;
+    }
+
+    /**
+     * Gets a type constant required.
+     * 
+     * @return type constant required
+     */
+    public String getRequired() {
+        return required;
+    }
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ContentDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/ContentDescriptor.java
new file mode 100644 (file)
index 0000000..1e7e98f
--- /dev/null
@@ -0,0 +1,251 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.tizen.efluibuilder.descriptor.DescriptorConstants;
+import org.tizen.efluibuilder.model.descriptors.WidgetDescriptor.DescriptorType;
+
+
+/**
+ * A content descriptor.
+ */
+public class ContentDescriptor {
+
+    /**
+     * A {@link Part} descriptor type
+     */
+    public enum PartType {
+        ANY_PART, DOCUMENT_PART, PAGE_PART, WIDGET_PART
+    }
+
+    /**
+     * A {@link Part} descriptor type.
+     */
+    private PartType descriptorType = PartType.ANY_PART;
+
+    /**
+     * A List containing descriptor id of {@link Part}.
+     */
+    private List<String> descriptorIds = new ArrayList<String>();
+
+    /**
+     * The minimum number of {@link Part}.
+     */
+    private int min = 0;
+
+    /**
+     * The maximum number of {@link Part}.
+     */
+    private int max = 9999;
+
+    /**
+     * The exclusive group name.
+     */
+    private String exclusiveGroup = null;
+
+    /**
+     * Constructor.
+     */
+    public ContentDescriptor() {
+    }
+
+    /**
+     * Gets a List containing descriptor id of {@link Part}.
+     * 
+     * @return List containing descriptor id of {@link Part}
+     */
+    public List<String> getPartIds() {
+        return descriptorIds;
+    }
+
+    /**
+     * Gets the minimum number of {@link Part}.
+     * 
+     * @return the minimum number of {@link Part}
+     */
+    public int getMin() {
+        return min;
+    }
+
+    /**
+     * Gets the maximum number of {@link Part}.
+     * 
+     * @return the minimum number of {@link Part}
+     */
+    public int getMax() {
+        return max;
+    }
+
+    /**
+     * Gets the exclusive group name.
+     * 
+     * @return exclusiveGroup the content in the same group, can be create only one.
+     */
+    public String getExclusiveGroup() {
+        return exclusiveGroup;
+    }
+
+    /**
+     * Sets a {@link Part} descriptor type.
+     * 
+     * @param type
+     *            a {@link Part} descriptor type
+     */
+    public void setPartType(PartType type) {
+        descriptorType = type;
+    }
+
+    /**
+     * Sets a List containing descriptor id of {@link Part}.
+     * 
+     * @param ids
+     *            comma separated descriptor ids of {@link Part}
+     */
+    public void setPartIds(String ids) {
+        if (ids == null || ids.isEmpty()) {
+            return;
+        }
+
+        String[] idsArray = ids.split(DescriptorConstants.COMMA);
+        descriptorIds = Arrays.asList(idsArray);
+    }
+
+    /**
+     * Sets the minimum number of {@link Part}.
+     * 
+     * @param min
+     *            the minimum number of {@link Part}
+     */
+    public void setMin(int min) {
+        this.min = min;
+    }
+
+    /**
+     * Sets the maximum number of {@link Part}.
+     * 
+     * @param max
+     *            the maximum number of {@link Part}
+     */
+    public void setMax(int max) {
+        this.max = max;
+    }
+
+    /**
+     * Sets the exclusive group name.
+     * 
+     * @param exclusiveGroup
+     *            the content in the same group, can be create only one
+     */
+    public void setExclusiveGroup(String exclusiveGroup) {
+        this.exclusiveGroup = exclusiveGroup;
+    }
+
+    /**
+     * Checks whether {@link Part} can have a specific child {@link Part}.
+     * 
+     * @param descriptor
+     *            a descriptor of child {@link Part}
+     * @return true if {@link Part} can have a specific child {@link Part}, and false otherwise
+     */
+    public boolean isMatch(WidgetDescriptor descriptor) {
+        // Validates type
+        boolean typematch = false;
+
+        switch (descriptorType) {
+            case ANY_PART:
+                typematch = true;
+                break;
+            case DOCUMENT_PART:
+                typematch = (descriptor.getDescriptorType() == DescriptorType.DOC);
+                break;
+            case PAGE_PART:
+                typematch = (descriptor.getDescriptorType() == DescriptorType.PAGE);
+                break;
+            case WIDGET_PART:
+                typematch = (descriptor.getDescriptorType() == DescriptorType.WIDGET);
+                break;
+            default:
+                break;
+        }
+
+        if (!typematch) {
+            return false;
+        }
+
+        // Validates id
+        boolean idmatch = false;
+
+        if (descriptorIds.isEmpty()) {
+            idmatch = true;
+        } else {
+            for (String id : descriptorIds) {
+                if (id.equals(descriptor.getDescriptorId())) {
+                    idmatch = true;
+                    break;
+                }
+            }
+        }
+
+        if (!idmatch) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Checks whether {@link Part} can have a specific child {@link Part}.
+     * 
+     * @param descriptor
+     *            a descriptor of child {@link Part}
+     * @param numberOfChild
+     *            the number of child {@link Part}
+     * @return true if {@link Part} can have a specific child {@link Part}, and false otherwise
+     */
+    public boolean isMatch(WidgetDescriptor descriptor, int numberOfChild) {
+        if (!isMatch(descriptor)) {
+            return false;
+        }
+
+        // Validates id
+        boolean idmatch = false;
+
+        if (max == 0) {
+            idmatch = true;
+        } else {
+            if (numberOfChild < max) {
+                idmatch = true;
+            } else {
+                idmatch = false;
+            }
+        }
+
+        return idmatch;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/DescriptorManager.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/DescriptorManager.java
new file mode 100644 (file)
index 0000000..1118f18
--- /dev/null
@@ -0,0 +1,411 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.tizen.efluibuilder.descriptor.Activator;
+import org.tizen.efluibuilder.model.descriptors.WidgetDescriptor.DescriptorType;
+import org.tizen.efluibuilder.model.descriptors.io.AnalisysDescriptorFileData;
+import org.tizen.efluibuilder.model.descriptors.io.DescriptorFileData;
+import org.tizen.efluibuilder.model.descriptors.io.file.DescriptorReader;
+import org.tizen.efluibuilder.utility.ResourceUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+
+/**
+ * A descriptor manager.
+ */
+public final class DescriptorManager {
+    /**
+     * A List containing {@link DocumentPartDescriptor}.
+     */
+    private List<WidgetDescriptor> docs = new ArrayList<WidgetDescriptor>();
+
+    /**
+     * A List containing {@link PagePartDescriptor}.
+     */
+    private List<WidgetDescriptor> pages = new ArrayList<WidgetDescriptor>();
+
+    /**
+     * A List containing {@link WidgetPartDescriptor}.
+     */
+    private List<WidgetDescriptor> widgets = new ArrayList<WidgetDescriptor>();
+
+    /**
+     * A Map containing {@link WidgetDescriptor} corresponding descriptor id.
+     */
+    private Map<String, WidgetDescriptor> descriptorIds = new HashMap<String, WidgetDescriptor>();
+
+    /**
+     * A Map containing {@link TypeDescriptor} corresponding property type name.
+     */
+    private Map<String, TypeDescriptor> types = new HashMap<String, TypeDescriptor>();
+
+    /**
+     * A Map containing {@link EventTypeDescriptor} corresponding event type name.
+     */
+    private Map<String, EventTypeDescriptor> eventTypes = new HashMap<String, EventTypeDescriptor>();
+
+    /**
+     * A Map containing {@link WidgetPartDescriptor} corresponding category.
+     */
+    private Map<String, List<WidgetDescriptor>> categories = new LinkedHashMap<String, List<WidgetDescriptor>>();
+
+    /**
+     * A List of default style edjs.
+     */
+    private List<String> defaultStyleEDJs = new ArrayList<String>();
+
+    /**
+     * A xslt document.
+     */
+    private Document xslt;
+
+    /**
+     * A xslt element.
+     */
+    private Element xslRoot;
+
+    /**
+     * Constructor.
+     */
+    public DescriptorManager() {
+    }
+
+    public void load(String path) throws IOException, ParserConfigurationException, SAXException {
+        // Workaround (Do not remove below a line of code)
+        // The reason for this is to copy all the files in the folder as a virtual resource of
+        // eclipse.
+        ResourceUtil.getURI(Activator.PLUGIN_ID, path);
+        URL url = ResourceUtil.getURL(Activator.PLUGIN_ID, path + "/tizen-native-ui-fw.xml"); //$NON-NLS-1$
+        load(path, url);
+    }
+
+    private void load(String path, URL url) throws ParserConfigurationException, SAXException, IOException {
+        // Adds default type descriptors.
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_STRING));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_RM_STRING)); // for RM
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_BOOLEAN));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_INTEGER));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DOUBLE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_URL));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_IMAGE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_LAYOUT_RESOURCE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_TEXT_RESOURCE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_COLOR));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_COLOR2));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DATE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_TIME));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_AUDIO));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_VIDEO));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_HTMLSTRING));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_GROUP));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_GROUP_TEXT));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_GROUP_POSITION));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_STYLE_TEXT_ALIGN));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_STYLE_FONT_WEIGHT));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_STYLE_FONT_STYLE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_STYLE_TEXT_DECORATION));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_STYLE_COLOR));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_SIZE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_SIZE_PIXEL));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_SIZE_ANGLE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_SIZE_PERCENT));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_STYLE_FONT_SIZE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DATABINDING_TEXT));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DATABINDING_VALUE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DATABINDING_FOREACH));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DATABINDING_SLIDER));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DATABINDING_TEXT_CHECK));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DATABINDING_FOREACH_TEXT));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DATABINDING_VALUE_TEXT));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DATABINDING_ATTR_SRC));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DATABINDING_ATTR_TEXT));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DATABINDING_ATTR_HREF));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_OPACITY));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_ICON));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_GROUP_TRANSFORM));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_GROUP_BORDER));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_SEPARATOR));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_CHECK));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_NEW_COLOR));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_COLOR_FILL));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_SCALE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_SCALE_PIXEL));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_SCALE_PERCENT));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_SCALE_ANGLE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_CHECK_SCALE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_SCALE_INTEGER));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_GROUP_FILTER));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_GROUP_VALUE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_METRICS));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_EMPTY));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_CUSTOM_STYLE));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_CLIP));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_GROUP_ICON));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_ITEM_ADD));
+        addTypeDescriptor(new TypeDescriptor(TypeDescriptor.ID_OF_DYNAMIC_COMBO));
+
+        DescriptorFileData fileData = DescriptorReader.parse(path, url);
+        AnalisysDescriptorFileData.analisysFileData(this, fileData);
+    }
+
+    /**
+     * Sets a xslt document.
+     */
+    public void setXsltDocument(Document doc) {
+        xslt = doc;
+        if (xslt != null) {
+            xslRoot = (Element) xslt.getChildNodes().item(0);
+        }
+    }
+
+    /**
+     * Gets a xslt document.
+     * 
+     * @return xslt document.
+     */
+    public Document getXsltDocument() {
+        return xslt;
+    }
+
+    /**
+     * Gets a xslt element.
+     * 
+     * @return xslt element.
+     */
+    public Element getXsltElement() {
+        return xslRoot;
+    }
+
+    /**
+     * Adds a {@link WidgetDescriptor}.
+     * 
+     * @param desc
+     *            a {@link WidgetDescriptor}
+     */
+    public void addPartDescriptor(WidgetDescriptor desc) {
+        if (desc == null) {
+            return;
+        } else if (desc.getDescriptorType() == DescriptorType.WIDGET) {
+            widgets.add(desc);
+        } else if (desc.getDescriptorType() == DescriptorType.PAGE) {
+            pages.add(desc);
+        } else if (desc.getDescriptorType() == DescriptorType.DOC) {
+            docs.add(desc);
+        } else {
+            // cannot be here
+            assert (false);
+        }
+
+        descriptorIds.put(desc.getDescriptorId(), desc);
+
+        // Sets widget categories.
+        if (desc.getDescriptorType() == DescriptorType.WIDGET) {
+            WidgetDescriptor widgetDesc = desc;
+            if (widgetDesc.getCategories() != null) {
+                List<String> widgetCategories = widgetDesc.getCategories();
+                int size = widgetCategories.size();
+                for (int i = 0; i < size; i++) {
+                    String widgetCategory = widgetCategories.get(i);
+                    List<WidgetDescriptor> category = categories.get(widgetCategory);
+                    if (category == null) {
+                        category = new ArrayList<WidgetDescriptor>();
+                        categories.put(widgetCategory, category);
+                    }
+                    category.add(widgetDesc);
+                }
+            }
+        }
+    }
+
+    /**
+     * Adds a {@link TypeDescriptor}.
+     * 
+     * @param type
+     *            a {@link TypeDescriptor}
+     */
+    public void addTypeDescriptor(TypeDescriptor type) {
+        if (type == null) {
+            return;
+        }
+        types.put(type.getId(), type);
+    }
+
+    /**
+     * Adds a {@link EventTypeDescriptor}.
+     * 
+     * @param eventType
+     *            a {@link EventTypeDescriptor}
+     */
+    public void addEventTypeDescriptor(EventTypeDescriptor eventType) {
+        if (eventType == null) {
+            return;
+        }
+        eventTypes.put(eventType.getId(), eventType);
+    }
+
+    /**
+     * Adds a {@link EventTypeDescriptor}.
+     * 
+     * @param eventType
+     *            a {@link EventTypeDescriptor}
+     */
+    public void addUIComponentCategoryDescriptor(String categoryName) {
+        if (categoryName == null) {
+            return;
+        }
+
+        List<WidgetDescriptor> category = new ArrayList<WidgetDescriptor>();
+        categories.put(categoryName, category);
+    }
+
+    /**
+     * Adds a name of default style edj
+     * 
+     * @param styleEDJ
+     */
+    public void addDefaultStyleEDJ(String styleEDJ) {
+        if (styleEDJ == null) {
+            return;
+        }
+        defaultStyleEDJs.add(styleEDJ);
+    }
+
+    /**
+     * Adds a {@link EventTypeDescriptor}.
+     * 
+     * @param eventType
+     *            a {@link EventTypeDescriptor}
+     */
+    public void addDescriptor(String categoryName) {
+        if (categoryName == null) {
+            return;
+        }
+
+        List<WidgetDescriptor> category = new ArrayList<WidgetDescriptor>();
+        categories.put(categoryName, category);
+    }
+
+    /**
+     * Gets a List containing {@link DocumentPartDescriptor}.
+     * 
+     * @return List containing {@link DocumentPartDescriptor}
+     */
+    public List<WidgetDescriptor> getDocumentDescriptors() {
+        return docs;
+    }
+
+    /**
+     * Gets a List containing {@link PagePartDescriptor}.
+     * 
+     * @return List containing {@link PagePartDescriptor}
+     */
+    public List<WidgetDescriptor> getPageDescriptors() {
+        return pages;
+    }
+
+    /**
+     * Gets a List containing {@link WidgetPartDescriptor}.
+     * 
+     * @return List containing {@link WidgetPartDescriptor}
+     */
+    public List<WidgetDescriptor> getWidgetDescriptors() {
+        return widgets;
+    }
+
+    /**
+     * Gets a Map containing widget categories.
+     * 
+     * @return Map containing widget categories
+     */
+    public Collection<String> getWidgetCategories() {
+        return categories.keySet();
+    }
+
+    /**
+     * Gets a List containing {@link WidgetPartDescriptor} corresponding category.
+     * 
+     * @param category
+     *            a widget category
+     * @return List containing {@link WidgetPartDescriptor} corresponding category
+     */
+    public List<WidgetDescriptor> getWidgetDescriptorsOfCategory(String category) {
+        return categories.get(category);
+    }
+
+    /**
+     * Gets a {@link WidgetDescriptor} corresponding descriptor id.
+     * 
+     * @param descriptorId
+     *            a descriptor id of {@link Part}
+     * @return {@link WidgetDescriptor} corresponding descriptor id
+     */
+    public WidgetDescriptor getWidgetDescriptor(String descriptorId) {
+        return descriptorIds.get(descriptorId);
+    }
+
+    /**
+     * Gets a {@link TypeDescriptor} corresponding property type name.
+     * 
+     * @param typeName
+     *            a property type name
+     * @return {@link TypeDescriptor} corresponding property type name
+     */
+    public TypeDescriptor getTypeDescriptor(String typeName) {
+        return types.get(typeName);
+    }
+
+    /**
+     * Gets a {@link EventTypeDescriptor} corresponding event type name.
+     * 
+     * @param typeName
+     *            an event type name
+     * @return {@link EventTypeDescriptor} corresponding event type name
+     */
+    public EventTypeDescriptor getEventTypeDescriptor(String typeName) {
+        return eventTypes.get(typeName);
+    }
+
+    /**
+     * Gets list of default style edj
+     * 
+     * @return
+     */
+    public List<String> getDefaultStyleEDJs() {
+        return defaultStyleEDJs;
+    }
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/EventDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/EventDescriptor.java
new file mode 100644 (file)
index 0000000..7981a5b
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+public class EventDescriptor {
+
+    private String name;
+    private String displayName;
+    private String eventType;
+    private String eventInfo;
+    private DescriptorManager manager;
+
+    public EventDescriptor(String name, String displayName, String eventType, String eventInfo, DescriptorManager manager) {
+        this.name = name;
+        this.displayName = displayName;
+        this.eventType = eventType;
+        this.eventInfo = eventInfo;
+        this.manager = manager;
+    }
+
+    public String getEventName() {
+        return name;
+    }
+
+    public String getEventDisplayName() {
+        return displayName;
+    }
+
+    public String getEventType() {
+        return eventType;
+    }
+
+    public String getEventInfo() {
+        return eventInfo;
+    }
+
+    public EventTypeDescriptor getEventTypeDescriptor() {
+        return manager.getEventTypeDescriptor(eventType);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/EventParamDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/EventParamDescriptor.java
new file mode 100644 (file)
index 0000000..1f5b711
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+public class EventParamDescriptor {
+
+    private String name;
+    private String type;
+
+    public EventParamDescriptor(String name, String type) {
+        this.name = name;
+        this.type = type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getTyep() {
+        return type;
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/EventTypeDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/EventTypeDescriptor.java
new file mode 100644 (file)
index 0000000..cf57745
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class EventTypeDescriptor {
+
+    private String id;
+    private String defaultCode;
+    private List<EventParamDescriptor> params = new ArrayList<EventParamDescriptor>();
+
+    public EventTypeDescriptor(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setDefaultCode(String defaultCode) {
+        this.defaultCode = defaultCode;
+    }
+
+    public String getDefaultCode() {
+        return defaultCode;
+    }
+
+    public void addEventParameter(EventParamDescriptor param) {
+        params.add(param);
+    }
+
+    public List<EventParamDescriptor> getEventParameters() {
+        return params;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/PartConditionDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/PartConditionDescriptor.java
new file mode 100644 (file)
index 0000000..35a63bf
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+/**
+ * A part condition descriptor.
+ */
+public class PartConditionDescriptor extends ConditionDescriptor {
+
+    /**
+     * The change-property-by-child-add condition.
+     */
+    public static final String CHANGE_PROPERTY_BY_CHILD_ADD = "change-property-by-child-add"; //$NON-NLS-1$
+
+    /**
+     * The change-property-by-child-remove condition.
+     */
+    public static final String CHANGE_PROPERTY_BY_CHILD_REMOVE = "change-property-by-child-remove"; //$NON-NLS-1$
+
+    /**
+     * The change-property-by-parent condition.
+     */
+    public static final String CHANGE_PROPERTY_BY_PARENT = "change-property-by-parent"; //$NON-NLS-1$
+
+    /**
+     * The set-property-by-parent condition.
+     */
+    public static final String SET_PROPERTY_BY_PARENT = "set-property-by-parent"; //$NON-NLS-1$
+
+    /**
+     * The set-property-by-grandparent condition.
+     */
+    public static final String SET_PROPERTY_BY_GRANDPARENT = "set-property-by-grandparent"; //$NON-NLS-1$
+
+    /**
+     * Constructor.
+     * 
+     * @param name
+     *            a name of condition
+     * @param value
+     *            a value of condition
+     * @param target
+     *            a target of condition
+     * @param targetValue
+     *            a value of target of condition
+     */
+    public PartConditionDescriptor(String name, String value, String target, String targetValue) {
+        super(name, value, target, targetValue);
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/PropertyConditionDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/PropertyConditionDescriptor.java
new file mode 100644 (file)
index 0000000..145daaa
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+/**
+ * A property condition descriptor.
+ */
+public class PropertyConditionDescriptor extends ConditionDescriptor {
+
+    /**
+     * An error string of condition.
+     */
+    private String error;
+
+    /**
+     * The string-id condition.
+     */
+    public static final String STRING_ID = "string-id"; //$NON-NLS-1$
+
+    /**
+     * The string-max-length condition.
+     */
+    public static final String STRING_MAX_LENGTH = "string-max-length"; //$NON-NLS-1$
+
+    /**
+     * The integer-min condition.
+     */
+    public static final String INTEGER_MIN = "integer-min"; //$NON-NLS-1$
+
+    /**
+     * The integer-min-by condition.
+     */
+    public static final String INTEGER_MIN_BY = "integer-min-by"; //$NON-NLS-1$
+
+    /**
+     * The integer-max condition.
+     */
+    public static final String INTEGER_MAX = "integer-max"; //$NON-NLS-1$
+
+    /**
+     * The integer-max-by condition.
+     */
+    public static final String INTEGER_MAX_BY = "integer-max-by"; //$NON-NLS-1$
+
+    /**
+     * The integer-min-by-parent-property condition.
+     */
+    public static final String INTEGER_MIN_BY_PARENT_PROPERTY = "integer-min-by-parent-property"; //$NON-NLS-1$
+
+    /**
+     * The integer-max-by-parent-property condition.
+     */
+    public static final String INTEGER_MAX_BY_PARENT_PROPERTY = "integer-max-by-parent-property"; //$NON-NLS-1$
+
+    /**
+     * The size-max condition.
+     */
+    public static final String SIZE_MAX = "size-max"; //$NON-NLS-1$
+
+    /**
+     * The enable-property condition.
+     */
+    public static final String ENABLE_PROPERTY = "enable-property"; //$NON-NLS-1$
+
+    /**
+     * The disable-property condition.
+     */
+    public static final String DISABLE_PROPERTY = "disable-property"; //$NON-NLS-1$
+
+    /**
+     * The enable-property-by-child condition.
+     */
+    public static final String ENABLE_PROPERTY_BY_CHILD = "enable-property-by-child"; //$NON-NLS-1$
+
+    /**
+     * The disable-property-by-child condition.
+     */
+    public static final String DISABLE_PROPERTY_BY_CHILD = "disable-property-by-child"; //$NON-NLS-1$
+
+    /**
+     * The disable-property-by-parent condition.
+     */
+    public static final String DISABLE_PROPERTY_BY_PARENT = "disable-property-by-parent"; //$NON-NLS-1$
+
+    /**
+     * The enable-property-by-parent condition.
+     */
+    public static final String ENABLE_PROPERTY_BY_PARENT = "enable-property-by-parent"; //$NON-NLS-1$
+
+    /**
+     * The disable-property-by-layout-type condition.
+     */
+    public static final String DISABLE_PROPERTY_BY_LAYOUT_TYPE = "disable-property-by-layout-type"; //$NON-NLS-1$
+
+    /**
+     * The hide-property-by-parent condition.
+     */
+    public static final String HIDE_PROPERTY_BY_PARENT = "hide-property-by-parent"; //$NON-NLS-1$
+
+    /**
+     * The show-property-by-parent condition.
+     */
+    public static final String SHOW_PROPERTY_BY_PARENT = "show-property-by-parent"; //$NON-NLS-1$
+
+    /**
+     * The disable-property-by-value condition.
+     */
+    public static final String DISABLE_PROPERTY_BY_VALUE = "disable-property-by-value"; //$NON-NLS-1$
+
+    /**
+     * The change-property condition.
+     */
+    public static final String CHANGE_PROPERTY = "change-property"; //$NON-NLS-1$
+
+    /**
+     * The change-other-property-by-property condition.
+     */
+    public static final String CHANGE_OTHER_PROPERTY_BY_PROPERTY = "change-other-property-by-property"; //$NON-NLS-1$
+
+    /**
+     * The change-other-property-by-parent condition.
+     */
+    public static final String CHANGE_OTHER_PROPERTY_BY_PARENT = "change-other-property-by-parent"; //$NON-NLS-1$
+
+    /**
+     * The change-other-property-by-grandparent condition.
+     */
+    public static final String CHANGE_OTHER_PROPERTY_BY_GRANDPARENT = "change-other-property-by-grandparent"; //$NON-NLS-1$
+
+    /**
+     * When value of the property is changed, notify all of properties subscribing.
+     */
+    public static final String NOTIFY_PROPERTY = "notify-property"; //$NON-NLS-1$
+
+    /**
+     * Constructor.
+     * 
+     * @param name
+     *            a name of condition
+     * @param value
+     *            a value of condition
+     * @param target
+     *            a target of condition
+     * @param targetValue
+     *            a value of target of condition
+     * @param error
+     *            an error string of condition
+     */
+    public PropertyConditionDescriptor(String name, String value, String target, String targetValue, String error) {
+        super(name, value, target, targetValue);
+        this.error = error;
+    }
+
+    /**
+     * Gets an error string of condition.
+     * 
+     * @return error string of condition
+     */
+    public String getError() {
+        return error;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/PropertyDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/PropertyDescriptor.java
new file mode 100644 (file)
index 0000000..669c5fc
--- /dev/null
@@ -0,0 +1,383 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * A property descriptor.
+ */
+public class PropertyDescriptor {
+
+    private final static int UNUSED_EDITORS_PROPERTIES = 0x01;
+    private final static int UNUSED_EDITORS_SOURCE_TAB = 0x02;
+
+    public enum UnusedEditors {
+        PROPERTIES("properties", UNUSED_EDITORS_PROPERTIES), SOURCE_TAB("source_tab", UNUSED_EDITORS_SOURCE_TAB);
+
+        private String editor;
+        private int bit;
+
+        UnusedEditors(String editor, int bit) {
+            this.editor = editor;
+            this.bit = bit;
+        }
+
+        public String getString() {
+            return editor;
+        }
+
+        public int getBit() {
+            return bit;
+        }
+    }
+
+    /**
+     * A property name.
+     */
+    private String name;
+
+    /**
+     * A property type.
+     */
+    private String type;
+
+    /**
+     * A property name on display in Properties view.
+     */
+    private String displayName;
+
+    /**
+     * A property tooltip.
+     */
+    private String tooltip;
+
+    /**
+     * A default property value.
+     */
+    private String defaultValue;
+
+    /**
+     * A initial property value.
+     */
+    private String initValue;
+
+    /**
+     * A property category.
+     */
+    private String category;
+
+    /**
+     * A owner element xpath.
+     */
+    private String xpath;
+
+    /**
+     * An attribute xpath.
+     */
+    private String attrXpath;
+
+    private String inline;
+
+    private int unusedEditors;
+
+    private TypeDescriptor typeDescriptor;
+
+    /**
+     * A List containing {@link PropertyConditionDescriptor}.
+     */
+    private List<PropertyConditionDescriptor> conditions = new ArrayList<PropertyConditionDescriptor>();
+
+    /**
+     * A List containing child {@link PropertyDescriptor}.
+     */
+    private List<PropertyDescriptor> childProperties = new ArrayList<PropertyDescriptor>();
+
+    /**
+     * A {@link DescriptorManager}.
+     */
+    private DescriptorManager manager;
+
+    /**
+     * Constructor.
+     * 
+     * @param name
+     *            a property name
+     * @param type
+     *            a property type
+     * @param displayName
+     *            a property name on display in Properties view
+     * @param tooltip
+     *            a property tooltip
+     * @param defaultValue
+     *            a default property value
+     * @param initValue
+     *            a initial property value
+     * @param category
+     *            a property category
+     * @param xpath
+     *            a owner element xpath
+     * @param attrXpath
+     *            an attribute xpath
+     * @param manager
+     *            a {@link DescriptorManager}
+     */
+    public PropertyDescriptor(String name, String type, String displayName, String tooltip, String defaultValue, String initValue, String category,
+            String xpath, String attrXpath, String inline, String unusedEditors, DescriptorManager manager) {
+        this.name = name;
+        this.type = type;
+        this.displayName = displayName;
+        this.tooltip = tooltip;
+        this.defaultValue = defaultValue;
+        this.initValue = initValue;
+        this.category = category;
+        this.xpath = xpath;
+        this.attrXpath = attrXpath;
+        this.manager = manager;
+        this.inline = inline;
+        this.unusedEditors = convertToBit(unusedEditors);
+
+        typeDescriptor = manager.getTypeDescriptor(type);
+    }
+
+    private int convertToBit(String unusedEditors) {
+        int results = 0;
+        if (unusedEditors == null) {
+            return results;
+        }
+
+        String[] splitUnusedEditors = null;
+        if (!unusedEditors.contains("|")) {
+            splitUnusedEditors = new String[] { unusedEditors };
+        } else {
+            splitUnusedEditors = unusedEditors.split("\\|");
+        }
+
+        for (int i = 0; i < splitUnusedEditors.length; i++) {
+            String unusedEditor = splitUnusedEditors[i].trim();
+            if (unusedEditor.equals(UnusedEditors.PROPERTIES.getString())) {
+                results |= UnusedEditors.PROPERTIES.getBit();
+            } else if (unusedEditor.equals(UnusedEditors.SOURCE_TAB.getString())) {
+                results |= UnusedEditors.SOURCE_TAB.getBit();
+            }
+        }
+
+        return results;
+    }
+
+    /**
+     * Adds a {@link PropertyConditionDescriptor} to the List.
+     * 
+     * @param conditionDescriptor
+     *            a {@link PropertyConditionDescriptor}
+     */
+    public void addConditionDescriptor(PropertyConditionDescriptor conditionDescriptor) {
+        conditions.add(conditionDescriptor);
+    }
+
+    /**
+     * Adds a child {@link PropertyDescriptor} to the List.
+     * 
+     * @param childPropertyDescriptor
+     *            a child {@link PropertyDescriptor}
+     */
+    public void addChildPropertyDescriptor(PropertyDescriptor childPropertyDescriptor) {
+        childProperties.add(childPropertyDescriptor);
+    }
+
+    /**
+     * Gets a property name.
+     * 
+     * @return property name
+     */
+    public String getPropertyName() {
+        return name;
+    }
+
+    /**
+     * Gets a property type.
+     * 
+     * @return property type
+     */
+    public String getPropertyType() {
+        return type;
+    }
+
+    public String getInlineValue() {
+        return inline;
+    }
+
+    private int getUnusedEditors() {
+        return unusedEditors;
+    }
+
+    /**
+     * Gets a {@link TypeDescriptor} by using property type.
+     * 
+     * @return {@link TypeDescriptor}
+     */
+    public TypeDescriptor getTypeDescriptor() {
+        return typeDescriptor;
+    }
+
+    /**
+     * Gets a property name on display in Properties view.
+     * 
+     * @return property name on display in Properties view
+     */
+    public String getPropertyDisplayName() {
+        return displayName;
+    }
+
+    /**
+     * Gets a property tooltip.
+     * 
+     * @return property tooltip
+     */
+    public String getTooltip() {
+        return tooltip;
+    }
+
+    /**
+     * Gets a default property value.
+     * 
+     * @return default property value
+     */
+    public String getDefaultValue() {
+        return defaultValue;
+    }
+
+    /**
+     * Gets a initial property value.
+     * 
+     * @return initial property value
+     */
+    public String getInitValue() {
+        return initValue;
+    }
+
+    /**
+     * Gets a property category.
+     * 
+     * @return property category
+     */
+    public String getCategory() {
+        return category;
+    }
+
+    /**
+     * Gets a owner element xpath.
+     * 
+     * @return xpath
+     */
+    public String getXpath() {
+        return xpath;
+    }
+
+    /**
+     * Gets an attribute xpath.
+     * 
+     * @return attrXpath
+     */
+    public String getAttrXpath() {
+        return attrXpath;
+    }
+
+    /**
+     * Gets a List containing {@link PropertyConditionDescriptor}.
+     * 
+     * @return List containing {@link PropertyConditionDescriptor}
+     */
+    public List<PropertyConditionDescriptor> getConditionDescriptors() {
+        return conditions;
+    }
+
+    /**
+     * Gets a List containing child {@link PropertyDescriptor}.
+     * 
+     * @return List containing child {@link PropertyDescriptor}
+     */
+    public List<PropertyDescriptor> getChildPropertyDescriptors() {
+        return childProperties;
+    }
+
+    /**
+     * Gets a child {@link PropertyDescriptor}.
+     * 
+     * @param name
+     *            a {@link PropertyDescriptor} name
+     * @return child {@link PropertyDescriptor} if it is exist, and null otherwise
+     */
+    public PropertyDescriptor getChildPropertyDescriptor(String name) {
+        for (PropertyDescriptor property : childProperties) {
+            String propertyName = property.getPropertyName();
+            if (propertyName != null && propertyName.equals(name)) {
+                return property;
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Gets a {@link DescriptorManager}.
+     * 
+     * @return {@link DescriptorManager}
+     */
+    public DescriptorManager getDescriptorManager() {
+        return manager;
+    }
+
+    /**
+     * Sets a default property value.
+     * 
+     * @param value
+     *            a default property value
+     */
+    public void setDefaultValue(String value) {
+        this.defaultValue = value;
+    }
+
+    /**
+     * check that this property can use proper purpose
+     * 
+     * @param editor
+     * @return true if property can use checked purpose, and false otherwise
+     * 
+     */
+    public boolean checkUnusedEditors(UnusedEditors editor) {
+        int unusedEditors = getUnusedEditors();
+        if (unusedEditors == 0) {
+            return false;
+        }
+
+        if ((unusedEditors & editor.getBit()) > 0) {
+            return true;
+        }
+
+        return false;
+    }
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/RelationDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/RelationDescriptor.java
new file mode 100644 (file)
index 0000000..9b3ba98
--- /dev/null
@@ -0,0 +1,423 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.tizen.efluibuilder.descriptor.DescriptorConstants;
+
+
+/**
+ * A relation descriptor.
+ */
+public class RelationDescriptor {
+
+    /**
+     * A List containing {@link ContentDescriptor}.
+     */
+    private List<ContentDescriptor> contents = new ArrayList<ContentDescriptor>();
+
+    /**
+     * A List containing no-content {@link Part} descriptor id.
+     */
+    private List<String> excludeIds = new ArrayList<String>();
+
+    /**
+     * A List containing parent {@link Part} descriptor id.
+     */
+    private List<String> parentIds = new ArrayList<String>();
+
+    /**
+     * A List containing no-parent {@link Part} descriptor id.
+     */
+    private List<String> noParentIds = new ArrayList<String>();
+
+    /**
+     * Adds a {@link ContentDescriptor}.
+     * 
+     * @param content
+     *            a {@link ContentDescriptor}
+     */
+    public void addContent(ContentDescriptor content) {
+        if (content == null) {
+            return;
+        }
+
+        contents.add(content);
+    }
+
+    /**
+     * Sets a List containing {@link ContentDescriptor}.
+     * 
+     * @param idList
+     *            a List containing {@link ContentDescriptor}
+     */
+    public void addContentPartIds(List<ContentDescriptor> idList) {
+        if (idList == null) {
+            return;
+        }
+
+        contents.addAll(idList);
+    }
+
+    /**
+     * Sets a List containing content {@link Part} descriptor id.
+     * 
+     * @param ids
+     *            comma separated content {@link Part} descriptor ids
+     */
+    public void addContentPartIds(String ids) {
+        if (ids == null) {
+            return;
+        }
+
+        ContentDescriptor content = new ContentDescriptor();
+        content.setPartIds(ids);
+
+        contents.add(content);
+    }
+
+    /**
+     * Adds a List containing no-content {@link Part} descriptor id.
+     * 
+     * @param idList
+     *            a List containing no-content {@link Part} descriptor id
+     */
+    public void addNoContentPartIds(List<String> idList) {
+        if (idList == null) {
+            return;
+        }
+
+        excludeIds.addAll(idList);
+    }
+
+    /**
+     * Sets a List containing no-content {@link Part} descriptor id.
+     * 
+     * @param ids
+     *            comma separated no-content {@link Part} descriptor ids
+     */
+    public void addNoContentPartIds(String ids) {
+        if (ids == null) {
+            return;
+        }
+
+        String[] idsArray = ids.split(DescriptorConstants.COMMA);
+        List<String> idList = Arrays.asList(idsArray);
+
+        addNoContentPartIds(idList);
+    }
+
+    /**
+     * Adds a List containing parent {@link Part} descriptor id.
+     * 
+     * @param ids
+     *            a List containing parent {@link Part} descriptor id
+     */
+    public void addParentPartIds(List<String> idList) {
+        if (idList == null) {
+            return;
+        }
+
+        parentIds.addAll(idList);
+    }
+
+    /**
+     * Sets a List containing parent {@link Part} descriptor id.
+     * 
+     * @param ids
+     *            comma separated parent {@link Part} descriptor ids
+     */
+    public void addParentPartIds(String ids) {
+        if (ids == null) {
+            return;
+        }
+
+        String[] idsArray = ids.split(DescriptorConstants.COMMA);
+        List<String> idList = Arrays.asList(idsArray);
+
+        addParentPartIds(idList);
+    }
+
+    /**
+     * Adds a List containing no-parent {@link Part} descriptor id.
+     * 
+     * @param ids
+     *            a List containing no-parent {@link Part} descriptor id
+     */
+    public void addNoParentPartIds(List<String> idList) {
+        if (idList == null) {
+            return;
+        }
+
+        noParentIds.addAll(idList);
+    }
+
+    /**
+     * Sets a List containing no-parent {@link Part} descriptor id.
+     * 
+     * @param ids
+     *            comma separated no-parent {@link Part} descriptor ids
+     */
+    public void addNoParentPartIds(String ids) {
+        if (ids == null) {
+            return;
+        }
+
+        String[] idsArray = ids.split(DescriptorConstants.COMMA);
+        List<String> idList = Arrays.asList(idsArray);
+
+        addNoParentPartIds(idList);
+    }
+
+    /**
+     * Gets a list of contents.
+     * 
+     * @return the list of contents.
+     */
+    public List<ContentDescriptor> getContents() {
+        return contents;
+    }
+
+    /**
+     * Gets an exclusive group of content.
+     * 
+     * @param descriptorId
+     *            a descriptor id of child {@link Part}
+     * @return the exclusive group name of the descriptorId if it exist, and null otherwise
+     */
+    public String getExclusiveGroupOfContent(String descriptorId) {
+        String exclusiveGroup = null;
+
+        if (!contents.isEmpty()) {
+            for (ContentDescriptor content : contents) {
+
+                List<String> descriptorIds = content.getPartIds();
+                if (!descriptorIds.isEmpty()) {
+                    for (String id : descriptorIds) {
+                        if (id.equals(descriptorId)) {
+                            exclusiveGroup = content.getExclusiveGroup();
+                            break;
+                        }
+                    }
+                }
+
+                if (exclusiveGroup != null) {
+                    break;
+                }
+            }
+        }
+
+        return exclusiveGroup;
+    }
+
+    /**
+     * Checks whether {@link Part} can have a specific child {@link Part}.
+     * 
+     * @param parentId
+     *            a descriptor id of parent {@link Part}
+     * @param descriptor
+     *            a descriptor of child {@link Part}
+     * @param numberOfChild
+     *            the number of child {@link Part}
+     * @return true if {@link Part} can have a specific child {@link Part}, and false otherwise
+     */
+    public boolean canHaveChild(String parentId, WidgetDescriptor descriptor, int numberOfChild) {
+        if (descriptor == null) {
+            return false;
+        }
+
+        boolean idmatch = false;
+
+        if (!contents.isEmpty()) {
+            for (ContentDescriptor content : contents) {
+                if (content.isMatch(descriptor, numberOfChild)) {
+                    idmatch = true;
+                    break;
+                }
+            }
+        }
+
+        if (!idmatch) {
+            return false;
+        }
+
+        if (!excludeIds.isEmpty()) {
+            boolean excluded = false;
+
+            for (String id : excludeIds) {
+                if (id.equals(descriptor.getDescriptorId())) {
+                    excluded = true;
+                    break;
+                }
+            }
+
+            if (excluded) {
+                return false;
+            }
+        }
+
+        RelationDescriptor relation = descriptor.getRelation();
+        if (relation == null) {
+            return false;
+        }
+
+        List<String> parents = relation.parentIds;
+        if (!parents.isEmpty()) {
+            boolean canParent = false;
+            boolean descriptParent = false;
+
+            for (String id : parents) {
+                descriptParent = true;
+                if (id.equals(parentId)) {
+                    canParent = true;
+                    break;
+                }
+            }
+
+            if (descriptParent && !canParent) {
+                return false;
+            }
+        }
+
+        List<String> noParents = relation.noParentIds;
+        if (!noParents.isEmpty()) {
+            boolean excluded = false;
+
+            for (String id : noParents) {
+                if (id.equals(parentId)) {
+                    excluded = true;
+                    break;
+                }
+            }
+
+            if (excluded) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Checks whether {@link Part} can have some children {@link Part}.
+     * 
+     * @return true if {@link Part} can have some children {@link Part}, and false otherwise
+     */
+    public boolean canHaveChildren() {
+        if (contents != null && !contents.isEmpty()) {
+            return true;
+        }
+
+        if (excludeIds != null && !excludeIds.isEmpty()) {
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Checks whether {@link Part} can copy a specific child {@link Part}.
+     * 
+     * @param descriptor
+     *            a descriptor of child {@link Part}
+     * @return true if {@link Part} can copy a specific child {@link Part}, and false otherwise
+     */
+    public boolean canCopyChild(WidgetDescriptor descriptor) {
+        if (!contents.isEmpty()) {
+            for (ContentDescriptor content : contents) {
+                if (content.isMatch(descriptor)) {
+                    if (content.getMax() == content.getMin()) {
+                        return false;
+                    }
+                }
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Checks whether {@link Part} can remove a specific child {@link Part}.
+     * 
+     * @param descriptor
+     *            a descriptor of child {@link Part}
+     * @param numberOfChild
+     *            the number of child {@link Part}
+     * @return true if {@link Part} can remove a specific child {@link Part}, and false otherwise
+     */
+    public boolean canRemoveChild(WidgetDescriptor descriptor, int numberOfChild) {
+        boolean canRemove = true;
+
+        if (!contents.isEmpty()) {
+            for (ContentDescriptor content : contents) {
+                if (content.isMatch(descriptor)) {
+                    if (numberOfChild <= content.getMin()) {
+                        canRemove = false;
+                        break;
+                    }
+                }
+            }
+        }
+
+        return canRemove;
+    }
+
+    /**
+     * Checks whether {@link Part} can set a specific parent {@link Part}.
+     * 
+     * @param parentDescriptor
+     *            a descriptor of parent {@link Part}
+     * @return true if {@link Part} can have a specific parent {@link Part}, and false otherwise
+     */
+    public boolean canSetParent(WidgetDescriptor parentDescriptor) {
+        // Validates type
+        boolean canParent = true;
+        String parentdescIds = parentDescriptor.getDescriptorId();
+
+        if (!parentIds.isEmpty()) {
+            canParent = false;
+            for (String id : parentIds) {
+                if (id.equals(parentdescIds)) {
+                    canParent = true;
+                    break;
+                }
+            }
+        }
+
+        if (canParent && !noParentIds.isEmpty()) {
+            for (String id : noParentIds) {
+                if (id.equals(parentdescIds)) {
+                    canParent = false;
+                    break;
+                }
+            }
+        }
+
+        return canParent;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/TypeDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/TypeDescriptor.java
new file mode 100644 (file)
index 0000000..98d5606
--- /dev/null
@@ -0,0 +1,351 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * A type descriptor.
+ */
+public class TypeDescriptor {
+
+    /**
+     * A property type.
+     */
+    public enum Types {
+        UNKNOWN, STRING, RM_STRING, BOOLEAN, INTEGER, DOUBLE, SUB_VIEW, IMAGE, LAYOUT_RESOURCE, TEXT_RESOURCE, COLOR, COLOR2, DATE, TIME, AUDIO, VIDEO, HTMLSTRING, GROUP, GROUP_TEXT, GROUP_POSITION, STYLE_COLOR, STYLE_FONT_SIZE, STYLE_FONT_STYLE, STYLE_FONT_WEIGHT, STYLE_TEXT_ALIGN, STYLE_TEXT_DECORATION, SIZE_INTEGER, SIZE_PERCENT, SIZE_REAL, SIZE, SIZE_PIXEL, SIZE_ANGLE, ENUM, OPACITY, ICON, ICON_TEXT_ALIGN, ICON_FONT_WEIGHT, ICON_FONT_STYLE, ICON_TEXT_DECORATION, ICON_TEXT_TRANSFORM, TEXT_LETTER_SPACING, TEXT_LINE_HEIGHT, GROUP_TRANSFORM, GROUP_BORDER, SEPARATOR, EMPTY, CHECK, NEW_COLOR, COLOR_FILL, SCALE, SCALE_INTEGER, SCALE_PIXEL, SCALE_PERCENT, SCALE_ANGLE, CHECK_SCALE, LISTITEM_CLASS, GROUP_FILTER, GROUP_VALUE, METRICS, CLIP, GROUP_ICON, DATABINDING_TEXT, DATABINDING_VALUE, DATABINDING_FOREACH, DATABINDING_SLIDER, DATABINDING_TEXT_CHECK, DATABINDING_FOREACH_TEXT, DATABINDING_VALUE_TEXT, DATABINDING_ATTR_SRC, DATABINDING_ATTR_TEXT, DATABINDING_ATTR_HREF, INTEGER_STYLE, ITEM_ADD, DYNAMIC_COMBO, EFL_STYLE, COLORS
+    }
+
+    // Id of type
+    public static final String ID_OF_RM_STRING = "rm_string"; //$NON-NLS-1$ // for RM LOCALIZATION
+    public static final String ID_OF_STRING = "string"; //$NON-NLS-1$
+    public static final String ID_OF_BOOLEAN = "boolean"; //$NON-NLS-1$
+    public static final String ID_OF_INTEGER = "integer"; //$NON-NLS-1$
+    public static final String ID_OF_DOUBLE = "double"; //$NON-NLS-1$
+    public static final String ID_OF_URL = "url"; //$NON-NLS-1$
+    public static final String ID_OF_IMAGE = "image"; //$NON-NLS-1$
+    public static final String ID_OF_LAYOUT_RESOURCE = "layout-resource"; //$NON-NLS-1$
+    public static final String ID_OF_TEXT_RESOURCE = "text-resource"; //$NON-NLS-1$
+    public static final String ID_OF_COLOR = "color"; //$NON-NLS-1$
+    public static final String ID_OF_COLOR2 = "color2"; //$NON-NLS-1$
+    public static final String ID_OF_DATE = "date"; //$NON-NLS-1$
+    public static final String ID_OF_TIME = "time"; //$NON-NLS-1$
+    public static final String ID_OF_AUDIO = "audio"; //$NON-NLS-1$
+    public static final String ID_OF_VIDEO = "video"; //$NON-NLS-1$
+    public static final String ID_OF_HTMLSTRING = "htmlstring"; //$NON-NLS-1$
+    public static final String ID_OF_CHECK = "check"; //$NON-NLS-1$
+    public static final String ID_OF_NEW_COLOR = "new-color"; //$NON-NLS-1$
+    public static final String ID_OF_COLOR_FILL = "color-fill"; //$NON-NLS-1$
+    public static final String ID_OF_SCALE = "scale"; //$NON-NLS-1$
+    public static final String ID_OF_LISTITEM_CLASS = "tizen.listitem@class"; //$NON-NLS-1$
+    public static final String ID_OF_METRICS = "metrics"; //$NON-NLS-1$
+    public static final String ID_OF_CLIP = "clip"; //$NON-NLS-1$
+    public static final String ID_OF_ITEM_ADD = "item-add"; //$NON-NLS-1$
+
+    // Id of group type
+    public static final String ID_OF_GROUP = "group"; //$NON-NLS-1$
+    public static final String ID_OF_GROUP_TEXT = "group-text"; //$NON-NLS-1$
+    public static final String ID_OF_GROUP_POSITION = "group-position"; //$NON-NLS-1$
+    public static final String ID_OF_GROUP_TRANSFORM = "group-transform"; //$NON-NLS-1$
+    public static final String ID_OF_GROUP_BORDER = "group-border"; //$NON-NLS-1$
+    public static final String ID_OF_GROUP_FILTER = "group-filter"; //$NON-NLS-1$
+    public static final String ID_OF_GROUP_VALUE = "group-value"; //$NON-NLS-1$
+    public static final String ID_OF_GROUP_ICON = "group-icon"; //$NON-NLS-1$
+
+    // Id of style type
+    public static final String ID_OF_STYLE_COLOR = "css-color"; //$NON-NLS-1$
+    public static final String ID_OF_STYLE_FONT_STYLE = "css-font-style"; //$NON-NLS-1$
+    public static final String ID_OF_STYLE_FONT_WEIGHT = "css-font-weight"; //$NON-NLS-1$
+    public static final String ID_OF_STYLE_TEXT_ALIGN = "css-text-align"; //$NON-NLS-1$
+    public static final String ID_OF_STYLE_TEXT_DECORATION = "css-text-decoration"; //$NON-NLS-1$
+
+    public static final String ID_OF_SIZE_INTEGER = "integer@style"; //$NON-NLS-1$ //non unit
+    public static final String ID_OF_SIZE_PERCENT = "size@per"; //$NON-NLS-1$ //%
+    public static final String ID_OF_SIZE_REAL = "size@real"; //$NON-NLS-1$ //0.0
+    public static final String ID_OF_SIZE = "size"; //$NON-NLS-1$ //px, %
+    public static final String ID_OF_SIZE_PIXEL = "size@px"; //$NON-NLS-1$ //px
+    public static final String ID_OF_SIZE_ANGLE = "size@deg"; //$NON-NLS-1$ //deg
+
+    public static final String ID_OF_SCALE_PIXEL = "scale@px"; //$NON-NLS-1$ //px
+    public static final String ID_OF_SCALE_PERCENT = "scale@per"; //$NON-NLS-1$ //px
+    public static final String ID_OF_SCALE_ANGLE = "scale@deg"; //$NON-NLS-1$ //px
+
+    public static final String ID_OF_CHECK_SCALE = "check-scale"; //$NON-NLS-1$
+    public static final String ID_OF_SCALE_INTEGER = "scale-integer"; //$NON-NLS-1$
+    public static final String ID_OF_STYLE_FONT_SIZE = "font@size"; //$NON-NLS-1$
+
+    public static final String ID_OF_OPACITY = "opacity"; //$NON-NLS-1$
+    public static final String ID_OF_ICON = "icon"; //$NON-NLS-1$
+    public static final String ID_OF_ICON_TEXT_ALIGN = "icon@text-align"; //$NON-NLS-1$
+    public static final String ID_OF_ICON_FONT_WEIGHT = "icon@font-weight"; //$NON-NLS-1$
+    public static final String ID_OF_ICON_FONT_STYLE = "icon@font-style"; //$NON-NLS-1$
+    public static final String ID_OF_ICON_TEXT_DECORATION = "icon@text-decoration"; //$NON-NLS-1$
+    public static final String ID_OF_ICON_TEXT_TRANSFORM = "icon@text-transform"; //$NON-NLS-1$
+    public static final String ID_OF_TEXT_LETTER_SPACING = "text@letter-spacing"; //$NON-NLS-1$
+    public static final String ID_OF_TEXT_LINE_HEIGHT = "text@line-height"; //$NON-NLS-1$
+
+    public static final String ID_OF_CUSTOM_STYLE = "custom-css"; //$NON-NLS-1$
+    public static final String ID_OF_SEPARATOR = "separator"; //$NON-NLS-1$
+    public static final String ID_OF_EMPTY = "empty"; //$NON-NLS-1$
+    public static final String ID_OF_DYNAMIC_COMBO = "dynamic-combo"; //$NON-NLS-1$
+
+    // Id of DataBinding type
+    public static final String ID_OF_DATABINDING_TEXT = "text@databinding"; //$NON-NLS-1$
+    public static final String ID_OF_DATABINDING_VALUE = "value@databinding"; //$NON-NLS-1$
+    public static final String ID_OF_DATABINDING_FOREACH = "foreach@databinding"; //$NON-NLS-1$
+    public static final String ID_OF_DATABINDING_SLIDER = "slider@databinding"; //$NON-NLS-1$
+    public static final String ID_OF_DATABINDING_TEXT_CHECK = "textchecked@databinding"; //$NON-NLS-1$
+    public static final String ID_OF_DATABINDING_FOREACH_TEXT = "foreachtext@databinding"; //$NON-NLS-1$
+    public static final String ID_OF_DATABINDING_VALUE_TEXT = "valuetext@databinding"; //$NON-NLS-1$
+    public static final String ID_OF_DATABINDING_ATTR_SRC = "attrsrc@databinding"; //$NON-NLS-1$
+    public static final String ID_OF_DATABINDING_ATTR_TEXT = "attrtext@databinding"; //$NON-NLS-1$
+    public static final String ID_OF_DATABINDING_ATTR_HREF = "attrhref@databinding"; //$NON-NLS-1$
+
+    /**
+     * A property type.
+     */
+    private Types type = Types.UNKNOWN;
+
+    /**
+     * An id of property type.
+     */
+    private String id;
+
+    /**
+     * A List containing constant of property type.
+     */
+    private List<ConstantDescriptor> constants = new ArrayList<ConstantDescriptor>();
+
+    /**
+     * A List containing unit of constant of property type.
+     */
+    private List<UnitDescriptor> units = new ArrayList<UnitDescriptor>();
+
+    /**
+     * Constructor.
+     * 
+     * @param id
+     *            an id of property type
+     */
+    public TypeDescriptor(String id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets an id of property type.
+     * 
+     * @return id of property type
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Gets a property type.
+     * 
+     * @return property type
+     */
+    public Types getType() {
+        if (type == Types.UNKNOWN && id != null) {
+            if (ID_OF_STRING.equals(id)) {
+                type = Types.STRING;
+            } else if (ID_OF_RM_STRING.equals(id)) {
+                type = Types.RM_STRING; // for RM localization
+            } else if (ID_OF_BOOLEAN.equals(id)) {
+                type = Types.BOOLEAN;
+            } else if (ID_OF_INTEGER.equals(id)) {
+                type = Types.INTEGER;
+            } else if (ID_OF_DOUBLE.equals(id)) {
+                type = Types.DOUBLE;
+            } else if (ID_OF_URL.equals(id)) {
+                type = Types.SUB_VIEW;
+            } else if (ID_OF_IMAGE.equals(id)) {
+                type = Types.IMAGE;
+            } else if (ID_OF_LAYOUT_RESOURCE.equals(id)) {
+                type = Types.LAYOUT_RESOURCE;
+            } else if (ID_OF_TEXT_RESOURCE.equals(id)) {
+                type = Types.TEXT_RESOURCE;
+            } else if (ID_OF_COLOR.equals(id)) {
+                type = Types.COLOR;
+            } else if (ID_OF_COLOR2.equals(id)) {
+                type = Types.COLOR2;
+            } else if (ID_OF_DATE.equals(id)) {
+                type = Types.DATE;
+            } else if (ID_OF_TIME.equals(id)) {
+                type = Types.TIME;
+            } else if (ID_OF_AUDIO.equals(id)) {
+                type = Types.AUDIO;
+            } else if (ID_OF_VIDEO.equals(id)) {
+                type = Types.VIDEO;
+            } else if (ID_OF_HTMLSTRING.equals(id)) {
+                type = Types.HTMLSTRING;
+            } else if (ID_OF_GROUP.equals(id)) {
+                type = Types.GROUP;
+            } else if (ID_OF_GROUP_TEXT.equals(id)) {
+                type = Types.GROUP_TEXT;
+            } else if (ID_OF_GROUP_POSITION.equals(id)) {
+                type = Types.GROUP_POSITION;
+            } else if (ID_OF_GROUP_BORDER.equals(id)) {
+                type = Types.GROUP_BORDER;
+            } else if (ID_OF_STYLE_COLOR.equals(id)) {
+                type = Types.STYLE_COLOR;
+            } else if (ID_OF_STYLE_FONT_STYLE.equals(id)) {
+                type = Types.STYLE_FONT_STYLE;
+            } else if (ID_OF_STYLE_FONT_WEIGHT.equals(id)) {
+                type = Types.STYLE_FONT_WEIGHT;
+            } else if (ID_OF_STYLE_TEXT_ALIGN.equals(id)) {
+                type = Types.STYLE_TEXT_ALIGN;
+            } else if (ID_OF_STYLE_TEXT_DECORATION.equals(id)) {
+                type = Types.STYLE_TEXT_DECORATION;
+            } else if (ID_OF_SIZE_INTEGER.equals(id)) {
+                type = Types.SIZE_INTEGER;
+            } else if (ID_OF_SIZE_PERCENT.equals(id)) {
+                type = Types.SIZE_PERCENT;
+            } else if (ID_OF_SIZE_REAL.equals(id)) {
+                type = Types.SIZE_REAL;
+            } else if (ID_OF_SIZE.equals(id)) {
+                type = Types.SIZE;
+            } else if (ID_OF_SIZE_PIXEL.equals(id)) {
+                type = Types.SIZE_PIXEL;
+            } else if (ID_OF_SIZE_ANGLE.equals(id)) {
+                type = Types.SIZE_ANGLE;
+            } else if (ID_OF_STYLE_FONT_SIZE.equals(id)) {
+                type = Types.STYLE_FONT_SIZE;
+            } else if (ID_OF_DATABINDING_TEXT.equals(id)) {
+                type = Types.DATABINDING_TEXT;
+            } else if (ID_OF_DATABINDING_VALUE.equals(id)) {
+                type = Types.DATABINDING_VALUE;
+            } else if (ID_OF_DATABINDING_FOREACH.equals(id)) {
+                type = Types.DATABINDING_FOREACH;
+            } else if (ID_OF_DATABINDING_SLIDER.equals(id)) {
+                type = Types.DATABINDING_SLIDER;
+            } else if (ID_OF_DATABINDING_TEXT_CHECK.equals(id)) {
+                type = Types.DATABINDING_TEXT_CHECK;
+            } else if (ID_OF_DATABINDING_FOREACH_TEXT.equals(id)) {
+                type = Types.DATABINDING_FOREACH_TEXT;
+            } else if (ID_OF_DATABINDING_VALUE_TEXT.equals(id)) {
+                type = Types.DATABINDING_VALUE_TEXT;
+            } else if (ID_OF_DATABINDING_ATTR_SRC.equals(id)) {
+                type = Types.DATABINDING_ATTR_SRC;
+            } else if (ID_OF_DATABINDING_ATTR_TEXT.equals(id)) {
+                type = Types.DATABINDING_ATTR_TEXT;
+            } else if (ID_OF_DATABINDING_ATTR_HREF.equals(id)) {
+                type = Types.DATABINDING_ATTR_HREF;
+            } else if (ID_OF_GROUP_TRANSFORM.equals(id)) {
+                type = Types.GROUP_TRANSFORM;
+            } else if (ID_OF_SEPARATOR.equals(id)) {
+                type = Types.SEPARATOR;
+            } else if (ID_OF_CHECK.equals(id)) {
+                type = Types.CHECK;
+            } else if (ID_OF_NEW_COLOR.equals(id)) {
+                type = Types.NEW_COLOR;
+            } else if (ID_OF_COLOR_FILL.equals(id)) {
+                type = Types.COLOR_FILL;
+            } else if (ID_OF_SCALE.equals(id)) {
+                type = Types.SCALE;
+            } else if (ID_OF_SCALE_PIXEL.equals(id)) {
+                type = Types.SCALE_PIXEL;
+            } else if (ID_OF_SCALE_PERCENT.equals(id)) {
+                type = Types.SCALE_PERCENT;
+            } else if (ID_OF_SCALE_ANGLE.equals(id)) {
+                type = Types.SCALE_ANGLE;
+            } else if (ID_OF_CHECK_SCALE.equals(id)) {
+                type = Types.CHECK_SCALE;
+            } else if (ID_OF_SCALE_INTEGER.equals(id)) {
+                type = Types.SCALE_INTEGER;
+            } else if (ID_OF_LISTITEM_CLASS.equals(id)) {
+                type = Types.LISTITEM_CLASS;
+            } else if (ID_OF_GROUP_FILTER.equals(id)) {
+                type = Types.GROUP_FILTER;
+            } else if (ID_OF_GROUP_VALUE.equals(id)) {
+                type = Types.GROUP_VALUE;
+            } else if (ID_OF_METRICS.equals(id)) {
+                type = Types.METRICS;
+            } else if (ID_OF_CLIP.equals(id)) {
+                type = Types.CLIP;
+            } else if (ID_OF_GROUP_ICON.equals(id)) {
+                type = Types.GROUP_ICON;
+            } else if (ID_OF_ITEM_ADD.equals(id)) {
+                type = Types.ITEM_ADD;
+            } else if (ID_OF_EMPTY.equals(id)) {
+                type = Types.EMPTY;
+            } else if (ID_OF_DYNAMIC_COMBO.equals(id)) {
+                type = Types.DYNAMIC_COMBO;
+            } else if (id.endsWith("@style") || id.endsWith("@itemstyle")) {
+                type = Types.EFL_STYLE;
+            } else if (id.endsWith("@colors")) {
+                type = Types.COLORS;
+            } else if (constants.size() > 0) {
+                if (id.startsWith(ID_OF_ICON)) {
+                    type = Types.ICON;
+                } else {
+                    type = Types.ENUM;
+                }
+            }
+        }
+
+        return type;
+    }
+
+    /**
+     * Adds a List containing constant of property type.
+     * 
+     * @param constant
+     *            a constant of property type.
+     */
+    public void addAvailableConstant(ConstantDescriptor constant) {
+        constants.add(constant);
+    }
+
+    /**
+     * Adds a List containing unit of constant of property type.
+     * 
+     * @param unit
+     *            a List containing unit of constant of property type
+     */
+    public void addAvailableUnit(UnitDescriptor unit) {
+        units.add(unit);
+    }
+
+    /**
+     * Gets a List containing constant of property type.
+     * 
+     * @return List containing constant of property type
+     */
+    public List<ConstantDescriptor> getAvailableConstant() {
+        return constants;
+    }
+
+    /**
+     * Gets a List containing unit of constant of property type.
+     * 
+     * @return List containing unit of constant of property type
+     */
+    public List<UnitDescriptor> getAvailableUnit() {
+        return units;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/UnitDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/UnitDescriptor.java
new file mode 100644 (file)
index 0000000..3db5b12
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+/**
+ * A unit of constant of property type descriptor.
+ */
+public class UnitDescriptor {
+
+    /**
+     * A unit of constant of property type.
+     */
+    private String value;
+
+    /**
+     * A unit of constant of property type on display in Properties view.
+     */
+    private String displayName;
+
+    /**
+     * Constructor.
+     * 
+     * @param value
+     *            a unit of constant of property type
+     * @param displayName
+     *            a unit of constant of property type on display in Properties view
+     */
+    public UnitDescriptor(String value, String displayName) {
+        this.value = value;
+        this.displayName = displayName;
+    }
+
+    /**
+     * Gets a unit of constant of property type.
+     * 
+     * @return unit of constant of property type
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Gets a unit of constant of property type on display in Properties view.
+     * 
+     * @return unit of constant of property type on display in Properties view
+     */
+    public String getDisplayName() {
+        return displayName;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/WidgetDescriptor.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/WidgetDescriptor.java
new file mode 100644 (file)
index 0000000..0177d99
--- /dev/null
@@ -0,0 +1,720 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.tizen.efluibuilder.descriptor.DescriptorConstants;
+
+
+/**
+ * A part descriptor.
+ */
+public class WidgetDescriptor implements Comparable<WidgetDescriptor> {
+
+    public enum DescriptorType {
+        DOC, PAGE, WIDGET
+    }
+
+    /**
+     * A descriptor type of {@link Part}.
+     */
+    protected DescriptorType descriptorType;
+
+    /**
+     * A descriptor id of {@link Part}.
+     */
+    protected String descriptorId;
+
+    /**
+     * A display name of {@link Part}.
+     */
+    protected String displayName;
+
+    /**
+     * A List containing category of widget.
+     */
+    protected List<String> categories;
+
+    /**
+     * A 32x32 icon name.
+     */
+    protected String smallIcon;
+
+    /**
+     * A 16x16 icon name.
+     */
+    protected String icon16;
+
+    /**
+     * A description of {@link Part}.
+     */
+    protected String description;
+
+    /**
+     * A Layout type for the container widget.
+     */
+    protected String layoutType;
+
+    /**
+     * The condition of feedback in Page Designer.
+     */
+    protected String layoutCapacity;
+
+    /**
+     * The visibility in a palette of Page Designer.
+     */
+    protected boolean paletteVisible;
+
+    /**
+     * A help document category.
+     */
+    protected String helpCategory;
+
+    /**
+     * A help document name.
+     */
+    protected String helpContents;
+
+    /**
+     * The width of feedback in Page Designer.
+     */
+    protected String feedbackHeight;
+
+    /**
+     * The height of feedback in Page Designer.
+     */
+    protected String feedbackWidth;
+
+    /**
+     * The minimum width of the widget.
+     */
+    protected String minWidth;
+
+    /**
+     * The minimum height of the widget
+     */
+    protected String minHeight;
+
+    /**
+     * The border visibility in Page Designer.
+     */
+    protected boolean borderVisible;
+
+    /**
+     * The condition of feedback in Page Designer.
+     */
+    protected String feedbackCondition;
+
+    /**
+     * A guide text in Page Designer.
+     */
+    protected String guideText;
+
+    /**
+     * The style setting availability in Properties view.
+     */
+    protected boolean setStyle;
+
+    /**
+     * A css selector.
+     */
+    protected String uiSelector;
+
+    /**
+     * A xpath.
+     */
+    protected String xpath;
+
+    /**
+     * A child xpath.
+     */
+    protected String childXpath;
+
+    /**
+     * A self child xpath.
+     */
+    protected String selfChildXpath;
+
+    /**
+     * A ID of container. (e.g) "gengriditem" has a containerID as "gengrid".
+     */
+    protected String containerID;
+
+    /**
+     * A {@link RelationDescriptor}.
+     */
+    protected RelationDescriptor relation = new RelationDescriptor();
+
+    /**
+     * A List containing {@link PartConditionDescriptor}.
+     */
+    protected List<PartConditionDescriptor> conditions = new ArrayList<PartConditionDescriptor>();
+
+    /**
+     * A List containing a {@link PropertyDescriptor}.
+     */
+    protected List<PropertyDescriptor> properties = new ArrayList<PropertyDescriptor>();
+
+    /**
+     * A List containing a {@link PropertyDescriptor}.
+     */
+    protected List<PropertyDescriptor> childUIComponentProperties = new ArrayList<PropertyDescriptor>();
+
+    /**
+     * A List containing an {@link EventDescriptor}.
+     */
+    protected List<EventDescriptor> events = new ArrayList<EventDescriptor>();
+
+    /**
+     * Constructor.
+     */
+    public WidgetDescriptor() {
+    }
+
+    /**
+     * Adds a {@link PartConditionDescriptor}.
+     * 
+     * @param condition
+     *            a {@link PartConditionDescriptor}
+     */
+    public void addConditionDescriptor(PartConditionDescriptor condition) {
+        conditions.add(condition);
+    }
+
+    /**
+     * Adds a {@link PropertyDescriptor}.
+     * 
+     * @param propertyDescriptor
+     *            a {@link PropertyDescriptor}
+     */
+    public void addPropertyDescriptor(PropertyDescriptor propertyDescriptor) {
+        properties.add(propertyDescriptor);
+    }
+
+    /**
+     * Adds a {@link PropertyDescriptor}.
+     * 
+     * @param propertyDescriptor
+     *            a {@link PropertyDescriptor}
+     */
+    public void addChildUIComponentPropertyDescriptor(PropertyDescriptor propertyDescriptor) {
+        childUIComponentProperties.add(propertyDescriptor);
+    }
+
+    /**
+     * Adds an {@link EventDescriptor}.
+     * 
+     * @param eventDescripter
+     *            an {@link EventDescriptor}
+     */
+    public void addEventDescriptor(EventDescriptor eventDescripter) {
+        events.add(eventDescripter);
+    }
+
+    /**
+     * Initialize a {@link WidgetDescriptor}.
+     * 
+     * @param descriptorId
+     *            a descriptor id of {@link Part}
+     * @param displayName
+     *            a display name of {@link Part}
+     * @param smallIcon
+     *            a 32x32 icon name
+     * @param icon16
+     *            a 16x16 icon name
+     * @param description
+     *            a description of {@link Part}
+     * @param layoutCapacity
+     *            a layoutCapacity of {@link Part}
+     * @param layoutType
+     * @param paletteVisible
+     *            the visibility in a palette of Page Designer
+     * @param helpCategory
+     *            a help document category
+     * @param helpContens
+     *            a help document name
+     * @param feedbackWidth
+     *            the width of feedback in Page Designer
+     * @param feedbackHeight
+     *            the height of feedback in Page Designer
+     * @param borderVisible
+     *            the border visibility in Page Designer
+     * @param feedbackCondition
+     *            the condition of feedback in Page Designer
+     * @param guideText
+     *            a guide text in Page Designer
+     * @param setStyle
+     *            the style setting availability in Properties view
+     * @param uiSelector
+     *            a css selector
+     * @param xpath
+     *            a xpath
+     * @param childXpath
+     *            a child xpath
+     * @param selfChildXpath
+     *            a self child xpath
+     */
+    public void init(DescriptorType descriptorType, String descriptorId, String displayName, List<String> categories, String smallIcon, String icon16,
+                     String description, String layoutType, String layoutCapacity, boolean paletteVisible, String helpCategory, String helpContens,
+                     String feedbackWidth, String feedbackHeight, String minWidth, String minHeight, boolean borderVisible, String feedbackCondition,
+                     String guideText, boolean setStyle, String uiSelector, String xpath, String childXpath, String selfChildXpath, String containerID) {
+        this.descriptorType = descriptorType;
+        this.descriptorId = descriptorId;
+        this.displayName = displayName;
+        this.categories = categories;
+        this.smallIcon = smallIcon;
+        this.icon16 = icon16;
+        this.description = description;
+        this.layoutType = layoutType;
+        this.layoutCapacity = layoutCapacity;
+        this.paletteVisible = paletteVisible;
+        this.helpCategory = helpCategory;
+        this.helpContents = helpContens;
+        this.feedbackWidth = feedbackWidth;
+        this.feedbackHeight = feedbackHeight;
+        this.minWidth = minWidth;
+        this.minHeight = minHeight;
+        this.borderVisible = borderVisible;
+        this.feedbackCondition = feedbackCondition;
+        this.guideText = guideText;
+        this.setStyle = setStyle;
+        this.uiSelector = uiSelector;
+        this.xpath = xpath;
+        this.childXpath = childXpath;
+        this.selfChildXpath = selfChildXpath;
+        this.containerID = containerID;
+    }
+
+    /**
+     * Gets a descriptor type of {@link Part}.
+     * 
+     * @return descriptor type of {@link Part}
+     */
+    public DescriptorType getDescriptorType() {
+        return descriptorType;
+    }
+
+    /**
+     * Gets a descriptor id of {@link Part}.
+     * 
+     * @return descriptor id of {@link Part}
+     */
+    public String getDescriptorId() {
+        return descriptorId;
+    }
+
+    /**
+     * Gets a display name of {@link Part}.
+     * 
+     * @return display name of {@link Part}
+     */
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    /**
+     * Gets a List containing category of widget.
+     * 
+     * @return List containing category of widget
+     */
+    public List<String> getCategories() {
+        return categories;
+    }
+
+    /**
+     * Gets a 32x32 icon name.
+     * 
+     * @return 32x32 icon name
+     */
+    public String getSmallIcon() {
+        return smallIcon;
+    }
+
+    /**
+     * Gets a 16x16 icon name.
+     * 
+     * @return 16x16 icon name
+     */
+    public String getIcon16() {
+        return icon16;
+    }
+
+    /**
+     * Gets a description of {@link Part}.
+     * 
+     * @return description of {@link Part}
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Gets a layout type of {@link Part}.
+     * 
+     * @return layout type of {@link Part}
+     */
+    public String getLayoutType() {
+        return layoutType;
+    }
+
+    /**
+     * Gets a layoutCapacity of {@link Part}.
+     * 
+     * @return layoutCapacity of {@link Part}
+     */
+    public String getLayoutCapacity() {
+        return layoutCapacity;
+    }
+
+    /**
+     * Gets the visibility in a palette of Page Designer.
+     * 
+     * @return visibility in a palette of Page Designer
+     */
+    public boolean isPaletteVisible() {
+        return paletteVisible;
+    }
+
+    /**
+     * Gets a help document category.
+     * 
+     * @return a help document category
+     */
+    public String getHelpCategory() {
+        return helpCategory;
+    }
+
+    /**
+     * Gets a help document name.
+     * 
+     * @return a help document name
+     */
+    public String getHelpContents() {
+        return helpContents;
+    }
+
+    /**
+     * Gets the width of feedback in Page Designer.
+     * 
+     * @return width of feedback
+     */
+    public String getFeedbackWidth() {
+        return feedbackWidth;
+    }
+
+    /**
+     * Gets the height of feedback in Page Designer.
+     * 
+     * @return height of feedback
+     */
+    public String getFeedbackHeight() {
+        return feedbackHeight;
+    }
+
+    /**
+     * Gets the minimum width of the widget.
+     * 
+     * @return the minimum width of the widget
+     */
+    public String getMinWidth() {
+        return minWidth;
+    }
+
+    /**
+     * Gets the minimum height of the widget.
+     * 
+     * @return the minimum height of the widget.
+     */
+    public String getMinHeight() {
+        return minHeight;
+    }
+
+    /**
+     * Gets the border visibility in Page Designer.
+     * 
+     * @return border visibility
+     */
+    public boolean isBorderVisible() {
+        return borderVisible;
+    }
+
+    /**
+     * Gets the condition of feedback in Page Designer.
+     * 
+     * @return condition of feedback
+     */
+    public String getFeedbackCondition() {
+        return feedbackCondition;
+    }
+
+    /**
+     * Gets a guide text in Page Designer.
+     * 
+     * @return guide text
+     */
+    public String getGuideText() {
+        return guideText;
+    }
+
+    /**
+     * Gets the style setting availability in Properties view.
+     * 
+     * @return style setting availability
+     */
+    public boolean canSetStyle() {
+        return setStyle;
+    }
+
+    /**
+     * Gets a css selector.
+     * 
+     * @return css selector
+     */
+    public String getUiSelector() {
+        return uiSelector;
+    }
+
+    /**
+     * Gets a xpath.
+     * 
+     * @return xpath
+     */
+    public String getXpath() {
+        return xpath;
+    }
+
+    /**
+     * Gets a child xpath.
+     * 
+     * @return child xpath
+     */
+    public String getChildXpath() {
+        return childXpath;
+    }
+
+    /**
+     * Gets a self child xpath.
+     * 
+     * @return self child xpath
+     */
+    public String getSelfChildXpath() {
+        return selfChildXpath;
+    }
+
+    /**
+     * Gets a id of container.
+     * 
+     * @return id of container
+     */
+    public String getContainerID() {
+        return containerID;
+    }
+
+    /**
+     * Gets a {@link RelationDescriptor}.
+     * 
+     * @return {@link RelationDescriptor}
+     */
+    public RelationDescriptor getRelation() {
+        return relation;
+    }
+
+    /**
+     * Gets a List containing {@link PartConditionDescriptor}.
+     * 
+     * @return List containing {@link PartConditionDescriptor}
+     */
+    public List<PartConditionDescriptor> getConditions() {
+        return conditions;
+    }
+
+    /**
+     * Gets a List containing a {@link PropertyDescriptor}.
+     * 
+     * @return List containing a {@link PropertyDescriptor}
+     */
+    public List<PropertyDescriptor> getPropertyDescriptors() {
+        return properties;
+    }
+
+    /**
+     * Gets a List containing a {@link PropertyDescriptor}.
+     * 
+     * @return List containing a {@link PropertyDescriptor}
+     */
+    public List<PropertyDescriptor> getChildUIComponentPropertyDescriptors() {
+        return childUIComponentProperties;
+    }
+
+    /**
+     * Gets a {@link PropertyDescriptor} corresponding specific property name.
+     * 
+     * @param propertyName
+     *            a property name
+     * @return {@link PropertyDescriptor} corresponding specific property name if it is exist, and
+     *         null otherwise
+     */
+    public PropertyDescriptor getPropertyDescriptor(String propertyName) {
+        PropertyDescriptor property = null;
+        for (Iterator<PropertyDescriptor> itr = properties.iterator(); itr.hasNext();) {
+            property = itr.next();
+            if (property.getPropertyName().equals(propertyName)) {
+                return property;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Gets a {@link PropertyDescriptor} corresponding specific property name.
+     * 
+     * @param propertyName
+     *            a property name
+     * @return {@link PropertyDescriptor} corresponding specific property name if it is exist, and
+     *         null otherwise
+     */
+    public PropertyDescriptor getChildUIComponentPropertyDescriptor(String propertyName) {
+        PropertyDescriptor property = null;
+        for (Iterator<PropertyDescriptor> itr = childUIComponentProperties.iterator(); itr.hasNext();) {
+            property = itr.next();
+            if (property.getPropertyName().equals(propertyName)) {
+                return property;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Gets a List containing an {@link EventDescriptor}.
+     * 
+     * @return List containing an {@link EventDescriptor}
+     */
+    public List<EventDescriptor> getEventDescriptors() {
+        return events;
+    }
+
+    /**
+     * Gets an exclusive group of content.
+     * 
+     * @param childDescriptorId
+     *            a descriptor id of child {@link Part}
+     * @return the exclusive group name of the childDescriptorId if it exist, and null otherwise
+     */
+    public String getExclusiveGroupOfContent(String childDescriptorId) {
+        if (relation == null) {
+            return null;
+        }
+        return relation.getExclusiveGroupOfContent(childDescriptorId);
+    }
+
+    /**
+     * Checks whether {@link Part} can have a specific child {@link Part}.
+     * 
+     * @param childDescriptor
+     *            a descriptor of child {@link Part}
+     * @param numberOfChild
+     *            the number of child {@link Part}
+     * @return true if {@link Part} can have a specific child {@link Part}, and false otherwise
+     */
+    public boolean canHaveChild(WidgetDescriptor childDescriptor, int numberOfChild) {
+        if (relation == null) {
+            return false;
+        }
+        return relation.canHaveChild(getDescriptorId(), childDescriptor, numberOfChild);
+    }
+
+    /**
+     * Checks whether {@link Part} can have some children {@link Part}.
+     * 
+     * @return true if {@link Part} can have some children {@link Part}, and false otherwise
+     */
+    public boolean canHaveChildren() {
+        return getRelation().canHaveChildren();
+    }
+
+    /**
+     * Checks whether {@link Part} can copy a specific child {@link Part}.
+     * 
+     * @param childDescriptor
+     *            a descriptor of child {@link Part}
+     * @return true if {@link Part} can copy a specific child {@link Part}, and false otherwise
+     */
+    public boolean canCopyChild(WidgetDescriptor childDescriptor) {
+        if (relation == null) {
+            return false;
+        }
+        return relation.canCopyChild(childDescriptor);
+    }
+
+    /**
+     * Checks whether {@link Part} can remove a specific child {@link Part}.
+     * 
+     * @param childDescriptor
+     *            a descriptor of child {@link Part}
+     * @param numberOfChild
+     *            the number of child {@link Part}
+     * @return true if {@link Part} can remove a specific child {@link Part}, and false otherwise
+     */
+    public boolean canRemoveChild(WidgetDescriptor childDescriptor, int numberOfChild) {
+        if (relation == null) {
+            return false;
+        }
+        return relation.canRemoveChild(childDescriptor, numberOfChild);
+    }
+
+    /**
+     * Checks whether {@link Part} can set a specific parent {@link Part}.
+     * 
+     * @param parentDescriptor
+     *            a descriptor of parent {@link Part}
+     * @return true if {@link Part} can have a specific child {@link Part}, and false otherwise
+     */
+    public boolean canSetParent(WidgetDescriptor parentDescriptor) {
+        if (relation == null) {
+            return false;
+        }
+        return relation.canSetParent(parentDescriptor);
+    }
+
+    @Override
+    public String toString() {
+        return descriptorId + DescriptorConstants.SPACE + displayName;
+    }
+
+    @Override
+    public int compareTo(WidgetDescriptor o) {
+        return getDisplayName().compareTo(o.getDisplayName());
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (o instanceof WidgetDescriptor) {
+            return getDisplayName().equals(((WidgetDescriptor) o).getDisplayName());
+        }
+        return false;
+    }
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/AnalisysDescriptorFileData.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/AnalisysDescriptorFileData.java
new file mode 100644 (file)
index 0000000..6ea5b7a
--- /dev/null
@@ -0,0 +1,397 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors.io;
+
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.model.descriptors.ContentDescriptor;
+import org.tizen.efluibuilder.model.descriptors.DescriptorManager;
+import org.tizen.efluibuilder.model.descriptors.EventDescriptor;
+import org.tizen.efluibuilder.model.descriptors.EventParamDescriptor;
+import org.tizen.efluibuilder.model.descriptors.EventTypeDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PartConditionDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyConditionDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.RelationDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.model.descriptors.UnitDescriptor;
+import org.tizen.efluibuilder.model.descriptors.WidgetDescriptor;
+import org.tizen.efluibuilder.model.descriptors.WidgetDescriptor.DescriptorType;
+import org.tizen.uibuilder.tizenfile.TizenFileDataEntry;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+
+public class AnalisysDescriptorFileData {
+    private static final String XSL_NAMESPACE = "http://www.w3.org/1999/XSL/Transform"; //$NON-NLS-1$
+    private static final String XSL_STYLESHEET = "stylesheet"; //$NON-NLS-1$
+    private static final String XSL_PREFIX = "xsl"; //$NON-NLS-1$
+    private static final String ATTR_STYLESHEET_VERSION = "version"; //$NON-NLS-1$
+    private static final String VALUE_STYLESHEET_VERSION = "1.0"; //$NON-NLS-1$
+
+    private static final String PART_TYPE_DOC = "doc"; //$NON-NLS-1$
+    private static final String PART_TYPE_PAGE = "page"; //$NON-NLS-1$
+    private static final String PART_TYPE_WIDGET = "widget"; //$NON-NLS-1$
+
+    public static void analisysFileData(DescriptorManager descriptorManager, DescriptorFileData fileData) {
+        if (fileData == null) {
+            return;
+        }
+
+        List<TizenFileDataEntry> typeList = fileData.getTypeList();
+        if (typeList != null) {
+            for (TizenFileDataEntry entry : typeList) {
+                String id = entry.getStringProperty(DescriptorFileData.PROP_ID);
+
+                TypeDescriptor type = descriptorManager.getTypeDescriptor(id);
+                if (type == null) {
+                    type = new TypeDescriptor(id);
+                    descriptorManager.addTypeDescriptor(type);
+                }
+
+                List constList = entry.getListProperty(DescriptorFileData.PROP_CONSTANT_LIST);
+                if (constList != null) {
+                    for (Object constant : constList) {
+                        TizenFileDataEntry constEntry = (TizenFileDataEntry) constant;
+
+                        String value = constEntry.getStringProperty(DescriptorFileData.PROP_VALUE);
+                        String displayName = constEntry.getStringProperty(DescriptorFileData.PROP_DISPLAYNAME);
+                        String icon = constEntry.getStringProperty(DescriptorFileData.PROP_ICON);
+                        String required = constEntry.getStringProperty(DescriptorFileData.PROP_REQUIRED);
+
+                        if (displayName == null) {
+                            displayName = value;
+                        }
+
+                        ConstantDescriptor constDesc = new ConstantDescriptor(value, displayName, icon, required);
+                        type.addAvailableConstant(constDesc);
+                    }
+                }
+
+                List unitList = entry.getListProperty(DescriptorFileData.PROP_UNIT_LIST);
+                if (unitList != null) {
+                    for (Object unit : unitList) {
+                        TizenFileDataEntry unitEntry = (TizenFileDataEntry) unit;
+
+                        String value = unitEntry.getStringProperty(DescriptorFileData.PROP_VALUE);
+                        String displayName = unitEntry.getStringProperty(DescriptorFileData.PROP_DISPLAYNAME);
+
+                        if (displayName == null) {
+                            displayName = value;
+                        }
+
+                        UnitDescriptor unitDesc = new UnitDescriptor(value, displayName);
+                        type.addAvailableUnit(unitDesc);
+                    }
+                }
+            }
+        }
+
+        // widget categories.. categories must be set before the part.
+        List<TizenFileDataEntry> uiComponentCategoryList = fileData.getUIComponentCategoryList();
+        if (uiComponentCategoryList != null) {
+            for (TizenFileDataEntry entry : uiComponentCategoryList) {
+                String categoryName = entry.getStringProperty(DescriptorFileData.PROP_NAME);
+                descriptorManager.addUIComponentCategoryDescriptor(categoryName);
+            }
+        }
+
+        // default theme edj file name. This theme will be applied WYSIWYG.
+        List<TizenFileDataEntry> defaultStyleEDJList = fileData.getDefaultSyleEDJList();
+        if (defaultStyleEDJList != null) {
+            for (TizenFileDataEntry entry : defaultStyleEDJList) {
+                String styleEDJ = entry.getStringProperty(DescriptorFileData.PROP_NAME);
+                descriptorManager.addDefaultStyleEDJ(styleEDJ);
+            }
+        }
+
+        List<TizenFileDataEntry> partList = fileData.getPartDescriptorList();
+        if (partList != null) {
+            for (TizenFileDataEntry entry : partList) {
+                String id = entry.getStringProperty(DescriptorFileData.PROP_ID);
+                String displayName = entry.getStringProperty(DescriptorFileData.PROP_DISPLAYNAME);
+                List<String> categories = (List) entry.getListProperty(DescriptorFileData.PROP_CATEGORY_LIST);
+                String smallIcon = entry.getStringProperty(DescriptorFileData.PROP_SMALLICON);
+                String icon16 = entry.getStringProperty(DescriptorFileData.PROP_ICON_16);
+                String description = entry.getStringProperty(DescriptorFileData.PROP_DESCRIPTION);
+                String layoutType = entry.getStringProperty(DescriptorFileData.PROP_LAYOUT_TYPE);
+                String layoutCapacity = entry.getStringProperty(DescriptorFileData.PROP_LAYOUT_CAPACITY);
+                String paletteVisible = entry.getStringProperty(DescriptorFileData.PROP_PALETTE_VISIBLE);
+                String helpCategory = entry.getStringProperty(DescriptorFileData.PROP_HELPCATEGORY);
+                String helpContens = entry.getStringProperty(DescriptorFileData.PROP_HELPCONTENS);
+                String width = entry.getStringProperty(DescriptorFileData.PROP_FEEDBACKWIDTH);
+                String height = entry.getStringProperty(DescriptorFileData.PROP_FEEDBACKHEIGHT);
+                String minWidth = entry.getStringProperty(DescriptorFileData.PROP_MINWIDTH);
+                String minHeight = entry.getStringProperty(DescriptorFileData.PROP_MINHEIGHT);
+                String borderVisible = entry.getStringProperty(DescriptorFileData.PROP_BORDER_VISIBLE);
+                String feedbackCondition = entry.getStringProperty(DescriptorFileData.PROP_FEEDBACKCONDITION);
+                String guideText = entry.getStringProperty(DescriptorFileData.PROP_GUIDE_TEXT);
+                String setStyle = entry.getStringProperty(DescriptorFileData.PROP_SET_STYLE);
+                String uiSelector = entry.getStringProperty(DescriptorFileData.PROP_UI_SELECTOR);
+                String xpath = entry.getStringProperty(DescriptorFileData.PROP_XPATH);
+                String childXpath = entry.getStringProperty(DescriptorFileData.PROP_CHILDXPATH);
+                String selfChildXpath = entry.getStringProperty(DescriptorFileData.PROP_SELFCHILDXPATH);
+                String containerID = entry.getStringProperty(DescriptorFileData.PROP_CONTAINER_ID);
+
+                WidgetDescriptor part = new WidgetDescriptor();
+
+                DescriptorType descType = DescriptorType.WIDGET;
+                if (entry.getName().equals("doc")) {
+                    descType = DescriptorType.DOC;
+                } else if (entry.getName().equals("page")) {
+                    descType = DescriptorType.PAGE;
+                } else if (entry.getName().equals("widget")) {
+                    descType = DescriptorType.WIDGET;
+                }
+
+                boolean boolpaletteVisible = true;
+                if (paletteVisible != null && !paletteVisible.isEmpty()) {
+                    boolpaletteVisible = Boolean.parseBoolean(paletteVisible);
+                }
+                boolean boolBorderVisible = Boolean.parseBoolean(borderVisible);
+                boolean boolSetStyle = Boolean.parseBoolean(setStyle);
+
+                part.init(descType, id, displayName, categories, smallIcon, icon16, description, layoutType, layoutCapacity, boolpaletteVisible, helpCategory,
+                          helpContens, width, height, minWidth, minHeight, boolBorderVisible, feedbackCondition, guideText, boolSetStyle, uiSelector, xpath,
+                          childXpath, selfChildXpath, containerID);
+
+                List<Object> propList = entry.getListProperty(DescriptorFileData.PROP_PROPERTY_LIST);
+                if (propList != null) {
+                    for (Object childEntry : propList) {
+                        TizenFileDataEntry propEntry = (TizenFileDataEntry) childEntry;
+                        PropertyDescriptor propertyDescriptor =
+                                new PropertyDescriptor(propEntry.getStringProperty("name"), propEntry.getStringProperty("type"),
+                                                       propEntry.getStringProperty("displayName"), propEntry.getStringProperty("tooltip"),
+                                                       propEntry.getStringProperty("default"), propEntry.getStringProperty("initValue"),
+                                                       propEntry.getStringProperty("category"), propEntry.getStringProperty("xpath"),
+                                                       propEntry.getStringProperty("attrXpath"), propEntry.getStringProperty("inline"),
+                                                       propEntry.getStringProperty("unusedEditors"), descriptorManager);
+
+                        List condList = propEntry.getListProperty(DescriptorFileData.PROP_CONDITION_LIST);
+                        if (condList != null) {
+                            for (Object propChildEntry : condList) {
+                                TizenFileDataEntry condEntry = (TizenFileDataEntry) propChildEntry;
+                                propertyDescriptor.addConditionDescriptor(new PropertyConditionDescriptor(condEntry.getStringProperty("name"),
+                                                                                                          condEntry.getStringProperty("value"),
+                                                                                                          condEntry.getStringProperty("target"),
+                                                                                                          condEntry.getStringProperty("targetValue"),
+                                                                                                          condEntry.getStringProperty("error")));
+                            }
+                        }
+
+                        part.addPropertyDescriptor(propertyDescriptor);
+                    }
+                }
+
+                List<Object> childUIComponentPropList = entry.getListProperty(DescriptorFileData.PROP_CHILDUICOMPONENTPROPERTY_LIST);
+                if (childUIComponentPropList != null) {
+                    for (Object childUIComponentEntry : childUIComponentPropList) {
+                        TizenFileDataEntry childUIComponentPropEntry = (TizenFileDataEntry) childUIComponentEntry;
+                        List<Object> listProperty = childUIComponentPropEntry.getListProperty(DescriptorFileData.PROP_PROPERTY_LIST);
+                        if (listProperty != null) {
+                            for (Object propertyEntry : listProperty) {
+                                TizenFileDataEntry propEntry = (TizenFileDataEntry) propertyEntry;
+                                PropertyDescriptor propertyDescriptor =
+                                        new PropertyDescriptor(propEntry.getStringProperty("name"), propEntry.getStringProperty("type"),
+                                                               propEntry.getStringProperty("displayName"), propEntry.getStringProperty("tooltip"),
+                                                               propEntry.getStringProperty("default"), propEntry.getStringProperty("initValue"),
+                                                               propEntry.getStringProperty("category"), propEntry.getStringProperty("xpath"),
+                                                               propEntry.getStringProperty("attrXpath"), propEntry.getStringProperty("inline"),
+                                                               propEntry.getStringProperty("unusedEditors"), descriptorManager);
+
+                                List condList = propEntry.getListProperty(DescriptorFileData.PROP_CONDITION_LIST);
+                                if (condList != null) {
+                                    for (Object propChildEntry : condList) {
+                                        TizenFileDataEntry condEntry = (TizenFileDataEntry) propChildEntry;
+                                        propertyDescriptor.addConditionDescriptor(new PropertyConditionDescriptor(condEntry.getStringProperty("name"),
+                                                                                                                  condEntry.getStringProperty("value"),
+                                                                                                                  condEntry.getStringProperty("target"),
+                                                                                                                  condEntry.getStringProperty("targetValue"),
+                                                                                                                  condEntry.getStringProperty("error")));
+                                    }
+                                }
+                                part.addChildUIComponentPropertyDescriptor(propertyDescriptor);
+                            }
+                        }
+                    }
+                }
+
+                List condList = entry.getListProperty(DescriptorFileData.PROP_CONDITION_LIST);
+                if (condList != null) {
+                    for (Object childEntry : condList) {
+                        TizenFileDataEntry condEntry = (TizenFileDataEntry) childEntry;
+                        part.addConditionDescriptor(new PartConditionDescriptor(condEntry.getStringProperty("name"), condEntry.getStringProperty("value"),
+                                                                                condEntry.getStringProperty("target"),
+                                                                                condEntry.getStringProperty("targetValue")));
+                    }
+                }
+
+                List eventList = entry.getListProperty(DescriptorFileData.PROP_EVENT_LIST);
+                if (eventList != null) {
+                    for (Object childEntry : eventList) {
+                        TizenFileDataEntry eventEntry = (TizenFileDataEntry) childEntry;
+                        part.addEventDescriptor(new EventDescriptor(eventEntry.getStringProperty("name"), eventEntry.getStringProperty("displayName"),
+                                                                    eventEntry.getStringProperty("eventType"), eventEntry.getStringProperty("eventInfo"),
+                                                                    descriptorManager));
+                    }
+                }
+
+                // if (entry.getName().equals("widget")) {
+                // part.setCategories((List) entry
+                // .getListProperty(DescriptorFileData.PROP_CATEGORY_LIST));
+                // }
+
+                TizenFileDataEntry relation = entry.getEntryProperty(DescriptorFileData.PROP_RELATION);
+                if (relation != null) {
+                    RelationDescriptor relDesc = part.getRelation();
+
+                    List parentList = relation.getListProperty(DescriptorFileData.PROP_PARENT_LIST);
+                    if (parentList != null) {
+                        relDesc.addParentPartIds(parentList);
+                    }
+
+                    List noParentList = relation.getListProperty(DescriptorFileData.PROP_NOPARENT_LIST);
+                    if (noParentList != null) {
+                        relDesc.addNoParentPartIds(noParentList);
+                    }
+
+                    List contentList = relation.getListProperty(DescriptorFileData.PROP_CONTENT_LIST);
+                    if (contentList != null) {
+                        for (Object childObj : contentList) {
+                            TizenFileDataEntry content = (TizenFileDataEntry) childObj;
+
+                            String ids = content.getStringProperty(DescriptorFileData.PROP_IDS);
+                            String min = content.getStringProperty(DescriptorFileData.PROP_MIN);
+                            String max = content.getStringProperty(DescriptorFileData.PROP_MAX);
+                            String exclusiveGroup = content.getStringProperty(DescriptorFileData.PROP_EXCLUSIVE_GROUP);
+                            String conttype = content.getStringProperty(DescriptorFileData.PROP_TYPE);
+                            ContentDescriptor.PartType partType = ContentDescriptor.PartType.ANY_PART;
+
+                            if (conttype != null && !conttype.isEmpty()) {
+                                if (conttype.equals(PART_TYPE_DOC)) {
+                                    partType = ContentDescriptor.PartType.DOCUMENT_PART;
+                                } else if (conttype.equals(PART_TYPE_PAGE)) {
+                                    partType = ContentDescriptor.PartType.PAGE_PART;
+                                } else if (conttype.equals(PART_TYPE_WIDGET)) {
+                                    partType = ContentDescriptor.PartType.WIDGET_PART;
+                                }
+                            }
+
+                            ContentDescriptor contDesc = new ContentDescriptor();
+                            contDesc.setPartType(partType);
+                            if (ids != null && !ids.isEmpty()) {
+                                contDesc.setPartIds(ids);
+                            }
+                            if (min != null && !min.isEmpty()) {
+                                contDesc.setMin(Integer.valueOf(min).intValue());
+                            }
+                            if (max != null && !max.isEmpty()) {
+                                contDesc.setMax(Integer.valueOf(max).intValue());
+                            }
+                            if (exclusiveGroup != null && !exclusiveGroup.isEmpty()) {
+                                contDesc.setExclusiveGroup(exclusiveGroup);
+                            }
+
+                            relDesc.addContent(contDesc);
+                        }
+                    }
+
+                    List noContentList = relation.getListProperty(DescriptorFileData.PROP_PARENT_LIST);
+                    if (noContentList != null) {
+                        relDesc.addNoContentPartIds(noContentList);
+                    }
+                }
+
+                descriptorManager.addPartDescriptor(part);
+            }
+        }
+
+        List<TizenFileDataEntry> eventTypeList = fileData.getEventTypeList();
+        if (eventTypeList != null) {
+            for (TizenFileDataEntry entry : eventTypeList) {
+                String id = entry.getStringProperty(DescriptorFileData.PROP_ID);
+
+                EventTypeDescriptor eventType = descriptorManager.getEventTypeDescriptor(id);
+                if (eventType == null) {
+                    eventType = new EventTypeDescriptor(id);
+                    descriptorManager.addEventTypeDescriptor(eventType);
+                }
+
+                String code = entry.getStringProperty(DescriptorFileData.PROP_DEFAULTCODE);
+
+                eventType.setDefaultCode(code);
+
+                List paramList = entry.getListProperty(DescriptorFileData.PROP_PARAM_LIST);
+                if (paramList != null) {
+                    for (Object param : paramList) {
+                        TizenFileDataEntry paramEntry = (TizenFileDataEntry) param;
+
+                        String name = paramEntry.getStringProperty(DescriptorFileData.PROP_NAME);
+                        String type = paramEntry.getStringProperty(DescriptorFileData.PROP_TYPE);
+                        eventType.addEventParameter(new EventParamDescriptor(name, type));
+                    }
+                }
+            }
+        }
+
+        List<TizenFileDataEntry> xslList = fileData.getXslList();
+        if (xslList != null && !xslList.isEmpty()) {
+            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+            factory.setNamespaceAware(true);
+
+            DocumentBuilder builder = null;
+            try {
+                builder = factory.newDocumentBuilder();
+            } catch (ParserConfigurationException e) {
+                e.printStackTrace();
+            }
+
+            if (builder != null) {
+                Document xslt = builder.newDocument();
+
+                Element xslRoot = xslt.createElementNS(XSL_NAMESPACE, XSL_STYLESHEET);
+                xslRoot.setPrefix(XSL_PREFIX);
+                xslRoot.setAttribute(ATTR_STYLESHEET_VERSION, VALUE_STYLESHEET_VERSION);
+
+                for (TizenFileDataEntry entry : xslList) {
+                    List elmList = entry.getListProperty(DescriptorFileData.PROP_XSL_LIST);
+                    if (elmList != null) {
+                        for (Object elm : elmList) {
+                            xslRoot.appendChild(xslt.adoptNode((Element) elm));
+                        }
+                    }
+                }
+
+                xslt.appendChild(xslRoot);
+
+                descriptorManager.setXsltDocument(xslt);
+            }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/DescriptorFileData.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/DescriptorFileData.java
new file mode 100644 (file)
index 0000000..998235e
--- /dev/null
@@ -0,0 +1,257 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors.io;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.uibuilder.tizenfile.TizenFileDataEntry;
+
+
+/**
+ * A descriptor reader.
+ */
+public class DescriptorFileData {
+
+    public static final String PROP_CATEGORY_LIST = "categoryList"; //$NON-NLS-1$
+    public static final String PROP_WIDGET = "widget"; //$NON-NLS-1$
+    public static final String PROP_RELATION = "relation"; //$NON-NLS-1$
+    public static final String PROP_PROPERTY_LIST = "propertyList"; //$NON-NLS-1$
+    public static final String PROP_CHILDUICOMPONENTPROPERTY_LIST = "childUIComponentPropertyList"; //$NON-NLS-1$
+    public static final String PROP_CONDITION_LIST = "conditionList"; //$NON-NLS-1$
+    public static final String PROP_EVENT_LIST = "eventList"; //$NON-NLS-1$
+    public static final String PROP_CONSTANT_LIST = "constantList"; //$NON-NLS-1$
+    public static final String PROP_UNIT_LIST = "unitList"; //$NON-NLS-1$
+    public static final String PROP_XSL_LIST = "xslList"; //$NON-NLS-1$
+
+    public static final String PROP_PARENT_LIST = "parent"; //$NON-NLS-1$
+    public static final String PROP_NOPARENT_LIST = "noparent"; //$NON-NLS-1$
+    public static final String PROP_CONTENT_LIST = "content"; //$NON-NLS-1$
+    public static final String PROP_NOCONTENT_LIST = "nocontent"; //$NON-NLS-1$
+
+    public static final String PROP_ID = "id"; //$NON-NLS-1$
+    public static final String PROP_DISPLAYNAME = "displayName"; //$NON-NLS-1$
+    public static final String PROP_SMALLICON = "smallIcon"; //$NON-NLS-1$
+    public static final String PROP_ICON_16 = "icon.16"; //$NON-NLS-1$
+    public static final String PROP_ICON = "icon"; //$NON-NLS-1$
+    public static final String PROP_CATEGORY = "category"; //$NON-NLS-1$
+    public static final String PROP_DESCRIPTION = "description"; //$NON-NLS-1$
+    public static final String PROP_LAYOUT_TYPE = "layoutType"; //$NON-NLS-1$
+    public static final String PROP_LAYOUT_CAPACITY = "layoutCapacity"; //$NON-NLS-1$
+    public static final String PROP_PALETTE_VISIBLE = "paletteVisible"; //$NON-NLS-1$
+    public static final String PROP_HELPCATEGORY = "helpCategory"; //$NON-NLS-1$
+    public static final String PROP_HELPCONTENS = "helpContents"; //$NON-NLS-1$
+    public static final String PROP_FEEDBACKWIDTH = "feedbackWidth"; //$NON-NLS-1$
+    public static final String PROP_FEEDBACKHEIGHT = "feedbackHeight"; //$NON-NLS-1$
+    public static final String PROP_MINWIDTH = "minWidth"; //$NON-NLS-1$
+    public static final String PROP_MINHEIGHT = "minHeight"; //$NON-NLS-1$
+    public static final String PROP_BORDER_VISIBLE = "borderVisible"; //$NON-NLS-1$
+    public static final String PROP_FEEDBACKCONDITION = "feedbackCondition"; //$NON-NLS-1$
+    public static final String PROP_GUIDE_TEXT = "guideText"; //$NON-NLS-1$
+    public static final String PROP_SET_STYLE = "setStyle"; //$NON-NLS-1$
+    public static final String PROP_UI_SELECTOR = "uiSelector"; //$NON-NLS-1$
+    public static final String PROP_XPATH = "xpath"; //$NON-NLS-1$
+    public static final String PROP_CHILDXPATH = "childXpath"; //$NON-NLS-1$
+    public static final String PROP_SELFCHILDXPATH = "selfChildXpath"; //$NON-NLS-1$
+    public static final String PROP_CONTAINER_ID = "containerID";
+    public static final String PROP_PROPXPATH = "PROPXpath"; //$NON-NLS-1$
+    public static final String PROP_IDS = "ids"; //$NON-NLS-1$
+    public static final String PROP_EXCLUDE_IDS = "exclude-ids"; //$NON-NLS-1$
+    public static final String PROP_PARENT_IDS = "parent-ids"; //$NON-NLS-1$
+    public static final String PROP_EXCLUSIVE_GROUP = "exclusiveGroup"; //$NON-NLS-1$
+    public static final String PROP_MIN = "min"; //$NON-NLS-1$
+    public static final String PROP_MAX = "max"; //$NON-NLS-1$
+    public static final String PROP_NAME = "name"; //$NON-NLS-1$
+    public static final String PROP_TYPE = "type"; //$NON-NLS-1$
+    public static final String PROP_DEFAULT = "default"; //$NON-NLS-1$
+    public static final String PROP_INITVALUE = "initValue"; //$NON-NLS-1$
+    public static final String PROP_SELECTOR = "selector"; //$NON-NLS-1$
+    public static final String PROP_NOT_SUPPORTED = "notsupported"; //$NON-NLS-1$
+    public static final String PROP_VALUE = "value"; //$NON-NLS-1$
+    public static final String PROP_TARGET = "target"; //$NON-NLS-1$
+    public static final String PROP_TARGETVALUE = "targetValue"; //$NON-NLS-1$
+    public static final String PROP_TOOLTIP = "tooltip"; //$NON-NLS-1$
+    public static final String PROP_ERROR = "error"; //$NON-NLS-1$
+    public static final String PROP_EVENTTYPE = "eventType"; //$NON-NLS-1$
+    public static final String PROP_REQUIRED = "required"; //$NON-NLS-1$
+
+    public static final String PROP_DEFAULTCODE = "defaultCode"; //$NON-NLS-1$
+    public static final String PROP_PARAM_LIST = "paramList"; //$NON-NLS-1$
+
+    // public TizenFileDataEntry doc;
+    // public TizenFileDataEntry page;
+    // public List<TizenFileDataEntry> widgets = null;
+
+    private String rendererId = null;
+    private String frameworkName = null;
+    private List<String> frameworkLibraries = null;
+    private List<String> editorLibraries = null;
+    public List<TizenFileDataEntry> descriptors = null;
+    public List<TizenFileDataEntry> types = null;
+    public List<TizenFileDataEntry> eventTypes = null;
+    public List<TizenFileDataEntry> xsls = null;
+    public List<TizenFileDataEntry> uiComponentCategories = null;
+    public List<TizenFileDataEntry> defaultStyleEdjs = null;
+
+    public void setRendererId(String rendererId) {
+        this.rendererId = rendererId;
+    }
+
+    public String getRendererId() {
+        return rendererId;
+    }
+
+    public void setFrameworkName(String frameworkName) {
+        this.frameworkName = frameworkName;
+    }
+
+    public String getFrameworkName() {
+        return frameworkName;
+    }
+
+    public void addFrameworkLibrary(String library) {
+        if (library == null) {
+            return;
+        }
+        if (frameworkLibraries == null) {
+            frameworkLibraries = new ArrayList<String>();
+        }
+        frameworkLibraries.add(library);
+    }
+
+    public List<String> getFrameworkLibraries() {
+        return frameworkLibraries;
+    }
+
+    public void addEditorLibrary(String library) {
+        if (library == null) {
+            return;
+        }
+
+        if (editorLibraries == null) {
+            editorLibraries = new ArrayList<String>();
+        }
+        editorLibraries.add(library);
+    }
+
+    public List<String> getEditorLibraries() {
+        return editorLibraries;
+    }
+
+    public void addPartDescriptor(TizenFileDataEntry entry) {
+        if (entry == null) {
+            return;
+        }
+
+        if (descriptors == null) {
+            descriptors = new ArrayList<TizenFileDataEntry>();
+        }
+
+        descriptors.add(entry);
+    }
+
+    public List<TizenFileDataEntry> getPartDescriptorList() {
+        return descriptors;
+    }
+
+    public void addType(TizenFileDataEntry entry) {
+        if (entry == null) {
+            return;
+        }
+
+        if (types == null) {
+            types = new ArrayList<TizenFileDataEntry>();
+        }
+
+        types.add(entry);
+    }
+
+    public List<TizenFileDataEntry> getTypeList() {
+        return types;
+    }
+
+    public void addEventType(TizenFileDataEntry entry) {
+        if (entry == null) {
+            return;
+        }
+
+        if (eventTypes == null) {
+            eventTypes = new ArrayList<TizenFileDataEntry>();
+        }
+
+        eventTypes.add(entry);
+    }
+
+    public void addUIComponentCategory(TizenFileDataEntry entry) {
+        if (entry == null) {
+            return;
+        }
+
+        if (uiComponentCategories == null) {
+            uiComponentCategories = new ArrayList<TizenFileDataEntry>();
+        }
+
+        uiComponentCategories.add(entry);
+    }
+
+    public void addDefaultStyleEDJs(TizenFileDataEntry entry) {
+        if (entry == null) {
+            return;
+        }
+
+        if (defaultStyleEdjs == null) {
+            defaultStyleEdjs = new ArrayList<TizenFileDataEntry>();
+        }
+
+        defaultStyleEdjs.add(entry);
+    }
+
+    public List<TizenFileDataEntry> getEventTypeList() {
+        return eventTypes;
+    }
+
+    public List<TizenFileDataEntry> getUIComponentCategoryList() {
+        return uiComponentCategories;
+    }
+
+    public List<TizenFileDataEntry> getDefaultSyleEDJList() {
+        return defaultStyleEdjs;
+    }
+
+    public void addXslEntry(TizenFileDataEntry entry) {
+        if (entry == null) {
+            return;
+        }
+
+        if (xsls == null) {
+            xsls = new ArrayList<TizenFileDataEntry>();
+        }
+
+        xsls.add(entry);
+    }
+
+    public List<TizenFileDataEntry> getXslList() {
+        return xsls;
+    }
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/file/DescriptorReader.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/file/DescriptorReader.java
new file mode 100644 (file)
index 0000000..12a300b
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors.io.file;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.tizen.efluibuilder.model.descriptors.io.DescriptorFileData;
+import org.xml.sax.SAXException;
+
+
+/**
+ * A descriptor reader.
+ */
+public class DescriptorReader {
+
+    /**
+     * A {@link DescriptorManager}.
+     */
+    // private DescriptorManager manager;
+
+    /**
+     * A xsl-for-output document.
+     */
+    // private Document xslt = null;
+    // private Element xslRoot = null;
+
+    /**
+     * Constructor.
+     * 
+     * @param manager
+     *            a {@link DescriptorManager}
+     */
+    // public DescriptorReader(DescriptorManager manager) {
+    // this.manager = manager;
+    // }
+
+    // /**
+    // * Gets a {@link Document}.
+    // *
+    // * @return a {@link Document}
+    // */
+    // public Document getXsltForOutput() {
+    // return xslt;
+    // }
+    //
+    // /**
+    // * Gets a {@link Document}.
+    // *
+    // * @return a {@link Document}
+    // */
+    // public Element getXsltForOutputElement() {
+    // return xslRoot;
+    // }
+
+    /**
+     * Parses a descriptor XML.
+     * 
+     * @param path
+     *            base directory location
+     * @param url
+     *            a path of descriptor XML
+     * @throws IOException
+     * @throws SAXException
+     * @throws ParserConfigurationException
+     */
+    public static DescriptorFileData parse(String path, URL url) throws ParserConfigurationException, SAXException, IOException {
+        DescriptorFileData doc = DescriptorReader_ver_2.parse(path, url);
+        if (doc == null) {
+            doc = DescriptorReader_ver_1.parse(url);
+        }
+
+        return doc;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/file/DescriptorReader_ver_1.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/file/DescriptorReader_ver_1.java
new file mode 100644 (file)
index 0000000..8e5f779
--- /dev/null
@@ -0,0 +1,975 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors.io.file;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.tizen.efluibuilder.descriptor.DescriptorConstants;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.RelationDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.model.descriptors.WidgetDescriptor;
+import org.tizen.efluibuilder.model.descriptors.io.DescriptorFileData;
+import org.tizen.uibuilder.tizenfile.TizenFileDataEntry;
+import org.tizen.uibuilder.tizenfile.TizenFileDataHelper;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+
+/**
+ * A descriptor reader.
+ */
+public class DescriptorReader_ver_1 {
+
+    // public static final String PROP_WIDGET = "widget"; //$NON-NLS-1$
+    // public static final String PROP_RELATIONS = "relations"; //$NON-NLS-1$
+    // public static final String PROP_PROPERTY = "property"; //$NON-NLS-1$
+    // public static final String PROP_CONDITION = "condition"; //$NON-NLS-1$
+    // public static final String PROP_EVENT = "event"; //$NON-NLS-1$
+    // public static final String PROP_CONSTANT = "constant"; //$NON-NLS-1$
+    //
+    // public static final String PROP_DEFAULTCODE = "defaultCode"; //$NON-NLS-1$
+    // public static final String PROP_PARAM = "param"; //$NON-NLS-1$
+
+    // Element name
+    private static final String ELEM_RENDERER = "renderer"; //$NON-NLS-1$
+    private static final String ELEM_FRAMEWORK = "framework"; //$NON-NLS-1$
+    private static final String ELEM_LIBRARY = "library"; //$NON-NLS-1$
+    private static final String ELEM_EDITOR = "editor"; //$NON-NLS-1$
+    private static final String ELEM_DOC = "doc"; //$NON-NLS-1$
+    private static final String ELEM_PAGE = "page"; //$NON-NLS-1$
+    private static final String ELEM_WIDGET = "widget"; //$NON-NLS-1$
+    private static final String ELEM_CONTENT = "content"; //$NON-NLS-1$
+    private static final String ELEM_NOCONTENT = "nocontent"; //$NON-NLS-1$
+    private static final String ELEM_PARENT = "parent"; //$NON-NLS-1$
+    private static final String ELEM_NOPARENT = "noparent"; //$NON-NLS-1$
+    private static final String ELEM_RELATIONS = "relations"; //$NON-NLS-1$
+    private static final String ELEM_PROPERTY = "property"; //$NON-NLS-1$
+    private static final String ELEM_CONDITION = "condition"; //$NON-NLS-1$
+    private static final String ELEM_EVENT = "event"; //$NON-NLS-1$
+    private static final String ELEM_XSL_FOR_OUTPUT = "xsl-for-output"; //$NON-NLS-1$
+    private static final String ELEM_TYPES = "types"; //$NON-NLS-1$
+    private static final String ELEM_TYPE = "type"; //$NON-NLS-1$
+    private static final String ELEM_CONSTANT = "constant"; //$NON-NLS-1$
+    private static final String ELEM_UNIT = "unit"; //$NON-NLS-1$
+    private static final String ELEM_EVENTTYPES = "eventTypes"; //$NON-NLS-1$
+    private static final String ELEM_EVENTTYPE = "eventType"; //$NON-NLS-1$
+    private static final String ELEM_DEFAULTCODE = "defaultCode"; //$NON-NLS-1$
+    private static final String ELEM_PARAM = "param"; //$NON-NLS-1$
+
+    // Attribute name
+    private static final String ATTR_ID = "id"; //$NON-NLS-1$
+    private static final String ATTR_DISPLAYNAME = "displayName"; //$NON-NLS-1$
+    private static final String ATTR_SMALLICON = "smallIcon"; //$NON-NLS-1$
+    private static final String ATTR_ICON_16 = "icon.16"; //$NON-NLS-1$
+    private static final String ATTR_ICON = "icon"; //$NON-NLS-1$
+    private static final String ATTR_CATEGORY = "category"; //$NON-NLS-1$
+    private static final String ATTR_DESCRIPTION = "description"; //$NON-NLS-1$
+    private static final String ATTR_LAYOUTTYPE = "layoutType"; //$NON-NLS-1$
+    private static final String ATTR_LAYOUT_CAPACITY = "layoutCapacity"; //$NON-NLS-1$
+    private static final String ATTR_PALETTE_VISIBLE = "paletteVisible"; //$NON-NLS-1$
+    private static final String ATTR_HELPCATEGORY = "helpCategory"; //$NON-NLS-1$
+    private static final String ATTR_HELPCONTENS = "helpContents"; //$NON-NLS-1$
+    private static final String ATTR_FEEDBACKWIDTH = "feedbackWidth"; //$NON-NLS-1$
+    private static final String ATTR_FEEDBACKHEIGHT = "feedbackHeight"; //$NON-NLS-1$
+    private static final String ATTR_MINWIDTH = "minWidth"; //$NON-NLS-1$
+    private static final String ATTR_MINHEIGHT = "minHeight"; //$NON-NLS-1$
+    private static final String ATTR_BORDER_VISIBLE = "borderVisible"; //$NON-NLS-1$
+    private static final String ATTR_FEEDBACKCONDITION = "feedbackCondition"; //$NON-NLS-1$
+    private static final String ATTR_GUIDE_TEXT = "guideText"; //$NON-NLS-1$
+    private static final String ATTR_SET_STYLE = "setStyle"; //$NON-NLS-1$
+    private static final String ATTR_UI_SELECTOR = "uiSelector"; //$NON-NLS-1$
+    private static final String ATTR_XPATH = "xpath"; //$NON-NLS-1$
+    private static final String ATTR_CHILDXPATH = "childXpath"; //$NON-NLS-1$
+    private static final String ATTR_SELFCHILDXPATH = "selfChildXpath"; //$NON-NLS-1$
+    private static final String ATTR_ATTRXPATH = "attrXpath"; //$NON-NLS-1$
+    private static final String ATTR_INLINE = "inline"; //$NON-NLS-1$
+    private static final String ATTR_IDS = "ids"; //$NON-NLS-1$
+    private static final String ATTR_EXCLUDE_IDS = "exclude-ids"; //$NON-NLS-1$
+    private static final String ATTR_PARENT_IDS = "parent-ids"; //$NON-NLS-1$
+    private static final String ATTR_EXCLUSIVE_GROUP = "exclusiveGroup"; //$NON-NLS-1$
+    private static final String ATTR_MIN = "min"; //$NON-NLS-1$
+    private static final String ATTR_MAX = "max"; //$NON-NLS-1$
+    private static final String ATTR_NAME = "name"; //$NON-NLS-1$
+    private static final String ATTR_TYPE = "type"; //$NON-NLS-1$
+    private static final String ATTR_DEFAULT = "default"; //$NON-NLS-1$
+    private static final String ATTR_INITVALUE = "initValue"; //$NON-NLS-1$
+    private static final String ATTR_SELECTOR = "selector"; //$NON-NLS-1$
+    private static final String ATTR_NOT_SUPPORTED = "notsupported"; //$NON-NLS-1$
+    private static final String ATTR_VALUE = "value"; //$NON-NLS-1$
+    private static final String ATTR_TARGET = "target"; //$NON-NLS-1$
+    private static final String ATTR_TARGETVALUE = "targetValue"; //$NON-NLS-1$
+    private static final String ATTR_TOOLTIP = "tooltip"; //$NON-NLS-1$
+    private static final String ATTR_ERROR = "error"; //$NON-NLS-1$
+    private static final String ATTR_EVENTTYPE = "eventType"; //$NON-NLS-1$ \
+    private static final String ATTR_SRC = "src"; //$NON-NLS-1$
+
+    /**
+     * Parses a descriptor XML.
+     * 
+     * @param descriptorPath
+     *            a path of descriptor XML
+     * @throws ParserConfigurationException
+     * @throws IOException
+     * @throws SAXException
+     */
+    public static DescriptorFileData parse(URL url) throws ParserConfigurationException, SAXException, IOException {
+        DescriptorFileData fileData = null;
+
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setNamespaceAware(true);
+
+        DocumentBuilder builder = null;
+        Document doc = null;
+
+        builder = factory.newDocumentBuilder();
+
+        if (builder != null) {
+            InputStream openStream = url.openStream();
+            doc = builder.parse(openStream);
+            openStream.close();
+
+            if (doc != null && doc.getDocumentElement() != null) {
+                fileData = new DescriptorFileData();
+
+                // Element xslRoot = doc.createElementNS(XSL_NAMESPACE,
+                // XSL_STYLESHEET);
+                // xslRoot.setPrefix(XSL_PREFIX);
+                // xslRoot.setAttribute(ATTR_STYLESHEET_VERSION,
+                // VALUE_STYLESHEET_VERSION);
+
+                parseRoot(fileData, doc.getDocumentElement(), builder);
+
+                // xslt = builder.newDocument();
+                // xslt.appendChild(xslt.adoptNode(xslRoot));
+            }
+        }
+        return fileData;
+    }
+
+    /**
+     * Parses a root element of descriptor XML.
+     * 
+     * @param root
+     *            a root element
+     */
+    private static void parseRoot(DescriptorFileData fileData, Element root, DocumentBuilder builder) {
+        if (root == null) {
+            return;
+        }
+
+        NodeList elemList = root.getChildNodes();
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Node childNode = elemList.item(i);
+            if (childNode instanceof Element) {
+                if (childNode.getNodeName().equals(ELEM_RENDERER)) {
+                    parseRenderer(fileData, ELEM_RENDERER, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_FRAMEWORK)) {
+                    parseFramework(fileData, ELEM_FRAMEWORK, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_DOC)) {
+                    parsePart(fileData, ELEM_DOC, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_PAGE)) {
+                    parsePart(fileData, ELEM_PAGE, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_WIDGET)) {
+                    parsePart(fileData, ELEM_WIDGET, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_TYPES)) {
+                    parseTypes(fileData, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_EVENTTYPES)) {
+                    parseEventTypes(fileData, (Element) childNode);
+                }
+            }
+        }
+    }
+
+    private static void parseRenderer(DescriptorFileData fileData, String typeName, Element elem) {
+        if (elem == null) {
+            return;
+        }
+
+        String rendererId = elem.getAttribute(ATTR_ID);
+        fileData.setRendererId(rendererId);
+    }
+
+    private static void parseFramework(DescriptorFileData fileData, String typeName, Element elem) {
+        if (elem == null) {
+            return;
+        }
+
+        String framework = elem.getAttribute(ATTR_NAME);
+        fileData.setFrameworkName(framework);
+
+        NodeList elemList = elem.getChildNodes();
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Node childNode = elemList.item(i);
+            if (childNode instanceof Element) {
+                if (childNode.getNodeName().equals(ELEM_LIBRARY)) {
+                    parseLibrary(fileData, typeName, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_EDITOR)) {
+                    parseEditor(fileData, ELEM_EDITOR, (Element) childNode);
+                }
+            }
+        }
+    }
+
+    private static void parseLibrary(DescriptorFileData fileData, String typeName, Element elem) {
+        if (typeName.equals(ELEM_FRAMEWORK)) {
+            fileData.addFrameworkLibrary(elem.getAttribute(ATTR_SRC));
+        } else if (typeName.equals(ELEM_EDITOR)) {
+            fileData.addEditorLibrary(elem.getAttribute(ATTR_SRC));
+        }
+    }
+
+    private static void parseEditor(DescriptorFileData fileData, String typeName, Element elem) {
+        NodeList elemList = elem.getElementsByTagName(ELEM_LIBRARY);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Element libElem = (Element) elemList.item(i);
+            parseLibrary(fileData, ELEM_EDITOR, libElem);
+        }
+    }
+
+    /**
+     * Parses a doc, page or widget element of descriptor XML.
+     * 
+     * @param elem
+     *            a doc, page or widget element
+     * @param part
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parsePart(DescriptorFileData fileData, String typeName, Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        // String id = elem.getAttribute(ATTR_ID);
+        // String displayName = elem.getAttribute(ATTR_DISPLAYNAME);
+        // String smallIcon = elem.getAttribute(ATTR_SMALLICON);
+        // String icon16 = elem.getAttribute(ATTR_ICON_16);
+        // String description = elem.getAttribute(ATTR_DESCRIPTION);
+        // String layoutCapacity = elem.getAttribute(ATTR_LAYOUT_CAPACITY);
+        // String paletteVisible = elem.getAttribute(ATTR_PALETTE_VISIBLE);
+        // String helpCategory = elem.getAttribute(ATTR_HELPCATEGORY);
+        // String helpContens = elem.getAttribute(ATTR_HELPCONTENS);
+        // String width = elem.getAttribute(ATTR_FEEDBACKWIDTH);
+        // String height = elem.getAttribute(ATTR_FEEDBACKHEIGHT);
+        // String borderVisible = elem.getAttribute(ATTR_BORDER_VISIBLE);
+        // String feedbackCondition = elem.getAttribute(ATTR_FEEDBACKCONDITION);
+        // String guideText = elem.getAttribute(ATTR_GUIDE_TEXT);
+        // String setStyle = elem.getAttribute(ATTR_SET_STYLE);
+        // String uiSelector = elem.getAttribute(ATTR_UI_SELECTOR);
+        // String xpath = elem.getAttribute(ATTR_XPATH);
+        // String childXpath = elem.getAttribute(ATTR_CHILDXPATH);
+        // String selfChildXpath = elem.getAttribute(ATTR_SELFCHILDXPATH);
+
+        TizenFileDataEntry entry =
+                TizenFileDataHelper.convert(typeName, elem,
+                                            new String[] { ATTR_ID, ATTR_DISPLAYNAME, ATTR_SMALLICON, ATTR_ICON_16, ATTR_DESCRIPTION, ATTR_LAYOUTTYPE,
+                                                    ATTR_LAYOUT_CAPACITY, ATTR_PALETTE_VISIBLE, ATTR_HELPCATEGORY, ATTR_HELPCONTENS, ATTR_FEEDBACKWIDTH,
+                                                    ATTR_FEEDBACKHEIGHT, ATTR_MINWIDTH, ATTR_MINHEIGHT, ATTR_BORDER_VISIBLE, ATTR_FEEDBACKCONDITION,
+                                                    ATTR_GUIDE_TEXT, ATTR_SET_STYLE, ATTR_UI_SELECTOR, ATTR_XPATH, ATTR_CHILDXPATH, ATTR_SELFCHILDXPATH });
+
+        // String paletteVisible = (String) entry
+        // .getProperty(ATTR_PALETTE_VISIBLE);
+        // String borderVisible = (String) entry.getProperty(ATTR_BORDER_VISIBLE);
+        // String setStyle = (String) entry.getProperty(ATTR_SET_STYLE);
+
+        // boolean boolpaletteVisible = true;
+        // if (paletteVisible != null && !paletteVisible.isEmpty()) {
+        // boolpaletteVisible = Boolean.parseBoolean(paletteVisible);
+        // }
+        // boolean boolBorderVisible = Boolean.parseBoolean(borderVisible);
+        // boolean boolSetStyle = Boolean.parseBoolean(setStyle);
+
+        // TizenFileDataEntry part2;
+        // part2.addProperty(ATTR_ID, id);
+        // part2.addProperty(ATTR_DISPLAYNAME, displayName);
+        // part2.addProperty(ATTR_SMALLICON, smallIcon);
+        // part2.addProperty(ATTR_ICON_16, icon16);
+        // part2.addProperty(ATTR_DESCRIPTION, description);
+        // part2.addProperty(ATTR_LAYOUT_CAPACITY, layoutCapacity);
+        // part2.addProperty(ATTR_PALETTE_VISIBLE, paletteVisible);
+        // part2.addProperty(ATTR_HELPCATEGORY, helpCategory);
+        // part2.addProperty(ATTR_HELPCONTENS, helpContens);
+        // part2.addProperty(ATTR_FEEDBACKWIDTH, width);
+        // part2.addProperty(ATTR_FEEDBACKHEIGHT, height);
+        // part2.addProperty(ATTR_BORDER_VISIBLE, borderVisible);
+        // part2.addProperty(ATTR_FEEDBACKCONDITION, feedbackCondition);
+        // part2.addProperty(ATTR_GUIDE_TEXT, guideText);
+        // part2.addProperty(ATTR_SET_STYLE, setStyle);
+        // part2.addProperty(ATTR_UI_SELECTOR, uiSelector);
+        // part2.addProperty(ATTR_XPATH, xpath);
+        // part2.addProperty(ATTR_CHILDXPATH, childXpath);
+        // part2.addProperty(ATTR_SELFCHILDXPATH, selfChildXpath);
+
+        // part.init(id, displayName, smallIcon, icon16, description,
+        // layoutCapacity, boolpaletteVisible, helpCategory, helpContens,
+        // width, height, boolBorderVisible, feedbackCondition, guideText,
+        // boolSetStyle, uiSelector, xpath, childXpath, selfChildXpath);
+
+        if (typeName.equals(ELEM_WIDGET)) {
+            String categories = elem.getAttribute(ATTR_CATEGORY);
+            if (categories != null && !categories.isEmpty()) {
+                String[] categoriesArray = categories.split(DescriptorConstants.COMMA);
+                entry.addListProperty(DescriptorFileData.PROP_CATEGORY_LIST, (List) Arrays.asList(categoriesArray));
+            }
+        }
+
+        boolean isNoRelation = true;
+        NodeList elemList1 = elem.getElementsByTagName(ELEM_RELATIONS);
+        for (int i = 0; i < elemList1.getLength(); i++) {
+            TizenFileDataEntry relation = parseRelations((Element) elemList1.item(i));
+            if (relation != null) {
+                TizenFileDataEntry curRelation = entry.getEntryProperty(DescriptorFileData.PROP_RELATION);
+                if (curRelation != null) {
+                    curRelation.addListPropertyList(DescriptorFileData.PROP_PARENT_LIST, relation.getListProperty(DescriptorFileData.PROP_PARENT_LIST));
+                    curRelation.addListPropertyList(DescriptorFileData.PROP_NOPARENT_LIST, relation.getListProperty(DescriptorFileData.PROP_NOPARENT_LIST));
+                    curRelation.addListPropertyList(DescriptorFileData.PROP_CONTENT_LIST, relation.getListProperty(DescriptorFileData.PROP_CONTENT_LIST));
+                    curRelation.addListPropertyList(DescriptorFileData.PROP_NOCONTENT_LIST, relation.getListProperty(DescriptorFileData.PROP_NOCONTENT_LIST));
+                } else {
+                    entry.addEntryProperty(DescriptorFileData.PROP_RELATION, relation);
+                }
+                isNoRelation = false;
+            }
+        }
+
+        // This code remains for compatibility.
+        if (isNoRelation) {
+            NodeList elemList = elem.getElementsByTagName(ELEM_CONTENT);
+            if (elemList.getLength() > 0) {
+                TizenFileDataEntry relation = new TizenFileDataEntry();
+
+                for (int i = 0; i < elemList.getLength(); i++) {
+                    TizenFileDataEntry relationEntry = parseContent((Element) elemList.item(i));
+
+                    if (relationEntry != null) {
+                        String excludeIds = relationEntry.getStringProperty(ATTR_EXCLUDE_IDS);
+                        String[] idsArray = excludeIds.split(DescriptorConstants.COMMA);
+                        List<String> idList = Arrays.asList(idsArray);
+                        relation.addListPropertyList(DescriptorFileData.PROP_NOCONTENT_LIST, (List) idList);
+                        String parentIds = relationEntry.getStringProperty(ATTR_PARENT_IDS);
+                        idsArray = parentIds.split(DescriptorConstants.COMMA);
+                        idList = Arrays.asList(idsArray);
+                        relation.addListPropertyList(DescriptorFileData.PROP_PARENT_LIST, (List) idList);
+                    }
+                }
+
+                entry.addEntryProperty(DescriptorFileData.PROP_RELATION, relation);
+            }
+        }
+
+        NodeList elemList = elem.getChildNodes();
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Node childNode = elemList.item(i);
+            if (childNode instanceof Element) {
+                if (childNode.getNodeName().equals(ELEM_CONDITION)) {
+                    TizenFileDataEntry childEntry = parsePartCondition((Element) childNode);
+                    if (childEntry != null) {
+                        entry.addListPropertyItem(DescriptorFileData.PROP_CONDITION_LIST, childEntry);
+                    }
+                } else if (childNode.getNodeName().equals(ELEM_PROPERTY)) {
+                    TizenFileDataEntry childEntry = parseProperty((Element) childNode);
+                    if (childEntry != null) {
+                        entry.addListPropertyItem(DescriptorFileData.PROP_PROPERTY_LIST, childEntry);
+                    }
+                } else if (childNode.getNodeName().equals(ELEM_EVENT)) {
+                    TizenFileDataEntry childEntry = parseEvent((Element) childNode);
+                    if (childEntry != null) {
+                        entry.addListPropertyItem(DescriptorFileData.PROP_EVENT_LIST, childEntry);
+                    }
+                } else if (childNode.getNodeName().equals(ELEM_XSL_FOR_OUTPUT)) {
+                    // if (fileData.getXslRoot() == null) {
+                    // // Document xslt = builder.newDocument();
+                    //
+                    // Element xslRoot = xslt.createElementNS(XSL_NAMESPACE,
+                    // XSL_STYLESHEET);
+                    // xslRoot.setPrefix(XSL_PREFIX);
+                    // xslRoot.setAttribute(ATTR_STYLESHEET_VERSION,
+                    // VALUE_STYLESHEET_VERSION);
+                    //
+                    // // xslt.appendChild(xslRoot);
+                    //
+                    // // fileData.setXsltDocument(xslt);
+                    // fileData.setXslRoot(xslRoot);
+                    // }
+
+                    TizenFileDataEntry childEntry = parseXsltForOutput((Element) childNode);
+                    if (childEntry != null) {
+                        fileData.addXslEntry(childEntry);
+                        // entry.addListPropertyList(DescriptorFileData.PROP_XSL_LIST, childEntry
+                        // .getListProperty(DescriptorFileData.PROP_XSL_LIST));
+                    }
+                }
+            }
+        }
+
+        fileData.addPartDescriptor(entry);
+
+        return entry;
+    }
+
+    /**
+     * Parses a relation element of descriptor XML.
+     * 
+     * @param elem
+     *            a relation element
+     * @param property
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parseRelations(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        // RelationDescriptor relation = part.getRelation();
+        // if (relation == null) {
+        // return null;
+        // }
+
+        TizenFileDataEntry entry = new TizenFileDataEntry();
+
+        NodeList elemList = elem.getChildNodes();
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Node childNode = elemList.item(i);
+            if (childNode instanceof Element) {
+                Element childElem = (Element) childNode;
+                if (childNode.getNodeName().equals(ELEM_PARENT)) {
+                    String ids = childElem.getAttribute(ATTR_IDS);
+                    String[] idsArray = ids.split(DescriptorConstants.COMMA);
+                    List<String> idList = Arrays.asList(idsArray);
+                    entry.addListPropertyList(DescriptorFileData.PROP_PARENT_LIST, (List) idList);
+                } else if (childNode.getNodeName().equals(ELEM_NOPARENT)) {
+                    String ids = childElem.getAttribute(ATTR_IDS);
+                    String[] idsArray = ids.split(DescriptorConstants.COMMA);
+                    List<String> idList = Arrays.asList(idsArray);
+                    entry.addListPropertyList(DescriptorFileData.PROP_NOPARENT_LIST, (List) idList);
+                } else if (childNode.getNodeName().equals(ELEM_CONTENT)) {
+                    TizenFileDataEntry entry2 = parseContent2(childElem);
+                    entry.addListPropertyItem(DescriptorFileData.PROP_CONTENT_LIST, entry2);
+                } else if (childNode.getNodeName().equals(ELEM_NOCONTENT)) {
+                    String ids = childElem.getAttribute(ATTR_IDS);
+                    String[] idsArray = ids.split(DescriptorConstants.COMMA);
+                    List<String> idList = Arrays.asList(idsArray);
+                    entry.addListPropertyList(DescriptorFileData.PROP_NOCONTENT_LIST, (List) idList);
+                }
+            }
+        }
+
+        return entry;
+    }
+
+    /**
+     * Parses a content element of descriptor XML. This method remains for compatibility.
+     * 
+     * @param elem
+     *            a content element
+     * @param part
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parseContent(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        // RelationDescriptor relation = part.getRelation();
+        // if (relation == null) {
+        // return null;
+        // }
+
+        // TizenFileDataEntry content = parseContent2(elem);
+
+        // String excludeIds = elem.getAttribute(ATTR_EXCLUDE_IDS);
+        // String parentIds = elem.getAttribute(ATTR_PARENT_IDS);
+        //
+        // if (excludeIds != null && !excludeIds.isEmpty()) {
+        // relation.addNoContentPartIds(excludeIds);
+        // }
+        // if (parentIds != null && !parentIds.isEmpty()) {
+        // relation.addParentPartIds(parentIds);
+        // }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_EXCLUDE_IDS, ATTR_PARENT_IDS });
+
+        return entry;
+    }
+
+    /**
+     * Parses a content element of descriptor XML.
+     * 
+     * @param elem
+     *            a content element
+     * @param relation
+     *            a {@link RelationDescriptor}
+     */
+    private static TizenFileDataEntry parseContent2(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry =
+                TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_IDS, ATTR_TYPE, ATTR_MIN, ATTR_MAX, ATTR_EXCLUSIVE_GROUP });
+
+        // String ids = elem.getAttribute(ATTR_IDS);
+        // String type = elem.getAttribute(ATTR_TYPE);
+        // String min = elem.getAttribute(ATTR_MIN);
+        // String max = elem.getAttribute(ATTR_MAX);
+        // String exclusiveGroup = elem.getAttribute(ATTR_EXCLUSIVE_GROUP);
+        // String type = entry.getStringProperty(ATTR_TYPE);
+        // ContentDescriptor.PartType partType = ContentDescriptor.PartType.ANY_PART;
+        //
+        // if (type != null && !type.isEmpty()) {
+        // if (type.equals(PART_TYPE_DOC)) {
+        // partType = ContentDescriptor.PartType.DOCUMENT_PART;
+        // } else if (type.equals(PART_TYPE_PAGE)) {
+        // partType = ContentDescriptor.PartType.PAGE_PART;
+        // } else if (type.equals(PART_TYPE_WIDGET)) {
+        // partType = ContentDescriptor.PartType.WIDGET_PART;
+        // }
+        // }
+
+        // ContentDescriptor content = new ContentDescriptor();
+        // content.setPartType(partType);
+        // if (ids != null && !ids.isEmpty()) {
+        // content.setPartIds(ids);
+        // }
+        // if (min != null && !min.isEmpty()) {
+        // content.setMin(Integer.valueOf(min).intValue());
+        // }
+        // if (max != null && !max.isEmpty()) {
+        // content.setMax(Integer.valueOf(max).intValue());
+        // }
+        // if (exclusiveGroup != null && !exclusiveGroup.isEmpty()) {
+        // content.setExclusiveGroup(exclusiveGroup);
+        // }
+        // relation.addContent(content);
+
+        return entry;
+    }
+
+    /**
+     * Parses a condition element of descriptor XML.
+     * 
+     * @param elem
+     *            a property element
+     * @param part
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parsePartCondition(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry =
+                TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_VALUE, ATTR_TARGET, ATTR_TARGETVALUE });
+        // String name = elem.getAttribute(ATTR_NAME);
+        // String value = elem.getAttribute(ATTR_VALUE);
+        // String target = elem.getAttribute(ATTR_TARGET);
+        // String targetValue = elem.getAttribute(ATTR_TARGETVALUE);
+
+        // PartConditionDescriptor condition = new PartConditionDescriptor(name,
+        // value, target, targetValue);
+        // part.addConditionDescriptor(condition);
+
+        return entry;
+    }
+
+    /**
+     * Parses a property element of descriptor XML.
+     * 
+     * @param elem
+     *            a property element
+     * @param part
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parseProperty(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        String notsupported = elem.getAttribute(ATTR_NOT_SUPPORTED);
+        if (notsupported != null && notsupported.equals(DescriptorConstants.TRUE)) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_TYPE, ATTR_DISPLAYNAME,
+                ATTR_DEFAULT, ATTR_INITVALUE, ATTR_CATEGORY, ATTR_XPATH, ATTR_ATTRXPATH, ATTR_INLINE });
+
+        // String name = elem.getAttribute(ATTR_NAME);
+        String type = elem.getAttribute(ATTR_TYPE);
+        String displayName = elem.getAttribute(ATTR_DISPLAYNAME);
+        String tooltip = elem.getAttribute(ATTR_TOOLTIP);
+        // String defaultValue = elem.getAttribute(ATTR_DEFAULT);
+        // String initValue = elem.getAttribute(ATTR_INITVALUE);
+        // String category = elem.getAttribute(ATTR_CATEGORY);
+        // String xpath = elem.getAttribute(ATTR_XPATH);
+        // String attrXpath = elem.getAttribute(ATTR_ATTRXPATH);
+
+        if (tooltip.isEmpty()) {
+            tooltip = displayName;
+        } else {
+            tooltip = displayName + DescriptorConstants.SPACE + DescriptorConstants.DASH + DescriptorConstants.SPACE + tooltip;
+        }
+        entry.addProperty(ATTR_TOOLTIP, tooltip);
+
+        // PropertyDescriptor property = new PropertyDescriptor(name, type,
+        // displayName, tooltip, defaultValue, initValue, category, xpath,
+        // attrXpath, fileData);
+        // part.addPropertyDescriptor(property);
+
+        if (TypeDescriptor.ID_OF_GROUP.equals(type) || TypeDescriptor.ID_OF_GROUP_TEXT.equals(type) || TypeDescriptor.ID_OF_GROUP_POSITION.equals(type)) {
+            NodeList elemList = elem.getElementsByTagName(ELEM_PROPERTY);
+            for (int i = 0; i < elemList.getLength(); i++) {
+                TizenFileDataEntry childEntry = parseChildProperty((Element) elemList.item(i));
+                if (childEntry != null) {
+                    entry.addListPropertyItem(DescriptorFileData.PROP_PROPERTY_LIST, childEntry);
+                }
+            }
+        }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_CONDITION);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry condition = parseCondition((Element) elemList.item(i));
+            if (condition != null) {
+                entry.addListPropertyItem(DescriptorFileData.PROP_CONDITION_LIST, condition);
+            }
+        }
+
+        return entry;
+    }
+
+    /**
+     * Parses a child property element of descriptor XML.
+     * 
+     * @param elem
+     *            a child property
+     * @param property
+     *            a {@link PropertyDescriptor}
+     */
+    private static TizenFileDataEntry parseChildProperty(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        // String name = elem.getAttribute(ATTR_NAME);
+        // String type = elem.getAttribute(ATTR_TYPE);
+        // String displayName = elem.getAttribute(ATTR_DISPLAYNAME);
+        // String tooltip = elem.getAttribute(ATTR_TOOLTIP);
+        // String defaultValue = elem.getAttribute(ATTR_DEFAULT);
+        // String initValue = elem.getAttribute(ATTR_INITVALUE);
+        // String category = elem.getAttribute(ATTR_CATEGORY);
+        // String xpath = elem.getAttribute(ATTR_XPATH);
+        // String attrXpath = elem.getAttribute(ATTR_ATTRXPATH);
+        // String selector = elem.getAttribute(ATTR_SELECTOR);
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_TYPE, ATTR_DISPLAYNAME,
+                ATTR_TOOLTIP, ATTR_DEFAULT, ATTR_INITVALUE, ATTR_CATEGORY, ATTR_XPATH, ATTR_ATTRXPATH, ATTR_SELECTOR });
+
+        // PropertyDescriptor childProperty = new ChildPropertyDescriptor(name,
+        // type, displayName, tooltip, defaultValue, initValue, category,
+        // xpath, attrXpath, selector, fileData);
+        // property.addChildPropertyDescriptor(childProperty);
+
+        // NodeList elemList = elem.getElementsByTagName(ELEM_CONDITION);
+        // for (int i = 0; i < elemList.getLength(); i++) {
+        // parseCondition((Element) elemList.item(i), childProperty);
+        // }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_CONDITION);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry condition = parseCondition((Element) elemList.item(i));
+            if (condition != null) {
+                entry.addListPropertyItem(DescriptorFileData.PROP_CONDITION_LIST, condition);
+            }
+        }
+
+        return entry;
+    }
+
+    /**
+     * Parses a condition element of descriptor XML.
+     * 
+     * @param elem
+     *            a condition element
+     * @param property
+     *            a {@link PropertyDescriptor}
+     */
+    private static TizenFileDataEntry parseCondition(Element elem) {
+        // if (elem == null || property == null) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry =
+                TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_VALUE, ATTR_TARGET, ATTR_TARGETVALUE, ATTR_ERROR });
+        // String name = elem.getAttribute(ATTR_NAME);
+        // String value = elem.getAttribute(ATTR_VALUE);
+        // String target = elem.getAttribute(ATTR_TARGET);
+        // String targetValue = elem.getAttribute(ATTR_TARGETVALUE);
+        // String error = elem.getAttribute(ATTR_ERROR);
+        //
+        // PropertyConditionDescriptor condition = new
+        // PropertyConditionDescriptor(
+        // name, value, target, targetValue, error);
+        // property.addConditionDescriptor(condition);
+
+        return entry;
+    }
+
+    /**
+     * Parses an event element of descriptor XML.
+     * 
+     * @param elem
+     *            an event element
+     * @param part
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parseEvent(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        // String name = elem.getAttribute(ATTR_NAME);
+        // String displayName = elem.getAttribute(ATTR_DISPLAYNAME);
+        // String eventType = elem.getAttribute(ATTR_EVENTTYPE);
+        // EventDescriptor event = new EventDescriptor(name, displayName,
+        // eventType, fileData);
+        // part.addEventDescriptor(event);
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_DISPLAYNAME, ATTR_EVENTTYPE });
+
+        return entry;
+    }
+
+    /**
+     * Parses a types element of descriptor XML.
+     * 
+     * @param elem
+     *            a types element
+     */
+    private static void parseTypes(DescriptorFileData fileData, Element elem) {
+        if (elem == null) {
+            return;
+        }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_TYPE);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry entry = parseType((Element) elemList.item(i));
+            fileData.addType(entry);
+        }
+    }
+
+    /**
+     * Parses a type element of descriptor XML.
+     * 
+     * @param elem
+     *            a type element
+     */
+    private static TizenFileDataEntry parseType(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_ID });
+
+        // String id = elem.getAttribute(ATTR_ID);
+        //
+        // TypeDescriptor type = fileData.getTypeDescriptor(id);
+        //
+        // if (type == null) {
+        // type = new TypeDescriptor(id);
+        // fileData.addTypeDescriptor(type);
+        // }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_CONSTANT);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            // type.addAvailableConstant(parseConstant((Element) elemList.item(i)));
+            TizenFileDataEntry constant = parseConstant((Element) elemList.item(i));
+            entry.addListPropertyItem(DescriptorFileData.PROP_CONSTANT_LIST, constant);
+        }
+
+        elemList = elem.getElementsByTagName(ELEM_UNIT);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry unit = parseUnit((Element) elemList.item(i));
+            entry.addListPropertyItem(DescriptorFileData.PROP_UNIT_LIST, unit);
+        }
+
+        return entry;
+    }
+
+    /**
+     * Parses a constant element of descriptor XML.
+     * 
+     * @param elem
+     *            a constant element
+     */
+    private static TizenFileDataEntry parseConstant(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        // String value = elem.getAttribute(ATTR_VALUE);
+        // String displayName = elem.getAttribute(ATTR_DISPLAYNAME);
+        // String icon = elem.getAttribute(ATTR_ICON);
+        //
+        // if (displayName == null) {
+        // displayName = value;
+        // }
+        //
+        // return new ConstantDescriptor(value, displayName, icon);
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_VALUE, ATTR_DISPLAYNAME, ATTR_ICON });
+
+        return entry;
+    }
+
+    private static TizenFileDataEntry parseUnit(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_VALUE, ATTR_DISPLAYNAME });
+
+        return entry;
+    }
+
+    /**
+     * Parses an eventTypes element of descriptor XML.
+     * 
+     * @param elem
+     *            an eventTypes element
+     */
+    private static void parseEventTypes(DescriptorFileData fileData, Element elem) {
+        if (elem == null) {
+            return;
+        }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_EVENTTYPE);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry entry = parseEventType(fileData, (Element) elemList.item(i));
+            if (entry != null) {
+                fileData.addEventType(entry);
+            }
+        }
+    }
+
+    /**
+     * Parses an eventType element of descriptor XML.
+     * 
+     * @param elem
+     *            an eventType element
+     */
+    private static TizenFileDataEntry parseEventType(DescriptorFileData fileData, Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_ID });
+
+        // String id = elem.getAttribute(ATTR_ID);
+        // if (fileData.getEventTypeDescriptor(id) != null) {
+        // return;
+        // }
+
+        // EventTypeDescriptor eventType = new EventTypeDescriptor(id);
+
+        NodeList elemList = elem.getChildNodes();
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Node childNode = elemList.item(i);
+            if (childNode instanceof Element) {
+                Element childElem = (Element) childNode;
+                if (childNode.getNodeName().equals(ELEM_DEFAULTCODE)) {
+                    // eventType.setDefaultCode(((Element) elemList.item(i))
+                    // .getTextContent());
+                    entry.addStringProperty(DescriptorFileData.PROP_DEFAULTCODE, childElem.getTextContent());
+                } else if (childNode.getNodeName().equals(ELEM_PARAM)) {
+                    // eventType
+                    // .addEventParameter(parseParameter((Element) elemList
+                    // .item(i)));
+                    entry.addListPropertyItem(DescriptorFileData.PROP_PARAM_LIST, parseParameter(childElem));
+                }
+            }
+        }
+
+        // fileData.addEventTypeDescriptor(eventType);
+        return entry;
+    }
+
+    /**
+     * Parses a param element of descriptor XML.
+     * 
+     * @param elem
+     *            a param element
+     */
+    private static TizenFileDataEntry parseParameter(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_TYPE });
+
+        // String name = elem.getAttribute(ATTR_NAME);
+        // String type = elem.getAttribute(ATTR_TYPE);
+
+        // return new EventParamDescriptor(name, type);
+        return entry;
+    }
+
+    /**
+     * Parses a xsl-for-output element of descriptor XML.
+     * 
+     * @param elem
+     *            a xsl-for-output element
+     */
+    private static TizenFileDataEntry parseXsltForOutput(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = new TizenFileDataEntry();
+
+        NodeList elemList2 = elem.getChildNodes();
+        for (int j = 0; j < elemList2.getLength(); j++) {
+            Node childNode = elemList2.item(j);
+            if (childNode instanceof Element) {
+                // fileData.getXsltElement().appendChild(fileData.getXsltDocument().adoptNode(childNode));
+                // TizenFileDataEntry child = new TizenFileDataEntry();
+                // child.setValue(childNode);
+                // fileData.addXslEntry(child);
+                entry.addListPropertyItem(DescriptorFileData.PROP_XSL_LIST, childNode);
+            }
+        }
+
+        return entry;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/file/DescriptorReader_ver_2.java b/org.tizen.efluibuilder.descriptor/src/org/tizen/efluibuilder/model/descriptors/io/file/DescriptorReader_ver_2.java
new file mode 100644 (file)
index 0000000..38d3f39
--- /dev/null
@@ -0,0 +1,1025 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.descriptors.io.file;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.tizen.efluibuilder.descriptor.DescriptorConstants;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.RelationDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.model.descriptors.WidgetDescriptor;
+import org.tizen.efluibuilder.model.descriptors.io.DescriptorFileData;
+import org.tizen.uibuilder.tizenfile.TizenFileDataEntry;
+import org.tizen.uibuilder.tizenfile.TizenFileDataHelper;
+import org.tizen.uibuilder.tizenfile.TizenFileFormatter;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+
+/**
+ * A descriptor reader.
+ */
+public class DescriptorReader_ver_2 {
+
+    // Element name
+    private static final String ELEM_RENDERER = "renderer"; //$NON-NLS-1$
+    private static final String ELEM_FRAMEWORK = "framework"; //$NON-NLS-1$
+    private static final String ELEM_LIBRARY = "library"; //$NON-NLS-1$
+    private static final String ELEM_EDITOR = "editor"; //$NON-NLS-1$
+    private static final String ELEM_DOC = "doc"; //$NON-NLS-1$
+    private static final String ELEM_PAGE = "page"; //$NON-NLS-1$
+    private static final String ELEM_WIDGET = "widget"; //$NON-NLS-1$
+    private static final String ELEM_CONTENT = "content"; //$NON-NLS-1$
+    private static final String ELEM_NOCONTENT = "nocontent"; //$NON-NLS-1$
+    private static final String ELEM_PARENT = "parent"; //$NON-NLS-1$
+    private static final String ELEM_NOPARENT = "noparent"; //$NON-NLS-1$
+    private static final String ELEM_RELATIONS = "relations"; //$NON-NLS-1$
+    private static final String ELEM_PROPERTY = "property"; //$NON-NLS-1$
+    private static final String ELEM_CHILDUICOMPONENTPROPERTY = "childUIComponentProperty"; //$NON-NLS-1$
+    private static final String ELEM_CONDITION = "condition"; //$NON-NLS-1$
+    private static final String ELEM_EVENT = "event"; //$NON-NLS-1$
+    private static final String ELEM_XSL_FOR_OUTPUT = "xsl-for-output"; //$NON-NLS-1$
+    private static final String ELEM_TYPES = "types"; //$NON-NLS-1$
+    private static final String ELEM_TYPE = "type"; //$NON-NLS-1$
+    private static final String ELEM_CONSTANT = "constant"; //$NON-NLS-1$
+    private static final String ELEM_UNIT = "unit"; //$NON-NLS-1$
+    private static final String ELEM_EVENTTYPES = "eventTypes"; //$NON-NLS-1$
+    private static final String ELEM_EVENTTYPE = "eventType"; //$NON-NLS-1$
+    private static final String ELEM_DEFAULTCODE = "defaultCode"; //$NON-NLS-1$
+    private static final String ELEM_PARAM = "param"; //$NON-NLS-1$
+    private static final String ELEM_UICOMPONENT_CATEGORIES = "UIComponentCategories"; //$NON-NLS-1$
+    private static final String ELEM_UICOMPONENT_CATEGORY = "UIComponentCategory"; //$NON-NLS-1$
+    private static final String ELEM_DEFAULT_STYLE_EDJS = "defaultStyleEDJs"; //$NON-NLS-1$
+    private static final String ELEM_STYLE_EDJ = "styleEDJ"; //$NON-NLS-1$
+
+    // Attribute name
+    private static final String ATTR_ID = "id"; //$NON-NLS-1$
+    private static final String ATTR_DISPLAYNAME = "displayName"; //$NON-NLS-1$
+    private static final String ATTR_SMALLICON = "smallIcon"; //$NON-NLS-1$
+    private static final String ATTR_ICON_16 = "icon.16"; //$NON-NLS-1$
+    private static final String ATTR_ICON = "icon"; //$NON-NLS-1$
+    private static final String ATTR_CATEGORY = "category"; //$NON-NLS-1$
+    private static final String ATTR_DESCRIPTION = "description"; //$NON-NLS-1$
+    private static final String ATTR_LAYOUTTYPE = "layoutType"; //$NON-NLS-1$
+    private static final String ATTR_LAYOUT_CAPACITY = "layoutCapacity"; //$NON-NLS-1$
+    private static final String ATTR_PALETTE_VISIBLE = "paletteVisible"; //$NON-NLS-1$
+    private static final String ATTR_HELPCATEGORY = "helpCategory"; //$NON-NLS-1$
+    private static final String ATTR_HELPCONTENS = "helpContents"; //$NON-NLS-1$
+    private static final String ATTR_FEEDBACKWIDTH = "feedbackWidth"; //$NON-NLS-1$
+    private static final String ATTR_FEEDBACKHEIGHT = "feedbackHeight"; //$NON-NLS-1$
+    private static final String ATTR_MINWIDTH = "minWidth"; //$NON-NLS-1$
+    private static final String ATTR_MINHEIGHT = "minHeight"; //$NON-NLS-1$
+    private static final String ATTR_BORDER_VISIBLE = "borderVisible"; //$NON-NLS-1$
+    private static final String ATTR_FEEDBACKCONDITION = "feedbackCondition"; //$NON-NLS-1$
+    private static final String ATTR_GUIDE_TEXT = "guideText"; //$NON-NLS-1$
+    private static final String ATTR_SET_STYLE = "setStyle"; //$NON-NLS-1$
+    private static final String ATTR_UI_SELECTOR = "uiSelector"; //$NON-NLS-1$
+    private static final String ATTR_XPATH = "xpath"; //$NON-NLS-1$
+    private static final String ATTR_CHILDXPATH = "childXpath"; //$NON-NLS-1$
+    private static final String ATTR_SELFCHILDXPATH = "selfChildXpath"; //$NON-NLS-1$
+    private static final String ATTR_CONTAINER_ID = "containerID"; //$NON-NLS-1$
+    private static final String ATTR_ATTRXPATH = "attrXpath"; //$NON-NLS-1$
+    private static final String ATTR_INLINE = "inline"; //$NON-NLS-1$
+    private static final String ATTR_IDS = "ids"; //$NON-NLS-1$
+    private static final String ATTR_EXCLUDE_IDS = "exclude-ids"; //$NON-NLS-1$
+    private static final String ATTR_PARENT_IDS = "parent-ids"; //$NON-NLS-1$
+    private static final String ATTR_EXCLUSIVE_GROUP = "exclusiveGroup"; //$NON-NLS-1$
+    private static final String ATTR_MIN = "min"; //$NON-NLS-1$
+    private static final String ATTR_MAX = "max"; //$NON-NLS-1$
+    private static final String ATTR_NAME = "name"; //$NON-NLS-1$
+    private static final String ATTR_TYPE = "type"; //$NON-NLS-1$
+    private static final String ATTR_DEFAULT = "default"; //$NON-NLS-1$
+    private static final String ATTR_INITVALUE = "initValue"; //$NON-NLS-1$
+    private static final String ATTR_SELECTOR = "selector"; //$NON-NLS-1$
+    private static final String ATTR_NOT_SUPPORTED = "notsupported"; //$NON-NLS-1$
+    private static final String ATTR_VALUE = "value"; //$NON-NLS-1$
+    private static final String ATTR_TARGET = "target"; //$NON-NLS-1$
+    private static final String ATTR_TARGETVALUE = "targetValue"; //$NON-NLS-1$
+    private static final String ATTR_TOOLTIP = "tooltip"; //$NON-NLS-1$
+    private static final String ATTR_ERROR = "error"; //$NON-NLS-1$
+    private static final String ATTR_EVENTTYPE = "eventType"; //$NON-NLS-1$ \
+    private static final String ATTR_EVENTINFO = "eventInfo"; //$NON-NLS-1$ \
+    private static final String ATTR_SRC = "src"; //$NON-NLS-1$
+    private static final String ATTR_UNUSED_EDITORS = "unusedEditors"; //$NON-NLS-1$
+    private static final String ATTR_REQUIRED = "required"; //$NON-NLS-1$
+
+    /**
+     * Parses a descriptor XML.
+     * 
+     * @param path
+     *            base directory location
+     * @param url
+     *            a path of descriptor XML
+     * @throws ParserConfigurationException
+     * @throws IOException
+     * @throws SAXException
+     */
+    public static DescriptorFileData parse(String path, URL url) throws ParserConfigurationException, SAXException, IOException {
+        DescriptorFileData fileData = null;
+
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setNamespaceAware(true);
+
+        DocumentBuilder builder = null;
+        Document doc = null;
+
+        builder = factory.newDocumentBuilder();
+
+        if (builder != null) {
+            builder.setEntityResolver(new EntityResolver() {
+                private String basePath = null;
+
+                private EntityResolver init(String basePath) {
+                    this.basePath = basePath;
+                    return this;
+                }
+
+                public InputSource resolveEntity(String publicId, String systemId) {
+                    // systemId is like
+                    // file:///$(sdk_location)/widget/efl.datetime.widget.xml
+
+                    IPath path = new Path(basePath);
+                    IPath systemIdPath = new Path(systemId);
+                    String[] segments = systemIdPath.segments();
+                    if (DescriptorConstants.DESCRIPTOR_WIDGET_FOLDER.equals(segments[segments.length - 2])) {
+                        path = path.append(segments[segments.length - 2]);
+                    }
+                    path = path.append(segments[segments.length - 1]);
+                    return new InputSource(getDescriptorStream(path.toString()));
+                }
+
+            }.init(path));
+
+            InputStream openStream = url.openStream();
+            doc = builder.parse(openStream);
+            openStream.close();
+
+            if (doc == null || doc.getDocumentElement() == null) {
+                return null;
+            }
+
+            Element root = doc.getDocumentElement();
+
+            TizenFileFormatter fileReader = new TizenFileFormatter(root);
+            if (!fileReader.isValidate()) {
+                return null;
+            }
+            if (!fileReader.getType().equals("tizen-descriptor")) {
+                return null;
+            }
+            if (!fileReader.getVersion().equals("2")) {
+                return null;
+            }
+
+            fileData = new DescriptorFileData();
+
+            NodeList descriptorList = root.getElementsByTagName("descriptors");
+            for (int i = 0; i < descriptorList.getLength(); i++) {
+                parseRoot(fileData, (Element) descriptorList.item(i), builder);
+            }
+        }
+        return fileData;
+    }
+
+    private static InputStream getDescriptorStream(String result) {
+        return DescriptorReader_ver_2.class.getClassLoader().getResourceAsStream(result);
+    }
+
+    /**
+     * Parses a root element of descriptor XML.
+     * 
+     * @param root
+     *            a root element
+     */
+    private static void parseRoot(DescriptorFileData fileData, Element root, DocumentBuilder builder) {
+        if (root == null) {
+            return;
+        }
+
+        NodeList elemList = root.getChildNodes();
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Node childNode = elemList.item(i);
+            if (childNode instanceof Element) {
+                if (childNode.getNodeName().equals(ELEM_RENDERER)) {
+                    parseRenderer(fileData, ELEM_RENDERER, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_FRAMEWORK)) {
+                    parseFramework(fileData, ELEM_FRAMEWORK, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_DOC)) {
+                    parsePart(fileData, ELEM_DOC, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_PAGE)) {
+                    parsePart(fileData, ELEM_PAGE, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_WIDGET)) {
+                    parsePart(fileData, ELEM_WIDGET, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_TYPES)) {
+                    parseTypes(fileData, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_EVENTTYPES)) {
+                    parseEventTypes(fileData, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_UICOMPONENT_CATEGORIES)) {
+                    parseWidgetCategories(fileData, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_DEFAULT_STYLE_EDJS)) {
+                    parseDefaultStyleEdjs(fileData, (Element) childNode);
+                }
+            }
+        }
+    }
+
+    private static void parseRenderer(DescriptorFileData fileData, String typeName, Element elem) {
+        if (elem == null) {
+            return;
+        }
+
+        String rendererId = elem.getAttribute(ATTR_ID);
+        fileData.setRendererId(rendererId);
+    }
+
+    private static void parseFramework(DescriptorFileData fileData, String typeName, Element elem) {
+        if (elem == null) {
+            return;
+        }
+
+        String framework = elem.getAttribute(ATTR_NAME);
+        fileData.setFrameworkName(framework);
+
+        NodeList elemList = elem.getChildNodes();
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Node childNode = elemList.item(i);
+            if (childNode instanceof Element) {
+                if (childNode.getNodeName().equals(ELEM_LIBRARY)) {
+                    parseLibrary(fileData, typeName, (Element) childNode);
+                } else if (childNode.getNodeName().equals(ELEM_EDITOR)) {
+                    parseEditor(fileData, ELEM_EDITOR, (Element) childNode);
+                }
+            }
+        }
+    }
+
+    private static void parseLibrary(DescriptorFileData fileData, String typeName, Element elem) {
+        if (typeName.equals(ELEM_FRAMEWORK)) {
+            fileData.addFrameworkLibrary(elem.getAttribute(ATTR_SRC));
+        } else if (typeName.equals(ELEM_EDITOR)) {
+            fileData.addEditorLibrary(elem.getAttribute(ATTR_SRC));
+        }
+    }
+
+    private static void parseEditor(DescriptorFileData fileData, String typeName, Element elem) {
+        NodeList elemList = elem.getElementsByTagName(ELEM_LIBRARY);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Element libElem = (Element) elemList.item(i);
+            parseLibrary(fileData, ELEM_EDITOR, libElem);
+        }
+    }
+
+    /**
+     * Parses a doc, page or widget element of descriptor XML.
+     * 
+     * @param elem
+     *            a doc, page or widget element
+     * @param part
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parsePart(DescriptorFileData fileData, String typeName, Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry =
+                TizenFileDataHelper.convert(typeName, elem,
+                                            new String[] { ATTR_ID, ATTR_DISPLAYNAME, ATTR_SMALLICON, ATTR_ICON_16, ATTR_DESCRIPTION, ATTR_LAYOUTTYPE,
+                                                    ATTR_LAYOUT_CAPACITY, ATTR_PALETTE_VISIBLE, ATTR_HELPCATEGORY, ATTR_HELPCONTENS, ATTR_FEEDBACKWIDTH,
+                                                    ATTR_FEEDBACKHEIGHT, ATTR_MINWIDTH, ATTR_MINHEIGHT, ATTR_BORDER_VISIBLE, ATTR_FEEDBACKCONDITION,
+                                                    ATTR_GUIDE_TEXT, ATTR_SET_STYLE, ATTR_UI_SELECTOR, ATTR_XPATH, ATTR_CHILDXPATH, ATTR_SELFCHILDXPATH,
+                                                    ATTR_CONTAINER_ID, ATTR_REQUIRED });
+
+        if (typeName.equals(ELEM_WIDGET)) {
+            String categories = elem.getAttribute(ATTR_CATEGORY);
+            if (categories != null && !categories.isEmpty()) {
+                String[] categoriesArray = categories.split(DescriptorConstants.COMMA);
+                entry.addListProperty(DescriptorFileData.PROP_CATEGORY_LIST, (List) Arrays.asList(categoriesArray));
+            }
+        }
+
+        boolean isNoRelation = true;
+        NodeList elemList1 = elem.getElementsByTagName(ELEM_RELATIONS);
+        for (int i = 0; i < elemList1.getLength(); i++) {
+            TizenFileDataEntry relation = parseRelations((Element) elemList1.item(i));
+            if (relation != null) {
+                TizenFileDataEntry curRelation = entry.getEntryProperty(DescriptorFileData.PROP_RELATION);
+                if (curRelation != null) {
+                    curRelation.addListPropertyList(DescriptorFileData.PROP_PARENT_LIST, relation.getListProperty(DescriptorFileData.PROP_PARENT_LIST));
+                    curRelation.addListPropertyList(DescriptorFileData.PROP_NOPARENT_LIST, relation.getListProperty(DescriptorFileData.PROP_NOPARENT_LIST));
+                    curRelation.addListPropertyList(DescriptorFileData.PROP_CONTENT_LIST, relation.getListProperty(DescriptorFileData.PROP_CONTENT_LIST));
+                    curRelation.addListPropertyList(DescriptorFileData.PROP_NOCONTENT_LIST, relation.getListProperty(DescriptorFileData.PROP_NOCONTENT_LIST));
+                } else {
+                    entry.addEntryProperty(DescriptorFileData.PROP_RELATION, relation);
+                }
+                isNoRelation = false;
+            }
+        }
+
+        // This code remains for compatibility.
+        if (isNoRelation) {
+            NodeList elemList = elem.getElementsByTagName(ELEM_CONTENT);
+            if (elemList.getLength() > 0) {
+                TizenFileDataEntry relation = new TizenFileDataEntry();
+
+                for (int i = 0; i < elemList.getLength(); i++) {
+                    TizenFileDataEntry relationEntry = parseContent((Element) elemList.item(i));
+
+                    if (relationEntry != null) {
+                        String excludeIds = relationEntry.getStringProperty(ATTR_EXCLUDE_IDS);
+                        String[] idsArray = excludeIds.split(DescriptorConstants.COMMA);
+                        List<String> idList = Arrays.asList(idsArray);
+                        relation.addListPropertyList(DescriptorFileData.PROP_NOCONTENT_LIST, (List) idList);
+                        String parentIds = relationEntry.getStringProperty(ATTR_PARENT_IDS);
+                        idsArray = parentIds.split(DescriptorConstants.COMMA);
+                        idList = Arrays.asList(idsArray);
+                        relation.addListPropertyList(DescriptorFileData.PROP_PARENT_LIST, (List) idList);
+                    }
+                }
+
+                entry.addEntryProperty(DescriptorFileData.PROP_RELATION, relation);
+            }
+        }
+
+        NodeList elemList = elem.getChildNodes();
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Node childNode = elemList.item(i);
+            if (childNode instanceof Element) {
+                if (childNode.getNodeName().equals(ELEM_CONDITION)) {
+                    TizenFileDataEntry childEntry = parsePartCondition((Element) childNode);
+                    if (childEntry != null) {
+                        entry.addListPropertyItem(DescriptorFileData.PROP_CONDITION_LIST, childEntry);
+                    }
+                } else if (childNode.getNodeName().equals(ELEM_PROPERTY)) {
+                    TizenFileDataEntry childEntry = parseProperty((Element) childNode);
+                    if (childEntry != null) {
+                        entry.addListPropertyItem(DescriptorFileData.PROP_PROPERTY_LIST, childEntry);
+                    }
+                } else if (childNode.getNodeName().equals(ELEM_CHILDUICOMPONENTPROPERTY)) {
+                    TizenFileDataEntry childEntry = parseChildUIComponentProperty((Element) childNode);
+                    if (childEntry != null) {
+                        entry.addListPropertyItem(DescriptorFileData.PROP_CHILDUICOMPONENTPROPERTY_LIST, childEntry);
+                    }
+                } else if (childNode.getNodeName().equals(ELEM_EVENT)) {
+                    TizenFileDataEntry childEntry = parseEvent((Element) childNode);
+                    if (childEntry != null) {
+                        entry.addListPropertyItem(DescriptorFileData.PROP_EVENT_LIST, childEntry);
+                    }
+                } else if (childNode.getNodeName().equals(ELEM_XSL_FOR_OUTPUT)) {
+
+                }
+            }
+        }
+
+        fileData.addPartDescriptor(entry);
+
+        return entry;
+    }
+
+    /**
+     * Parses a relation element of descriptor XML.
+     * 
+     * @param elem
+     *            a relation element
+     * @param property
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parseRelations(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        // RelationDescriptor relation = part.getRelation();
+        // if (relation == null) {
+        // return null;
+        // }
+
+        TizenFileDataEntry entry = new TizenFileDataEntry();
+
+        NodeList elemList = elem.getChildNodes();
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Node childNode = elemList.item(i);
+            if (childNode instanceof Element) {
+                Element childElem = (Element) childNode;
+                if (childNode.getNodeName().equals(ELEM_PARENT)) {
+                    String ids = childElem.getAttribute(ATTR_IDS);
+                    String[] idsArray = ids.split(DescriptorConstants.COMMA);
+                    List<String> idList = Arrays.asList(idsArray);
+                    entry.addListPropertyList(DescriptorFileData.PROP_PARENT_LIST, (List) idList);
+                } else if (childNode.getNodeName().equals(ELEM_NOPARENT)) {
+                    String ids = childElem.getAttribute(ATTR_IDS);
+                    String[] idsArray = ids.split(DescriptorConstants.COMMA);
+                    List<String> idList = Arrays.asList(idsArray);
+                    entry.addListPropertyList(DescriptorFileData.PROP_NOPARENT_LIST, (List) idList);
+                } else if (childNode.getNodeName().equals(ELEM_CONTENT)) {
+                    TizenFileDataEntry entry2 = parseContent2(childElem);
+                    entry.addListPropertyItem(DescriptorFileData.PROP_CONTENT_LIST, entry2);
+                } else if (childNode.getNodeName().equals(ELEM_NOCONTENT)) {
+                    String ids = childElem.getAttribute(ATTR_IDS);
+                    String[] idsArray = ids.split(DescriptorConstants.COMMA);
+                    List<String> idList = Arrays.asList(idsArray);
+                    entry.addListPropertyList(DescriptorFileData.PROP_NOCONTENT_LIST, (List) idList);
+                }
+            }
+        }
+
+        return entry;
+    }
+
+    /**
+     * Parses a content element of descriptor XML. This method remains for compatibility.
+     * 
+     * @param elem
+     *            a content element
+     * @param part
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parseContent(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        // RelationDescriptor relation = part.getRelation();
+        // if (relation == null) {
+        // return null;
+        // }
+
+        // TizenFileDataEntry content = parseContent2(elem);
+
+        // String excludeIds = elem.getAttribute(ATTR_EXCLUDE_IDS);
+        // String parentIds = elem.getAttribute(ATTR_PARENT_IDS);
+        //
+        // if (excludeIds != null && !excludeIds.isEmpty()) {
+        // relation.addNoContentPartIds(excludeIds);
+        // }
+        // if (parentIds != null && !parentIds.isEmpty()) {
+        // relation.addParentPartIds(parentIds);
+        // }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_EXCLUDE_IDS, ATTR_PARENT_IDS });
+
+        return entry;
+    }
+
+    /**
+     * Parses a content element of descriptor XML.
+     * 
+     * @param elem
+     *            a content element
+     * @param relation
+     *            a {@link RelationDescriptor}
+     */
+    private static TizenFileDataEntry parseContent2(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry =
+                TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_IDS, ATTR_TYPE, ATTR_MIN, ATTR_MAX, ATTR_EXCLUSIVE_GROUP });
+
+        // String ids = elem.getAttribute(ATTR_IDS);
+        // String type = elem.getAttribute(ATTR_TYPE);
+        // String min = elem.getAttribute(ATTR_MIN);
+        // String max = elem.getAttribute(ATTR_MAX);
+        // String exclusiveGroup = elem.getAttribute(ATTR_EXCLUSIVE_GROUP);
+        // String type = entry.getStringProperty(ATTR_TYPE);
+        // ContentDescriptor.PartType partType = ContentDescriptor.PartType.ANY_PART;
+        //
+        // if (type != null && !type.isEmpty()) {
+        // if (type.equals(PART_TYPE_DOC)) {
+        // partType = ContentDescriptor.PartType.DOCUMENT_PART;
+        // } else if (type.equals(PART_TYPE_PAGE)) {
+        // partType = ContentDescriptor.PartType.PAGE_PART;
+        // } else if (type.equals(PART_TYPE_WIDGET)) {
+        // partType = ContentDescriptor.PartType.WIDGET_PART;
+        // }
+        // }
+
+        // ContentDescriptor content = new ContentDescriptor();
+        // content.setPartType(partType);
+        // if (ids != null && !ids.isEmpty()) {
+        // content.setPartIds(ids);
+        // }
+        // if (min != null && !min.isEmpty()) {
+        // content.setMin(Integer.valueOf(min).intValue());
+        // }
+        // if (max != null && !max.isEmpty()) {
+        // content.setMax(Integer.valueOf(max).intValue());
+        // }
+        // if (exclusiveGroup != null && !exclusiveGroup.isEmpty()) {
+        // content.setExclusiveGroup(exclusiveGroup);
+        // }
+        // relation.addContent(content);
+
+        return entry;
+    }
+
+    /**
+     * Parses a condition element of descriptor XML.
+     * 
+     * @param elem
+     *            a property element
+     * @param part
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parsePartCondition(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry =
+                TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_VALUE, ATTR_TARGET, ATTR_TARGETVALUE });
+        // String name = elem.getAttribute(ATTR_NAME);
+        // String value = elem.getAttribute(ATTR_VALUE);
+        // String target = elem.getAttribute(ATTR_TARGET);
+        // String targetValue = elem.getAttribute(ATTR_TARGETVALUE);
+
+        // PartConditionDescriptor condition = new PartConditionDescriptor(name,
+        // value, target, targetValue);
+        // part.addConditionDescriptor(condition);
+
+        return entry;
+    }
+
+    /**
+     * Parses a property element of descriptor XML.
+     * 
+     * @param elem
+     *            a property element
+     * @param part
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parseChildUIComponentProperty(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = new TizenFileDataEntry();
+
+        NodeList childNodes = elem.getChildNodes();
+        for (int i = 0; i < childNodes.getLength(); i++) {
+            Node item = childNodes.item(i);
+            if (item instanceof Element) {
+                TizenFileDataEntry childEntry = parseProperty((Element) childNodes.item(i));
+                if (childEntry != null) {
+                    entry.addListPropertyItem(DescriptorFileData.PROP_PROPERTY_LIST, childEntry);
+                }
+            }
+        }
+
+        return entry;
+    }
+
+    /**
+     * Parses a property element of descriptor XML.
+     * 
+     * @param elem
+     *            a property element
+     * @param part
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parseProperty(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        String notsupported = elem.getAttribute(ATTR_NOT_SUPPORTED);
+        if (notsupported != null && notsupported.equals(DescriptorConstants.TRUE)) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_TYPE, ATTR_DISPLAYNAME,
+                ATTR_DEFAULT, ATTR_INITVALUE, ATTR_CATEGORY, ATTR_XPATH, ATTR_ATTRXPATH, ATTR_INLINE, ATTR_UNUSED_EDITORS
+
+        });
+
+        // String name = elem.getAttribute(ATTR_NAME);
+        String type = elem.getAttribute(ATTR_TYPE);
+        String displayName = elem.getAttribute(ATTR_DISPLAYNAME);
+        String tooltip = elem.getAttribute(ATTR_TOOLTIP);
+        // String defaultValue = elem.getAttribute(ATTR_DEFAULT);
+        // String initValue = elem.getAttribute(ATTR_INITVALUE);
+        // String category = elem.getAttribute(ATTR_CATEGORY);
+        // String xpath = elem.getAttribute(ATTR_XPATH);
+        // String attrXpath = elem.getAttribute(ATTR_ATTRXPATH);
+
+        if (tooltip.isEmpty()) {
+            tooltip = displayName;
+        } else {
+            tooltip = displayName + DescriptorConstants.SPACE + DescriptorConstants.DASH + DescriptorConstants.SPACE + tooltip;
+        }
+        entry.addProperty(ATTR_TOOLTIP, tooltip);
+
+        // PropertyDescriptor property = new PropertyDescriptor(name, type,
+        // displayName, tooltip, defaultValue, initValue, category, xpath,
+        // attrXpath, fileData);
+        // part.addPropertyDescriptor(property);
+
+        if (TypeDescriptor.ID_OF_GROUP.equals(type) || TypeDescriptor.ID_OF_GROUP_TEXT.equals(type) || TypeDescriptor.ID_OF_GROUP_POSITION.equals(type)) {
+            NodeList elemList = elem.getElementsByTagName(ELEM_PROPERTY);
+            for (int i = 0; i < elemList.getLength(); i++) {
+                TizenFileDataEntry childEntry = parseChildProperty((Element) elemList.item(i));
+                if (childEntry != null) {
+                    entry.addListPropertyItem(DescriptorFileData.PROP_PROPERTY_LIST, childEntry);
+                }
+            }
+        }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_CONDITION);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry condition = parseCondition((Element) elemList.item(i));
+            if (condition != null) {
+                entry.addListPropertyItem(DescriptorFileData.PROP_CONDITION_LIST, condition);
+            }
+        }
+
+        return entry;
+    }
+
+    /**
+     * Parses a child property element of descriptor XML.
+     * 
+     * @param elem
+     *            a child property
+     * @param property
+     *            a {@link PropertyDescriptor}
+     */
+    private static TizenFileDataEntry parseChildProperty(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        // String name = elem.getAttribute(ATTR_NAME);
+        // String type = elem.getAttribute(ATTR_TYPE);
+        // String displayName = elem.getAttribute(ATTR_DISPLAYNAME);
+        // String tooltip = elem.getAttribute(ATTR_TOOLTIP);
+        // String defaultValue = elem.getAttribute(ATTR_DEFAULT);
+        // String initValue = elem.getAttribute(ATTR_INITVALUE);
+        // String category = elem.getAttribute(ATTR_CATEGORY);
+        // String xpath = elem.getAttribute(ATTR_XPATH);
+        // String attrXpath = elem.getAttribute(ATTR_ATTRXPATH);
+        // String selector = elem.getAttribute(ATTR_SELECTOR);
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_TYPE, ATTR_DISPLAYNAME,
+                ATTR_TOOLTIP, ATTR_DEFAULT, ATTR_INITVALUE, ATTR_CATEGORY, ATTR_XPATH, ATTR_ATTRXPATH, ATTR_SELECTOR });
+
+        // PropertyDescriptor childProperty = new ChildPropertyDescriptor(name,
+        // type, displayName, tooltip, defaultValue, initValue, category,
+        // xpath, attrXpath, selector, fileData);
+        // property.addChildPropertyDescriptor(childProperty);
+
+        // NodeList elemList = elem.getElementsByTagName(ELEM_CONDITION);
+        // for (int i = 0; i < elemList.getLength(); i++) {
+        // parseCondition((Element) elemList.item(i), childProperty);
+        // }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_CONDITION);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry condition = parseCondition((Element) elemList.item(i));
+            if (condition != null) {
+                entry.addListPropertyItem(DescriptorFileData.PROP_CONDITION_LIST, condition);
+            }
+        }
+
+        return entry;
+    }
+
+    /**
+     * Parses a condition element of descriptor XML.
+     * 
+     * @param elem
+     *            a condition element
+     * @param property
+     *            a {@link PropertyDescriptor}
+     */
+    private static TizenFileDataEntry parseCondition(Element elem) {
+        // if (elem == null || property == null) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry =
+                TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_VALUE, ATTR_TARGET, ATTR_TARGETVALUE, ATTR_ERROR });
+        // String name = elem.getAttribute(ATTR_NAME);
+        // String value = elem.getAttribute(ATTR_VALUE);
+        // String target = elem.getAttribute(ATTR_TARGET);
+        // String targetValue = elem.getAttribute(ATTR_TARGETVALUE);
+        // String error = elem.getAttribute(ATTR_ERROR);
+        //
+        // PropertyConditionDescriptor condition = new
+        // PropertyConditionDescriptor(
+        // name, value, target, targetValue, error);
+        // property.addConditionDescriptor(condition);
+
+        return entry;
+    }
+
+    /**
+     * Parses an event element of descriptor XML.
+     * 
+     * @param elem
+     *            an event element
+     * @param part
+     *            a {@link WidgetDescriptor}
+     */
+    private static TizenFileDataEntry parseEvent(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        // String name = elem.getAttribute(ATTR_NAME);
+        // String displayName = elem.getAttribute(ATTR_DISPLAYNAME);
+        // String eventType = elem.getAttribute(ATTR_EVENTTYPE);
+        // EventDescriptor event = new EventDescriptor(name, displayName,
+        // eventType, fileData);
+        // part.addEventDescriptor(event);
+
+        TizenFileDataEntry entry =
+                TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_DISPLAYNAME, ATTR_EVENTTYPE, ATTR_EVENTINFO });
+
+        return entry;
+    }
+
+    /**
+     * Parses a types element of descriptor XML.
+     * 
+     * @param elem
+     *            a types element
+     */
+    private static void parseTypes(DescriptorFileData fileData, Element elem) {
+        if (elem == null) {
+            return;
+        }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_TYPE);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry entry = parseType((Element) elemList.item(i));
+            fileData.addType(entry);
+        }
+    }
+
+    /**
+     * Parses a type element of descriptor XML.
+     * 
+     * @param elem
+     *            a type element
+     */
+    private static TizenFileDataEntry parseType(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_ID });
+
+        // String id = elem.getAttribute(ATTR_ID);
+        //
+        // TypeDescriptor type = fileData.getTypeDescriptor(id);
+        //
+        // if (type == null) {
+        // type = new TypeDescriptor(id);
+        // fileData.addTypeDescriptor(type);
+        // }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_CONSTANT);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            // type.addAvailableConstant(parseConstant((Element) elemList.item(i)));
+            TizenFileDataEntry constant = parseConstant((Element) elemList.item(i));
+            entry.addListPropertyItem(DescriptorFileData.PROP_CONSTANT_LIST, constant);
+        }
+
+        elemList = elem.getElementsByTagName(ELEM_UNIT);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry unit = parseUnit((Element) elemList.item(i));
+            entry.addListPropertyItem(DescriptorFileData.PROP_UNIT_LIST, unit);
+        }
+
+        return entry;
+    }
+
+    /**
+     * Parses a constant element of descriptor XML.
+     * 
+     * @param elem
+     *            a constant element
+     */
+    private static TizenFileDataEntry parseConstant(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        // String value = elem.getAttribute(ATTR_VALUE);
+        // String displayName = elem.getAttribute(ATTR_DISPLAYNAME);
+        // String icon = elem.getAttribute(ATTR_ICON);
+        //
+        // if (displayName == null) {
+        // displayName = value;
+        // }
+        //
+        // return new ConstantDescriptor(value, displayName, icon);
+
+        TizenFileDataEntry entry =
+                TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_VALUE, ATTR_DISPLAYNAME, ATTR_ICON, ATTR_REQUIRED });
+
+        return entry;
+    }
+
+    private static TizenFileDataEntry parseUnit(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_VALUE, ATTR_DISPLAYNAME });
+
+        return entry;
+    }
+
+    /**
+     * Parses an eventTypes element of descriptor XML.
+     * 
+     * @param elem
+     *            an eventTypes element
+     */
+    private static void parseEventTypes(DescriptorFileData fileData, Element elem) {
+        if (elem == null) {
+            return;
+        }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_EVENTTYPE);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry entry = parseEventType(fileData, (Element) elemList.item(i));
+            if (entry != null) {
+                fileData.addEventType(entry);
+            }
+        }
+    }
+
+    /**
+     * Parses an eventType element of descriptor XML.
+     * 
+     * @param elem
+     *            an eventType element
+     */
+    private static TizenFileDataEntry parseEventType(DescriptorFileData fileData, Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_ID });
+
+        // String id = elem.getAttribute(ATTR_ID);
+        // if (fileData.getEventTypeDescriptor(id) != null) {
+        // return;
+        // }
+
+        // EventTypeDescriptor eventType = new EventTypeDescriptor(id);
+
+        NodeList elemList = elem.getChildNodes();
+        for (int i = 0; i < elemList.getLength(); i++) {
+            Node childNode = elemList.item(i);
+            if (childNode instanceof Element) {
+                Element childElem = (Element) childNode;
+                if (childNode.getNodeName().equals(ELEM_DEFAULTCODE)) {
+                    // eventType.setDefaultCode(((Element) elemList.item(i))
+                    // .getTextContent());
+                    entry.addStringProperty(DescriptorFileData.PROP_DEFAULTCODE, childElem.getTextContent());
+                } else if (childNode.getNodeName().equals(ELEM_PARAM)) {
+                    // eventType
+                    // .addEventParameter(parseParameter((Element) elemList
+                    // .item(i)));
+                    entry.addListPropertyItem(DescriptorFileData.PROP_PARAM_LIST, parseParameter(childElem));
+                }
+            }
+        }
+
+        // fileData.addEventTypeDescriptor(eventType);
+        return entry;
+    }
+
+    /**
+     * Parses a widget categories element of descriptor XML.
+     * 
+     * @param elem
+     *            a types element
+     */
+    private static void parseWidgetCategories(DescriptorFileData fileData, Element elem) {
+        if (elem == null) {
+            return;
+        }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_UICOMPONENT_CATEGORY);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry entry = parseWidgetCategory(fileData, (Element) elemList.item(i));
+            if (entry != null) {
+                fileData.addUIComponentCategory(entry);
+            }
+        }
+    }
+
+    /**
+     * Parses a default style edjs element of descriptor XML.
+     * 
+     * @param elem
+     *            a types element
+     */
+    private static void parseDefaultStyleEdjs(DescriptorFileData fileData, Element elem) {
+        if (elem == null) {
+            return;
+        }
+
+        NodeList elemList = elem.getElementsByTagName(ELEM_STYLE_EDJ);
+        for (int i = 0; i < elemList.getLength(); i++) {
+            TizenFileDataEntry entry = parseStyleEDJ(fileData, (Element) elemList.item(i));
+            if (entry != null) {
+                fileData.addDefaultStyleEDJs(entry);
+            }
+        }
+    }
+
+    /**
+     * Parses a widget category element of descriptor XML.
+     * 
+     * @param elem
+     *            a type element
+     */
+    private static TizenFileDataEntry parseWidgetCategory(DescriptorFileData fileData, Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME });
+        return entry;
+    }
+
+    /**
+     * Parses a style edj element of descriptor XML.
+     * 
+     * @param elem
+     *            a type element
+     */
+    private static TizenFileDataEntry parseStyleEDJ(DescriptorFileData fileData, Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME });
+        return entry;
+    }
+
+    /**
+     * Parses a param element of descriptor XML.
+     * 
+     * @param elem
+     *            a param element
+     */
+    private static TizenFileDataEntry parseParameter(Element elem) {
+        if (elem == null) {
+            return null;
+        }
+
+        TizenFileDataEntry entry = TizenFileDataHelper.convert(DescriptorConstants.EMPTY, elem, new String[] { ATTR_NAME, ATTR_TYPE });
+
+        // String name = elem.getAttribute(ATTR_NAME);
+        // String type = elem.getAttribute(ATTR_TYPE);
+
+        // return new EventParamDescriptor(name, type);
+        return entry;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.feature/.project b/org.tizen.efluibuilder.feature/.project
new file mode 100644 (file)
index 0000000..086151e
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.efluibuilder.feature</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.FeatureBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.FeatureNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.efluibuilder.feature/Apache-v2.0.html b/org.tizen.efluibuilder.feature/Apache-v2.0.html
new file mode 100644 (file)
index 0000000..c4035e7
--- /dev/null
@@ -0,0 +1,238 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+<title>Apache License, Version 2.0</title>
+
+<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<meta property="og:image"
+       content="http://www.apache.org/images/asf_logo.gif" />
+
+<link rel="stylesheet" type="text/css" media="screen"
+       href="/css/style.css">
+<link rel="stylesheet" type="text/css" media="screen"
+       href="/css/code.css">
+
+<script type="text/javascript" src="/js/jquery.js"></script>
+<script type="text/javascript" src="/js/apache_boot.js"></script>
+
+
+
+
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.  You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License. -->
+</head>
+
+<body>
+       <div id="page" class="container_16">
+               <div id="header" class="grid_8">
+                       <h1>The Apache Software Foundation</h1>
+                       <h2>Apache License, Version 2.0</h2>
+               </div>
+
+               <div class="clear"></div>
+               <div id="content" class="grid_16">
+                       <div class="section-content">
+                               <p>
+                                       Apache License<br></br>Version 2.0, January 2004<br></br> <a
+                                               href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a>
+                               </p>
+                               <p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
+                               <p>
+                                       <strong><a name="definitions">1. Definitions</a></strong>.
+                               </p>
+                               <p>"License" shall mean the terms and conditions for use,
+                                       reproduction, and distribution as defined by Sections 1 through 9
+                                       of this document.</p>
+                               <p>"Licensor" shall mean the copyright owner or entity
+                                       authorized by the copyright owner that is granting the License.</p>
+                               <p>"Legal Entity" shall mean the union of the acting entity and
+                                       all other entities that control, are controlled by, or are under
+                                       common control with that entity. For the purposes of this
+                                       definition, "control" means (i) the power, direct or indirect, to
+                                       cause the direction or management of such entity, whether by
+                                       contract or otherwise, or (ii) ownership of fifty percent (50%) or
+                                       more of the outstanding shares, or (iii) beneficial ownership of
+                                       such entity.</p>
+                               <p>"You" (or "Your") shall mean an individual or Legal Entity
+                                       exercising permissions granted by this License.</p>
+                               <p>"Source" form shall mean the preferred form for making
+                                       modifications, including but not limited to software source code,
+                                       documentation source, and configuration files.</p>
+                               <p>"Object" form shall mean any form resulting from mechanical
+                                       transformation or translation of a Source form, including but not
+                                       limited to compiled object code, generated documentation, and
+                                       conversions to other media types.</p>
+                               <p>"Work" shall mean the work of authorship, whether in Source
+                                       or Object form, made available under the License, as indicated by a
+                                       copyright notice that is included in or attached to the work (an
+                                       example is provided in the Appendix below).</p>
+                               <p>"Derivative Works" shall mean any work, whether in Source or
+                                       Object form, that is based on (or derived from) the Work and for
+                                       which the editorial revisions, annotations, elaborations, or other
+                                       modifications represent, as a whole, an original work of
+                                       authorship. For the purposes of this License, Derivative Works
+                                       shall not include works that remain separable from, or merely link
+                                       (or bind by name) to the interfaces of, the Work and Derivative
+                                       Works thereof.</p>
+                               <p>"Contribution" shall mean any work of authorship, including
+                                       the original version of the Work and any modifications or additions
+                                       to that Work or Derivative Works thereof, that is intentionally
+                                       submitted to Licensor for inclusion in the Work by the copyright
+                                       owner or by an individual or Legal Entity authorized to submit on
+                                       behalf of the copyright owner. For the purposes of this definition,
+                                       "submitted" means any form of electronic, verbal, or written
+                                       communication sent to the Licensor or its representatives,
+                                       including but not limited to communication on electronic mailing
+                                       lists, source code control systems, and issue tracking systems that
+                                       are managed by, or on behalf of, the Licensor for the purpose of
+                                       discussing and improving the Work, but excluding communication that
+                                       is conspicuously marked or otherwise designated in writing by the
+                                       copyright owner as "Not a Contribution."</p>
+                               <p>"Contributor" shall mean Licensor and any individual or Legal
+                                       Entity on behalf of whom a Contribution has been received by
+                                       Licensor and subsequently incorporated within the Work.</p>
+                               <p>
+                                       <strong><a name="copyright">2. Grant of Copyright
+                                                       License</a></strong>. Subject to the terms and conditions of this License,
+                                       each Contributor hereby grants to You a perpetual, worldwide,
+                                       non-exclusive, no-charge, royalty-free, irrevocable copyright
+                                       license to reproduce, prepare Derivative Works of, publicly
+                                       display, publicly perform, sublicense, and distribute the Work and
+                                       such Derivative Works in Source or Object form.
+                               </p>
+                               <p>
+                                       <strong><a name="patent">3. Grant of Patent License</a></strong>.
+                                       Subject to the terms and conditions of this License, each
+                                       Contributor hereby grants to You a perpetual, worldwide,
+                                       non-exclusive, no-charge, royalty-free, irrevocable (except as
+                                       stated in this section) patent license to make, have made, use,
+                                       offer to sell, sell, import, and otherwise transfer the Work, where
+                                       such license applies only to those patent claims licensable by such
+                                       Contributor that are necessarily infringed by their Contribution(s)
+                                       alone or by combination of their Contribution(s) with the Work to
+                                       which such Contribution(s) was submitted. If You institute patent
+                                       litigation against any entity (including a cross-claim or
+                                       counterclaim in a lawsuit) alleging that the Work or a Contribution
+                                       incorporated within the Work constitutes direct or contributory
+                                       patent infringement, then any patent licenses granted to You under
+                                       this License for that Work shall terminate as of the date such
+                                       litigation is filed.
+                               </p>
+                               <p>
+                                       <strong><a name="redistribution">4. Redistribution</a></strong>.
+                                       You may reproduce and distribute copies of the Work or Derivative
+                                       Works thereof in any medium, with or without modifications, and in
+                                       Source or Object form, provided that You meet the following
+                                       conditions:
+                               </p>
+                               <ol>
+                                       <li>
+                                               <p>You must give any other recipients of the Work or
+                                                       Derivative Works a copy of this License; and</p>
+                                       </li>
+                                       <li>
+                                               <p>You must cause any modified files to carry prominent
+                                                       notices stating that You changed the files; and</p>
+                                       </li>
+                                       <li>
+                                               <p>You must retain, in the Source form of any Derivative Works
+                                                       that You distribute, all copyright, patent, trademark, and
+                                                       attribution notices from the Source form of the Work, excluding
+                                                       those notices that do not pertain to any part of the Derivative
+                                                       Works; and</p>
+                                       </li>
+                                       <li>
+                                               <p>If the Work includes a "NOTICE" text file as part of its
+                                                       distribution, then any Derivative Works that You distribute must
+                                                       include a readable copy of the attribution notices contained
+                                                       within such NOTICE file, excluding those notices that do not
+                                                       pertain to any part of the Derivative Works, in at least one of
+                                                       the following places: within a NOTICE text file distributed as
+                                                       part of the Derivative Works; within the Source form or
+                                                       documentation, if provided along with the Derivative Works; or,
+                                                       within a display generated by the Derivative Works, if and
+                                                       wherever such third-party notices normally appear. The contents
+                                                       of the NOTICE file are for informational purposes only and do not
+                                                       modify the License. You may add Your own attribution notices
+                                                       within Derivative Works that You distribute, alongside or as an
+                                                       addendum to the NOTICE text from the Work, provided that such
+                                                       additional attribution notices cannot be construed as modifying
+                                                       the License. You may add Your own copyright statement to Your
+                                                       modifications and may provide additional or different license
+                                                       terms and conditions for use, reproduction, or distribution of
+                                                       Your modifications, or for any such Derivative Works as a whole,
+                                                       provided Your use, reproduction, and distribution of the Work
+                                                       otherwise complies with the conditions stated in this License.</p>
+                                       </li>
+                               </ol>
+                               <p>
+                                       <strong><a name="contributions">5. Submission of
+                                                       Contributions</a></strong>. Unless You explicitly state otherwise, any
+                                       Contribution intentionally submitted for inclusion in the Work by
+                                       You to the Licensor shall be under the terms and conditions of this
+                                       License, without any additional terms or conditions.
+                                       Notwithstanding the above, nothing herein shall supersede or modify
+                                       the terms of any separate license agreement you may have executed
+                                       with Licensor regarding such Contributions.
+                               </p>
+                               <p>
+                                       <strong><a name="trademarks">6. Trademarks</a></strong>. This
+                                       License does not grant permission to use the trade names,
+                                       trademarks, service marks, or product names of the Licensor, except
+                                       as required for reasonable and customary use in describing the
+                                       origin of the Work and reproducing the content of the NOTICE file.
+                               </p>
+                               <p>
+                                       <strong><a name="no-warranty">7. Disclaimer of
+                                                       Warranty</a></strong>. Unless required by applicable law or agreed to in
+                                       writing, Licensor provides the Work (and each Contributor provides
+                                       its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+                                       CONDITIONS OF ANY KIND, either express or implied, including,
+                                       without limitation, any warranties or conditions of TITLE,
+                                       NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
+                                       PURPOSE. You are solely responsible for determining the
+                                       appropriateness of using or redistributing the Work and assume any
+                                       risks associated with Your exercise of permissions under this
+                                       License.
+                               </p>
+                               <p>
+                                       <strong><a name="no-liability">8. Limitation of
+                                                       Liability</a></strong>. In no event and under no legal theory, whether in tort
+                                       (including negligence), contract, or otherwise, unless required by
+                                       applicable law (such as deliberate and grossly negligent acts) or
+                                       agreed to in writing, shall any Contributor be liable to You for
+                                       damages, including any direct, indirect, special, incidental, or
+                                       consequential damages of any character arising as a result of this
+                                       License or out of the use or inability to use the Work (including
+                                       but not limited to damages for loss of goodwill, work stoppage,
+                                       computer failure or malfunction, or any and all other commercial
+                                       damages or losses), even if such Contributor has been advised of
+                                       the possibility of such damages.
+                               </p>
+                               <p>
+                                       <strong><a name="additional">9. Accepting Warranty or
+                                                       Additional Liability</a></strong>. While redistributing the Work or Derivative
+                                       Works thereof, You may choose to offer, and charge a fee for,
+                                       acceptance of support, warranty, indemnity, or other liability
+                                       obligations and/or rights consistent with this License. However, in
+                                       accepting such obligations, You may act only on Your own behalf and
+                                       on Your sole responsibility, not on behalf of any other
+                                       Contributor, and only if You agree to indemnify, defend, and hold
+                                       each Contributor harmless for any liability incurred by, or claims
+                                       asserted against, such Contributor by reason of your accepting any
+                                       such warranty or additional liability.
+                               </p>
+                               <p>END OF TERMS AND CONDITIONS</p>
+
+                               <div class="clear"></div>
+
+                       </div>
+                       <div id="copyright" class="container_16">
+                               <p>
+                                       Copyright &#169; 2011 The Apache Software Foundation, Licensed
+                                       under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+                                               License, Version 2.0</a>.<br />Apache and the Apache feather logo are
+                                       trademarks of The Apache Software Foundation.
+                               </p>
+                       </div>
+</body>
+</html>
diff --git a/org.tizen.efluibuilder.feature/build.properties b/org.tizen.efluibuilder.feature/build.properties
new file mode 100644 (file)
index 0000000..4767615
--- /dev/null
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+               feature.properties,\
+               Apache-v2.0.html
diff --git a/org.tizen.efluibuilder.feature/feature.properties b/org.tizen.efluibuilder.feature/feature.properties
new file mode 100644 (file)
index 0000000..0118108
--- /dev/null
@@ -0,0 +1,29 @@
+###############################################################################
+# Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd.
+# All rights reserved. This program and the accompanying materials 
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#      S-Core Co., Ltd
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Tizen EFL UI Builder
+
+# "providerName" property - name of the company that provides the feature
+providerName=The Linux Foundation
+
+# "description" property - description of the feature
+description=Tizen EFL UI Builder.
+
+# "copyright" property
+copyrightURL=https://developer.tizen.org
+copyright=Copyright (C) 2010 - 2014 Samsung Electronics Co., Ltd.\n\
+All rights reserved.\n
diff --git a/org.tizen.efluibuilder.feature/feature.xml b/org.tizen.efluibuilder.feature/feature.xml
new file mode 100644 (file)
index 0000000..9f3c6f7
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.tizen.efluibuilder.feature"
+      label="%featureName"
+      version="1.0.0.qualifier"
+      provider-name="%providerName"
+      plugin="org.tizen.efluibuilder"
+      license-feature="org.tizen.base.feature">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="">
+      %license
+   </license>
+
+   <plugin
+         id="org.tizen.efluibuilder"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.tizen.efluibuilder.project"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.tizen.efluibuilder.renderer"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.tizen.efluibuilder.codegenerator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.tizen.efluibuilder.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.tizen.efluibuilder.descriptor"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.tizen.efluibuilder.configurator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.tizen.efluibuilder.common"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.tizen.efluibuilder.converter"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+         
+   <plugin
+         id="org.tizen.efluibuilder.projectmigrator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/org.tizen.efluibuilder.project/.classpath b/org.tizen.efluibuilder.project/.classpath
new file mode 100644 (file)
index 0000000..1fa3e68
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.efluibuilder.project/.project b/org.tizen.efluibuilder.project/.project
new file mode 100644 (file)
index 0000000..88b60d2
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.efluibuilder.project</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.efluibuilder.project/.settings/org.eclipse.jdt.core.prefs b/org.tizen.efluibuilder.project/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..6dffab0
--- /dev/null
@@ -0,0 +1,98 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.tizen.efluibuilder.project/META-INF/MANIFEST.MF b/org.tizen.efluibuilder.project/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..41c50bf
--- /dev/null
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.efluibuilder.project;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.tizen.efluibuilder.project.Activator
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.ui,
+ org.eclipse.cdt.core;bundle-version="5.6.0",
+ org.tizen.common,
+ org.tizen.efluibuilder.codegenerator,
+ org.eclipse.ui.ide,
+ org.tizen.efluibuilder.common,
+ org.tizen.efluibuilder
+Bundle-ActivationPolicy: lazy
+Export-Package: org.tizen.efluibuilder.project.core
+Bundle-Vendor: %Bundle-Vendor
diff --git a/org.tizen.efluibuilder.project/OSGI-INF/l10n/bundle.properties b/org.tizen.efluibuilder.project/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..67910e7
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for org.tizen.efluibuilder.project
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen EFL UI Builder Project
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.project/build.properties b/org.tizen.efluibuilder.project/build.properties
new file mode 100644 (file)
index 0000000..3e5f9ad
--- /dev/null
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               OSGI-INF/
diff --git a/org.tizen.efluibuilder.project/plugin.xml b/org.tizen.efluibuilder.project/plugin.xml
new file mode 100644 (file)
index 0000000..2b7f8cb
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.cdt.core.templateProcessTypes">
+      <processType
+            name="AddNature"
+            processRunner="org.tizen.efluibuilder.project.core.AddNatureProcess">
+         <simple
+               name="projectName">
+         </simple>
+      </processType>
+   </extension>
+   <extension
+         id="org.tizen.efluibuilder.nature"
+         name="NUIBNature"
+         point="org.eclipse.core.resources.natures">
+      <runtime>
+         <run
+               class="org.tizen.efluibuilder.project.core.NUIBNature">
+         </run>
+      </runtime>
+   </extension>
+   <extension
+         id="org.tizen.efluibuilder.builder"
+         name="NUIBBuilder"
+         point="org.eclipse.core.resources.builders">
+      <builder
+            hasNature="false">
+         <run
+               class="org.tizen.efluibuilder.project.core.NUIBBuilder">
+         </run>
+      </builder>
+   </extension>
+       <extension
+         id="problem"
+         name="Layout Problem"
+         point="org.eclipse.core.resources.markers">
+               <super type="org.eclipse.core.resources.problemmarker"/>
+               <persistent value="true"/>
+       </extension>
+</plugin>
diff --git a/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/Activator.java b/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/Activator.java
new file mode 100644 (file)
index 0000000..ff7c1e4
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.project;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.tizen.efluibuilder.project"; //$NON-NLS-1$
+
+    // The shared instance
+    private static Activator plugin;
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     * 
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/AddNatureProcess.java b/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/AddNatureProcess.java
new file mode 100644 (file)
index 0000000..1c31e29
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.project.core;
+
+import org.eclipse.cdt.core.templateengine.TemplateCore;
+import org.eclipse.cdt.core.templateengine.process.ProcessArgument;
+import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
+import org.eclipse.cdt.core.templateengine.process.ProcessRunner;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+
+
+public final class AddNatureProcess extends ProcessRunner {
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.cdt.core.templateengine.process.ProcessRunner#process(org.eclipse.cdt.core.
+     * templateengine.TemplateCore, org.eclipse.cdt.core.templateengine.process.ProcessArgument[],
+     * java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+     */
+    @Override
+    public void process(TemplateCore template, ProcessArgument[] args, String processId, IProgressMonitor monitor) {
+        // project name
+        String projectName = args[0].getSimpleValue();
+        IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+        try {
+            NUIBProjectUtil.addNature(project, monitor);
+            NUIBProjectUtil.open(project);
+        } catch (ProcessFailureException e) {
+            e.printStackTrace();
+            final String message = e.getMessage();
+            Display.getDefault().syncExec(new Runnable() {
+                public void run() {
+                    MessageDialog.openWarning(Display.getDefault().getActiveShell(), Messages.MESSAGE_DIALOG_TITLE, message);
+                }
+            });
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/Messages.java b/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/Messages.java
new file mode 100644 (file)
index 0000000..25916a0
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.project.core;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public class Messages extends NLS {
+
+    private static final String BUNDLE_NAME = Messages.class.getName();
+
+    public static String MESSAGE_DIALOG_TITLE;
+    public static String MESSAGE_DIALOG_LAYOUT_FILE_NOT_FOUND;
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/Messages.properties b/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/Messages.properties
new file mode 100644 (file)
index 0000000..3554642
--- /dev/null
@@ -0,0 +1,2 @@
+MESSAGE_DIALOG_TITLE = Warning
+MESSAGE_DIALOG_LAYOUT_FILE_NOT_FOUND=Layout file not found
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/NUIBBuilder.java b/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/NUIBBuilder.java
new file mode 100644 (file)
index 0000000..8995767
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.project.core;
+
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.codegenerator.CodeGenerator;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorConstants;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorException;
+import org.tizen.efluibuilder.codegenerator.ICodeGenerator;
+import org.tizen.efluibuilder.ui.editor.texteditor.validation.LayoutValidator;
+import org.tizen.efluibuilder.ui.editor.texteditor.validation.ValidationInfo;
+
+
+public final class NUIBBuilder extends IncrementalProjectBuilder {
+    private static final String ID = "org.tizen.efluibuilder.builder"; //$NON-NLS-1$
+    private static final String MARKER_ID = "org.tizen.efluibuilder.project.problem"; //$NON-NLS-1$
+    private static Logger logger = LoggerFactory.getLogger(NUIBBuilder.class);
+
+    public static String getId() {
+        return ID;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.core.resources.IncrementalProjectBuilder#build(int, java.util.Map,
+     * org.eclipse.core.runtime.IProgressMonitor)
+     */
+    @Override
+    protected IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor) throws CoreException {
+        IProject project = getProject();
+        IFile fFile = project.getFile(CodeGeneratorConstants.FILE_LAYOUT_META);
+        try {
+            fFile.deleteMarkers(MARKER_ID, false, IResource.DEPTH_ZERO);
+        } catch (CoreException e) {
+            e.printStackTrace();
+        }
+        List<ValidationInfo> validationInfos = LayoutValidator.validateXml(fFile);
+        if (validationInfos.isEmpty() == false) { // if layout.xml is invalid,
+            for (int i = 0; i < validationInfos.size(); i++) {
+                IMarker marker = fFile.createMarker(MARKER_ID);
+                marker.setAttribute(IMarker.MESSAGE, validationInfos.get(i).message);
+                marker.setAttribute(IMarker.LINE_NUMBER, validationInfos.get(i).lineNum);
+                marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
+            }
+            return null;
+        }
+
+        switch (kind) {
+            case INCREMENTAL_BUILD:
+            case AUTO_BUILD:
+                final IPath xmlPath = new Path(CodeGeneratorConstants.FILE_LAYOUT_META);
+                final IPath customThemePath = new Path(CodeGeneratorConstants.FILE_CUSTOM_THEME);
+                final IPath managedPath = new Path(CodeGeneratorConstants.DIRECTORY_MANAGED);
+
+                final AtomicBoolean bNeedGeneration = new AtomicBoolean();
+
+                IResourceDelta delta = getDelta(project);
+                if (delta != null) {
+                    delta.accept(new IResourceDeltaVisitor() {
+                        @Override
+                        public boolean visit(IResourceDelta resourceDelta) throws CoreException {
+                            IPath projectRelativePath = resourceDelta.getProjectRelativePath();
+
+                            // if layout.xml is changed
+                            if (xmlPath.equals(projectRelativePath)) {
+                                bNeedGeneration.set(true);
+                            }
+
+                            // if managed code is changed.
+                            if (managedPath.isPrefixOf(projectRelativePath)) {
+                                bNeedGeneration.set(true);
+                            }
+
+                            // if custom theme is created or removed.
+                            if (customThemePath.equals(projectRelativePath)) {
+                                bNeedGeneration.set(true);
+                            }
+                            return !bNeedGeneration.get();
+                        }
+                    });
+                }
+
+                if (bNeedGeneration.get() == false) {
+                    break;
+                }
+            case FULL_BUILD:
+                logger.trace("Generate C/C++ codes from layout.xml.");
+                build(project);
+                break;
+            case CLEAN_BUILD:
+                logger.info("CLEAN_BUILD");
+                break;
+            default:
+                break;
+        }
+        return null;
+    }
+
+    private void build(IProject project) throws CoreException {
+        ICodeGenerator codeGenerator = new CodeGenerator(project);
+        try {
+            codeGenerator.generate();
+        } catch (CodeGeneratorException e) {
+            throw new CoreException(Status.CANCEL_STATUS);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.core.resources.IncrementalProjectBuilder#clean(org.eclipse.core.runtime.
+     * IProgressMonitor)
+     */
+    @Override
+    protected void clean(IProgressMonitor monitor) throws CoreException {
+        IProject project = getProject();
+        ICodeGenerator codeGenerator = new CodeGenerator(project);
+        try {
+            codeGenerator.clean();
+        } catch (CodeGeneratorException e) {
+            throw new CoreException(Status.CANCEL_STATUS);
+        }
+        IFile fFile = project.getFile(CodeGeneratorConstants.FILE_LAYOUT_META);
+        try {
+            fFile.deleteMarkers(MARKER_ID, false, IResource.DEPTH_ZERO);
+        } catch (CoreException e) {
+            logger.error(e.getMessage());
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/NUIBNature.java b/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/NUIBNature.java
new file mode 100644 (file)
index 0000000..6557f55
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.project.core;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.runtime.CoreException;
+
+
+public final class NUIBNature implements IProjectNature {
+    private static final String ID = "org.tizen.efluibuilder.nature"; //$NON-NLS-1$
+    private IProject project = null;
+
+    public static String getId() {
+        return ID;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject)
+     */
+    @Override
+    public void setProject(IProject project) {
+        this.project = project;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.core.resources.IProjectNature#getProject()
+     */
+    @Override
+    public IProject getProject() {
+        return project;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.core.resources.IProjectNature#configure()
+     */
+    @Override
+    public void configure() throws CoreException {
+        NUIBProjectUtil.setBuildSpec(getProject());
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.core.resources.IProjectNature#deconfigure()
+     */
+    @Override
+    public void deconfigure() throws CoreException {
+    }
+
+}
diff --git a/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/NUIBProjectUtil.java b/org.tizen.efluibuilder.project/src/org/tizen/efluibuilder/project/core/NUIBProjectUtil.java
new file mode 100644 (file)
index 0000000..cdfc0aa
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.project.core;
+
+import java.util.Arrays;
+
+import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.tizen.efluibuilder.utility.IDEUtil;
+
+
+public class NUIBProjectUtil {
+
+    private static final String FILE_LAYOUT_META = "layout/layout.xml";
+
+    public static void addNature(IProject project, IProgressMonitor monitor) throws ProcessFailureException {
+        IProjectDescription description = null;
+        try {
+            description = project.getDescription();
+        } catch (CoreException e) {
+            throw new ProcessFailureException(e.getMessage());
+        }
+        String[] natures = description.getNatureIds();
+        for (String nature : natures) {
+            if (nature.equals(NUIBNature.getId())) {
+                return;
+            }
+        }
+
+        String[] newNatures = Arrays.copyOf(natures, natures.length + 1);
+        newNatures[natures.length] = NUIBNature.getId();
+        description.setNatureIds(newNatures);
+        try {
+            project.setDescription(description, monitor);
+        } catch (CoreException e) {
+            throw new ProcessFailureException(e.getMessage());
+        }
+    }
+
+    public static boolean existNature(IProject project) throws ProcessFailureException {
+        IProjectDescription description = null;
+        try {
+            description = project.getDescription();
+        } catch (CoreException e) {
+            throw new ProcessFailureException(e.getMessage());
+        }
+        String[] natures = description.getNatureIds();
+        for (String nature : natures) {
+            if (nature.equals(NUIBNature.getId())) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    public static void open(IProject project) throws ProcessFailureException {
+        IFile file = project.getFile(FILE_LAYOUT_META);
+        if (file.exists()) {
+            IDEUtil.open(file);
+        } else {
+            throw new ProcessFailureException(Messages.MESSAGE_DIALOG_LAYOUT_FILE_NOT_FOUND);
+        }
+    }
+
+    public static void setBuildSpec(IProject project) throws CoreException {
+        IProjectDescription description = project.getDescription();
+        ICommand[] commands = description.getBuildSpec();
+
+        // if builder already exist in project
+        for (int i = 0; i < commands.length; i++) {
+            if (commands[i].getBuilderName().equals(NUIBBuilder.getId())) {
+                return;
+            }
+        }
+
+        ICommand[] newCommands = new ICommand[commands.length + 1];
+        System.arraycopy(commands, 0, newCommands, 1, commands.length);
+        ICommand command = description.newCommand();
+        command.setBuilderName(NUIBBuilder.getId());
+        newCommands[0] = command;
+        description.setBuildSpec(newCommands);
+        project.setDescription(description, null);
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/.classpath b/org.tizen.efluibuilder.projectmigrator/.classpath
new file mode 100644 (file)
index 0000000..16d067f
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.efluibuilder.projectmigrator/.project b/org.tizen.efluibuilder.projectmigrator/.project
new file mode 100644 (file)
index 0000000..efcdad0
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.efluibuilder.projectmigrator</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.efluibuilder.projectmigrator/.settings/org.eclipse.jdt.core.prefs b/org.tizen.efluibuilder.projectmigrator/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..0c68a61
--- /dev/null
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.tizen.efluibuilder.projectmigrator/META-INF/MANIFEST.MF b/org.tizen.efluibuilder.projectmigrator/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..e5c6740
--- /dev/null
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: ProjectMigrator
+Bundle-SymbolicName: org.tizen.efluibuilder.projectmigrator;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.tizen.efluibuilder.projectmigrator.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.cdt.core,
+ org.eclipse.ui.ide,
+ org.eclipse.core.resources,
+ org.eclipse.core.expressions,
+ org.eclipse.cdt.managedbuilder.core,
+ org.tizen.common,
+ org.tizen.nativecommon,
+ org.tizen.efluibuilder.common,
+ org.tizen.efluibuilder.project,
+ org.tizen.common.sign.ui,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.jface.text,
+ org.eclipse.cdt.ui,
+ org.eclipse.ltk.core.refactoring
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.ui.navigator.resources,
+ org.tizen.common.ui.color,
+ org.tizen.common.ui.font,
+ org.tizen.common.ui.wizards.project.template.widgets,
+ org.tizen.efluibuilder.core.configurator,
+ org.tizen.efluibuilder.ui.resources
diff --git a/org.tizen.efluibuilder.projectmigrator/build.properties b/org.tizen.efluibuilder.projectmigrator/build.properties
new file mode 100644 (file)
index 0000000..e96cdea
--- /dev/null
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               res/,\
+               plugin.xml
diff --git a/org.tizen.efluibuilder.projectmigrator/plugin.xml b/org.tizen.efluibuilder.projectmigrator/plugin.xml
new file mode 100644 (file)
index 0000000..5b7cc36
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+       <extension
+               point="org.eclipse.core.expressions.propertyTesters">
+               <propertyTester
+                       class="org.tizen.efluibuilder.projectmigrator.ManageUserViewTester"
+                       id="org.tizen.efluibuilder.projectmigrator.ManageUserViewTester"
+                       namespace="org.tizen.efluibuilder.projectmigrator"
+                       properties="isNUIBProject"
+                       type="java.lang.Object">
+               </propertyTester>
+       </extension>
+       <extension
+               point="org.eclipse.ui.handlers">
+               <handler
+                       commandId="org.tizen.uibuilder.projectmigrator.manageuserviewcommand"
+                       class="org.tizen.efluibuilder.projectmigrator.ManageUserViewHandler">
+                       <enabledWhen>
+                       <with variable="selection">
+                               <adapt type="java.lang.Object">
+                               <test forcePluginActivation="true" property="org.tizen.efluibuilder.projectmigrator.isNUIBProject" />
+                               </adapt>
+                       </with>
+               </enabledWhen>
+               </handler>
+       </extension>
+       <extension
+               point="org.eclipse.ui.commands">
+               <command
+                       id="org.tizen.uibuilder.projectmigrator.manageuserviewcommand"
+                       name="UserViewCommand">
+               </command>
+       </extension>
+       <extension
+               point="org.eclipse.ui.menus">
+               <!-- <menuContribution
+                       locationURI="popup:common.new.menu?after=additions"> -->
+               <menuContribution
+            locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions">
+                       <command
+                               commandId="org.tizen.uibuilder.projectmigrator.manageuserviewcommand"
+                               label="Manage User Views"
+                               tooltip="Manage User Views">
+                               <visibleWhen
+                                       checkEnabled="false">
+                                       <with variable="selection">
+                                               <iterate
+                                                       ifEmpty="false">
+                                                       <adapt type="org.eclipse.core.resources.IResource">
+                                                               <test property="org.tizen.nativecommon.isTizenProject"/>
+                                                       </adapt>
+                                               </iterate>
+                                       </with>
+                               </visibleWhen>
+                       </command>
+               </menuContribution>
+       </extension>
+               <extension
+               point="org.eclipse.core.expressions.propertyTesters">
+               <propertyTester
+                       class="org.tizen.efluibuilder.projectmigrator.ConvertTester"
+                       id="org.tizen.efluibuilder.projectmigrator.ConvertTester"
+                       namespace="org.tizen.efluibuilder.projectmigrator"
+                       properties="CanBeNUIBProject"
+                       type="java.lang.Object">
+               </propertyTester>
+       </extension>
+       <extension
+               point="org.eclipse.ui.handlers">
+               <handler
+                       commandId="org.tizen.uibuilder.projectmigrator.convertercommand"
+                       class="org.tizen.efluibuilder.projectmigrator.ConvertHandler">
+                       <enabledWhen>
+                       <with variable="selection">
+                               <adapt type="java.lang.Object">
+                               <test forcePluginActivation="true" property="org.tizen.efluibuilder.projectmigrator.CanBeNUIBProject" />
+                               </adapt>
+                       </with>
+               </enabledWhen>
+               </handler>
+       </extension>
+       <extension
+               point="org.eclipse.ui.commands">
+               <command
+                       id="org.tizen.uibuilder.projectmigrator.convertercommand"
+                       name="EnableNUIBCommand">
+               </command>
+       </extension>
+       <extension
+               point="org.eclipse.ui.menus">
+               <!-- <menuContribution
+                       locationURI="popup:common.new.menu?after=additions"> -->
+               <menuContribution
+            locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions">
+                       <command
+                               commandId="org.tizen.uibuilder.projectmigrator.convertercommand"
+                               label="Convert to UI Builder Project"
+                               tooltip="Convert to UI Builder Project">
+                               <visibleWhen
+                                       checkEnabled="false">
+                                       <with variable="selection">
+                                               <iterate
+                                                       ifEmpty="false">
+                                                       <adapt type="org.eclipse.core.resources.IResource">
+                                                               <test property="org.tizen.nativecommon.isTizenProject"/>
+                                                       </adapt>
+                                               </iterate>
+                                       </with>
+                               </visibleWhen>
+                       </command>
+               </menuContribution>
+       </extension>
+</plugin>
diff --git a/org.tizen.efluibuilder.projectmigrator/res/template/user_view b/org.tizen.efluibuilder.projectmigrator/res/template/user_view
new file mode 100644 (file)
index 0000000..9f702f9
--- /dev/null
@@ -0,0 +1,61 @@
+/*******************************************************************************
+* This file was generated by UI Builder.
+* User should hand edit this file.
+********************************************************************************/
+
+#include "app_main.h"
+#include "uib_app_manager.h"
+#include "uib_views.h"
+#include "uib_views_inc.h"
+
+/**
+ * @brief the user clicked the button (press/release).
+ *
+ * @param vc - A context of the generated view.
+ * @param obj - A UI component itself that emits the event signal.
+ * @param event_info - Information about the event signal. The default value is NULL.
+ *             event_info is NULL
+ *
+ */
+//void user_view_button_onclicked(uib_view_context *vc, Evas_Object *obj, void *event_info) {
+//     //Switch to view1
+//    uib_util_push_view("view1");
+//}
+
+
+/**
+ * @brief When the user view is shown, this function will be call
+ *
+ * @param win_obj - A window object which contains elementary window, bg, conformant naviframe(built-in view manager), and etc. 
+ * @param vc - A context of the generated view.
+ *
+ */
+void uib_uview_${user_view_name}_create_cb(window_obj* win_obj, uib_view_context* vc) {
+       /* initialize elm_win rotation. */
+
+       if (elm_win_wm_rotation_supported_get(win_obj->win)) {
+               int rots[4] = { 0, 90, 180, 270 };
+               elm_win_wm_rotation_available_rotations_set(win_obj->win, (const int *)(&rots), 4);
+       }
+       /* initialize indicator of elm_win. */
+       elm_win_indicator_mode_set(win_obj->win, ELM_WIN_INDICATOR_SHOW);
+       elm_win_indicator_opacity_set(win_obj->win, ELM_WIN_INDICATOR_OPAQUE);
+
+  // TODO: User-define codes
+  /* // Example of hand coding
+     // * Please connect the top-level UI component of the a view based by your EFL code to the parent Evas_Object provided by UI Builder View System.
+       Evas_Object* button = elm_button_add(vc->parent);
+       if (button) {
+               evas_object_size_hint_align_set(button, -1.0, -1.0);
+               evas_object_size_hint_weight_set(button, 1.0, 1.0);
+               elm_object_text_set(button,_UIB_LOCALE("<align=center>Hello Tizen User View1</align>"));
+               elm_object_style_set(button,"dropdown");
+               evas_object_show(button);
+       }
+
+       // evas_object_smart_callback_add(button, "clicked", (Evas_Smart_Cb)user_view_button_onclicked, vc); // Add event handler
+
+       // * Please assign the top-level UI component of view based by your EFL code to the root UI component of the UI Builder View System. 
+       vc->root_container = button;
+       */
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/Activator.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/Activator.java
new file mode 100644 (file)
index 0000000..2608d3b
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.projectmigrator;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+       // The plug-in ID
+       public static final String PLUGIN_ID = "org.tizen.efluibuilder.projectmigrator"; //$NON-NLS-1$
+
+       // The shared instance
+       private static Activator plugin;
+       
+       /**
+        * The constructor
+        */
+       public Activator() {
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+        */
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+               plugin = this;
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+        */
+       public void stop(BundleContext context) throws Exception {
+               plugin = null;
+               super.stop(context);
+       }
+
+       /**
+        * Returns the shared instance
+        *
+        * @return the shared instance
+        */
+       public static Activator getDefault() {
+               return plugin;
+       }
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ConvertHandler.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ConvertHandler.java
new file mode 100644 (file)
index 0000000..2b92f34
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.tizen.efluibuilder.projectmigrator.ui.dialog.ProjectMigratorWizardDialog;
+import org.tizen.efluibuilder.projectmigrator.ui.wizards.ProjectMigratorWizard;
+
+
+public class ConvertHandler extends AbstractHandler {
+
+    @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        // Get the project from the initiating event if at all possible
+        IProject project = extractProject(event);
+        if (project == null) {
+            return null;
+        }
+
+        Shell shell = Display.getDefault().getActiveShell();
+
+        ProjectMigratorWizard wizard = new ProjectMigratorWizard();
+        ProjectMigratorWizardDialog dialog = new ProjectMigratorWizardDialog(shell, wizard);
+
+        wizard.setModel(ProjectMigratorUtil.getPlatformProfile(project), project);
+        dialog.open();
+        wizard.dispose();
+        return null;
+    }
+
+    private IProject extractProject(ExecutionEvent event) {
+        IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
+        // Get the active WorkbenchPage
+        if (window != null) {
+            IWorkbenchPage activePage = window.getActivePage();
+            if (activePage != null) {
+                // Get the Selection from the active WorkbenchPage page
+                ISelection selection = activePage.getSelection();
+                if (selection instanceof ITreeSelection) {
+                    TreeSelection treeSelection = (TreeSelection) selection;
+                    TreePath[] treePaths = treeSelection.getPaths();
+                    TreePath treePath = treePaths[0];
+
+                    // The first segment should be a IProject
+                    Object firstSegmentObj = treePath.getFirstSegment();
+                    if (firstSegmentObj != null) {
+                        IProject project = ((IAdaptable) firstSegmentObj).getAdapter(IProject.class);
+
+                        return project;
+                    }
+                }
+            }
+        }
+
+        return null;
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ConvertTester.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ConvertTester.java
new file mode 100644 (file)
index 0000000..7b8789b
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator;
+
+import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.TizenProjectType;
+import org.tizen.efluibuilder.project.core.NUIBProjectUtil;
+import org.tizen.nativecommon.ProjectUtil;
+
+
+public class ConvertTester extends PropertyTester {
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+    private static final String UI_APP_TYPE = "UI"; //$NON-NLS-1$
+    private static final String PROPERTY_TESTER_CAN_BE_NUIB = "CanBeNUIBProject"; //$NON-NLS-1$
+
+    @Override
+    public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+        if (PROPERTY_TESTER_CAN_BE_NUIB.equals(property)) {
+            if (receiver instanceof TreeSelection) {
+                TreeSelection treeSelection = (TreeSelection) receiver;
+                TreePath[] treePaths = treeSelection.getPaths();
+                if (treePaths.length == 0) {
+                    return false;
+                }
+                TreePath treePath = treePaths[0];
+                Object firstSegmentObj = treePath.getFirstSegment();
+                if (!(firstSegmentObj instanceof IProject)) {
+                    return false;
+                }
+                IProject project = ((IAdaptable) firstSegmentObj).getAdapter(IProject.class);
+                TizenProjectType tizenProjectType = ProjectUtil.getTizenProjectType(project);
+                if (tizenProjectType == null) {
+                    return false;
+                }
+
+                // TODO does need to check it?
+                if (!tizenProjectType.isNativeApplicationProject()) {
+                    return false;
+                }
+
+                // TODO does need to check it?
+                TizenProjectType projectType = ProjectUtil.getTizenProjectType(project);
+                if (projectType != null) {
+                    String appType = projectType.getAppType();
+
+                    if (!UI_APP_TYPE.equals(appType)) {
+                        return false;
+                    }
+                }
+                try {
+                    if (!NUIBProjectUtil.existNature(project)) {
+                        return true;
+                    }
+                } catch (ProcessFailureException e) {
+                    logger.error(e.getMessage());
+                }
+            }
+        }
+        return false;
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/IProjectMigrator.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/IProjectMigrator.java
new file mode 100644 (file)
index 0000000..cfe8fa1
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+
+public interface IProjectMigrator {
+
+    public void convertToUIB(ProjectConvertParam projectConvertParam, IProgressMonitor monitor);
+
+    public void updateUserViews(List<String> userViews, List<String> deletedViews, String startUpView, IProgressMonitor monitor);
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ManageUserViewHandler.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ManageUserViewHandler.java
new file mode 100644 (file)
index 0000000..9b26bd2
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.tizen.efluibuilder.projectmigrator.ui.dialog.ProjectMigratorWizardDialog;
+import org.tizen.efluibuilder.projectmigrator.ui.wizards.ProjectMigratorWizard;
+
+
+public class ManageUserViewHandler extends AbstractHandler {
+
+    @Override
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        // Get the project from the initiating event if at all possible
+        IProject project = extractProject(event);
+        if (project == null) {
+            return null;
+        }
+
+        Shell shell = Display.getDefault().getActiveShell();
+
+        ProjectMigratorWizard wizard = new ProjectMigratorWizard();
+        ProjectMigratorWizardDialog dialog = new ProjectMigratorWizardDialog(shell, wizard);
+
+        wizard.setModel(ProjectMigratorConstants.WIZARD_MODE_MANAGEMENT_USER_VIEW, project);
+        dialog.open();
+        wizard.dispose();
+        return null;
+    }
+
+    private IProject extractProject(ExecutionEvent event) {
+        IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
+        if (window != null) {
+            // Get the active WorkbenchPage
+            IWorkbenchPage activePage = window.getActivePage();
+
+            // Get the Selection from the active WorkbenchPage page
+            ISelection selection = activePage.getSelection();
+            if (selection instanceof ITreeSelection) {
+                TreeSelection treeSelection = (TreeSelection) selection;
+                TreePath[] treePaths = treeSelection.getPaths();
+                TreePath treePath = treePaths[0];
+
+                // The first segment should be a IProject
+                Object firstSegmentObj = treePath.getFirstSegment();
+                if (firstSegmentObj != null) {
+                    IProject project = ((IAdaptable) firstSegmentObj).getAdapter(IProject.class);
+                    return project;
+                }
+            }
+        }
+
+        return null;
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ManageUserViewTester.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ManageUserViewTester.java
new file mode 100644 (file)
index 0000000..e25bc60
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator;
+
+import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.TizenProjectType;
+import org.tizen.efluibuilder.project.core.NUIBProjectUtil;
+import org.tizen.nativecommon.ProjectUtil;
+
+
+public class ManageUserViewTester extends PropertyTester {
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+    private static final String UI_APP_TYPE = "UI"; //$NON-NLS-1$
+    private static final String PROPERTY_TESTER_IS_NUIB = "isNUIBProject"; //$NON-NLS-1$
+
+    @Override
+    public boolean test(Object receiver, String property, Object[] arg2, Object arg3) {
+        if (PROPERTY_TESTER_IS_NUIB.equals(property)) {
+            if (receiver instanceof TreeSelection) {
+                TreeSelection treeSelection = (TreeSelection) receiver;
+                TreePath[] treePaths = treeSelection.getPaths();
+                if (treePaths.length == 0) {
+                    return false;
+                }
+                TreePath treePath = treePaths[0];
+                Object firstSegmentObj = treePath.getFirstSegment();
+                if (!(firstSegmentObj instanceof IProject)) {
+                    return false;
+                }
+                IProject project = ((IAdaptable) firstSegmentObj).getAdapter(IProject.class);
+                TizenProjectType tizenProjectType = ProjectUtil.getTizenProjectType(project);
+                if (tizenProjectType == null) {
+                    return false;
+                }
+
+                // TODO does need to check it?
+                if (!tizenProjectType.isNativeApplicationProject()) {
+                    return false;
+                }
+
+                // TODO does need to check it?
+                TizenProjectType projectType = ProjectUtil.getTizenProjectType(project);
+                if (projectType != null) {
+                    String appType = projectType.getAppType();
+                    if (!UI_APP_TYPE.equals(appType)) {
+                        return false;
+                    }
+                }
+
+                try {
+                    if (NUIBProjectUtil.existNature(project)) {
+                        return true;
+                    }
+                } catch (ProcessFailureException e) {
+                    logger.error(e.getMessage());
+                }
+            }
+        }
+        return false;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectConvertParam.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectConvertParam.java
new file mode 100644 (file)
index 0000000..4eed4f5
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator;
+
+import java.util.List;
+
+
+public class ProjectConvertParam {
+
+    public ProjectConvertParam(boolean isShapeCircle, boolean isUIBAppEntry, List<String> userViews, List<String> deletedUserViews,
+            String startupViewName,
+            boolean isOverwriteMode,
+            String appEntryRelativeFilePath) {
+        this.isShapeCircle = isShapeCircle;
+        this.isUIBAppEntry = isUIBAppEntry;
+        this.userViews = userViews;
+        this.deletedUserViews = deletedUserViews;
+        this.startupViewName = startupViewName;
+        this.appEntryRelativeFilePath = appEntryRelativeFilePath;
+    }
+
+    private boolean isShapeCircle;
+    private boolean isUIBAppEntry;
+    private List<String> userViews;
+    private List<String> deletedUserViews;
+    private String startupViewName;
+    private String appEntryRelativeFilePath;
+    private String cloneProjectName;
+
+    public ProjectConvertParam() {
+
+    }
+
+    public boolean isShapeCircle() {
+        return isShapeCircle;
+    }
+
+    public void setShapeCircle(boolean isShapeCircle) {
+        this.isShapeCircle = isShapeCircle;
+    }
+
+    public boolean isUIBAppEntry() {
+        return isUIBAppEntry;
+    }
+
+    public void setUIBAppEntry(boolean isUIBAppEntry) {
+        this.isUIBAppEntry = isUIBAppEntry;
+    }
+
+    public List<String> getUserViews() {
+        return userViews;
+    }
+
+    public void setUserViews(List<String> userViews) {
+        this.userViews = userViews;
+    }
+
+    public List<String> getDeletedUserViews() {
+        return deletedUserViews;
+    }
+
+    public void setDeletedUserViews(List<String> deletedUserViews) {
+        this.deletedUserViews = deletedUserViews;
+    }
+
+    public String getStartupViewName() {
+        return startupViewName;
+    }
+
+    public void setStartupViewName(String startupViewName) {
+        this.startupViewName = startupViewName;
+    }
+
+    public String getAppEntryRelativeFilePath() {
+        return appEntryRelativeFilePath;
+    }
+
+    public void setAppEntryRelativeFilePath(String appEntryRelativeFilePath) {
+        this.appEntryRelativeFilePath = appEntryRelativeFilePath;
+    }
+
+    public String getCloneProjectName() {
+        return cloneProjectName;
+    }
+
+    public void setCloneProjectName(String cloneProjectName) {
+        this.cloneProjectName = cloneProjectName;
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigrator.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigrator.java
new file mode 100644 (file)
index 0000000..2c46fc4
--- /dev/null
@@ -0,0 +1,374 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.application.InstallPathConfig;
+import org.tizen.common.util.DialogUtil;
+import org.tizen.efluibuilder.projectmigrator.codewriter.ASTManager;
+import org.tizen.efluibuilder.projectmigrator.codewriter.CodeWriterConstants;
+import org.tizen.efluibuilder.projectmigrator.codewriter.CodeWriterException;
+import org.tizen.efluibuilder.projectmigrator.codewriter.UserViewGenerator;
+import org.tizen.efluibuilder.projectmigrator.codewriter.visitor.UserViewAddVisitor;
+import org.tizen.efluibuilder.projectmigrator.codewriter.visitor.UserViewRemoveVisitor;
+import org.tizen.efluibuilder.projectmigrator.codewriter.visitor.NUIBAppEntryAddVisitor;
+import org.tizen.efluibuilder.projectmigrator.codewriter.visitor.MethodCheckVisitor;
+import org.tizen.efluibuilder.projectmigrator.ui.message.Messages;
+import org.tizen.efluibuilder.projectmigrator.util.FileUtil;
+import org.tizen.efluibuilder.projectmigrator.util.StringUtil;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+import org.tizen.nativecommon.build.CommonConfigurationManager;
+
+
+public class ProjectMigrator implements IProjectMigrator {
+
+    private IProject project;
+    private boolean isProjectCloned = false;
+    private ASTManager astManager;
+
+    private static Map<String, String> copyTargetFileMap = createCopyTargetFileMap();
+    private static Map<String, String> mainParam = createMainParamMap();
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    private static Map<String, String> createCopyTargetFileMap() {
+        Map<String, String> element = new HashMap<String, String>();
+        element.put(ProjectMigratorConstants.RES_APP_MAIN_H_PATH, ProjectMigratorConstants.APP_MAIN_H_PATH);
+        element.put(ProjectMigratorConstants.RES_APP_MAIN_C_PATH, ProjectMigratorConstants.APP_MAIN_C_PATH);
+        element.put(ProjectMigratorConstants.RES_LAYOUT_XML_PATH, ProjectMigratorConstants.LAYOUT_XML_PATH);
+        element.put(ProjectMigratorConstants.RES_UPROJECT_PATH, ProjectMigratorConstants.UPROJECT_PATH);
+        return Collections.unmodifiableMap(element);
+    }
+
+    private static Map<String, String> createMainParamMap() {
+        Map<String, String> param = new HashMap<String, String>();
+        param.put("argc", "int"); //$NON-NLS-1$ //$NON-NLS-2$
+        param.put("*argv[]", "char"); //$NON-NLS-1$ //$NON-NLS-2$
+        return Collections.unmodifiableMap(param);
+    }
+
+    public ProjectMigrator(IProject project) {
+        this.project = project;
+    }
+
+    public synchronized ASTManager getASTManager() {
+        if (astManager == null) {
+            astManager = new ASTManager();
+        }
+        return astManager;
+    }
+
+    public void setASTManager(ASTManager astManager) {
+        this.astManager = astManager;
+    }
+
+    @Override
+    public void convertToUIB(ProjectConvertParam projectConvertParam, IProgressMonitor monitor) {
+        try {
+            // validation
+            if (!isExistAppEntry(projectConvertParam.getAppEntryRelativeFilePath())) {
+                return;
+            }
+
+            monitor.beginTask(Messages.PROGRESS_MSG_CONVERT_BEGINTASK, ProjectMigratorConstants.MAX_WORKED_TOTAL_TICKS);
+
+            // following codes are sub task.
+
+            // == backup current project: 1st
+            if (!cloneProject(projectConvertParam.getCloneProjectName(), monitor)) {
+                return; // cancel
+            }
+
+            // == create layout folder: 2nd
+            if (!createLayoutFolder(project, monitor)) {
+                return; // cancel
+            }
+
+            // == copy related files: 3rd
+            // app_main.h, app_main.c, layout.xml, .uproject
+            if (!copyRelatedFiles(project, getBaseTemplatePath(ProjectMigratorUtil.getPlatformProfile(project), ProjectMigratorUtil.getPlatformVersion(project),
+                                                               projectConvertParam.isShapeCircle()),
+                                  monitor)) {
+                return; // cancel
+            }
+
+            // == append include path to compiler: 4th
+            if (!appendIncludePath(project, monitor)) {
+                return; // cancel
+            }
+
+            // == add NUIB App Entry to projectName.c: 5th
+            if (!addNUIBAppEntry(project, projectConvertParam.isUIBAppEntry(), projectConvertParam.getAppEntryRelativeFilePath(), monitor)) {
+                return; // cancel
+            }
+
+            // add user view to app_main.c: 6th
+            // create user view files
+            if (!addUserViews(projectConvertParam.getUserViews(), null, projectConvertParam.getStartupViewName(), monitor)) {
+                return; // cancel
+            }
+        } catch (ProjectMigratorException | CodeWriterException e) {
+            logger.error(e.getMessage());
+            logger.error(StringUtil.getStackTraceToString(e));
+            try {
+                if (isProjectCloned) {
+                    FileUtil.deleteProject(project);
+                }
+            } catch (CoreException e1) {
+                logger.error("Failed to delete %s project by Exception", project.getName()); //$NON-NLS-1$
+
+            }
+            DialogUtil.openErrorDialog(Messages.WIZARD_TITLE_CONVERTER, e.getMessage());
+        } finally {
+            monitor.done();
+        }
+    }
+
+    private void doProcessUserViews(List<String> userViews, List<String> deletedViews, String startUpView, int userViewTotalTicks, IProgressMonitor monitor)
+            throws ProjectMigratorException, CodeWriterException {
+        int workedTickStep = userViewTotalTicks / 2;
+        int workedRemainTick = userViewTotalTicks;
+        monitor.subTask(Messages.bind(Messages.PROGRESS_MSG_SUBTASK_DO_PROCESS_USER_VIEW_FILE, ""));
+
+        IFile file = FileUtil.getFile(project, CodeWriterConstants.SRC_PATH, CodeWriterConstants.APP_MAIN_C);
+        UserViewRemoveVisitor removeVisitor = new UserViewRemoveVisitor(userViews, startUpView);
+        getASTManager().visit(file, ITranslationUnit.AST_SKIP_ALL_HEADERS, removeVisitor);
+
+        UserViewAddVisitor insertVisitor = new UserViewAddVisitor(userViews, startUpView);
+        getASTManager().visit(file, ITranslationUnit.AST_SKIP_ALL_HEADERS, insertVisitor);
+
+        // create user_view folder in src
+        try {
+            FileUtil.createFolder(project, CodeWriterConstants.USER_VIEW_PATH);
+        } catch (CoreException e) {
+            logger.error(e.getMessage());
+            throw new ProjectMigratorException(Messages.bind(Messages.CORE_EXCEPTION_MSG_CREATE_FOLDER,
+                                                             CodeWriterConstants.USER_VIEW_PATH));
+        }
+        UserViewGenerator generator = new UserViewGenerator(project);
+        generator.addUserViewFile(userViews, workedTickStep, monitor);
+        workedRemainTick -= workedTickStep;
+        generator.deleteUserviewFile(deletedViews, workedTickStep, monitor);
+        workedRemainTick -= workedTickStep;
+        monitor.worked(workedRemainTick);
+    }
+
+    private boolean addUserViews(List<String> userViews, List<String> deletedViews, String startUpView, IProgressMonitor monitor)
+            throws ProjectMigratorException, CodeWriterException {
+        int addUserViewsTotalTicks = ProjectMigratorConstants.WORKED_TICKS_ADD_USER_VIEWS;
+
+        doProcessUserViews(userViews, deletedViews, startUpView, addUserViewsTotalTicks, monitor);
+
+        if (monitor.isCanceled()) { // convert mode?
+            recoveryProject(monitor);
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public void updateUserViews(List<String> userViews, List<String> deletedViews, String startUpView, IProgressMonitor monitor) {
+        int updateUserViewsTotalTicks = ProjectMigratorConstants.MAX_WORKED_TOTAL_TICKS;
+        monitor.beginTask(Messages.PROGRESS_MSG_UPDATE_USER_VIEW_BEGINTASK, updateUserViewsTotalTicks);
+
+        try {
+            doProcessUserViews(userViews, deletedViews, startUpView, updateUserViewsTotalTicks, monitor);
+        } catch (ProjectMigratorException | CodeWriterException e) {
+            logger.error(e.getMessage());
+            logger.error(StringUtil.getStackTraceToString(e));
+            DialogUtil.openErrorDialog(Messages.WIZARD_TITLE_USER_VIEW, e.getMessage());
+        } finally {
+            monitor.done();
+        }
+    }
+
+    private boolean isExistAppEntry(String appEntryRelativeFilePath) throws CodeWriterException, ProjectMigratorException {
+        if (appEntryRelativeFilePath == null) {
+            throw new ProjectMigratorException(Messages.CORE_EXCEPTION_MSG_PRE_VALIDATION_NO_FILE_SELECTED);
+        }
+
+        IFile file = FileUtil.getFile(project, appEntryRelativeFilePath);
+        MethodCheckVisitor visitor = new MethodCheckVisitor(ProjectMigratorConstants.MAIN_FUNCTION, IASTSimpleDeclSpecifier.t_int, mainParam);
+        getASTManager().visit(file, ITranslationUnit.AST_SKIP_ALL_HEADERS | ITranslationUnit.AST_SKIP_FUNCTION_BODIES, visitor);
+        boolean exist = visitor.isExist();
+        if (!exist) {
+            throw new ProjectMigratorException(Messages.bind(Messages.CORE_EXCEPTION_MSG_CANNOT_FIND_APP_ENTRY, appEntryRelativeFilePath));
+        }
+        return exist;
+    }
+
+    private void recoveryProject(IProgressMonitor monitor) throws ProjectMigratorException {
+        String cloneProjectName = project.getName();
+        monitor.subTask(Messages.bind(Messages.PROGRESS_MSG_SUBTASK_RECORVERY, cloneProjectName));
+        try {
+            FileUtil.deleteProject(project);
+            logger.debug("The %s project was canceld", cloneProjectName); //$NON-NLS-1$
+        } catch (CoreException e) {
+            logger.error(e.getMessage());
+            throw new ProjectMigratorException(Messages.CORE_EXCEPTION_MSG_CANNOT_FIND_APP_ENTRY);
+        }
+        monitor.worked(5);
+    }
+
+    private boolean createLayoutFolder(IProject project, IProgressMonitor monitor) throws ProjectMigratorException {
+        monitor.subTask(Messages.PROGRESS_MSG_SUBTASK_CREATE_LAYOUT_FOLADER);
+        try {
+            FileUtil.createFolder(project, ProjectMigratorConstants.LAYOUT_FOLDER);
+        } catch (CoreException e) {
+            logger.error(e.getMessage());
+            throw new ProjectMigratorException(Messages.bind(Messages.CORE_EXCEPTION_MSG_CREATE_FOLDER,
+                                                             project.getName()));
+        }
+        if (monitor.isCanceled()) {
+            recoveryProject(monitor);
+            return false;
+        }
+        monitor.worked(ProjectMigratorConstants.WORKED_TICKS_CREATE_LAYOUT_FOLDER);
+        return true;
+    }
+
+    private boolean addNUIBAppEntry(IProject project, boolean isNUIBEntry, String appEntryRelativeFilePath, IProgressMonitor monitor)
+            throws CodeWriterException, ProjectMigratorException {
+        monitor.subTask(Messages.PROGRESS_MSG_SUBTASK_SET_APP_ENTRY);
+        IFile file = FileUtil.getFile(project, appEntryRelativeFilePath);
+        NUIBAppEntryAddVisitor visitor =
+                new NUIBAppEntryAddVisitor(ProjectMigratorConstants.MAIN_FUNCTION, IASTSimpleDeclSpecifier.t_int, mainParam, isNUIBEntry);
+        getASTManager().visit(file, ITranslationUnit.AST_SKIP_ALL_HEADERS, visitor);
+        getASTManager().appendInclude(file, ProjectMigratorConstants.APP_MAIN_H);
+
+        if (monitor.isCanceled()) {
+            recoveryProject(monitor);
+            return false;
+        }
+        monitor.worked(ProjectMigratorConstants.WORKED_TICKS_ADD_NUIB_APP_ENTRY);
+        return true;
+    }
+
+    private boolean cloneProject(String cloneProjectName, IProgressMonitor monitor) throws ProjectMigratorException {
+        String srcProjectName = project.getName();
+        monitor.subTask(Messages.bind(Messages.PROGRESS_MSG_SUBTASK_CLONE_CUR_PROJECT, srcProjectName));
+        try {
+            this.project = FileUtil.cloneProject(srcProjectName, cloneProjectName);
+            this.isProjectCloned = true;
+        } catch (CoreException e) {
+            logger.error(e.getMessage());
+            throw new ProjectMigratorException(Messages.bind(Messages.CORE_EXCEPTION_MSG_CLONE_PROJECT, srcProjectName));
+        }
+        if (monitor.isCanceled()) {
+            recoveryProject(monitor);
+            return false;
+        }
+        monitor.worked(ProjectMigratorConstants.WORKED_TICKS_CLONE_PROJECT);
+        return true;
+    }
+
+    private boolean appendIncludePath(IProject project, IProgressMonitor monitor) throws ProjectMigratorException {
+        monitor.subTask(Messages.PROGRESS_MSG_SUBTASK_ADD_INCLUDE_PATH);
+        IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+
+        if (info != null) {
+            IConfiguration defaultConfig = info.getDefaultConfiguration();
+
+            for (IConfiguration config : defaultConfig.getManagedProject().getConfigurations()) {
+                CommonConfigurationManager.appendIncludePathToCompiler(config, ProjectMigratorConstants.MANAGED_INCLUDE_PATH);
+            }
+        }
+
+        ManagedBuildManager.saveBuildInfo(project, true);
+        if (monitor.isCanceled()) {
+            recoveryProject(monitor);
+            return false;
+        }
+        monitor.worked(ProjectMigratorConstants.WORKED_TICKS_APP_INCLUDE_PATH);
+        return true;
+    }
+
+    private String getBaseTemplatePath(String profile, String version, boolean isCircle) {
+        String sdkPath = InstallPathConfig.getSDKPath();
+        sdkPath = sdkPath + ProjectMigratorConstants.PROJECT_TEMPLATE_MIDDLE_PATH + version + "/" + profile;
+        if (ProjectMigratorConstants.PROFILE_WEARABLE.equals(profile)) {
+            if (isCircle) {
+                sdkPath = sdkPath + ProjectMigratorConstants.PROJECT_TEMPLATE_WEARABLE_CIRCLE_LAST_PATH;
+            } else {
+                sdkPath = sdkPath + ProjectMigratorConstants.PROJECT_TEMPLATE_WEARABLE_SQUARE_LAST_PATH;
+            }
+        } else {
+            sdkPath = sdkPath + ProjectMigratorConstants.PROJECT_TEMPLATE_MOBILE_LAST_PATH;
+        }
+
+        return sdkPath;
+    }
+
+    private boolean copyRelatedFiles(IProject project, String baseTemplatePath, IProgressMonitor monitor) throws ProjectMigratorException {
+        // copy related files from template to workspace
+        monitor.subTask(Messages.CORE_EXCEPTION_MSG_COPY_RELATED_FILES);
+        try {
+            Iterator<String> iterator = copyTargetFileMap.keySet().iterator();
+            while (iterator.hasNext()) {
+                String source = iterator.next();
+                copyFilesToProject(project, baseTemplatePath + source, copyTargetFileMap.get(source));
+            }
+        } catch (IOException e1) {
+            throw new ProjectMigratorException(Messages.CORE_EXCEPTION_MSG_COPY_RELATED_FILES);
+        } catch (CoreException e1) {
+            throw new ProjectMigratorException(Messages.CORE_EXCEPTION_MSG_COPY_RELATED_FILES);
+        }
+        if (monitor.isCanceled()) {
+            recoveryProject(monitor);
+            return false;
+        }
+        monitor.worked(ProjectMigratorConstants.WORKED_TICKS_COPY_RELATED_FILES);
+        return true;
+    }
+
+    private void copyFilesToProject(IProject project, String from, String to) throws IOException, CoreException {
+        String resRealPath = PlatformUtil.getCorrectedPath(from);
+        IFile file = project.getFile(to);
+        if (file.exists()) {
+            return;
+        }
+        String path = file.getLocation().toOSString();
+        Files.copy(Paths.get(resRealPath), Paths.get(path));
+        file.refreshLocal(IResource.DEPTH_ONE, null);
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigratorConstants.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigratorConstants.java
new file mode 100644 (file)
index 0000000..ba31479
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator;
+
+import org.tizen.efluibuilder.core.configurator.ConfiguratorConstants;
+
+
+public class ProjectMigratorConstants {
+
+    public static final String PROFILE_WEARABLE = "wearable"; //$NON-NLS-1$
+    public static final String VERSION_2_3_1 = "2.3.1"; //$NON-NLS-1$
+    public static final String SHAPE_SQUARE = "square"; //$NON-NLS-1$
+    public static final String SHAPE_CIRCLE = "circle"; //$NON-NLS-1$
+
+    public static final String PROJECT_TEMPLATE_MIDDLE_PATH = "/platforms/tizen-"; //$NON-NLS-1$
+    public static final String PROJECT_TEMPLATE_MOBILE_LAST_PATH = "/samples/Template/Native/uib-single-view"; //$NON-NLS-1$
+    public static final String PROJECT_TEMPLATE_WEARABLE_CIRCLE_LAST_PATH = "/samples/Template/Native/uib-single-view-circle"; //$NON-NLS-1$
+    public static final String PROJECT_TEMPLATE_WEARABLE_SQUARE_LAST_PATH = "/samples/Template/Native/uib-single-view"; //$NON-NLS-1$
+
+    public static final String RES_LAYOUT_XML_PATH = "/project/layout/layout.xml"; //$NON-NLS-1$
+    public static final String RES_UPROJECT_PATH = "/project/.uproject"; //$NON-NLS-1$
+    public static final String RES_APP_MAIN_H_PATH = "/project/inc/app_main.h"; //$NON-NLS-1$
+    public static final String RES_APP_MAIN_C_PATH = "/project/src/app_main.c"; //$NON-NLS-1$
+
+    public static final String APP_MAIN_H_PATH = "inc/app_main.h"; //$NON-NLS-1$
+    public static final String APP_MAIN_C_PATH = "src/app_main.c"; //$NON-NLS-1$
+    public static final String LAYOUT_XML_PATH = "layout/layout.xml"; //$NON-NLS-1$
+    public static final String UPROJECT_PATH = ".uproject"; //$NON-NLS-1$
+    public static final String LAYOUT_FOLDER = "layout"; //$NON-NLS-1$
+
+    public static final String MANAGED_INCLUDE_PATH = "\"${workspace_loc:/${ProjName}/src/managed/inc}\""; //$NON-NLS-1$
+
+    public static final String SRC_EXTENTION_FILTER = ".c"; //$NON-NLS-1$
+
+    public static final String MAIN_FUNCTION = "main"; //$NON-NLS-1$
+    public static final String APP_MAIN_H = "app_main.h"; //$NON-NLS-1$
+
+    // for wizard
+    public static final String WIZARD_MODE_CONVERT_PROFILE_MOBILE = ConfiguratorConstants.PROFILE_MOBILE;
+    public static final String WIZARD_MODE_CONVERT_PROFILE_WEARABLE = ConfiguratorConstants.PROFILE_WEARABLE;
+    public static final String WIZARD_MODE_MANAGEMENT_USER_VIEW = "MANAGEMENT_USER_VIEW"; // $NON-NLS-1$
+
+    // for AST's Visit
+    public static final String APP_ENTRY_RELATIVE_FILE_PATH = "appEntryRelativeFilePath"; // $NON-NLS-1$
+
+    public static final int MAX_WORKED_TOTAL_TICKS = 1000000;
+    public static final int WORKED_TICKS_CLONE_PROJECT = 150000;
+    public static final int WORKED_TICKS_CREATE_LAYOUT_FOLDER = 50000;
+    public static final int WORKED_TICKS_COPY_RELATED_FILES = 150000;
+    public static final int WORKED_TICKS_APP_INCLUDE_PATH = 50000;
+    public static final int WORKED_TICKS_ADD_NUIB_APP_ENTRY = 150000;
+
+    public static final int WORKED_TICKS_ADD_USER_VIEWS = 400000;
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigratorException.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigratorException.java
new file mode 100644 (file)
index 0000000..c95a561
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator;
+
+public class ProjectMigratorException extends Exception {
+    private static final long serialVersionUID = 6062652085229810786L;
+
+    public ProjectMigratorException(String message) {
+        super(message);
+    }
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigratorUtil.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ProjectMigratorUtil.java
new file mode 100644 (file)
index 0000000..036c986
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator;
+
+import org.eclipse.core.resources.IProject;
+import org.tizen.common.core.application.TizenProjectDescription;
+import org.tizen.common.util.ProjectUtil;
+
+
+public class ProjectMigratorUtil {
+
+    public static String getPlatformProfile(IProject project) {
+        TizenProjectDescription tizenProjectDescription = ProjectUtil.getTizenProjectDescription(project);
+        return tizenProjectDescription.getProfileName();
+    }
+
+    public static String getPlatformVersion(IProject project) {
+        TizenProjectDescription tizenProjectDescription = ProjectUtil.getTizenProjectDescription(project);
+        return tizenProjectDescription.getVersion();
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/ASTManager.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/ASTManager.java
new file mode 100644 (file)
index 0000000..028523f
--- /dev/null
@@ -0,0 +1,187 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.codewriter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IInclude;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.projectmigrator.codewriter.visitor.ReWriteVisitor;
+import org.tizen.efluibuilder.projectmigrator.ui.message.Messages;
+
+
+public final class ASTManager {
+
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+    private Map<String, ITranslationUnit> tus = new HashMap<String, ITranslationUnit>();
+    private Map<String, Map<Integer, IASTTranslationUnit>> asts = new HashMap<String, Map<Integer, IASTTranslationUnit>>();
+
+    public void visit(IFile file, int style, ASTVisitor visitor) throws CodeWriterException {
+        if (file == null || visitor == null) {
+            return;
+        }
+
+        IASTTranslationUnit ast = getAST(file, style);
+        if (ast != null) {
+            ast.accept(visitor);
+        }
+
+        if (visitor instanceof ReWriteVisitor) {
+            reWrite(file, (ReWriteVisitor) visitor);
+        }
+    }
+
+    public void appendInclude(IFile file, String include) throws CodeWriterException {
+        if (file == null || include == null) {
+            return;
+        }
+
+        ITranslationUnit translationUnit = getTranslationUnit(file);
+        if (translationUnit != null) {
+            try {
+                IInclude[] includes = translationUnit.getIncludes();
+                for (IInclude inc : includes) {
+                    if (include.equals(inc.getIncludeName())) {
+                        return;
+                    }
+                }
+
+                ICElement sibling = null;
+                if (includes.length > 0) {
+                    sibling = includes[0];
+                }
+                translationUnit.createInclude(include, false, sibling, null);
+            } catch (CModelException e) {
+                logger.error(e.getMessage());
+                throw new CodeWriterException(Messages.CORE_EXCEPTION_MSG_INTERNAL);
+            }
+        }
+    }
+
+    public void flushAll() {
+        asts.clear();
+        tus.clear();
+    }
+
+    public void flush(IFile file) {
+        if (file == null) {
+            return;
+        }
+
+        flushASTT(file);
+        flushTranslationUnit(file);
+    }
+
+    private void flushASTT(IFile file) {
+        asts.remove(file.getLocation().toString());
+    }
+
+    private void flushTranslationUnit(IFile file) {
+        tus.remove(file.getLocation().toString());
+    }
+
+    private void reWrite(IFile file, ReWriteVisitor visitor) throws CodeWriterException {
+        ASTRewrite astRewrite = visitor.getReWrite();
+        if (astRewrite != null) {
+            try {
+                Change c = astRewrite.rewriteAST();
+                c.perform(new NullProgressMonitor());
+            } catch (CoreException e) {
+                logger.error(e.getMessage());
+                throw new CodeWriterException(Messages.CORE_EXCEPTION_MSG_INTERNAL);
+            }
+        }
+        flush(file);
+    }
+
+    private IASTTranslationUnit getAST(IFile file, int style) throws CodeWriterException {
+        if (file == null || !file.exists()) {
+            return null;
+        }
+
+        IASTTranslationUnit ast = null;
+        Map<Integer, IASTTranslationUnit> map = asts.get(file.getLocation().toString());
+        if (map == null) {
+            map = new HashMap<Integer, IASTTranslationUnit>();
+            asts.put(file.getLocation().toString(), map);
+        }
+
+        ast = map.get(style);
+        if (ast == null) {
+            ast = createAST(file, style);
+            map.put(style, ast);
+        }
+
+        return ast;
+    }
+
+    private ITranslationUnit getTranslationUnit(IFile file) {
+        if (file == null || !file.exists()) {
+            return null;
+        }
+
+        ITranslationUnit iTranslationUnit = tus.get(file.getLocation().toString());
+        if (iTranslationUnit == null) {
+            iTranslationUnit = (ITranslationUnit) CoreModel.getDefault().create(file);
+            tus.put(file.getLocation().toString(), iTranslationUnit);
+        }
+
+        return iTranslationUnit;
+    }
+
+    private IASTTranslationUnit createAST(IFile file, int style) throws CodeWriterException {
+        if (file == null || !file.exists()) {
+            return null;
+        }
+
+        IASTTranslationUnit ast = null;
+        ITranslationUnit translationUnit = getTranslationUnit(file);
+        if (translationUnit == null) {
+            logger.error("Fail to get translationUnit"); //$NON-NLS-1$
+            throw new CodeWriterException(Messages.CORE_EXCEPTION_MSG_INTERNAL);
+        }
+
+        try {
+            ast = translationUnit.getAST(null, style);
+        } catch (CoreException e) {
+            logger.error(e.getMessage());
+            throw new CodeWriterException(Messages.CORE_EXCEPTION_MSG_INTERNAL);
+        }
+
+        return ast;
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/CodeWriterConstants.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/CodeWriterConstants.java
new file mode 100644 (file)
index 0000000..aaa6ccd
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.codewriter;
+
+import java.io.File;
+
+public class CodeWriterConstants {
+
+    public static final String DOUBLE_QUOTATION = "\""; //$NON-NLS-1$
+    public static final String TAB = "\t"; //$NON-NLS-1$
+    public static final String NEW_LINE = "\n"; //$NON-NLS-1$
+    public static final String SEPARATOR = "_"; //$NON-NLS-1$
+
+    public static final int USER_VIEW_WORD_COUNT = 5;
+    public static final String REPLACE_KEY_ID = "%id%"; //$NON-NLS-1$
+    public static final String ON_CREATE_CB = SEPARATOR + "on_create_cb"; //$NON-NLS-1$
+    public static final String USER_VIEW_DECLARE_FIRST_PREFIX = "uib"; //$NON-NLS-1$
+    public static final String USER_VIEW_DECLARE_SECOND_PREFIX = "uview"; //$NON-NLS-1$
+    public static final String USER_VIEW_DECLARE_SECOND_POSTFIX = "create"; //$NON-NLS-1$
+    public static final String USER_VIEW_DECLARE_FIRST_POSTFIX = "cb"; //$NON-NLS-1$
+    public static final String USER_VIEW_FIRST_PARAMETER_TYPE = "window_obj*"; //$NON-NLS-1$
+    public static final String USER_VIEW_FIRST_PARAMETER_NAME = "win_obj"; //$NON-NLS-1$
+    public static final String USER_VIEW_SECOND_PARAMETER_TYPE = "uib_view_context*"; //$NON-NLS-1$
+    public static final String USER_VIEW_SECOND_PARAMETER_NAME = "vc"; //$NON-NLS-1$
+
+    public static final String USER_VIEW_FIRST_PARAMETER = USER_VIEW_FIRST_PARAMETER_TYPE + " " + USER_VIEW_FIRST_PARAMETER_NAME; //$NON-NLS-1$
+    public static final String USER_VIEW_SECOND_PARAMETER = USER_VIEW_SECOND_PARAMETER_TYPE + " " + USER_VIEW_SECOND_PARAMETER_NAME; //$NON-NLS-1$
+
+    public static final String USER_VIEW_DECLARE_PREFIX =
+            USER_VIEW_DECLARE_FIRST_PREFIX + SEPARATOR + USER_VIEW_DECLARE_SECOND_PREFIX; // $NON-NLS-1$
+    public static final String USER_VIEW_DECLARE_POSTFIX =
+            USER_VIEW_DECLARE_SECOND_POSTFIX + SEPARATOR + USER_VIEW_DECLARE_FIRST_POSTFIX; // $NON-NLS-1$
+    public static final String USER_VIEW_CB = USER_VIEW_DECLARE_PREFIX + SEPARATOR + REPLACE_KEY_ID + SEPARATOR + USER_VIEW_DECLARE_POSTFIX; // $NON-NLS-1$
+
+    public static final String USER_VIEW_FUNCTION_DECLARE =
+            "void " + USER_VIEW_CB + "(" + USER_VIEW_FIRST_PARAMETER + "," + USER_VIEW_SECOND_PARAMETER + ")"; //$NON-NLS-1$
+
+    public static final String USER_VIEW_COMMENTS = "; // user_view"; // $NON-NLS-1$
+    public static final String USER_VIEW_DECLARE = USER_VIEW_FUNCTION_DECLARE + USER_VIEW_COMMENTS + NEW_LINE; // $NON-NLS-1$
+
+    public static final String ADD_USER_VIEWS = "uib_views_get_instance()->add_user_views"; //$NON-NLS-1$
+    public static final String SET_STARTUP_VIEW = "uib_views_get_instance()->set_startup_view_name"; //$NON-NLS-1$
+    public static final String INITIALIZE = "initialize()";
+
+    public static final String ADD_USER_VIEWS_FUNCTION_CALL =
+            TAB + ADD_USER_VIEWS + "(" + DOUBLE_QUOTATION + REPLACE_KEY_ID + DOUBLE_QUOTATION + ", " + USER_VIEW_CB + ");" + NEW_LINE; //$NON-NLS-1$
+
+    public static final String SET_STARTUP_VIEW_FUNCTION_CALL =
+            TAB + SET_STARTUP_VIEW + "(" + DOUBLE_QUOTATION + REPLACE_KEY_ID + DOUBLE_QUOTATION + ");"; //$NON-NLS-1$
+
+    public static final String SRC_PATH = "src" + File.separator; //$NON-NLS-1$
+    public static final String APP_MAIN_C = "app_main.c"; //$NON-NLS-1$
+
+    public static final String REPLACE_KEY_BOOLEAN = "%boolean%"; //$NON-NLS-1$
+    public static final String DIRECTIVE_IF = "#if " + REPLACE_KEY_BOOLEAN + NEW_LINE; //$NON-NLS-1$
+    public static final String DIRECTIVE_ELSE = "#else" + NEW_LINE; //$NON-NLS-1$
+    public static final String DIRECTIVE_ENDIF = "#endif" + NEW_LINE; //$NON-NLS-1$
+
+    public static final String NUIB_APP_ENTRY =
+            DIRECTIVE_ELSE
+                    + TAB + "int result = 0;" + NEW_LINE
+                    + TAB + "app_data *app = uib_app_create();" + NEW_LINE
+                    + TAB + "if (app)" + NEW_LINE
+                    + TAB + "{" + NEW_LINE
+                    + TAB + TAB + "result = uib_app_run(app, argc, argv);" + NEW_LINE
+                    + TAB + TAB + "uib_app_destroy(app);" + NEW_LINE
+                    + TAB + "}" + NEW_LINE + NEW_LINE
+                    + TAB + "return result;" + NEW_LINE
+                    + DIRECTIVE_ENDIF; // $NON-NLS-1$
+    public static final String MAIN_FUNCTION_NAME = "main"; //$NON-NLS-1$
+
+    public static final String USER_VIEW_PATH = SRC_PATH + "user_view"; //$NON-NLS-1$
+    public static final String USER_VIEW_FILE_PRFIX = "uib_"; //$NON-NLS-1$
+    public static final String USER_VIEW_FILE_POSTFIX = "_view.c"; //$NON-NLS-1$
+
+    public static final String USER_VIEW_TEMPLATE_FOLDER = "/res/template"; //$NON-NLS-1$
+    public static final String USER_VIEW_TEMPLATE = "user_view"; //$NON-NLS-1$
+    public static final String USER_VIEW_TEMPLATE_KEY = "user_view_name"; //$NON-NLS-1$
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/CodeWriterException.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/CodeWriterException.java
new file mode 100644 (file)
index 0000000..5931f0f
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.codewriter;
+
+public class CodeWriterException extends Exception {
+
+    private static final long serialVersionUID = -7774699835058620087L;
+
+    public CodeWriterException(String message) {
+        super(message);
+    }
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/UserViewGenerator.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/UserViewGenerator.java
new file mode 100644 (file)
index 0000000..88bc10b
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.codewriter;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.util.FreeMarkerUtil;
+import org.tizen.common.util.IOUtil;
+import org.tizen.efluibuilder.projectmigrator.Activator;
+import org.tizen.efluibuilder.projectmigrator.ui.message.Messages;
+import org.tizen.efluibuilder.projectmigrator.util.FileUtil;
+import org.tizen.efluibuilder.utility.ResourceUtil;
+
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+
+
+public class UserViewGenerator {
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+    private IProject project;
+
+    public UserViewGenerator(IProject project) {
+        this.project = project;
+    }
+
+    public void addUserViewFile(List<String> userViews, int addUserViewsTotalTicks, IProgressMonitor monitor) throws CodeWriterException {
+        if (userViews == null || userViews.isEmpty()) {
+            return;
+        }
+
+        int workedTickStep = addUserViewsTotalTicks / userViews.size();
+        int workedRemainTick = addUserViewsTotalTicks;
+
+        Template template = null;
+        try {
+            Configuration defaultConfiguration = FreeMarkerUtil.getDefaultConfiguration();
+            defaultConfiguration
+                    .setDirectoryForTemplateLoading(new File(ResourceUtil.getURI(Activator.PLUGIN_ID, CodeWriterConstants.USER_VIEW_TEMPLATE_FOLDER)));
+            template = defaultConfiguration.getTemplate(CodeWriterConstants.USER_VIEW_TEMPLATE);
+        } catch (IOException e) {
+            logger.error(e.getMessage());
+            throw new CodeWriterException(Messages.CORE_EXCEPTION_MSG_INTERNAL);
+        }
+
+        for (String userView : userViews) {
+            IFile file = FileUtil.getFile(project, CodeWriterConstants.USER_VIEW_PATH,
+                                          CodeWriterConstants.USER_VIEW_FILE_PRFIX + userView + CodeWriterConstants.USER_VIEW_FILE_POSTFIX);
+            if (file.exists()) {
+                continue;
+            }
+
+            createFile(file, getUserViewByteArray(template, userView));
+
+            monitor.worked(workedTickStep);
+            monitor.subTask(Messages.bind(Messages.PROGRESS_MSG_SUBTASK_DO_PROCESS_USER_VIEW_FILE, userView.toUpperCase()));
+            workedRemainTick -= workedTickStep;
+
+            if (monitor.isCanceled()) {
+                return;
+            }
+        } // end of for
+        monitor.worked(workedRemainTick);
+    }
+
+    public void deleteUserviewFile(List<String> deleteViews, int deleteViewsTotalTicks, IProgressMonitor monitor) throws CodeWriterException {
+        if (deleteViews == null || deleteViews.isEmpty()) {
+            return;
+        }
+
+        int workedTickStep = deleteViewsTotalTicks / deleteViews.size();
+        int workedRemainTick = deleteViewsTotalTicks;
+
+        for (String userView : deleteViews) {
+            IFile file = FileUtil.getFile(project, CodeWriterConstants.USER_VIEW_PATH,
+                                          CodeWriterConstants.USER_VIEW_FILE_PRFIX + userView + CodeWriterConstants.USER_VIEW_FILE_POSTFIX);
+            if (file.exists()) {
+                try {
+                    // TODO need to check the reason why file does not deleted using EFS
+                    // IFileStore fileStore = EFS.getStore(file.getLocationURI());
+                    // fileStore.delete(EFS.NONE, new NullProgressMonitor());
+                    file.delete(true, new NullProgressMonitor());
+                } catch (CoreException e) {
+                    logger.error(e.getMessage());
+                    throw new CodeWriterException(Messages.bind(Messages.CORE_EXCEPTION_MSG_DELETE_FILE,
+                                                                file.getLocation().toOSString()));
+                }
+
+            }
+
+            monitor.worked(workedTickStep);
+            monitor.subTask(Messages.bind(Messages.PROGRESS_MSG_SUBTASK_DO_PROCESS_USER_VIEW_FILE, userView.toUpperCase()));
+            workedRemainTick -= workedTickStep;
+
+            if (monitor.isCanceled()) {
+                return;
+            }
+        } // end of for
+        monitor.worked(workedRemainTick);
+
+    }
+
+    private byte[] getUserViewByteArray(Template template, String userView) throws CodeWriterException {
+        if (template == null || userView == null || userView.isEmpty()) {
+            return null;
+        }
+
+        byte[] byteArray = null;
+        Map<String, Object> root = new HashMap<>();
+        root.put(CodeWriterConstants.USER_VIEW_TEMPLATE_KEY, userView);
+
+        ByteArrayOutputStream stream = new ByteArrayOutputStream();
+        Writer out = new OutputStreamWriter(stream);
+        try {
+            template.process(root, out);
+            byteArray = stream.toByteArray();
+        } catch (TemplateException e) {
+            logger.error(e.getMessage());
+            throw new CodeWriterException(Messages.CORE_EXCEPTION_MSG_INTERNAL);
+        } catch (IOException e) {
+            logger.error(e.getMessage());
+            throw new CodeWriterException(Messages.CORE_EXCEPTION_MSG_INTERNAL);
+        } finally {
+            IOUtil.tryClose(stream);
+            IOUtil.tryClose(out);
+        }
+
+        return byteArray;
+    }
+
+    private void createFile(IFile file, byte[] byteArray) throws CodeWriterException {
+        if (file == null || byteArray == null) {
+            return;
+        }
+
+        try {
+            file.create(new ByteArrayInputStream(byteArray), true, new NullProgressMonitor());
+        } catch (CoreException e) {
+            logger.error(e.getMessage());
+            throw new CodeWriterException(Messages.bind(Messages.CORE_EXCEPTION_MSG_CREATE_FILE, file.getLocation().toOSString()));
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/FuncCallParamGetVisitor.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/FuncCallParamGetVisitor.java
new file mode 100644 (file)
index 0000000..5f9841c
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.codewriter.visitor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionCallExpression;
+import org.eclipse.cdt.core.dom.ast.IASTInitializerClause;
+import org.tizen.efluibuilder.projectmigrator.codewriter.CodeWriterConstants;
+
+
+public class FuncCallParamGetVisitor extends ASTVisitor {
+
+    private String function = null;
+    private String targetFunction = null;
+    private int paramIndex;
+    private List<String> results = new ArrayList<String>();
+
+    public static String getParamFromExpression(IASTExpression expression, String function, String targetFunction, int paramIndex) {
+        if (!(expression instanceof IASTFunctionCallExpression)) {
+            return null;
+        }
+
+        // TODO check function name
+        IASTFunctionCallExpression fe = (IASTFunctionCallExpression) expression;
+        IASTExpression functionNameExpression = fe.getFunctionNameExpression();
+        if (targetFunction != null && targetFunction.equals(functionNameExpression.getRawSignature())) {
+            IASTInitializerClause[] arguments = fe.getArguments();
+            if (arguments.length <= paramIndex) {
+                return null;
+            }
+
+            String param = arguments[paramIndex].getRawSignature();
+            if (param.contains(CodeWriterConstants.DOUBLE_QUOTATION)) {
+                param = arguments[paramIndex].getRawSignature().replace(CodeWriterConstants.DOUBLE_QUOTATION, ""); //$NON-NLS-1$
+            }
+
+            return param;
+        }
+
+        return null;
+    }
+
+    public FuncCallParamGetVisitor(String function, String targetFunction, int paramIndex) {
+        super();
+        this.function = function;
+        this.targetFunction = targetFunction;
+        this.paramIndex = paramIndex;
+        this.shouldVisitExpressions = true;
+    }
+
+    public int visit(IASTExpression expression) {
+        String paramFromExpression = getParamFromExpression(expression, function, targetFunction, paramIndex);
+        if (paramFromExpression != null) {
+            results.add(paramFromExpression);
+        }
+
+        return PROCESS_CONTINUE;
+    }
+
+    public List<String> getResults() {
+        return results;
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/MethodCheckVisitor.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/MethodCheckVisitor.java
new file mode 100644 (file)
index 0000000..a1ed37d
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.codewriter.visitor;
+
+import java.util.Map;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator;
+
+
+public class MethodCheckVisitor extends ASTVisitor {
+
+    private boolean isExist = false;
+    private String name = null;
+    private int returnType;
+    private Map<String, String> param = null;
+
+    public MethodCheckVisitor(String name, int returnType, Map<String, String> param) {
+        this.name = name;
+        this.returnType = returnType;
+        this.param = param;
+        this.shouldVisitDeclarations = true;
+    }
+
+    public int visit(IASTDeclaration declaration) {
+        if (!(declaration instanceof IASTFunctionDefinition)) {
+            return PROCESS_CONTINUE;
+        }
+        IASTFunctionDefinition func = (IASTFunctionDefinition) declaration;
+        IASTFunctionDeclarator func_name_expr = func.getDeclarator();
+        if (!name.equals(func_name_expr.getName().toString())) {
+            return PROCESS_CONTINUE;
+        }
+
+        // it is main function
+        IASTNode[] children = func.getChildren();
+        for (IASTNode node : children) {
+            //check return type
+            if (node instanceof IASTSimpleDeclSpecifier) {
+                // check return type
+                IASTSimpleDeclSpecifier specifier = (IASTSimpleDeclSpecifier) node;
+                if (specifier.getType() != returnType) {
+                    return PROCESS_CONTINUE;
+                }
+            }
+
+            // check parameter
+            if (node instanceof IASTFunctionDeclarator) {
+                IASTStandardFunctionDeclarator functionDeclarator = (IASTStandardFunctionDeclarator) node;
+                IASTParameterDeclaration[] parameters = functionDeclarator.getParameters();
+                if (param == null || parameters.length != param.size()) {
+                    //if current parameter is null and input parameter size is not difference
+                    return PROCESS_CONTINUE;
+                }
+
+                for (IASTParameterDeclaration parameter : parameters) {
+                    // check declarator
+                    String replace = parameter.getDeclarator().getRawSignature().replace(" ", "");
+                    String declSpecifier = param.get(replace);
+                    if (declSpecifier == null) {
+                        return PROCESS_CONTINUE;
+                    }
+
+                    if (!declSpecifier.equals(parameter.getDeclSpecifier().getRawSignature())) {
+                        return PROCESS_CONTINUE;
+                    }
+                }
+            }
+        }
+
+        isExist = true;
+        return PROCESS_ABORT;
+    }
+
+    public boolean isExist() {
+        return this.isExist;
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/NUIBAppEntryAddVisitor.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/NUIBAppEntryAddVisitor.java
new file mode 100644 (file)
index 0000000..d1bbdd0
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.codewriter.visitor;
+
+import java.util.Map;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.tizen.efluibuilder.projectmigrator.codewriter.CodeWriterConstants;
+
+
+public final class NUIBAppEntryAddVisitor extends ReWriteVisitor {
+
+    private boolean isNUIBEntry;
+    private MethodCheckVisitor visitor;
+
+    public NUIBAppEntryAddVisitor(String name, int returnType, Map<String, String> param, boolean isNUIBEntry) {
+        super();
+        this.isNUIBEntry = isNUIBEntry;
+        this.shouldVisitDeclarations = true;
+        this.visitor = new MethodCheckVisitor(name, returnType, param);
+    }
+
+    public int visit(IASTDeclaration declaration) {
+        visitor.visit(declaration);
+        if (!visitor.isExist()) {
+            return PROCESS_CONTINUE;
+        }
+
+        IASTFunctionDefinition func = (IASTFunctionDefinition) declaration;
+        IASTNode[] children = func.getChildren();
+        if (children.length < 3) {
+            return PROCESS_CONTINUE;
+        }
+        // get main function body
+        IASTNode[] grandChildren = children[2].getChildren();
+        if (grandChildren.length < 1) {
+            return PROCESS_CONTINUE;
+        }
+
+        String ifStatement = CodeWriterConstants.DIRECTIVE_IF.replace(CodeWriterConstants.REPLACE_KEY_BOOLEAN, Integer.toString(isNUIBEntry ? 0 : 1));
+        // insert #if boolean in top of main function body
+        rw.insertBefore(children[2], grandChildren[0], rw.createLiteralNode(ifStatement), null);
+        // insert nuib appentry with last statement in end of main fucntion body
+        IASTNode lastNode = grandChildren[grandChildren.length - 1];
+        rw.insertBefore(children[2], grandChildren[grandChildren.length - 1],
+                        rw.createLiteralNode(lastNode.getRawSignature() + CodeWriterConstants.NEW_LINE + CodeWriterConstants.NUIB_APP_ENTRY), null);
+        // remove last statement;
+        rw.remove(grandChildren[grandChildren.length - 1], null);
+
+        return PROCESS_ABORT;
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/ReWriteVisitor.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/ReWriteVisitor.java
new file mode 100644 (file)
index 0000000..50150ee
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.codewriter.visitor;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.rewrite.ASTRewrite;
+
+
+public abstract class ReWriteVisitor extends ASTVisitor {
+    protected ASTRewrite rw = null;
+
+    public ReWriteVisitor() {
+        this.shouldVisitTranslationUnit = true;
+    }
+
+    public int visit(IASTTranslationUnit tu) {
+        this.rw = ASTRewrite.create(tu);
+        return PROCESS_CONTINUE;
+    }
+
+    public ASTRewrite getReWrite() {
+        return rw;
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/UserViewAddVisitor.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/UserViewAddVisitor.java
new file mode 100644 (file)
index 0000000..2f2e744
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.codewriter.visitor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionCallExpression;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.tizen.efluibuilder.projectmigrator.codewriter.CodeWriterConstants;
+
+
+public final class UserViewAddVisitor extends ReWriteVisitor {
+
+    private List<String> existDeclar;
+    private List<String> existFuncCallExpression;
+    private List<String> userViews;
+    private String startUpView;
+
+    public UserViewAddVisitor(List<String> userViews, String startUpView) {
+        super();
+        this.userViews = userViews;
+        this.startUpView = startUpView;
+        this.existDeclar = new ArrayList<String>();
+        this.existFuncCallExpression = new ArrayList<String>();
+        this.shouldVisitExpressions = true;
+        this.shouldVisitStatements = true;
+        this.shouldVisitDeclarations = true;
+        this.shouldVisitDeclarators = true;
+    }
+
+    public int visit(IASTDeclaration declaration) {
+        if (!(declaration instanceof IASTFunctionDefinition)) {
+            return PROCESS_CONTINUE;
+        }
+
+        IASTFunctionDefinition func = (IASTFunctionDefinition) declaration;
+        IASTFunctionDeclarator func_name_expr = func.getDeclarator();
+        if (!CodeWriterConstants.ON_CREATE_CB.equals(func_name_expr.getName().toString())) {
+            return PROCESS_CONTINUE;
+        }
+
+        // add user view prototype before _on_create_cb
+        IASTNode parent = declaration.getParent();
+        for (String userView : userViews) {
+            if (existDeclar.contains(userView)) {
+                continue;
+            }
+            String pro = CodeWriterConstants.USER_VIEW_DECLARE.replace(CodeWriterConstants.REPLACE_KEY_ID, userView);
+            rw.insertBefore(parent, declaration, rw.createLiteralNode(pro), null);
+        }
+
+        return PROCESS_CONTINUE;
+    }
+
+    public int visit(IASTExpression expression) {
+        if (!(expression instanceof IASTFunctionCallExpression)) {
+            return PROCESS_CONTINUE;
+        }
+
+        // get current userview
+        String param = FuncCallParamGetVisitor.getParamFromExpression(expression, null, CodeWriterConstants.ADD_USER_VIEWS, 0);
+        if (param != null) {
+            if (userViews.contains(param)) {
+                existFuncCallExpression.add(param);
+            }
+        }
+
+        return PROCESS_CONTINUE;
+    }
+
+    public int visit(IASTStatement statement) {
+        if (statement == null || statement.getRawSignature() == null) {
+            return PROCESS_CONTINUE;
+        }
+
+        if (!statement.getRawSignature().contains(CodeWriterConstants.INITIALIZE)) {
+            return PROCESS_CONTINUE;
+        }
+
+        IASTNode parent = statement.getParent();
+        IASTNode grandParent = parent.getParent();
+        IASTNode[] children = grandParent.getChildren();
+        if (children.length < 1) {
+            return PROCESS_CONTINUE;
+        }
+
+        if (!children[1].getRawSignature().contains(CodeWriterConstants.ON_CREATE_CB)) {
+            return PROCESS_CONTINUE;
+        }
+
+        for (String userView : userViews) {
+            if (existFuncCallExpression.contains(userView)) {
+                continue;
+            }
+            String addUserView = CodeWriterConstants.ADD_USER_VIEWS_FUNCTION_CALL.replace(CodeWriterConstants.REPLACE_KEY_ID, userView);
+            rw.insertBefore(parent, statement, rw.createLiteralNode(addUserView), null);
+        }
+
+        if (startUpView != null) {
+            String addUserView = CodeWriterConstants.SET_STARTUP_VIEW_FUNCTION_CALL.replace(CodeWriterConstants.REPLACE_KEY_ID, startUpView);
+            rw.insertBefore(parent, statement, rw.createLiteralNode(addUserView), null);
+        }
+
+        return PROCESS_ABORT;
+    }
+
+    public int visit(IASTDeclarator declarator) {
+        if (!declarator.getRawSignature().contains(CodeWriterConstants.USER_VIEW_DECLARE_PREFIX)) {
+            return PROCESS_CONTINUE;
+        }
+
+        IASTNode[] children = declarator.getChildren();
+        if (!(CodeWriterConstants.USER_VIEW_FIRST_PARAMETER.equals(children[1].getRawSignature())) ||
+                !(CodeWriterConstants.USER_VIEW_SECOND_PARAMETER.equals(children[2].getRawSignature()))) {
+            // check parameter
+            return PROCESS_CONTINUE;
+        }
+
+        String rawSignature = children[0].getRawSignature();
+        String[] split = rawSignature.split("_");
+        if (split.length != CodeWriterConstants.USER_VIEW_WORD_COUNT) {
+            // check function declarator split count
+            // ex) uib_uview_&user_View_create_cb
+            return PROCESS_CONTINUE;
+        }
+
+        if (CodeWriterConstants.USER_VIEW_DECLARE_FIRST_PREFIX.equals(split[0])
+                && CodeWriterConstants.USER_VIEW_DECLARE_SECOND_PREFIX.equals(split[1])
+                && CodeWriterConstants.USER_VIEW_DECLARE_SECOND_POSTFIX.equals(split[3])
+                && CodeWriterConstants.USER_VIEW_DECLARE_FIRST_POSTFIX.equals(split[4])) {
+            // check function declarator split
+            if (userViews.contains(split[2])) {
+                existDeclar.add(split[2]);
+            }
+        }
+
+        return PROCESS_CONTINUE;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/UserViewRemoveVisitor.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/codewriter/visitor/UserViewRemoveVisitor.java
new file mode 100644 (file)
index 0000000..5a5ae41
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.codewriter.visitor;
+
+import java.util.List;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionCallExpression;
+import org.eclipse.cdt.core.dom.ast.IASTInitializerClause;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.tizen.efluibuilder.projectmigrator.codewriter.CodeWriterConstants;
+
+
+public final class UserViewRemoveVisitor extends ReWriteVisitor {
+    private List<String> userViews;
+
+    public UserViewRemoveVisitor(List<String> userViews, String startUpView) {
+        super();
+        this.userViews = userViews;
+        this.shouldVisitExpressions = true;
+        this.shouldVisitDeclarators = true;
+    }
+
+    public int visit(IASTExpression expression) {
+        if (!(expression instanceof IASTFunctionCallExpression)) {
+            return PROCESS_CONTINUE;
+        }
+
+        // get current userview
+        String param = FuncCallParamGetVisitor.getParamFromExpression(expression, null, CodeWriterConstants.ADD_USER_VIEWS, 0);
+        if (param != null) {
+            if (!userViews.contains(param)) {
+                // if current user view is not exist in inputed user view list
+                rw.remove(expression.getParent(), null);
+            }
+        }
+
+        IASTFunctionCallExpression fe = (IASTFunctionCallExpression) expression;
+        IASTExpression functionNameExpression = fe.getFunctionNameExpression();
+        if (CodeWriterConstants.SET_STARTUP_VIEW.equals(functionNameExpression.getRawSignature())) {
+            IASTInitializerClause[] arguments = fe.getArguments();
+            if (arguments.length > 0) {
+                rw.remove(expression.getParent(), null);
+            }
+        }
+
+        return PROCESS_CONTINUE;
+    }
+
+    public int visit(IASTDeclarator declarator) {
+        if (!declarator.getRawSignature().contains(CodeWriterConstants.USER_VIEW_DECLARE_PREFIX)) {
+            return PROCESS_CONTINUE;
+        }
+
+        IASTNode[] children = declarator.getChildren();
+        if (!(CodeWriterConstants.USER_VIEW_FIRST_PARAMETER.equals(children[1].getRawSignature())) ||
+                !(CodeWriterConstants.USER_VIEW_SECOND_PARAMETER.equals(children[2].getRawSignature()))) {
+            // check parameter
+            return PROCESS_CONTINUE;
+        }
+
+        String rawSignature = children[0].getRawSignature();
+        String[] split = rawSignature.split("_");
+        if (split.length != CodeWriterConstants.USER_VIEW_WORD_COUNT) {
+            // check function declarator split count
+            // ex) uib_uview_&user_View_create_cb
+            return PROCESS_CONTINUE;
+        }
+
+        if (CodeWriterConstants.USER_VIEW_DECLARE_FIRST_PREFIX.equals(split[0])
+                && CodeWriterConstants.USER_VIEW_DECLARE_SECOND_PREFIX.equals(split[1])
+                && CodeWriterConstants.USER_VIEW_DECLARE_SECOND_POSTFIX.equals(split[3])
+                && CodeWriterConstants.USER_VIEW_DECLARE_FIRST_POSTFIX.equals(split[4])) {
+            // check function declarator split
+            if (!userViews.contains(split[2])) {
+                rw.remove(declarator.getParent(), null);
+
+            }
+        }
+
+        return PROCESS_CONTINUE;
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/dialog/ProjectMigratorDialogMessages.properties b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/dialog/ProjectMigratorDialogMessages.properties
new file mode 100644 (file)
index 0000000..a5b4c7c
--- /dev/null
@@ -0,0 +1,4 @@
+# Dialog
+DIALOG_TITLE=Enable UI Builder
+DIALOG_MESSAGE=Are you sure you want to enable the UI Builder?
+DIALOG_WEARABLE_MESSAGE=For wearable profile, select the shape to enable
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/dialog/ProjectMigratorWizardDialog.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/dialog/ProjectMigratorWizardDialog.java
new file mode 100755 (executable)
index 0000000..0b3a0f7
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.dialog;
+
+import org.eclipse.jface.dialogs.PageChangedEvent;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class ProjectMigratorWizardDialog extends WizardDialog {
+
+    public ProjectMigratorWizardDialog(Shell parentShell, IWizard wizard) {
+        super(parentShell, wizard);
+        setHelpAvailable(false);
+    }
+
+    @Override
+    public void updateTitleBar() {
+        String title = null;
+        String description = null;
+        IWizardPage page = getCurrentPage();
+        if (page != null) {
+            title = page.getTitle();
+            description = page.getDescription();
+        }
+        if (title == null) {
+            title = ""; //$NON-NLS-1$
+        }
+        if (description == null) {
+            description = "";
+        }
+        setCTitle(title);
+        setCDescription(description);
+    }
+
+    @Override
+    protected void update() {
+        updateWindowTitle();
+        updateTitleBar();
+        updateButtons();
+        firePageChanged(new PageChangedEvent(this, getCurrentPage()));
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/dialog/WizardDialog.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/dialog/WizardDialog.java
new file mode 100755 (executable)
index 0000000..d7e4f00
--- /dev/null
@@ -0,0 +1,1780 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Chris Gross (schtoo@schtoo.com) - patch for bug 16179
+ *     Eugene Ostroukhov <eugeneo@symbian.org> - Bug 287887 [Wizards] [api] Cancel button has two distinct roles
+ *     Paul Adams <padams@ittvis.com> - Bug 202534 - [Dialogs] SWT error in Wizard dialog when help is displayed and "Finish" is pressed
+ *******************************************************************************/
+
+/*
+ * 2016-06-30 ByoungChang Son sonbc121.son@samsung.com
+ * Modifications by S-Core Co., Ltd.
+ * 1. Give a Tizen identity
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.dialog;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ControlEnableState;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.dialogs.IPageChangeProvider;
+import org.eclipse.jface.dialogs.IPageChangedListener;
+import org.eclipse.jface.dialogs.IPageChangingListener;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.PageChangedEvent;
+import org.eclipse.jface.dialogs.PageChangingEvent;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.operation.ModalContext;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.Policy;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardContainer2;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.ProgressMonitorPart;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.events.HelpEvent;
+import org.eclipse.swt.events.HelpListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Layout;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.common.ui.color.TizenColors;
+import org.tizen.common.ui.font.TizenFonts;
+import org.tizen.common.ui.wizards.project.template.widgets.PageNavigator;
+
+
+/**
+ * A dialog to show a wizard to the end user.
+ * <p>
+ * In typical usage, the client instantiates this class with a particular wizard. The dialog serves
+ * as the wizard container and orchestrates the presentation of its pages.
+ * <p>
+ * The standard layout is roughly as follows: it has an area at the top containing both the wizard's
+ * title, description, and image; the actual wizard page appears in the middle; below that is a
+ * progress indicator (which is made visible if needed); and at the bottom of the page is message
+ * line and a button bar containing Help, Next, Back, Finish, and Cancel buttons (or some subset).
+ * </p>
+ * contents.setBackgroundMode(SWT.INHERIT_FORCE);
+ * <p>
+ * Clients may subclass <code>WizardDialog</code>, although this is rarely required.
+ * </p>
+ */
+public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
+        IPageChangeProvider {
+    /**
+     * Image registry key for error message image (value <code>"dialog_title_error_image"</code>).
+     */
+    public static final String WIZ_IMG_ERROR = "dialog_title_error_image"; //$NON-NLS-1$
+
+    /* TIZEN */
+    private static final int WIZ_DLG_TITLE_PAGE_NAVI_HEIGHT = 34;
+    private static final int WIZ_DLG_TITLE_DESC_HEIGHT = 60 + 4;
+    private static final int WIZ_DLG_TITLE_HEIGHT = WIZ_DLG_TITLE_PAGE_NAVI_HEIGHT + WIZ_DLG_TITLE_DESC_HEIGHT;
+    public static final int WIZ_DLG_WIDTH = 850;
+    public static final int WIZ_DLG_HEIGHT = 627;
+
+    // The wizard the dialog is currently showing.
+    private IWizard wizard;
+
+    // Wizards to dispose
+    private ArrayList<IWizard> createdWizards = new ArrayList<IWizard>();
+
+    // Current nested wizards
+    private ArrayList<IWizard> nestedWizards = new ArrayList<IWizard>();
+
+    // The currently displayed page.
+    private IWizardPage currentPage = null;
+
+    // The number of long running operation executed from the dialog.
+    private long activeRunningOperations = 0;
+
+    /**
+     * The time in milliseconds where the last job finished. 'Enter' key presses are ignored for the
+     * next {@link #RESTORE_ENTER_DELAY} milliseconds.
+     * <p>
+     * The value <code>-1</code> indicates that the traverse listener needs to be installed.
+     * </p>
+     * 
+     * @since 3.6
+     */
+    private long timeWhenLastJobFinished = -1;
+
+    // Tells whether a subclass provided the progress monitor part
+    private boolean useCustomProgressMonitorPart = true;
+
+    // The current page message and description
+    private String pageMessage;
+
+    private int pageMessageType = IMessageProvider.NONE;
+
+    private String pageDescription;
+
+    // The progress monitor
+    private ProgressMonitorPart progressMonitorPart;
+
+    private Cursor waitCursor;
+
+    private Cursor arrowCursor;
+
+    private MessageDialog windowClosingDialog;
+
+    // Navigation buttons
+    private Button backButton;
+
+    private Button nextButton;
+
+    private Button finishButton;
+
+    private Button cancelButton;
+
+    private Button helpButton;
+
+    /* Tizen */
+    private Label titleLabel;
+
+    /* Tizen */
+    // private Label descLabel;
+    private Label descLabelTypePageNavi;
+    private Label descLabelTypeMsg;
+
+    private PageNavigator pageNavigator;
+
+    private String[] navigatorString = null;
+    /* ===== */
+
+    private SelectionAdapter cancelListener;
+
+    private boolean isMovingToPreviousPage = false;
+
+    private Composite pageContainer;
+
+    /* Tizen */
+    /*
+     * private PageContainerFillLayout pageContainerLayout = new PageContainerFillLayout( 5, 5, 300,
+     * 225);
+     */
+    private PageContainerFillLayout pageContainerLayout = new PageContainerFillLayout(
+                                                                                      0, 0, 300, 225);
+    /* ===== */
+
+    private int pageWidth = SWT.DEFAULT;
+
+    private int pageHeight = SWT.DEFAULT;
+
+    private static final String FOCUS_CONTROL = "focusControl"; //$NON-NLS-1$
+
+    /**
+     * A delay in milliseconds that reduces the risk that the user accidentally triggers a button by
+     * pressing the 'Enter' key immediately after a job has finished.
+     * 
+     * @since 3.6
+     */
+    private static final int RESTORE_ENTER_DELAY = 500;
+
+    private boolean lockedUI = false;
+
+    private ListenerList pageChangedListeners = new ListenerList();
+
+    private ListenerList pageChangingListeners = new ListenerList();
+
+    /**
+     * A layout for a container which includes several pages, like a notebook, wizard, or preference
+     * dialog. The size computed by this layout is the maximum width and height of all pages
+     * currently inserted into the container.
+     */
+    protected static class PageContainerFillLayout extends Layout {
+        /**
+         * The margin width; <code>5</code> pixels by default.
+         */
+        public int marginWidth = 5;
+
+        /**
+         * The margin height; <code>5</code> pixels by default.
+         */
+        public int marginHeight = 5;
+
+        /**
+         * The minimum width; <code>0</code> pixels by default.
+         */
+        public int minimumWidth = 0;
+
+        /**
+         * The minimum height; <code>0</code> pixels by default.
+         */
+        public int minimumHeight = 0;
+
+        /**
+         * Creates new layout object.
+         * 
+         * @param mw
+         *            the margin width
+         * @param mh
+         *            the margin height
+         * @param minW
+         *            the minimum width
+         * @param minH
+         *            the minimum height
+         */
+        public PageContainerFillLayout(int mw, int mh, int minW, int minH) {
+            marginWidth = mw;
+            marginHeight = mh;
+            minimumWidth = minW;
+            minimumHeight = minH;
+        }
+
+        @Override
+        public Point computeSize(Composite composite, int wHint, int hHint,
+                                 boolean force) {
+            if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT) {
+                return new Point(wHint, hHint);
+            }
+            Point result = null;
+            Control[] children = composite.getChildren();
+            if (children.length > 0) {
+                result = new Point(0, 0);
+                for (int i = 0; i < children.length; i++) {
+                    Point cp = children[i].computeSize(wHint, hHint, force);
+                    result.x = Math.max(result.x, cp.x);
+                    result.y = Math.max(result.y, cp.y);
+                }
+                result.x = result.x + 2 * marginWidth;
+                result.y = result.y + 2 * marginHeight;
+            } else {
+                Rectangle rect = composite.getClientArea();
+                result = new Point(rect.width, rect.height);
+            }
+            result.x = Math.max(result.x, minimumWidth);
+            result.y = Math.max(result.y, minimumHeight);
+            if (wHint != SWT.DEFAULT) {
+                result.x = wHint;
+            }
+            if (hHint != SWT.DEFAULT) {
+                result.y = hHint;
+            }
+            return result;
+        }
+
+        /**
+         * Returns the client area for the given composite according to this layout.
+         * 
+         * @param c
+         *            the composite
+         * @return the client area rectangle
+         */
+        public Rectangle getClientArea(Composite c) {
+            Rectangle rect = c.getClientArea();
+            rect.x = rect.x + marginWidth;
+            rect.y = rect.y + marginHeight;
+            rect.width = rect.width - 2 * marginWidth;
+            rect.height = rect.height - 2 * marginHeight;
+            return rect;
+        }
+
+        @Override
+        public void layout(Composite composite, boolean force) {
+            Rectangle rect = getClientArea(composite);
+            Control[] children = composite.getChildren();
+            for (int i = 0; i < children.length; i++) {
+                children[i].setBounds(rect);
+            }
+        }
+
+        /**
+         * Lays outs the page according to this layout.
+         * 
+         * @param w
+         *            the control
+         */
+        public void layoutPage(Control w) {
+            w.setBounds(getClientArea(w.getParent()));
+        }
+
+        /**
+         * Sets the location of the page so that its origin is in the upper left corner.
+         * 
+         * @param w
+         *            the control
+         */
+        public void setPageLocation(Control w) {
+            w.setLocation(marginWidth, marginHeight);
+        }
+    }
+
+    /**
+     * Creates a new wizard dialog for the given wizard.
+     * 
+     * @param parentShell
+     *            the parent shell
+     * @param newWizard
+     *            the wizard this dialog is working on
+     */
+    public WizardDialog(Shell parentShell, IWizard newWizard) {
+        super(parentShell);
+        setShellStyle(SWT.CLOSE | SWT.MAX | SWT.TITLE | SWT.BORDER
+                | SWT.APPLICATION_MODAL | SWT.RESIZE | getDefaultOrientation());
+        setWizard(newWizard);
+        // since VAJava can't initialize an instance var with an anonymous
+        // class outside a constructor we do it here:
+        cancelListener = new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                cancelPressed();
+            }
+        };
+    }
+
+    /**
+     * About to start a long running operation triggered through the wizard. Shows the progress
+     * monitor and disables the wizard's buttons and controls.
+     * 
+     * @param enableCancelButton
+     *            <code>true</code> if the Cancel button should be enabled, and <code>false</code>
+     *            if it should be disabled
+     * @return the saved UI state
+     */
+    private Object aboutToStart(boolean enableCancelButton) {
+        Map<String, Object> savedState = null;
+        if (getShell() != null) {
+            // Save focus control
+            Control focusControl = getShell().getDisplay().getFocusControl();
+            if (focusControl != null && focusControl.getShell() != getShell()) {
+                focusControl = null;
+            }
+            boolean needsProgressMonitor = wizard.needsProgressMonitor();
+
+            // Set the busy cursor to all shells.
+            Display d = getShell().getDisplay();
+            waitCursor = new Cursor(d, SWT.CURSOR_WAIT);
+            setDisplayCursor(waitCursor);
+
+            if (useCustomProgressMonitorPart) {
+                cancelButton.removeSelectionListener(cancelListener);
+                // Set the arrow cursor to the cancel component.
+                arrowCursor = new Cursor(d, SWT.CURSOR_ARROW);
+                cancelButton.setCursor(arrowCursor);
+            }
+
+            // Deactivate shell
+            savedState = saveUIState(useCustomProgressMonitorPart && needsProgressMonitor && enableCancelButton);
+            if (focusControl != null) {
+                savedState.put(FOCUS_CONTROL, focusControl);
+            }
+            // Activate cancel behavior.
+//            if (needsProgressMonitor) {
+//                if (enableCancelButton || useCustomProgressMonitorPart) {
+//                    progressMonitorPart.attachToCancelComponent(cancelButton);
+//                }
+//                progressMonitorPart.setVisible(true);
+//            }
+
+            // Install traverse listener once in order to implement 'Enter' and 'Space' key blocking
+            if (timeWhenLastJobFinished == -1) {
+                timeWhenLastJobFinished = 0;
+                getShell().addTraverseListener(new TraverseListener() {
+                    @Override
+                    public void keyTraversed(TraverseEvent e) {
+                        if (e.detail == SWT.TRAVERSE_RETURN || (e.detail == SWT.TRAVERSE_MNEMONIC && e.keyCode == 32)) {
+                            // We want to ignore the keystroke when we detect that it has been
+                            // received within the
+                            // delay period after the last operation has finished. This prevents the
+                            // user from accidentally
+                            // hitting "Enter" or "Space", intending to cancel an operation, but
+                            // having it processed exactly
+                            // when the operation finished, thus traversing the wizard. If there is
+                            // another operation still
+                            // running, the UI is locked anyway so we are not in this code. This
+                            // listener should fire only
+                            // after the UI state is restored (which by definition means all jobs
+                            // are done.
+                            // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=287887
+                            if (timeWhenLastJobFinished != 0 && System.currentTimeMillis() - timeWhenLastJobFinished < RESTORE_ENTER_DELAY) {
+                                e.doit = false;
+                                return;
+                            }
+                            timeWhenLastJobFinished = 0;
+                        }
+                    }
+                });
+            }
+        }
+        return savedState;
+    }
+
+    /**
+     * The Back button has been pressed.
+     */
+    protected void backPressed() {
+        IWizardPage page = currentPage.getPreviousPage();
+        if (page == null) {
+            // should never happen since we have already visited the page
+            return;
+        }
+
+        // set flag to indicate that we are moving back
+        isMovingToPreviousPage = true;
+        // show the page
+        showPage(page);
+    }
+
+    @Override
+    protected void buttonPressed(int buttonId) {
+        switch (buttonId) {
+            case IDialogConstants.HELP_ID: {
+                helpPressed();
+                break;
+            }
+            case IDialogConstants.BACK_ID: {
+                backPressed();
+                break;
+            }
+            case IDialogConstants.NEXT_ID: {
+                nextPressed();
+                break;
+            }
+            case IDialogConstants.FINISH_ID: {
+                finishPressed();
+                break;
+            }
+            // The Cancel button has a listener which calls cancelPressed
+            // directly
+        }
+    }
+
+    /**
+     * Calculates the difference in size between the given page and the page container. A larger
+     * page results in a positive delta.
+     * 
+     * @param page
+     *            the page
+     * @return the size difference encoded as a <code>new Point(deltaWidth,deltaHeight)</code>
+     */
+    private Point calculatePageSizeDelta(IWizardPage page) {
+        Control pageControl = page.getControl();
+        if (pageControl == null) {
+            // control not created yet
+            return new Point(0, 0);
+        }
+        Point contentSize = pageControl.computeSize(SWT.DEFAULT, SWT.DEFAULT,
+                                                    true);
+        Rectangle rect = pageContainerLayout.getClientArea(pageContainer);
+        Point containerSize = new Point(rect.width, rect.height);
+        return new Point(Math.max(0, contentSize.x - containerSize.x), Math
+                .max(0, contentSize.y - containerSize.y));
+    }
+
+    @Override
+    protected void cancelPressed() {
+        if (activeRunningOperations <= 0) {
+            // Close the dialog. The check whether the dialog can be
+            // closed or not is done in <code>okToClose</code>.
+            // This ensures that the check is also evaluated when the user
+            // presses the window's close button.
+            setReturnCode(CANCEL);
+            close();
+        } else {
+            cancelButton.setEnabled(false);
+        }
+    }
+
+    @Override
+    public boolean close() {
+        if (okToClose()) {
+            return hardClose();
+        }
+        return false;
+    }
+
+    @Override
+    protected void configureShell(Shell newShell) {
+        super.configureShell(newShell);
+        // Register help listener on the shell
+        newShell.addHelpListener(new HelpListener() {
+            @Override
+            public void helpRequested(HelpEvent event) {
+                // call perform help on the current page
+                if (currentPage != null) {
+                    currentPage.performHelp();
+                }
+            }
+        });
+    }
+
+    /**
+     * Creates the buttons for this dialog's button bar.
+     * <p>
+     * The <code>WizardDialog</code> implementation of this framework method prevents the parent
+     * composite's columns from being made equal width in order to remove the margin between the
+     * Back and Next buttons.
+     * </p>
+     * 
+     * @param parent
+     *            the parent composite to contain the buttons
+     */
+    @Override
+    protected void createButtonsForButtonBar(Composite parent) {
+        ((GridLayout) parent.getLayout()).makeColumnsEqualWidth = false;
+        if (wizard.isHelpAvailable()) {
+            helpButton = createButton(parent, IDialogConstants.HELP_ID,
+                                      IDialogConstants.HELP_LABEL, false);
+        }
+        if (wizard.needsPreviousAndNextButtons()) {
+            createPreviousAndNextButtons(parent);
+        }
+        finishButton = createButton(parent, IDialogConstants.FINISH_ID,
+                                    IDialogConstants.FINISH_LABEL, true);
+        cancelButton = createCancelButton(parent);
+
+        if (parent.getDisplay().getDismissalAlignment() == SWT.RIGHT) {
+            // Make the default button the right-most button.
+            // See also special code in org.eclipse.jface.dialogs.Dialog#initializeBounds()
+            finishButton.moveBelow(null);
+        }
+    }
+
+    @Override
+    protected void setButtonLayoutData(Button button) {
+        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+        int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+
+        // On large fonts this can make this dialog huge
+        widthHint = Math.min(widthHint,
+                             button.getDisplay().getBounds().width / 5);
+        Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+        data.widthHint = Math.max(widthHint, minSize.x);
+
+        button.setLayoutData(data);
+    }
+
+    /**
+     * Creates the Cancel button for this wizard dialog. Creates a standard (<code>SWT.PUSH</code>)
+     * button and registers for its selection events. Note that the number of columns in the button
+     * bar composite is incremented. The Cancel button is created specially to give it a removeable
+     * listener.
+     * 
+     * @param parent
+     *            the parent button bar
+     * @return the new Cancel button
+     */
+    private Button createCancelButton(Composite parent) {
+        // increment the number of columns in the button bar
+        ((GridLayout) parent.getLayout()).numColumns++;
+        Button button = new Button(parent, SWT.PUSH);
+        button.setText(IDialogConstants.CANCEL_LABEL);
+        setButtonLayoutData(button);
+        button.setFont(parent.getFont());
+        button.setData(new Integer(IDialogConstants.CANCEL_ID));
+        button.addSelectionListener(cancelListener);
+        return button;
+    }
+
+    /**
+     * Return the cancel button if the id is a the cancel id.
+     * 
+     * @param id
+     *            the button id
+     * @return the button corresponding to the button id
+     */
+    @Override
+    protected Button getButton(int id) {
+        if (id == IDialogConstants.CANCEL_ID) {
+            return cancelButton;
+        }
+        return super.getButton(id);
+    }
+
+    /**
+     * The <code>WizardDialog</code> implementation of this <code>Window</code> method calls call
+     * <code>IWizard.addPages</code> to allow the current wizard to add extra pages, then
+     * <code>super.createContents</code> to create the controls. It then calls
+     * <code>IWizard.createPageControls</code> to allow the wizard to pre-create their page controls
+     * prior to opening, so that the wizard opens to the correct size. And finally it shows the
+     * first page.
+     */
+    @Override
+    protected Control createContents(Composite parent) {
+        // Allow the wizard to add pages to itself
+        // Need to call this now so page count is correct
+        // for determining if next/previous buttons are needed
+        wizard.addPages();
+
+        /* Tizen */
+        // Control contents = super.createContents(parent);
+        Composite contents = new Composite(parent, 0);
+        contents.setLayoutData(new GridData(1808));
+
+        initializeDialogUnits(contents);
+        FormLayout layout = new FormLayout();
+        contents.setLayout(layout);
+
+        contents.setBackground(getShell().getDisplay().getSystemColor(SWT.COLOR_WHITE));
+        contents.setBackgroundMode(SWT.INHERIT_FORCE);
+
+        Composite workArea = new Composite(contents, SWT.NONE);
+        GridLayout childLayout = new GridLayout();
+        childLayout.marginHeight = 0;
+        childLayout.marginWidth = 0;
+        childLayout.verticalSpacing = 0;
+        workArea.setLayout(childLayout);
+        /* ECLISPE */
+        // Control top = createTitleAreaOrigin(contents);
+        /* TIZEN */
+        createTitleArea(contents);
+        FormData childData = new FormData();
+        /* ECLISPE */
+        // childData.top = new FormAttachment(top);
+        /* TIZEN */
+        childData.top = new FormAttachment(contentPanel, 0);
+        childData.right = new FormAttachment(100);
+        childData.left = new FormAttachment(0);
+        childData.bottom = new FormAttachment(100);
+        workArea.setLayoutData(childData);
+        workArea.setFont(JFaceResources.getDialogFont());
+        workArea.setBackground(TizenColors.getTizenLightGrey());
+        initializeDialogUnits(workArea);
+
+        this.dialogArea = createDialogArea(workArea);
+        this.buttonBar = createButtonBar(workArea);
+        this.buttonBar.setBackground(getShell().getDisplay().getSystemColor(SWT.COLOR_WHITE));
+        /* ===== */
+
+        // Allow the wizard pages to precreate their page controls
+        createPageControls();
+        // Show the first page
+        showStartingPage();
+        return contents;
+    }
+
+    @Override
+    protected Control createDialogArea(Composite parent) {
+        /* Tizen */
+        // Composite composite = (Composite) super.createDialogArea(parent);
+        Composite composite = new Composite(parent, SWT.NONE);
+        GridLayout layout = new GridLayout();
+        layout.marginHeight = 0;
+        layout.marginWidth = 0;
+        layout.verticalSpacing = 0;
+        layout.horizontalSpacing = 0;
+        composite.setLayout(layout);
+        composite.setLayoutData(new GridData(1808));
+        composite.setFont(parent.getFont());
+        /* ===== */
+
+        // Build the Page container
+        pageContainer = createPageContainer(composite);
+        GridData gd = new GridData(GridData.FILL_BOTH);
+        gd.widthHint = pageWidth;
+        gd.heightHint = pageHeight;
+        pageContainer.setLayoutData(gd);
+        pageContainer.setFont(parent.getFont());
+        // Insert a progress monitor
+        /* Tizen */
+        /*
+         * progressMonitorPart = createProgressMonitorPart(composite, new GridLayout()); GridData
+         * gridData = new GridData(GridData.FILL_HORIZONTAL); if (!wizard.needsProgressMonitor()) {
+         * gridData.exclude = true; } progressMonitorPart.setLayoutData(gridData);
+         * progressMonitorPart.setVisible(false);
+         */
+        /* ===== */
+
+        // Build the separator line
+        /* Tizen */
+        /*
+         * Label separator = new Label(parent, SWT.HORIZONTAL | SWT.SEPARATOR);
+         * separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+         */
+        Canvas separator = new Canvas(parent, SWT.NONE);
+        separator.setBackground(TizenColors.getTizenSmokeGrey());
+        GridData separatorData = new GridData(GridData.FILL_HORIZONTAL);
+        separatorData.heightHint = 1;
+        separator.setLayoutData(separatorData);
+        /* ===== */
+
+        applyDialogFont(progressMonitorPart);
+        return composite;
+    }
+
+    private StackLayout stl;
+    private Composite pageNaviTitleComp;
+    private Composite pageNaviUnTitleComp;
+    private Composite contentPanel;
+
+    /* Tizen */
+    private Composite createTitlePageNaviArea(Composite parent) {
+        pageNaviTitleComp = new Composite(parent, SWT.BOLD);
+        pageNaviTitleComp.setLayout(new FormLayout());
+
+        FormData formData = new FormData();
+        formData.left = new FormAttachment(0);
+        formData.right = new FormAttachment(100);
+        formData.height = 34;
+
+        pageNavigator = new PageNavigator(pageNaviTitleComp, navigatorString);
+        pageNavigator.setTextFont(TizenFonts.getFont(0, SWT.NONE));
+        pageNavigator.setTextBoldFont(TizenFonts.getFont(0, SWT.BOLD));
+        pageNavigator.setLayoutData(formData);
+
+        formData = new FormData();
+        formData.left = new FormAttachment(0);
+        formData.right = new FormAttachment(100);
+        formData.top = new FormAttachment(pageNavigator);
+        formData.height = WIZ_DLG_TITLE_DESC_HEIGHT;
+
+        Composite descComp = new Composite(pageNaviTitleComp, SWT.NONE);
+        GridLayout layout = new GridLayout(1, false);
+        layout.marginWidth = 20;
+        descComp.setLayout(layout);
+        descComp.setLayoutData(formData);
+
+        descLabelTypePageNavi = new Label(descComp, SWT.WRAP);
+        GridData layoutData = new GridData(GridData.FILL_HORIZONTAL |
+                GridData.VERTICAL_ALIGN_CENTER);
+        layoutData.grabExcessVerticalSpace = true;
+        descLabelTypePageNavi.setLayoutData(layoutData);
+        descLabelTypePageNavi.setFont(JFaceResources.getDialogFont());
+
+        return descComp;
+    }
+
+    private Composite createTitleMsgArea(Composite parent) {
+        pageNaviUnTitleComp = new Composite(parent, SWT.BOLD);
+        pageNaviUnTitleComp.setLayout(new GridLayout(1, false));
+
+        Composite descComp = new Composite(pageNaviUnTitleComp, SWT.NONE);
+        GridLayout layout = new GridLayout(1, false);
+
+        GridData layoutData = new GridData(GridData.FILL_HORIZONTAL |
+                GridData.VERTICAL_ALIGN_CENTER);
+
+        layout.marginWidth = 20;
+        descComp.setLayout(layout);
+        descComp.setLayoutData(layoutData);
+
+        descLabelTypeMsg = new Label(descComp, SWT.WRAP);
+        layoutData.grabExcessVerticalSpace = true;
+        layoutData.widthHint = WIZ_DLG_WIDTH;
+        descLabelTypeMsg.setLayoutData(layoutData);
+        descLabelTypeMsg.setFont(JFaceResources.getDialogFont());
+
+        return descComp;
+    }
+
+    private void createTitleArea(Composite parent) {
+        stl = new StackLayout();
+        contentPanel = new Composite(parent, SWT.NONE);
+        FormData formData = new FormData();
+        formData.left = new FormAttachment(0, 0);
+        formData.right = new FormAttachment(100, 0);
+        formData.top = new FormAttachment(0, 0);
+        formData.height = WIZ_DLG_TITLE_HEIGHT;
+
+        contentPanel.setLayout(stl);
+        contentPanel.setLayoutData(formData);
+
+        if (navigatorString != null) {
+            createTitlePageNaviArea(contentPanel);
+        }
+        createTitleMsgArea(contentPanel);
+        return;
+
+    }
+
+    /* ===== */
+
+    /**
+     * Hook method for subclasses to create a custom progress monitor part.
+     * <p>
+     * The default implementation creates a progress monitor with a stop button will be created.
+     * </p>
+     * 
+     * @param composite
+     *            the parent composite
+     * @param pmlayout
+     *            the layout
+     * @return ProgressMonitorPart the progress monitor part
+     */
+    protected ProgressMonitorPart createProgressMonitorPart(
+                                                            Composite composite, GridLayout pmlayout) {
+        useCustomProgressMonitorPart = false;
+        return new ProgressMonitorPart(composite, pmlayout, true) {
+            String currentTask = null;
+
+            @Override
+            public void setBlocked(IStatus reason) {
+                super.setBlocked(reason);
+                if (!lockedUI) {
+                    getBlockedHandler().showBlocked(getShell(), this, reason,
+                                                    currentTask);
+                }
+            }
+
+            @Override
+            public void clearBlocked() {
+                super.clearBlocked();
+                if (!lockedUI) {
+                    getBlockedHandler().clearBlocked();
+                }
+            }
+
+            @Override
+            public void beginTask(String name, int totalWork) {
+                super.beginTask(name, totalWork);
+                currentTask = name;
+            }
+
+            @Override
+            public void setTaskName(String name) {
+                super.setTaskName(name);
+                currentTask = name;
+            }
+
+            @Override
+            public void subTask(String name) {
+                super.subTask(name);
+                // If we haven't got anything yet use this value for more
+                // context
+                if (currentTask == null) {
+                    currentTask = name;
+                }
+            }
+        };
+    }
+
+    /**
+     * Creates the container that holds all pages.
+     * 
+     * @param parent
+     * @return Composite
+     */
+    private Composite createPageContainer(Composite parent) {
+        Composite result = new Composite(parent, SWT.NONE);
+        result.setLayout(pageContainerLayout);
+        return result;
+    }
+
+    /**
+     * Allow the wizard's pages to pre-create their page controls. This allows the wizard dialog to
+     * open to the correct size.
+     */
+    private void createPageControls() {
+        // Allow the wizard pages to precreate their page controls
+        // This allows the wizard to open to the correct size
+        wizard.createPageControls(pageContainer);
+        // Ensure that all of the created pages are initially not visible
+        IWizardPage[] pages = wizard.getPages();
+        for (int i = 0; i < pages.length; i++) {
+            IWizardPage page = pages[i];
+            if (page.getControl() != null) {
+                page.getControl().setVisible(false);
+            }
+        }
+    }
+
+    /**
+     * Creates the Previous and Next buttons for this wizard dialog. Creates standard (
+     * <code>SWT.PUSH</code>) buttons and registers for their selection events. Note that the number
+     * of columns in the button bar composite is incremented. These buttons are created specially to
+     * prevent any space between them.
+     * 
+     * @param parent
+     *            the parent button bar
+     * @return a composite containing the new buttons
+     */
+    private Composite createPreviousAndNextButtons(Composite parent) {
+        // increment the number of columns in the button bar
+        ((GridLayout) parent.getLayout()).numColumns++;
+        Composite composite = new Composite(parent, SWT.NONE);
+        // create a layout with spacing and margins appropriate for the font
+        // size.
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 0; // will be incremented by createButton
+        layout.marginWidth = 0;
+        layout.marginHeight = 0;
+        layout.horizontalSpacing = 0;
+        layout.verticalSpacing = 0;
+        composite.setLayout(layout);
+        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_CENTER
+                | GridData.VERTICAL_ALIGN_CENTER);
+        composite.setLayoutData(data);
+        composite.setFont(parent.getFont());
+        backButton = createButton(composite, IDialogConstants.BACK_ID,
+                                  IDialogConstants.BACK_LABEL, false);
+        nextButton = createButton(composite, IDialogConstants.NEXT_ID,
+                                  IDialogConstants.NEXT_LABEL, false);
+
+        // make sure screen readers skip visual '<', '>' chars on buttons:
+        final String backReaderText = IDialogConstants.BACK_LABEL.replace('<', ' ');
+        backButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+            @Override
+            public void getName(AccessibleEvent e) {
+                e.result = backReaderText;
+            }
+        });
+        final String nextReaderText = IDialogConstants.NEXT_LABEL.replace('>', ' ');
+        nextButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+            @Override
+            public void getName(AccessibleEvent e) {
+                e.result = nextReaderText;
+            }
+        });
+        return composite;
+    }
+
+    /**
+     * Creates and return a new wizard closing dialog without opening it.
+     * 
+     * @return MessageDalog
+     */
+    private MessageDialog createWizardClosingDialog() {
+        MessageDialog result = new MessageDialog(getShell(),
+                                                 JFaceResources.getString("WizardClosingDialog.title"), //$NON-NLS-1$
+                                                 null,
+                                                 JFaceResources.getString("WizardClosingDialog.message"), //$NON-NLS-1$
+                                                 MessageDialog.QUESTION,
+                                                 new String[] { IDialogConstants.OK_LABEL }, 0) {
+            @Override
+            protected int getShellStyle() {
+                return super.getShellStyle() | SWT.SHEET;
+            }
+        };
+        return result;
+    }
+
+    /**
+     * The Finish button has been pressed.
+     */
+    protected void finishPressed() {
+        // Wizards are added to the nested wizards list in setWizard.
+        // This means that the current wizard is always the last wizard in the
+        // list.
+        // Note that we first call the current wizard directly (to give it a
+        // chance to
+        // abort, do work, and save state) then call the remaining n-1 wizards
+        // in the
+        // list (to save state).
+        if (wizard.performFinish()) {
+            // Call perform finish on outer wizards in the nested chain
+            // (to allow them to save state for example)
+            for (int i = 0; i < nestedWizards.size() - 1; i++) {
+                nestedWizards.get(i).performFinish();
+            }
+            // Hard close the dialog.
+            setReturnCode(OK);
+            hardClose();
+        }
+    }
+
+    @Override
+    public IWizardPage getCurrentPage() {
+        return currentPage;
+    }
+
+    /**
+     * Returns the progress monitor for this wizard dialog (if it has one).
+     * 
+     * @return the progress monitor, or <code>null</code> if this wizard dialog does not have one
+     */
+    protected IProgressMonitor getProgressMonitor() {
+        return progressMonitorPart;
+    }
+
+    /**
+     * Returns the wizard this dialog is currently displaying.
+     * 
+     * @return the current wizard
+     */
+    protected IWizard getWizard() {
+        return wizard;
+    }
+
+    /**
+     * Closes this window.
+     * 
+     * @return <code>true</code> if the window is (or was already) closed, and <code>false</code> if
+     *         it is still open
+     */
+    private boolean hardClose() {
+        // inform wizards
+        for (int i = 0; i < createdWizards.size(); i++) {
+            IWizard createdWizard = createdWizards.get(i);
+            try {
+                createdWizard.dispose();
+            } catch (Exception e) {
+                Status status = new Status(IStatus.ERROR, Policy.JFACE, IStatus.ERROR, e.getMessage(), e);
+                Policy.getLog().log(status);
+            }
+            // Remove this dialog as a parent from the managed wizard.
+            // Note that we do this after calling dispose as the wizard or
+            // its pages may need access to the container during
+            // dispose code
+            createdWizard.setContainer(null);
+        }
+        // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=202534
+        // disposing the wizards could cause the image currently set in
+        // this dialog to be disposed. A subsequent repaint event during
+        // close would then fail. To prevent this case, we null out the image.
+        setTitleImage(null);
+        return super.close();
+    }
+
+    /**
+     * The Help button has been pressed.
+     */
+    protected void helpPressed() {
+        if (currentPage != null) {
+            currentPage.performHelp();
+        }
+    }
+
+    /**
+     * The Next button has been pressed.
+     */
+    protected void nextPressed() {
+        IWizardPage page = currentPage.getNextPage();
+        if (page == null) {
+            // something must have happened getting the next page
+            return;
+        }
+
+        // show the next page
+        showPage(page);
+    }
+
+    /**
+     * Notifies page changing listeners and returns result of page changing processing to the
+     * sender.
+     * 
+     * @param eventType
+     * @return <code>true</code> if page changing listener completes successfully,
+     *         <code>false</code> otherwise
+     */
+    private boolean doPageChanging(IWizardPage targetPage) {
+        PageChangingEvent e = new PageChangingEvent(this, getCurrentPage(),
+                                                    targetPage);
+        firePageChanging(e);
+        // Prevent navigation if necessary
+        return e.doit;
+    }
+
+    /**
+     * Checks whether it is alright to close this wizard dialog and performed standard cancel
+     * processing. If there is a long running operation in progress, this method posts an alert
+     * message saying that the wizard cannot be closed.
+     * 
+     * @return <code>true</code> if it is alright to close this dialog, and <code>false</code> if it
+     *         is not
+     */
+    private boolean okToClose() {
+        if (activeRunningOperations > 0) {
+            synchronized (this) {
+                windowClosingDialog = createWizardClosingDialog();
+            }
+            windowClosingDialog.open();
+            synchronized (this) {
+                windowClosingDialog = null;
+            }
+            return false;
+        }
+        return wizard.performCancel();
+    }
+
+    /**
+     * Restores the enabled/disabled state of the given control.
+     * 
+     * @param control
+     *            the control
+     * @param saveState
+     *            a map containing the enabled/disabled state of the wizard dialog's buttons
+     * @param key
+     *            the key
+     * @see #saveEnableStateAndSet
+     */
+    private void restoreEnableState(Control control, Map<String, Object> saveState, String key) {
+        if (control != null) {
+            Boolean b = (Boolean) saveState.get(key);
+            if (b != null) {
+                control.setEnabled(b.booleanValue());
+            }
+        }
+    }
+
+    /**
+     * Restores the enabled/disabled state of the wizard dialog's buttons and the tree of controls
+     * for the currently showing page.
+     * 
+     * @param saveState
+     *            a map containing the saved state as returned by <code>saveUIState</code>
+     * @see #saveUIState
+     */
+    private void restoreUIState(Map<String, Object> saveState) {
+        restoreEnableState(backButton, saveState, "back"); //$NON-NLS-1$
+        restoreEnableState(nextButton, saveState, "next"); //$NON-NLS-1$
+        restoreEnableState(finishButton, saveState, "finish"); //$NON-NLS-1$
+        restoreEnableState(cancelButton, saveState, "cancel"); //$NON-NLS-1$
+        restoreEnableState(helpButton, saveState, "help"); //$NON-NLS-1$
+        Object pageValue = saveState.get("page"); //$NON-NLS-1$
+        if (pageValue != null) {
+            ((ControlEnableState) pageValue).restore();
+        }
+    }
+
+    /**
+     * This implementation of IRunnableContext#run(boolean, boolean, IRunnableWithProgress) blocks
+     * until the runnable has been run, regardless of the value of <code>fork</code>. It is
+     * recommended that <code>fork</code> is set to true in most cases. If <code>fork</code> is set
+     * to <code>false</code>, the runnable will run in the UI thread and it is the runnable's
+     * responsibility to call <code>Display.readAndDispatch()</code> to ensure UI responsiveness. UI
+     * state is saved prior to executing the long-running operation and is restored after the
+     * long-running operation completes executing. Any attempt to change the UI state of the wizard
+     * in the long-running operation will be nullified when original UI state is restored.
+     */
+    @Override
+    public void run(boolean fork, boolean cancelable,
+                    IRunnableWithProgress runnable)
+            throws InvocationTargetException,
+            InterruptedException {
+        // The operation can only be canceled if it is executed in a separate
+        // thread.
+        // Otherwise the UI is blocked anyway.
+        Object state = null;
+        if (activeRunningOperations++ == 0) {
+            state = aboutToStart(fork && cancelable);
+        }
+        IProgressMonitor progressMonitor = getProgressMonitor();
+        if (progressMonitor == null) {
+            progressMonitor = new NullProgressMonitor();
+        }
+        try {
+            if (!fork) {
+                lockedUI = true;
+            }
+            ModalContext.run(runnable, fork, progressMonitor, getShell()
+                    .getDisplay());
+            lockedUI = false;
+        } finally {
+            // explicitly invoke done() on our progress monitor so that its
+            // label does not spill over to the next invocation, see bug 271530
+            progressMonitor.done();
+            // Stop if this is the last one
+            if (state != null) {
+                timeWhenLastJobFinished = System.currentTimeMillis();
+                stopped(state);
+            }
+            activeRunningOperations--;
+        }
+    }
+
+    /**
+     * Saves the enabled/disabled state of the given control in the given map, which must be
+     * modifiable.
+     * 
+     * @param control
+     *            the control, or <code>null</code> if none
+     * @param saveState
+     *            a map containing the enabled/disabled state of the wizard dialog's buttons
+     * @param key
+     *            the key
+     * @param enabled
+     *            <code>true</code> to enable the control, and <code>false</code> to disable it
+     * @see #restoreEnableState(Control, Map, String)
+     */
+    private void saveEnableStateAndSet(Control control, Map<String, Object> saveState, String key,
+                                       boolean enabled) {
+        if (control != null) {
+            saveState.put(key, control.getEnabled() ? Boolean.TRUE : Boolean.FALSE);
+            control.setEnabled(enabled);
+        }
+    }
+
+    /**
+     * Captures and returns the enabled/disabled state of the wizard dialog's buttons and the tree
+     * of controls for the currently showing page. All these controls are disabled in the process,
+     * with the possible exception of the Cancel button.
+     * 
+     * @param keepCancelEnabled
+     *            <code>true</code> if the Cancel button should remain enabled, and
+     *            <code>false</code> if it should be disabled
+     * @return a map containing the saved state suitable for restoring later with
+     *         <code>restoreUIState</code>
+     * @see #restoreUIState
+     */
+    private Map<String, Object> saveUIState(boolean keepCancelEnabled) {
+        Map<String, Object> savedState = new HashMap<String, Object>(10);
+        saveEnableStateAndSet(backButton, savedState, "back", false); //$NON-NLS-1$
+        saveEnableStateAndSet(nextButton, savedState, "next", false); //$NON-NLS-1$
+        saveEnableStateAndSet(finishButton, savedState, "finish", false); //$NON-NLS-1$
+        saveEnableStateAndSet(cancelButton, savedState, "cancel", keepCancelEnabled); //$NON-NLS-1$
+        saveEnableStateAndSet(helpButton, savedState, "help", false); //$NON-NLS-1$
+        if (currentPage != null) {
+            savedState
+                    .put(
+                         "page", ControlEnableState.disable(currentPage.getControl())); //$NON-NLS-1$
+        }
+        return savedState;
+    }
+
+    /**
+     * Sets the given cursor for all shells currently active for this window's display.
+     * 
+     * @param c
+     *            the cursor
+     */
+    private void setDisplayCursor(Cursor c) {
+        Shell[] shells = getShell().getDisplay().getShells();
+        for (int i = 0; i < shells.length; i++) {
+            shells[i].setCursor(c);
+        }
+    }
+
+    /**
+     * Sets the minimum page size used for the pages.
+     * 
+     * @param minWidth
+     *            the minimum page width
+     * @param minHeight
+     *            the minimum page height
+     * @see #setMinimumPageSize(Point)
+     */
+    public void setMinimumPageSize(int minWidth, int minHeight) {
+        Assert.isTrue(minWidth >= 0 && minHeight >= 0);
+        pageContainerLayout.minimumWidth = minWidth;
+        pageContainerLayout.minimumHeight = minHeight;
+    }
+
+    /**
+     * Sets the minimum page size used for the pages.
+     * 
+     * @param size
+     *            the page size encoded as <code>new Point(width,height)</code>
+     * @see #setMinimumPageSize(int,int)
+     */
+    public void setMinimumPageSize(Point size) {
+        setMinimumPageSize(size.x, size.y);
+    }
+
+    /**
+     * Sets the size of all pages. The given size takes precedence over computed sizes.
+     * 
+     * @param width
+     *            the page width
+     * @param height
+     *            the page height
+     * @see #setPageSize(Point)
+     */
+    public void setPageSize(int width, int height) {
+        pageWidth = width;
+        pageHeight = height;
+    }
+
+    /**
+     * Sets the size of all pages. The given size takes precedence over computed sizes.
+     * 
+     * @param size
+     *            the page size encoded as <code>new Point(width,height)</code>
+     * @see #setPageSize(int,int)
+     */
+    public void setPageSize(Point size) {
+        setPageSize(size.x, size.y);
+    }
+
+    /**
+     * Sets the wizard this dialog is currently displaying.
+     * 
+     * @param newWizard
+     *            the wizard
+     */
+    protected void setWizard(IWizard newWizard) {
+        wizard = newWizard;
+        wizard.setContainer(this);
+        if (!createdWizards.contains(wizard)) {
+            createdWizards.add(wizard);
+            // New wizard so just add it to the end of our nested list
+            nestedWizards.add(wizard);
+            if (pageContainer != null) {
+                // Dialog is already open
+                // Allow the wizard pages to precreate their page controls
+                // This allows the wizard to open to the correct size
+                createPageControls();
+                // Ensure the dialog is large enough for the wizard
+                updateSizeForWizard(wizard);
+                pageContainer.layout(true);
+            }
+        } else {
+            // We have already seen this wizard, if it is the previous wizard
+            // on the nested list then we assume we have gone back and remove
+            // the last wizard from the list
+            int size = nestedWizards.size();
+            if (size >= 2 && nestedWizards.get(size - 2) == wizard) {
+                nestedWizards.remove(size - 1);
+            } else {
+                // Assume we are going forward to revisit a wizard
+                nestedWizards.add(wizard);
+            }
+        }
+    }
+
+    @Override
+    public void showPage(IWizardPage page) {
+        if (page == null || page == currentPage) {
+            return;
+        }
+
+        if (!isMovingToPreviousPage) {
+            // remember my previous page.
+            page.setPreviousPage(currentPage);
+        } else {
+            isMovingToPreviousPage = false;
+        }
+
+        // If page changing evaluation unsuccessful, do not change the page
+        if (!doPageChanging(page))
+            return;
+
+        // Update for the new page in a busy cursor if possible
+        if (getContents() == null) {
+            updateForPage(page);
+        } else {
+            final IWizardPage finalPage = page;
+            BusyIndicator.showWhile(getContents().getDisplay(), new Runnable() {
+                @Override
+                public void run() {
+                    updateForPage(finalPage);
+                }
+            });
+        }
+    }
+
+    /**
+     * Update the receiver for the new page.
+     * 
+     * @param page
+     */
+    private void updateForPage(IWizardPage page) {
+        // ensure this page belongs to the current wizard
+        if (wizard != page.getWizard()) {
+            setWizard(page.getWizard());
+        }
+        // ensure that page control has been created
+        // (this allows lazy page control creation)
+        if (page.getControl() == null) {
+            page.createControl(pageContainer);
+            // the page is responsible for ensuring the created control is
+            // accessible via getControl.
+            Assert.isNotNull(page.getControl(), JFaceResources.format(
+                                                                      JFaceResources.getString("WizardDialog.missingSetControl"), //$NON-NLS-1$
+                                                                      new Object[] { page.getName() }));
+            // ensure the dialog is large enough for this page
+            updateSize(page);
+        }
+        // make the new page visible
+        IWizardPage oldPage = currentPage;
+        currentPage = page;
+
+        currentPage.setVisible(true);
+        if (oldPage != null) {
+            oldPage.setVisible(false);
+        }
+        // update the dialog controls
+        update();
+    }
+
+    /**
+     * Shows the starting page of the wizard.
+     */
+    private void showStartingPage() {
+        currentPage = wizard.getStartingPage();
+        if (currentPage == null) {
+            // something must have happened getting the page
+            return;
+        }
+        // ensure the page control has been created
+        if (currentPage.getControl() == null) {
+            currentPage.createControl(pageContainer);
+            // the page is responsible for ensuring the created control is
+            // accessible via getControl.
+            Assert.isNotNull(currentPage.getControl());
+            // we do not need to update the size since the call
+            // to initialize bounds has not been made yet.
+        }
+        // make the new page visible
+        currentPage.setVisible(true);
+        // update the dialog controls
+        update();
+    }
+
+    /**
+     * A long running operation triggered through the wizard was stopped either by user input or by
+     * normal end. Hides the progress monitor and restores the enable state wizard's buttons and
+     * controls.
+     * 
+     * @param savedState
+     *            the saved UI state as returned by <code>aboutToStart</code>
+     * @see #aboutToStart
+     */
+    private void stopped(Object savedState) {
+        if (getShell() != null && !getShell().isDisposed()) {
+//            if (wizard.needsProgressMonitor()) {
+//                progressMonitorPart.setVisible(false);
+//                progressMonitorPart.removeFromCancelComponent(cancelButton);
+//            }
+
+            @SuppressWarnings("unchecked")
+            Map<String, Object> state = (Map<String, Object>) savedState;
+            restoreUIState(state);
+            setDisplayCursor(null);
+            if (useCustomProgressMonitorPart) {
+                cancelButton.addSelectionListener(cancelListener);
+                cancelButton.setCursor(null);
+                arrowCursor.dispose();
+                arrowCursor = null;
+            }
+            waitCursor.dispose();
+            waitCursor = null;
+            Control focusControl = (Control) state.get(FOCUS_CONTROL);
+            if (focusControl != null && !focusControl.isDisposed()) {
+                focusControl.setFocus();
+            }
+        }
+    }
+
+    /**
+     * Updates this dialog's controls to reflect the current page.
+     */
+    protected void update() {
+        // Update the window title
+        updateWindowTitle();
+        // Update the title bar
+        updateTitleBar();
+        // Update the buttons
+        updateButtons();
+
+        // Fires the page change event
+        firePageChanged(new PageChangedEvent(this, getCurrentPage()));
+    }
+
+    @Override
+    public void updateButtons() {
+        boolean canFlipToNextPage = false;
+        boolean canFinish = wizard.canFinish();
+        if (backButton != null) {
+            boolean backEnabled = currentPage != null
+                    && currentPage.getPreviousPage() != null;
+            backButton.setEnabled(backEnabled);
+        }
+        if (nextButton != null) {
+            canFlipToNextPage = currentPage != null
+                    && currentPage.canFlipToNextPage();
+            nextButton.setEnabled(canFlipToNextPage);
+        }
+        finishButton.setEnabled(canFinish);
+        // finish is default unless it is disabled and next is enabled
+        if (canFlipToNextPage && !canFinish) {
+            getShell().setDefaultButton(nextButton);
+        } else {
+            getShell().setDefaultButton(finishButton);
+        }
+    }
+
+    /**
+     * Update the message line with the page's description.
+     * <p>
+     * A description is shown only if there is no message or error message.
+     * </p>
+     */
+    private void updateDescriptionMessage() {
+        pageDescription = currentPage.getDescription();
+        setMessage(pageDescription);
+    }
+
+    @Override
+    public void updateMessage() {
+
+        if (currentPage == null) {
+            return;
+        }
+
+        pageMessage = currentPage.getMessage();
+        if (pageMessage != null && currentPage instanceof IMessageProvider) {
+            pageMessageType = ((IMessageProvider) currentPage).getMessageType();
+        } else {
+            pageMessageType = IMessageProvider.NONE;
+        }
+        if (pageMessage == null) {
+            setMessage(pageDescription);
+        } else {
+            setMessage(pageMessage, pageMessageType);
+        }
+        setErrorMessage(currentPage.getErrorMessage());
+    }
+
+    /**
+     * Changes the shell size to the given size, ensuring that it is no larger than the display
+     * bounds.
+     * 
+     * @param width
+     *            the shell width
+     * @param height
+     *            the shell height
+     */
+    private void setShellSize(int width, int height) {
+        Rectangle size = getShell().getBounds();
+        size.height = height;
+        size.width = width;
+        getShell().setBounds(getConstrainedShellBounds(size));
+    }
+
+    /**
+     * Computes the correct dialog size for the current page and resizes its shell if necessary.
+     * Also causes the container to refresh its layout.
+     * 
+     * @param page
+     *            the wizard page to use to resize the dialog
+     * @since 2.0
+     */
+    protected void updateSize(IWizardPage page) {
+        if (page == null || page.getControl() == null) {
+            return;
+        }
+        updateSizeForPage(page);
+        pageContainerLayout.layoutPage(page.getControl());
+    }
+
+    @Override
+    public void updateSize() {
+        updateSize(currentPage);
+    }
+
+    /**
+     * Computes the correct dialog size for the given page and resizes its shell if necessary.
+     * 
+     * @param page
+     *            the wizard page
+     */
+    private void updateSizeForPage(IWizardPage page) {
+        // ensure the page container is large enough
+        Point delta = calculatePageSizeDelta(page);
+        if (delta.x > 0 || delta.y > 0) {
+            // increase the size of the shell
+            Shell shell = getShell();
+            Point shellSize = shell.getSize();
+            setShellSize(shellSize.x + delta.x, shellSize.y + delta.y);
+            constrainShellSize();
+        }
+    }
+
+    /**
+     * Computes the correct dialog size for the given wizard and resizes its shell if necessary.
+     * 
+     * @param sizingWizard
+     *            the wizard
+     */
+    private void updateSizeForWizard(IWizard sizingWizard) {
+        Point delta = new Point(0, 0);
+        IWizardPage[] pages = sizingWizard.getPages();
+        for (int i = 0; i < pages.length; i++) {
+            // ensure the page container is large enough
+            Point pageDelta = calculatePageSizeDelta(pages[i]);
+            delta.x = Math.max(delta.x, pageDelta.x);
+            delta.y = Math.max(delta.y, pageDelta.y);
+        }
+        if (delta.x > 0 || delta.y > 0) {
+            // increase the size of the shell
+            Shell shell = getShell();
+            Point shellSize = shell.getSize();
+            setShellSize(shellSize.x + delta.x, shellSize.y + delta.y);
+        }
+    }
+
+    /* Tizen */
+    public void setNavigationString(String[] strings) {
+        this.navigatorString = strings;
+    }
+
+    public void setNavigatorCurrentPage(int index) {
+        if (pageNavigator != null) {
+            pageNavigator.setCurruntPageIndex(index);
+        }
+    }
+
+    public void redrawNavigator() {
+        if (pageNavigator != null) {
+            this.pageNavigator.redraw();
+        }
+    }
+
+    public void setCTitle(String title) {
+        if (titleLabel != null) {
+            titleLabel.setText(title);
+        }
+    }
+
+    public void setCDescription(String desc) {
+        if (stl == null)
+            return;
+
+        Label descLabel = (stl.topControl == pageNaviTitleComp) ? descLabelTypePageNavi : descLabelTypeMsg;
+        if (descLabel != null) {
+            Composite comp = descLabel.getParent();
+            descLabel.setText(desc);
+            comp.layout();
+        }
+    }
+    /* ===== */
+
+    @Override
+    public void updateTitleBar() {
+        String s = null;
+        if (currentPage != null) {
+            s = currentPage.getTitle();
+        }
+        if (s == null) {
+            s = ""; //$NON-NLS-1$
+        }
+        setTitle(s);
+        if (currentPage != null) {
+            setTitleImage(currentPage.getImage());
+            updateDescriptionMessage();
+        }
+        updateMessage();
+    }
+
+    @Override
+    public void updateWindowTitle() {
+        if (getShell() == null) {
+            // Not created yet
+            return;
+        }
+        String title = wizard.getWindowTitle();
+        if (title == null) {
+            title = ""; //$NON-NLS-1$
+        }
+        getShell().setText(title);
+    }
+
+    @Override
+    public Object getSelectedPage() {
+        return getCurrentPage();
+    }
+
+    @Override
+    public void addPageChangedListener(IPageChangedListener listener) {
+        pageChangedListeners.add(listener);
+    }
+
+    @Override
+    public void removePageChangedListener(IPageChangedListener listener) {
+        pageChangedListeners.remove(listener);
+    }
+
+    /**
+     * Notifies any selection changed listeners that the selected page has changed. Only listeners
+     * registered at the time this method is called are notified.
+     * 
+     * @param event
+     *            a selection changed event
+     * @see IPageChangedListener#pageChanged
+     * @since 3.1
+     */
+    protected void firePageChanged(final PageChangedEvent event) {
+        Object[] listeners = pageChangedListeners.getListeners();
+        for (int i = 0; i < listeners.length; ++i) {
+            final IPageChangedListener l = (IPageChangedListener) listeners[i];
+            SafeRunnable.run(new SafeRunnable() {
+                @Override
+                public void run() {
+                    l.pageChanged(event);
+                }
+            });
+        }
+    }
+
+    /**
+     * Adds a listener for page changes to the list of page changing listeners registered for this
+     * dialog. Has no effect if an identical listener is already registered.
+     * 
+     * @param listener
+     *            a page changing listener
+     * @since 3.3
+     */
+    public void addPageChangingListener(IPageChangingListener listener) {
+        pageChangingListeners.add(listener);
+    }
+
+    /**
+     * Removes the provided page changing listener from the list of page changing listeners
+     * registered for the dialog.
+     * 
+     * @param listener
+     *            a page changing listener
+     * @since 3.3
+     */
+    public void removePageChangingListener(IPageChangingListener listener) {
+        pageChangingListeners.remove(listener);
+    }
+
+    /**
+     * Notifies any page changing listeners that the currently selected dialog page is changing.
+     * Only listeners registered at the time this method is called are notified.
+     * 
+     * @param event
+     *            a selection changing event
+     * @see IPageChangingListener#handlePageChanging(PageChangingEvent)
+     * @since 3.3
+     */
+    protected void firePageChanging(final PageChangingEvent event) {
+        Object[] listeners = pageChangingListeners.getListeners();
+        for (int i = 0; i < listeners.length; ++i) {
+            final IPageChangingListener l = (IPageChangingListener) listeners[i];
+            SafeRunnable.run(new SafeRunnable() {
+                @Override
+                public void run() {
+                    l.handlePageChanging(event);
+                }
+            });
+        }
+    }
+
+    public void setVisiblePageNavigator(boolean visible) {
+        stl.topControl = (visible) ? pageNaviTitleComp : pageNaviUnTitleComp;
+        contentPanel.layout();
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/message/Messages.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/message/Messages.java
new file mode 100644 (file)
index 0000000..9142973
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.message;
+
+import org.eclipse.osgi.util.NLS;
+import org.tizen.efluibuilder.projectmigrator.Activator;
+
+
+public class Messages extends NLS {
+
+    private static final String BUNDLE_NAME = Activator.PLUGIN_ID + ".ui.message.messages";//$NON-NLS-1$
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+
+    public static String WIZARD_TITLE_CONVERTER;
+    public static String WIZARD_TITLE_USER_VIEW;
+    public static String PAGE_NAVI_SHAPE_TYPE;
+    public static String PAGE_NAVI_APP_ENTRY;
+    public static String PAGE_NAVI_USER_VIEW;
+
+    public static String WIZARD_CANCEL_CONVERSION;
+    public static String WIZARD_CANCEL;
+
+    // == main page
+    public static String PAGE_MAIN_DESC;
+    public static String PAGE_MAIN_MSG_IMAGE_TITLE;
+
+    // == shape-type page
+    public static String PAGE_SHAPETYPE_DESC;
+    public static String PAGE_SHAPETYPE_MSG_GROUPNAME;
+    public static String PAGE_SHAPETYPE_MSG_SQUARE;
+    public static String PAGE_SHAPETYPE_MSG_CIRCLE;
+
+    // == app-entry page
+    public static String PAGE_APPENTRY_DESC;
+    public static String PAGE_APPENTRY_MSG_LABEL_BROWSE;
+    public static String PAGE_APPENTRY_MSG_LABEL_SELECT;
+    public static String PAGE_APPENTRY_MSG_UIB;
+    public static String PAGE_APPENTRY_MSG_LEGACY;
+
+    public static String PAGE_APPENTRY_MSG_BTN_BROWSE;
+    public static String PAGE_APPENTRY_MSG_TEXT_DEFAULT_MSG;
+    public static String PAGE_APPENTRY_MSG_FILTER_EXTENSION;
+    public static String PAGE_APPENTRY_MSG_INVALID_SRC;
+    public static String PAGE_APPENTRY_MSG_FILE_DLG_TITLE;
+
+    // == user-view page
+    public static String PAGE_USERVIEW_DESC_SINGLE_LINE;
+    public static String PAGE_USERVIEW_DESC_MULTI_LINE;
+    public static String PAGE_USERVIEW_MSG_STARTUP_DESC;
+    public static String PAGE_USERVIEW_MSG_INPUT;
+    public static String PAGE_USERVIEW_MSG_ADD_USER_VIEW;
+    public static String PAGE_USERVIEW_MSG_USER_VIEWS;
+    public static String PAGE_USERVIEW_MSG_BTN_ADD;
+
+    public static String PAGE_USERVIEW_MSG_BTN_DEL;
+    public static String PAGE_USERVIEW_MSG_BTN_STARTUP;
+
+    public static String PAGE_USERVIEW_MSG_SAME_NAME;
+    public static String PAGE_USERVIEW_MSG_NAME_LENGTH;
+    public static String PAGE_USERVIEW_MSG_NAME_REGX;
+
+    // new add
+    public static String PAGE_USERVIEW_MSG_DELETE_CONFIRM;
+
+    // == progress monitor message;#
+    public static String PROGRESS_MSG_CONVERT_BEGINTASK;
+    public static String PROGRESS_MSG_UPDATE_USER_VIEW_BEGINTASK;
+
+    public static String PROGRESS_MSG_SUBTASK_CLONE_CUR_PROJECT;
+    public static String PROGRESS_MSG_SUBTASK_CREATE_LAYOUT_FOLADER;
+    public static String PROGRESS_MSG_SUBTASK_COPY_RELATED_FILES;
+    public static String PROGRESS_MSG_SUBTASK_ADD_INCLUDE_PATH;
+    public static String PROGRESS_MSG_SUBTASK_SET_APP_ENTRY;
+    public static String PROGRESS_MSG_SUBTASK_DO_PROCESS_USER_VIEW_FILE;
+    public static String PROGRESS_MSG_SUBTASK_RECORVERY;
+
+    // == core exception message;#
+    public static String CORE_EXCEPTION_MSG_PRE_VALIDATION_NO_FILE_SELECTED;
+    public static String CORE_EXCEPTION_MSG_PRE_VALIDATION_EXIST_USER_VIEW;
+    public static String CORE_EXCEPTION_MSG_CHANGE_UIB_PERSPECTIVE;
+    public static String CORE_EXCEPTION_MSG_ADD_UIB_NATURE;
+    public static String CORE_EXCEPTION_MSG_COPY_RELATED_FILES;
+    public static String CORE_EXCEPTION_MSG_CREATE_FOLDER;
+    public static String CORE_EXCEPTION_MSG_CREATE_FILE;
+    public static String CORE_EXCEPTION_MSG_DELETE_FILE;
+    public static String CORE_EXCEPTION_MSG_RUN_PROGRESS_DIALOG;
+    public static String CORE_EXCEPTION_MSG_CLONE_PROJECT;
+    public static String CORE_EXCEPTION_MSG_RECORVERY;
+    public static String CORE_EXCEPTION_MSG_INTERNAL;
+
+    // == core exception message2==#
+    public static String CORE_EXCEPTION_MSG_CANNOT_FIND_APP_ENTRY;
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/message/messages.properties b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/message/messages.properties
new file mode 100644 (file)
index 0000000..41f6674
--- /dev/null
@@ -0,0 +1,85 @@
+WIZARD_TITLE_CONVERTER=Convert to UI Builder Project
+WIZARD_TITLE_USER_VIEW=User View Manager
+PAGE_NAVI_SHAPE_TYPE=Shape Type
+PAGE_NAVI_APP_ENTRY=Application Entry Point
+PAGE_NAVI_USER_VIEW=User View
+WIZARD_CANCEL_CONVERSION=Are you sure you want to cancel the conversion? If you click Yes, you lose what you've done.
+WIZARD_CANCEL=Are you sure you want to cancel? If you click Yes, you lose what you've done.
+
+PAGE_MAIN_DESC=Are you sure you want to convert to UI builder project? The conversion allows you to use the UI Builder features.\n\
+However, DALi and widget application projects are not supported.
+PAGE_MAIN_MSG_IMAGE_TITLE=UI Builder
+
+PAGE_SHAPETYPE_DESC=Select the shape (layout) for the converted project.
+PAGE_SHAPETYPE_MSG_GROUPNAME=Shape Type
+PAGE_SHAPETYPE_MSG_CIRCLE=Circle
+PAGE_SHAPETYPE_MSG_SQUARE=Square
+
+PAGE_APPENTRY_DESC=Select the application entry point\n\
+If you select UI Builder, the converted application follows the Tizen native UI Builder application life-cycle.
+
+PAGE_APPENTRY_MSG_LABEL_BROWSE=Application entry point source file location
+PAGE_APPENTRY_MSG_LABEL_SELECT=Application entry point
+PAGE_APPENTRY_MSG_UIB=Use UI Builder
+PAGE_APPENTRY_MSG_LEGACY=Keep Current Application Setting
+
+PAGE_APPENTRY_MSG_BTN_BROWSE=Browse
+PAGE_APPENTRY_MSG_TEXT_DEFAULT_MSG=Select the application entry file
+PAGE_APPENTRY_MSG_FILTER_EXTENSION=*.c
+PAGE_APPENTRY_MSG_INVALID_SRC=The selected application entry file is not valid. Make sure that you have selected the file from the project to be converted, or the main() function exists in the file.
+PAGE_APPENTRY_MSG_FILE_DLG_TITLE=File Select
+
+PAGE_USERVIEW_DESC_MULTI_LINE=To use the existing UI views in the new project, you must create a user view file.\n\
+The file has functions that wrap the EFL UI component code and offer the interface. You can insert the UI logic code to the functions.
+
+PAGE_USERVIEW_DESC_SINGLE_LINE=To use the existing UI views in the new project, you must create a user view file. The file has functions that wrap the EFL UI component code and offer the interface. You can insert the UI logic code to the functions.
+
+PAGE_USERVIEW_MSG_STARTUP_DESC=\
+You can set a specific user view as the start-up view instead of the existing start-up view in the Outline view.
+
+
+PAGE_USERVIEW_MSG_INPUT=user_view1
+PAGE_USERVIEW_MSG_ADD_USER_VIEW=Add User view
+PAGE_USERVIEW_MSG_USER_VIEWS=User Views
+
+#==[START]== new add ==#
+PAGE_USERVIEW_MSG_DELETE_CONFIRM=Are you sure you want to delete the selected user views? If you click Finish, the views are deleted immediately. You can't undo this action.
+#==[END]== new add ==#
+
+PAGE_USERVIEW_MSG_BTN_ADD=Add
+PAGE_USERVIEW_MSG_BTN_DEL=Delete
+PAGE_USERVIEW_MSG_BTN_STARTUP=Start-up
+    
+PAGE_USERVIEW_MSG_SAME_NAME=The user view with the same name already exists. Enter another name.
+PAGE_USERVIEW_MSG_NAME_LENGTH=The name length must be 1-30 characters.
+PAGE_USERVIEW_MSG_NAME_REGX=The name can contain alphabetic characters, digits, and underscores ("_"). It cannot start with a digit.
+
+#== progress monitor message==#
+PROGRESS_MSG_CONVERT_BEGINTASK=Converting to UI Builder project...
+PROGRESS_MSG_UPDATE_USER_VIEW_BEGINTASK=The user view manager is applying new configuration to the project.
+PROGRESS_MSG_SUBTASK_CLONE_CUR_PROJECT=Cloning the {0} project...
+PROGRESS_MSG_SUBTASK_CREATE_LAYOUT_FOLADER=Creating the layout folder...
+PROGRESS_MSG_SUBTASK_COPY_RELATED_FILES=Copying files related to UI Builder...
+PROGRESS_MSG_SUBTASK_ADD_INCLUDE_PATH=Add include paths related to UI Builder...
+PROGRESS_MSG_SUBTASK_SET_APP_ENTRY=Setting UI Builder as the application entry point...
+PROGRESS_MSG_SUBTASK_DO_PROCESS_USER_VIEW_FILE=Creating the {0} user view files...
+
+PROGRESS_MSG_SUBTASK_RECORVERY=Recovering... Converting has stopped and the project is being deleted.
+
+
+#== core exception message==#
+CORE_EXCEPTION_MSG_PRE_VALIDATION_NO_FILE_SELECTED=Application entry file has not selected.
+CORE_EXCEPTION_MSG_PRE_VALIDATION_EXIST_USER_VIEW= The {0} user view is already exist.
+CORE_EXCEPTION_MSG_CHANGE_UIB_PERSPECTIVE=Cannot change to the UI Builder perspective due to an unexpected internal error.
+CORE_EXCEPTION_MSG_ADD_UIB_NATURE=Cannot add the build option for compiling the layout.xml due to an unexpected internal error.
+CORE_EXCEPTION_MSG_COPY_RELATED_FILES=Cannot copy the project file because it does not exist or the file with the same name already exists in the target directory.
+CORE_EXCEPTION_MSG_RUN_PROGRESS_DIALOG=Cannot start the progress bar due to an unexpected internal error.
+CORE_EXCEPTION_MSG_CREATE_FOLDER=Cannot create a(an) {0} directory due to an unexpected internal error.
+CORE_EXCEPTION_MSG_CREATE_FILE=Cannot create a(an) {0} file due to an unexpected internal error.
+CORE_EXCEPTION_MSG_DELETE_FILE=Cannot delete the {0} file due to an unexpected internal error.
+CORE_EXCEPTION_MSG_CLONE_PROJECT=Cannot clone the {0} project due to an unexpected internal error.
+CORE_EXCEPTION_MSG_RECORVERY=Cannot recovery the {0} project due to an unexpected internal error.
+CORE_EXCEPTION_MSG_INTERNAL=Unexpected internal error occurred.
+
+#== core exception message2==#
+CORE_EXCEPTION_MSG_CANNOT_FIND_APP_ENTRY=Cannot find main function due to an unexpected internal error.
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/progress/ProgressConstants.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/progress/ProgressConstants.java
new file mode 100644 (file)
index 0000000..1082c42
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.progress;
+
+public class ProgressConstants {
+
+    public static final String KEY_MODEL_PARAM = "key_model_param"; //$NON-NLS-1$
+    public static final String KEY_MODEL_WIZARD_MODE = "key_model_wizard_mode"; //$NON-NLS-1$
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/progress/ProgressMonitorDialogEx.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/progress/ProgressMonitorDialogEx.java
new file mode 100644 (file)
index 0000000..5c194cb
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.progress;
+
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.swt.widgets.Shell;
+
+
+public final class ProgressMonitorDialogEx extends ProgressMonitorDialog {
+
+    private String title;
+
+    public ProgressMonitorDialogEx(Shell parent) {
+        super(parent);
+    }
+
+    public ProgressMonitorDialogEx(Shell parent, String title) {
+        super(parent);
+        this.title = title;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    @Override
+    protected void configureShell(Shell shell) {
+        super.configureShell(shell);
+        shell.setText(title);
+    }
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/progress/ProjectMigratorRunnableWithProgress.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/progress/ProjectMigratorRunnableWithProgress.java
new file mode 100644 (file)
index 0000000..270fd6b
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.progress;
+
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.tizen.efluibuilder.projectmigrator.IProjectMigrator;
+import org.tizen.efluibuilder.projectmigrator.ProjectConvertParam;
+import org.tizen.efluibuilder.projectmigrator.ProjectMigrator;
+import org.tizen.efluibuilder.projectmigrator.ProjectMigratorConstants;
+
+
+public class ProjectMigratorRunnableWithProgress
+        implements IRunnableWithProgress {
+
+    protected IProject iProject;
+    protected Map<String, Object> model;
+
+    public ProjectMigratorRunnableWithProgress(IProject iProject, Map<String, Object> model) {
+        super();
+        this.iProject = iProject;
+        this.model = model;
+    }
+
+    @Override
+    public void run(IProgressMonitor monitor) {
+        ProjectConvertParam projectConverterParam = (ProjectConvertParam) model.get(ProgressConstants.KEY_MODEL_PARAM);
+        String wizardMode = (String) model.get(ProgressConstants.KEY_MODEL_WIZARD_MODE);
+        IProjectMigrator projectMigrator = new ProjectMigrator(iProject);
+        if (ProjectMigratorConstants.WIZARD_MODE_MANAGEMENT_USER_VIEW.equals(wizardMode)) {
+            projectMigrator.updateUserViews(projectConverterParam.getUserViews(), projectConverterParam.getDeletedUserViews(),
+                                       projectConverterParam.getStartupViewName(), monitor);
+        } else {
+            projectMigrator.convertToUIB(projectConverterParam, monitor);
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/ProjectMigratorWizard.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/ProjectMigratorWizard.java
new file mode 100644 (file)
index 0000000..8cbe5ea
--- /dev/null
@@ -0,0 +1,270 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.wizards;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.dialogs.IPageChangedListener;
+import org.eclipse.jface.dialogs.PageChangedEvent;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.WorkbenchException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.util.DialogUtil;
+import org.tizen.common.util.SWTUtil;
+import org.tizen.efluibuilder.project.core.NUIBProjectUtil;
+import org.tizen.efluibuilder.projectmigrator.ProjectConvertParam;
+import org.tizen.efluibuilder.projectmigrator.ProjectMigratorConstants;
+import org.tizen.efluibuilder.projectmigrator.ProjectMigratorException;
+import org.tizen.efluibuilder.projectmigrator.ui.dialog.ProjectMigratorWizardDialog;
+import org.tizen.efluibuilder.projectmigrator.ui.message.Messages;
+import org.tizen.efluibuilder.projectmigrator.ui.progress.ProgressConstants;
+import org.tizen.efluibuilder.projectmigrator.ui.progress.ProgressMonitorDialogEx;
+import org.tizen.efluibuilder.projectmigrator.ui.progress.ProjectMigratorRunnableWithProgress;
+import org.tizen.efluibuilder.projectmigrator.ui.wizards.pages.AppEntryPage;
+import org.tizen.efluibuilder.projectmigrator.ui.wizards.pages.BaseWizardPage;
+import org.tizen.efluibuilder.projectmigrator.ui.wizards.pages.MainPage;
+import org.tizen.efluibuilder.projectmigrator.ui.wizards.pages.ShapeTypePage;
+import org.tizen.efluibuilder.projectmigrator.ui.wizards.pages.UserViewPage;
+import org.tizen.efluibuilder.projectmigrator.util.FileUtil;
+import org.tizen.efluibuilder.projectmigrator.util.StringUtil;
+
+
+public class ProjectMigratorWizard extends Wizard implements IPageChangedListener {
+
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+    private IProject project;
+    private ProjectMigratorWizardDialog wizardDialog;
+    private static final String CUSTOM_PERSPECTIVE_NAME = "org.tizen.efluibuilder.ui.perspective.NUIBPerspective"; //$NON-NLS-1$
+
+    private String wizardMode;
+
+    private String[] pageNavigations;
+    private static final String[] pageNavigationsMobile = {
+            Messages.PAGE_NAVI_APP_ENTRY,
+            Messages.PAGE_NAVI_USER_VIEW };
+    private static final String[] pageNavigationsWearable = {
+            Messages.PAGE_NAVI_SHAPE_TYPE,
+            Messages.PAGE_NAVI_APP_ENTRY,
+            Messages.PAGE_NAVI_USER_VIEW };
+
+    public void setModel(String mode, IProject project) {
+        wizardMode = mode;
+        this.project = project;
+    }
+
+    public IProject getProject() {
+        return project;
+    }
+
+    public String getWizardMode() {
+        return wizardMode;
+    }
+
+    private void setNavigationIndexWizardPages() {
+        IWizardPage[] wizardPages = this.getPages();
+        int naviIdx = 0;
+        for (IWizardPage wizardPage : wizardPages) {
+            if (wizardPage instanceof BaseWizardPage) {
+                if (this.getStartingPage() != wizardPage) {
+                    ((BaseWizardPage) wizardPage).setNavigationIndex(naviIdx++);
+                }
+            }
+        }
+    }
+
+    private void createMobilePages() {
+        pageNavigations = pageNavigationsMobile;
+        setWindowTitle(Messages.WIZARD_TITLE_CONVERTER);
+
+        addPage(new MainPage(MainPage.class.getName()));
+
+        // tot-num: 2
+        addPage(new AppEntryPage(AppEntryPage.class.getName()));
+        addPage(new UserViewPage(UserViewPage.class.getName()));
+        setNavigationIndexWizardPages();
+    }
+
+    private void createWearablePages() {
+        setWindowTitle(Messages.WIZARD_TITLE_CONVERTER);
+        pageNavigations = pageNavigationsWearable;
+
+        addPage(new MainPage(MainPage.class.getName()));
+
+        // tot-num: 3
+        addPage(new ShapeTypePage(ShapeTypePage.class.getName()));
+        addPage(new AppEntryPage(AppEntryPage.class.getName()));
+        addPage(new UserViewPage(UserViewPage.class.getName()));
+        setNavigationIndexWizardPages();
+    }
+
+    private void createUserViewModePages() {
+        setWindowTitle(Messages.WIZARD_TITLE_USER_VIEW);
+        pageNavigations = null;
+
+        addPage(new UserViewPage(UserViewPage.class.getName()));
+    }
+
+    public void addPages() {
+        if (wizardMode == null) {
+            return;
+        } else if (wizardMode.equals(ProjectMigratorConstants.WIZARD_MODE_CONVERT_PROFILE_MOBILE)) {
+            createMobilePages();
+        } else if (wizardMode.equals(ProjectMigratorConstants.WIZARD_MODE_CONVERT_PROFILE_WEARABLE)) {
+            createWearablePages();
+        } else if (wizardMode.equals(ProjectMigratorConstants.WIZARD_MODE_MANAGEMENT_USER_VIEW)) {
+            createUserViewModePages();
+        }
+
+        wizardDialog = (ProjectMigratorWizardDialog) getContainer();
+        wizardDialog.addPageChangedListener(this);
+        wizardDialog.setNavigationString(pageNavigations);
+
+        if (getShell() != null) {
+            this.getShell().setMinimumSize(850, 627);
+            this.getShell().setLocation(SWT.CENTER, SWT.CENTER);
+        }
+    }
+
+    @Override
+    public boolean canFinish() {
+        IWizardPage currentPage = getContainer().getCurrentPage();
+        IWizardPage lastPage = getPages()[getPageCount() - 1];
+        if ((currentPage != null) && currentPage.equals(lastPage)) {
+            return currentPage.isPageComplete();
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    public boolean performCancel() {
+        int result = SWT.YES;
+
+        if (!wizardMode.equals(ProjectMigratorConstants.WIZARD_MODE_MANAGEMENT_USER_VIEW)) {
+            // project convert mode(mobile | wearable)
+            result = DialogUtil.openQuestionDialog(getWindowTitle(), Messages.WIZARD_CANCEL_CONVERSION);
+        } else if (canFinish()) {
+            // user view manager mode & Finish
+            result = DialogUtil.openQuestionDialog(getWindowTitle(), Messages.WIZARD_CANCEL);
+        }
+        return (result == SWT.YES);
+    }
+
+    @Override
+    public boolean performFinish() {
+        try {
+            Shell shell = this.getShell();
+            IWizardPage[] wizardPages = getPages();
+
+            ProjectConvertParam projectConverterParam = new ProjectConvertParam();
+            projectConverterParam.setCloneProjectName(FileUtil.findCloneProjectNameforConvert(project.getName()));
+
+            for (IWizardPage wizardPage : wizardPages) {
+                if (wizardPage.getName().equals(AppEntryPage.class.getName())) {
+                    AppEntryPage appEntryPage = (AppEntryPage) wizardPage;
+                    projectConverterParam.setUIBAppEntry(appEntryPage.isSelectedAppEntryUIB());
+                    projectConverterParam.setAppEntryRelativeFilePath(appEntryPage.getAppEntryRelativeFilePath());
+
+                } else if (wizardPage.getName().equals(ShapeTypePage.class.getName())) {
+                    ShapeTypePage shapeTypePage = (ShapeTypePage) wizardPage;
+                    projectConverterParam.setShapeCircle(shapeTypePage.isSelectedShapeTypeCircle());
+                } else if (wizardPage.getName().equals(UserViewPage.class.getName())) {
+                    UserViewPage userViewPage = (UserViewPage) wizardPage;
+                    projectConverterParam.setUserViews(userViewPage.getUserViews());
+                    projectConverterParam.setDeletedUserViews(userViewPage.getDeletedUserViews());
+                    projectConverterParam.setStartupViewName(userViewPage.getStartupViewName());
+                }
+            }
+            createProgressMonitorDialog(shell, project, projectConverterParam);
+        } catch (ProjectMigratorException e) {
+            logger.error(e.getMessage());
+            logger.error(StringUtil.getStackTraceToString(e));
+            DialogUtil.openErrorDialog(Messages.WIZARD_TITLE_CONVERTER, e.getMessage());
+        }
+
+        return true;
+    }
+
+    private void createProgressMonitorDialog(Shell shell, IProject iProject, ProjectConvertParam projectConverterParam) throws ProjectMigratorException {
+        ProgressMonitorDialogEx progressDialog = new ProgressMonitorDialogEx(shell, Messages.WIZARD_TITLE_CONVERTER);
+
+        Map<String, Object> model = new HashMap<String, Object>();
+        model.put(ProgressConstants.KEY_MODEL_PARAM, projectConverterParam);
+        model.put(ProgressConstants.KEY_MODEL_WIZARD_MODE, wizardMode);
+        ProjectMigratorRunnableWithProgress runnableProgressConvert = new ProjectMigratorRunnableWithProgress(iProject, model);
+        try {
+            progressDialog.run(true, !ProjectMigratorConstants.WIZARD_MODE_MANAGEMENT_USER_VIEW.equals(wizardMode), runnableProgressConvert);
+            IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+            IProject clonedProject = workspaceRoot.getProject(projectConverterParam.getCloneProjectName());
+            if ((clonedProject != null) && (clonedProject.exists())) {
+                doPostJob(clonedProject);
+            }
+        } catch (InvocationTargetException | InterruptedException e) {
+            logger.error(e.getMessage());
+            throw new ProjectMigratorException(Messages.CORE_EXCEPTION_MSG_RUN_PROGRESS_DIALOG);
+        }
+    }
+
+    @Override
+    public boolean needsProgressMonitor() {
+        return true;
+    }
+
+    @Override
+    public void pageChanged(PageChangedEvent event) {
+        BaseWizardPage page = (BaseWizardPage) event.getSelectedPage();
+
+        if ((pageNavigations == null) || (page instanceof MainPage)) {
+            wizardDialog.setVisiblePageNavigator(false);
+        } else {
+            // set current navigator page
+            wizardDialog.setVisiblePageNavigator(true);
+            wizardDialog.setNavigatorCurrentPage(page.getNavigationIndex());
+            wizardDialog.redrawNavigator();
+        }
+        wizardDialog.updateTitleBar();
+    }
+
+    private void doPostJob(IProject project) {
+        try {
+            FileUtil.selectProjectInProjectExplorer(project);
+            SWTUtil.showPerspective(CUSTOM_PERSPECTIVE_NAME);
+            NUIBProjectUtil.addNature(project, new NullProgressMonitor());
+            NUIBProjectUtil.open(project);
+        } catch (WorkbenchException | ProcessFailureException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/AppEntryPage.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/AppEntryPage.java
new file mode 100644 (file)
index 0000000..1e32ce5
--- /dev/null
@@ -0,0 +1,284 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.wizards.pages;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.ui.color.TizenColors;
+import org.tizen.common.ui.font.TizenFonts;
+import org.tizen.common.util.DialogUtil;
+import org.tizen.efluibuilder.projectmigrator.ProjectMigratorConstants;
+import org.tizen.efluibuilder.projectmigrator.codewriter.ASTManager;
+import org.tizen.efluibuilder.projectmigrator.codewriter.CodeWriterException;
+import org.tizen.efluibuilder.projectmigrator.codewriter.visitor.MethodCheckVisitor;
+import org.tizen.efluibuilder.projectmigrator.ui.message.Messages;
+import org.tizen.efluibuilder.projectmigrator.ui.wizards.ProjectMigratorWizard;
+import org.tizen.efluibuilder.projectmigrator.util.FileUtil;
+import org.tizen.efluibuilder.projectmigrator.util.StringUtil;
+import org.tizen.efluibuilder.projectmigrator.util.UIUtil;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class AppEntryPage extends BaseWizardPage {
+
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    private Button radioUIB;
+    private Button radioLegacy;
+    private Label imageLabel;
+
+    private Text textFilePath;
+    private Button btnBrowse;
+
+    private String appEntryFileName = null;
+    private static Map<String, String> mainParam = createMainParamMap();
+
+    private static Map<String, String> createMainParamMap() {
+        Map<String, String> param = new HashMap<String, String>();
+        param.put("argc", "int"); //$NON-NLS-1$ //$NON-NLS-2$
+        param.put("*argv[]", "char"); //$NON-NLS-1$ //$NON-NLS-2$
+        return Collections.unmodifiableMap(param);
+    }
+
+    public AppEntryPage(String pageName) {
+        super(pageName);
+        setDescription(Messages.PAGE_APPENTRY_DESC);
+    }
+
+    @Override
+    public void createControl(Composite parent) {
+
+        Composite composite = new Composite(parent, SWT.NONE);
+        composite.setLayout(new GridLayout());
+        createBodyComposite(composite);
+        setControl(composite);
+        this.setPageComplete(false);
+    }
+
+    private SelectionListener radioUIBListener = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            radioUIB.setSelection(true);
+            radioLegacy.setSelection(false);
+            imageLabel.setImage(ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_APPENTRY_UIB));
+            imageLabel.pack();
+            super.widgetSelected(e);
+        }
+    };
+
+    private SelectionListener radioLegacyListener = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            radioLegacy.setSelection(true);
+            radioUIB.setSelection(false);
+            imageLabel.setImage(ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_APPENTRY_LEGACY));
+            imageLabel.pack();
+            super.widgetSelected(e);
+        }
+    };
+
+    private void createBodyComposite(Composite parent) {
+        Composite baseFormLayoutComp = new Composite(parent, SWT.NONE);
+        baseFormLayoutComp.setLayout(new FormLayout());
+        baseFormLayoutComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        int startYOffset = createFileBrowserComposite(baseFormLayoutComp, 0);
+        createSelectComposite(baseFormLayoutComp, startYOffset);
+    }
+
+    private int createFileBrowserComposite(Composite parent, int startYOffset) {
+        Label labelBrowse = new Label(parent, SWT.NONE);
+        startYOffset += 15;
+        FormData formDataLabel = UIUtil.createFormData(new FormAttachment(0, CONTENTS_INDENT_OFFSET), new FormAttachment(100, -CONTENTS_INDENT_OFFSET),
+                                                       new FormAttachment(0, startYOffset));
+
+        labelBrowse.setLayoutData(formDataLabel);
+        labelBrowse.setBackground(TizenColors.getTizenLightGrey());
+        labelBrowse.setText(Messages.PAGE_APPENTRY_MSG_LABEL_BROWSE);
+        labelBrowse.setFont(TizenFonts.getBoldFont());
+        startYOffset += 13; // font size
+
+        Composite browseTextBtnComp = new Composite(parent, SWT.NONE);
+
+        startYOffset += 15; // between label and textbox
+        FormData formDataComp = UIUtil.createFormData(new FormAttachment(0, CONTENTS_INDENT_OFFSET), new FormAttachment(100, -CONTENTS_INDENT_OFFSET),
+                                                      new FormAttachment(0, startYOffset));
+        browseTextBtnComp.setLayoutData(formDataComp);
+
+        GridLayout layoutTextBtn = new GridLayout(2, false);
+        layoutTextBtn.marginWidth = 0;
+        layoutTextBtn.marginHeight = 9;
+        layoutTextBtn.verticalSpacing = 0;
+        layoutTextBtn.horizontalSpacing = UIUtil.HORIZONTAL_SPACING;
+        browseTextBtnComp.setLayout(layoutTextBtn);
+
+        textFilePath = new Text(browseTextBtnComp, SWT.BORDER);
+        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+        textFilePath.setLayoutData(gd);
+        textFilePath.setMessage(Messages.PAGE_APPENTRY_MSG_TEXT_DEFAULT_MSG);
+        textFilePath.setEnabled(false);
+
+        gd = new GridData();
+        gd.widthHint = UIUtil.BUTTON_SIZE;
+        btnBrowse = UIUtil.createButtonWithGridLayout(browseTextBtnComp, Messages.PAGE_APPENTRY_MSG_BTN_BROWSE, gd, SWT.PUSH, true, false, false);
+
+        String filterProjectPath = ((ProjectMigratorWizard) this.getWizard()).getProject().getLocation().toOSString();
+        btnBrowse.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent arg0) {
+                FileDialog dlg = new FileDialog(getShell(), SWT.OPEN);
+                dlg.setFilterExtensions(new String[] { Messages.PAGE_APPENTRY_MSG_FILTER_EXTENSION });
+                dlg.setFilterPath(filterProjectPath);
+                dlg.setText(Messages.PAGE_APPENTRY_MSG_FILE_DLG_TITLE);
+                String filepath = dlg.open();
+
+                if (!StringUtil.isNullorEmpty(filepath)) {
+                    if (!filepath.startsWith(filterProjectPath)) {
+                        DialogUtil.openErrorDialog(Messages.WIZARD_TITLE_CONVERTER, Messages.PAGE_APPENTRY_MSG_INVALID_SRC);
+                        return;
+                    }
+                    filepath = filepath.substring(filterProjectPath.length() + 1);
+
+                    if (isExistAppEntryWithCoreVisit(filepath)) {
+                        appEntryFileName = filepath;
+                        textFilePath.setText(filepath);
+                        setPageComplete(true);
+                    } else {
+                        DialogUtil.openErrorDialog(Messages.WIZARD_TITLE_CONVERTER, Messages.CORE_EXCEPTION_MSG_CANNOT_FIND_APP_ENTRY);
+                    }
+                }
+            }
+        });
+
+        startYOffset += UIUtil.INPUT_TEXT_HEIGHT_SIZE;
+        startYOffset += 30;
+
+        return startYOffset;
+    }
+
+    private void createSelectComposite(Composite parent, int startYOffset) {
+        FormData formData = UIUtil.createFormData(new FormAttachment(0, CONTENTS_INDENT_OFFSET), new FormAttachment(100, -CONTENTS_INDENT_OFFSET),
+                                                  new FormAttachment(0, startYOffset));
+        Label labelSelect = new Label(parent, SWT.NONE);
+
+        labelSelect.setLayoutData(formData);
+        labelSelect.setBackground(TizenColors.getTizenLightGrey());
+        labelSelect.setText(Messages.PAGE_APPENTRY_MSG_LABEL_SELECT);
+        labelSelect.setFont(TizenFonts.getBoldFont());
+
+        startYOffset += 13; // font size
+        startYOffset += 15; // height gap
+
+        Composite radioComp = new Composite(parent, SWT.NONE);
+        GridLayout layoutRadio = new GridLayout(2, false);
+
+        layoutRadio.marginHeight = 0;
+        layoutRadio.marginWidth = 0;
+        layoutRadio.verticalSpacing = 0;
+        layoutRadio.horizontalSpacing = 0;
+
+        radioComp.setLayout(layoutRadio);
+        formData = UIUtil.createFormData(new FormAttachment(0, 109), new FormAttachment(100, -109), new FormAttachment(0, startYOffset));
+        radioComp.setLayoutData(formData);
+
+        GridData gdUIB = UIUtil.createGridData(GridData.FILL_HORIZONTAL, 1, SWT.CENTER, -1);
+
+        radioUIB = UIUtil.createButtonWithGridLayout(radioComp, Messages.PAGE_APPENTRY_MSG_UIB, gdUIB, SWT.RADIO, true, false, false);
+        radioUIB.addSelectionListener(radioUIBListener);
+
+        GridData gdLegacy = UIUtil.createGridData(GridData.FILL_HORIZONTAL, 1, SWT.CENTER, -1);
+        radioLegacy = UIUtil.createButtonWithGridLayout(radioComp, Messages.PAGE_APPENTRY_MSG_LEGACY, gdLegacy, SWT.RADIO, true, false, false);
+        radioLegacy.addSelectionListener(radioLegacyListener);
+
+        startYOffset += 13 + 15;
+
+        createImageComposite(parent, startYOffset);
+    }
+
+    private void createImageComposite(Composite parent, int startYOffset) {
+        FormData formData = UIUtil.createFormData(new FormAttachment(0, 80), new FormAttachment(100, -80), new FormAttachment(0, startYOffset));
+        Composite groupComp = new Composite(parent, SWT.NONE);
+        groupComp.setLayoutData(formData);
+
+        GridLayout layout = new GridLayout();
+        groupComp.setLayout(layout);
+
+        imageLabel = new Label(groupComp, SWT.NONE);
+
+        GridData gd = UIUtil.createGridData(GridData.FILL_HORIZONTAL, 1, SWT.CENTER, -1);
+        imageLabel.setLayoutData(gd);
+        imageLabel.setBackground(TizenColors.getTizenLightGrey());
+
+        Image uibImage = ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_APPENTRY_UIB);
+        imageLabel.setImage(uibImage);
+        imageLabel.pack();
+        radioUIB.setSelection(true);
+    }
+
+    private boolean isExistAppEntryWithCoreVisit(String filepath) {
+        Map<String, Object> param = new HashMap<String, Object>();
+        param.put(ProjectMigratorConstants.APP_ENTRY_RELATIVE_FILE_PATH, filepath);
+        ProjectMigratorWizard projectMigratorWizard = (ProjectMigratorWizard) this.getWizard();
+        try {
+            IFile file = FileUtil.getFile(projectMigratorWizard.getProject(), filepath);
+            MethodCheckVisitor visitor = new MethodCheckVisitor(ProjectMigratorConstants.MAIN_FUNCTION, IASTSimpleDeclSpecifier.t_int, mainParam);
+            ASTManager manager = new ASTManager();
+            manager.visit(file, ITranslationUnit.AST_SKIP_ALL_HEADERS | ITranslationUnit.AST_SKIP_FUNCTION_BODIES, visitor);
+            return visitor.isExist();
+        } catch (CodeWriterException e) {
+            logger.error(e.getMessage());
+            return false;
+        }
+    }
+
+    public String getAppEntryRelativeFilePath() {
+        return appEntryFileName;
+    }
+
+    public boolean isSelectedAppEntryUIB() {
+        return radioUIB.getSelection();
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/BaseWizardPage.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/BaseWizardPage.java
new file mode 100755 (executable)
index 0000000..1e7ae1f
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.wizards.pages;
+
+import org.eclipse.jface.wizard.WizardPage;
+
+
+public abstract class BaseWizardPage extends WizardPage {
+
+    protected int navigationIndex = 0;
+    protected static final int CONTENTS_INDENT_OFFSET = 63;
+
+    protected BaseWizardPage(String pageName) {
+        super(pageName);
+    }
+
+    protected void enableNextPage() {
+        getWizard().getContainer().updateButtons();
+    }
+
+    public void setNavigationIndex(int index) {
+        this.navigationIndex = index;
+    }
+
+    public int getNavigationIndex() {
+        return this.navigationIndex;
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/MainPage.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/MainPage.java
new file mode 100644 (file)
index 0000000..b9ea7cb
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.wizards.pages;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.tizen.common.ui.font.TizenFonts;
+import org.tizen.efluibuilder.projectmigrator.ui.message.Messages;
+import org.tizen.efluibuilder.projectmigrator.util.UIUtil;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class MainPage extends BaseWizardPage {
+
+    public MainPage(String pageName) {
+        super(pageName);
+        setDescription(Messages.PAGE_MAIN_DESC);
+    }
+
+    @Override
+    public void createControl(Composite parent) {
+        Composite composite = new Composite(parent, SWT.NONE);
+        GridLayout layout = new GridLayout(1, false);
+
+        layout.marginHeight = 15;
+        layout.marginWidth = 30;
+        layout.verticalSpacing = 25;
+
+        composite.setLayout(layout);
+        composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        Label lImageTitle = new Label(composite, SWT.NONE);
+        lImageTitle.setFont(TizenFonts.getBoldFont());
+        lImageTitle.setText(Messages.PAGE_MAIN_MSG_IMAGE_TITLE);
+        GridData gd1 = UIUtil.createGridData(GridData.FILL_HORIZONTAL, 1, SWT.CENTER, 600);
+
+        lImageTitle.setLayoutData(gd1);
+
+        Composite imageComp = new Composite(composite, SWT.NONE);
+        layout = new GridLayout(1, false);
+        layout.marginHeight = 0;
+        layout.marginWidth = 0;
+        layout.verticalSpacing = 25;
+        imageComp.setLayout(layout);
+        imageComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        final Label imageLabel = new Label(imageComp, SWT.NONE);
+        GridData gd = UIUtil.createGridData(GridData.FILL_HORIZONTAL, 1, SWT.CENTER, -1);
+        imageLabel.setLayoutData(gd);
+
+        Image uibImage = null;
+        uibImage = ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_MAIN);
+        imageLabel.setImage(uibImage);
+        imageLabel.pack();
+
+        setControl(composite);
+
+        enableNextPage();
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/ShapeTypePage.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/ShapeTypePage.java
new file mode 100644 (file)
index 0000000..0d9254c
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.wizards.pages;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.tizen.common.ui.color.TizenColors;
+import org.tizen.efluibuilder.projectmigrator.ui.message.Messages;
+import org.tizen.efluibuilder.projectmigrator.util.UIUtil;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class ShapeTypePage extends BaseWizardPage {
+
+    private Button radioCircle;
+    private Button radioSquare;
+    private Label imageLabel;
+
+    public ShapeTypePage(String pageName) {
+        super(pageName);
+        setDescription(Messages.PAGE_SHAPETYPE_DESC);
+    }
+
+    @Override
+    public void createControl(Composite parent) {
+        Composite composite = new Composite(parent, SWT.NONE);
+        composite.setLayout(new GridLayout());
+
+        createBodyComposite(composite);
+        radioCircle.setSelection(true);
+        setControl(composite);
+    }
+
+    private SelectionListener radioCircleListener = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            radioCircle.setSelection(true);
+            radioSquare.setSelection(false);
+            imageLabel.setImage(ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_SHAPE_CIRCLE));
+            imageLabel.pack();
+            super.widgetSelected(e);
+        }
+    };
+
+    private SelectionListener radioSquareListener = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            radioSquare.setSelection(true);
+            radioCircle.setSelection(false);
+            imageLabel.setImage(ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_SHAPE_SQUARE));
+            imageLabel.pack();
+            super.widgetSelected(e);
+        }
+    };
+
+    private void createImageComposite(Composite parent) {
+        Composite shapeImageComp = new Composite(parent, SWT.NONE);
+        GridLayout layout = new GridLayout(1, false);
+        layout.marginHeight = 50;
+        layout.marginWidth = 0;
+        layout.verticalSpacing = 200;
+        shapeImageComp.setLayout(layout);
+        shapeImageComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        imageLabel = new Label(shapeImageComp, SWT.NONE);
+        GridData gd = UIUtil.createGridData(GridData.FILL_HORIZONTAL, 1, SWT.CENTER, -1);
+        imageLabel.setLayoutData(gd);
+        imageLabel.setBackground(TizenColors.getTizenLightGrey());
+
+        Image uibImage = ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_SHAPE_CIRCLE);
+        imageLabel.setImage(uibImage);
+        imageLabel.pack();
+    }
+
+    private void createBodyComposite(Composite parent) {
+        Composite bodyComp = new Composite(parent, SWT.NONE);
+        GridLayout layout = new GridLayout(3, false);
+
+        layout.marginHeight = 25;
+        layout.marginWidth = 245;
+        layout.verticalSpacing = 0;
+
+        bodyComp.setLayout(layout);
+        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+        bodyComp.setLayoutData(gd);
+
+        gd = UIUtil.createGridData(GridData.FILL_HORIZONTAL, 1, SWT.LEFT, -1);
+
+        radioCircle = UIUtil.createButtonWithGridLayout(bodyComp, Messages.PAGE_SHAPETYPE_MSG_CIRCLE, gd, SWT.RADIO, true, false, false);
+        radioCircle.addSelectionListener(radioCircleListener);
+
+        gd = UIUtil.createGridData(GridData.FILL_HORIZONTAL, 1, SWT.RIGHT, -1);
+
+        radioSquare = UIUtil.createButtonWithGridLayout(bodyComp, Messages.PAGE_SHAPETYPE_MSG_SQUARE, gd, SWT.RADIO, true, false, false);
+        radioSquare.addSelectionListener(radioSquareListener);
+        createImageComposite(parent);
+    }
+
+    public boolean isSelectedShapeTypeCircle() {
+        return radioCircle.getSelection();
+    }
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/UserViewPage.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/ui/wizards/pages/UserViewPage.java
new file mode 100644 (file)
index 0000000..788bc31
--- /dev/null
@@ -0,0 +1,618 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.ui.wizards.pages;
+
+import java.util.ArrayList;
+
+import org.apache.commons.lang3.StringEscapeUtils;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseTrackAdapter;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.ui.color.TizenColors;
+import org.tizen.common.ui.font.TizenFonts;
+import org.tizen.common.util.DialogUtil;
+import org.tizen.efluibuilder.projectmigrator.ProjectMigratorConstants;
+import org.tizen.efluibuilder.projectmigrator.codewriter.ASTManager;
+import org.tizen.efluibuilder.projectmigrator.codewriter.CodeWriterConstants;
+import org.tizen.efluibuilder.projectmigrator.codewriter.CodeWriterException;
+import org.tizen.efluibuilder.projectmigrator.codewriter.visitor.FuncCallParamGetVisitor;
+import org.tizen.efluibuilder.projectmigrator.ui.message.Messages;
+import org.tizen.efluibuilder.projectmigrator.ui.wizards.ProjectMigratorWizard;
+import org.tizen.efluibuilder.projectmigrator.util.FileUtil;
+import org.tizen.efluibuilder.projectmigrator.util.StringUtil;
+import org.tizen.efluibuilder.projectmigrator.util.UIUtil;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+public class UserViewPage extends BaseWizardPage {
+
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+    private List list;
+
+    private Text inputText;
+    private Button btnAdd;
+    private Label labelErrorMessage;
+
+    private Label labelDelete;
+    private Label labelStartUp;
+
+    private ArrayList<String> currentUserViews = new ArrayList<String>();
+    private ArrayList<String> prevUserViews = new ArrayList<String>();
+    private ArrayList<String> deletedUserViews = new ArrayList<String>();
+
+    private static final int LIST_HEIGHT_SIZE = 207;
+    private static final int INPUT_TEXT_MAX_LEN = 30 + 1;
+
+    private static String UNICODENUM_STARTUP = "\u27AA"; //$NON-NLS-1$ -- arrow
+    private static final String UNICODECH_STARTUPVIEW = " " + StringEscapeUtils.unescapeJava(UNICODENUM_STARTUP);
+
+    private static String UNICODENUM_EXISTING_USERVIEW = "\u270E"; //$NON-NLS-1$ - pen`
+    private static final String UNICODECH_EXISTING_USERVIEW = StringEscapeUtils.unescapeJava(UNICODENUM_EXISTING_USERVIEW) + " ";
+
+    private int curStartupViewIdx;
+    private boolean isWizardUserViewMode;
+
+    public UserViewPage(String pageName) {
+        super(pageName);
+        curStartupViewIdx = -1;
+        setTitle(Messages.PAGE_NAVI_USER_VIEW);
+
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_LINUX)) {
+            setDescription(Messages.PAGE_USERVIEW_DESC_SINGLE_LINE);
+        } else {
+            setDescription(Messages.PAGE_USERVIEW_DESC_MULTI_LINE);
+        }
+    }
+
+    @Override
+    public void createControl(Composite parent) {
+
+        Composite composite = new Composite(parent, SWT.NONE);
+        composite.setLayout(new GridLayout());
+
+        isWizardUserViewMode = ((ProjectMigratorWizard) getWizard()).getWizardMode().equals(ProjectMigratorConstants.WIZARD_MODE_MANAGEMENT_USER_VIEW);
+
+        createBodyComposite(composite);
+        setControl(composite);
+
+        this.setPageComplete(!isWizardUserViewMode);
+        if (isWizardUserViewMode) {
+            preloadUserViews();
+        }
+    }
+
+    private void preloadUserViews() {
+        try {
+            IFile file =
+                    FileUtil.getFile(((ProjectMigratorWizard) this.getWizard()).getProject(), CodeWriterConstants.SRC_PATH, CodeWriterConstants.APP_MAIN_C);
+            FuncCallParamGetVisitor funcCall = new FuncCallParamGetVisitor(null, CodeWriterConstants.ADD_USER_VIEWS, 0);
+            ASTManager manager = new ASTManager();
+            manager.visit(file, ITranslationUnit.AST_SKIP_ALL_HEADERS, funcCall);
+            currentUserViews = (ArrayList<String>) funcCall.getResults(); // get user views
+            if (currentUserViews.size() > 0) {
+                prevUserViews = (ArrayList<String>) currentUserViews.clone();
+
+                // startup view
+                funcCall = new FuncCallParamGetVisitor(null, CodeWriterConstants.SET_STARTUP_VIEW, 0);
+                manager.visit(file, ITranslationUnit.AST_SKIP_ALL_HEADERS, funcCall);
+                String startupViewName = "";
+                ArrayList<String> startupViewNames = (ArrayList<String>) funcCall.getResults();
+                if (startupViewNames.size() > 0) {
+                    startupViewName = startupViewNames.get(0);
+                    if (!StringUtil.isNullorEmpty(startupViewName)) {
+                        curStartupViewIdx = currentUserViews.indexOf(startupViewName);
+                    }
+                }
+                int idx = 0;
+                for (String addItem : currentUserViews) {
+                    addItem = UNICODECH_EXISTING_USERVIEW + addItem;
+                    if (idx == curStartupViewIdx) {
+                        addItem += UNICODECH_STARTUPVIEW;
+                    }
+                    list.add(addItem);
+                    idx++;
+                }
+                list.setSelection(0);
+            }
+        } catch (CodeWriterException e) {
+            logger.error(e.getMessage());
+        }
+    }
+
+    private void setEnabledListControlButtons(boolean enabled) {
+        if (labelDelete != null) {
+            labelDelete.setEnabled(enabled);
+        }
+        if (labelStartUp != null) {
+            labelStartUp.setEnabled(enabled);
+        }
+    }
+
+    /*
+     * FIXME: This listener is temp code. added listener for bug of the TizenList
+     */
+    private FocusListener listFocusListener = new FocusListener() {
+        @Override
+        public void focusLost(FocusEvent arg0) {
+
+        }
+
+        @Override
+        public void focusGained(FocusEvent arg0) {
+            if (list.getSelectionIndex() > -1) {
+                setEnabledListControlButtons(true);
+            } else {
+                setEnabledListControlButtons(false);
+            }
+        }
+    };
+
+    private SelectionListener listSelectionListener = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            // action
+            if (list.getSelectionIndex() > -1) {
+                String[] selItems = list.getSelection();
+                labelDelete.setEnabled(true);
+                if (selItems.length == 1) {
+                    labelStartUp.setEnabled(true);
+                } else {
+                    labelStartUp.setEnabled(false);
+                }
+            }
+        }
+    };
+
+    private void addUserViewListItem(String addItem) {
+        if (addItem.length() > 0) {
+            currentUserViews.add(addItem);
+            list.add(addItem);
+            inputText.setText("");
+            btnAdd.setEnabled(false);
+            inputText.setFocus();
+            setPageComplete(true);
+        }
+    }
+
+    private SelectionListener btnAddListener = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            String addItem = inputText.getText().trim();
+            addUserViewListItem(addItem);
+            super.widgetSelected(e);
+            setPageComplete(true);
+        }
+    };
+
+    private void deleteSelected() {
+        int selIdx = list.getSelectionIndex();
+        if (selIdx > -1) {
+            String[] selectItems = list.getSelection();
+            // check existing user view
+            boolean isDeleteActionEnabled = true;
+            for (String item : selectItems) {
+                if (item.startsWith(UNICODECH_EXISTING_USERVIEW)) {
+                    isDeleteActionEnabled =
+                            (DialogUtil.openQuestionDialog(Messages.PAGE_NAVI_USER_VIEW, Messages.PAGE_USERVIEW_MSG_DELETE_CONFIRM) == SWT.YES);
+                    break;
+                } // end of if
+            } // end of for
+            if (isDeleteActionEnabled) {
+                if (list.isSelected(curStartupViewIdx)) {
+                    curStartupViewIdx = -1;
+                }
+                setPageComplete(true);
+                for (String item : selectItems) {
+                    list.remove(item);
+                    item = item.replace(UNICODECH_EXISTING_USERVIEW, "").trim();
+                    item = item.replace(UNICODECH_STARTUPVIEW, "").trim();
+                    currentUserViews.remove(item);
+                    if (isWizardUserViewMode && prevUserViews.remove(item)) {
+                        deletedUserViews.add(item);
+                    }
+                }
+                if (list.getItemCount() < 1) {
+                    setEnabledListControlButtons(false);
+                }
+                refreshStartupViewIdx();
+            }
+            if (isWizardUserViewMode && prevUserViews.isEmpty() && currentUserViews.isEmpty()) {
+                setPageComplete(false);
+            }
+        }
+    }
+
+    private void startUpSelected() {
+        // action
+
+        int selIdx = list.getSelectionIndex();
+        if (selIdx > -1) {
+            setPageComplete(true);
+            if (isWizardUserViewMode) {
+                setPageComplete(true);
+            }
+            String selectedItem = list.getItem(selIdx);
+            if (selIdx == curStartupViewIdx) { // unset
+                String viewName = StringUtil.removeEndsWith(selectedItem, UNICODECH_STARTUPVIEW);
+                list.setItem(selIdx, viewName != null ? viewName.trim() : "");
+                curStartupViewIdx = -1;
+            } else { // change start-up view
+                if (curStartupViewIdx > -1) {
+                    // Unset previous start-up item
+                    String viewName = StringUtil.removeEndsWith(list.getItem(curStartupViewIdx), UNICODECH_STARTUPVIEW);
+                    list.setItem(curStartupViewIdx, viewName != null ? viewName.trim() : "");
+                }
+                // Set new item
+                list.setItem(selIdx, selectedItem + UNICODECH_STARTUPVIEW);
+                curStartupViewIdx = selIdx;
+            }
+
+            list.setSelection(selIdx);
+        }
+    }
+
+    private void setInputStatusMessage(String message) {
+        if (StringUtil.isNullorEmpty(message)) {
+            labelErrorMessage.setVisible(false);
+            labelErrorMessage.setText("");
+        } else {
+            labelErrorMessage.setVisible(true);
+            labelErrorMessage.setText(message);
+        }
+
+    }
+
+    private boolean validateInputText(String viewName) {
+        int inputLen = viewName.length();
+        String message = null;
+
+        if (inputLen < 1) {
+            message = null;
+        } else if (inputLen >= INPUT_TEXT_MAX_LEN) {
+            message = Messages.PAGE_USERVIEW_MSG_NAME_LENGTH;
+        } else if (currentUserViews.contains(viewName)) {
+            message = Messages.PAGE_USERVIEW_MSG_SAME_NAME;
+        } else if (!UIUtil.validateRegExp(viewName)) {
+            message = Messages.PAGE_USERVIEW_MSG_NAME_REGX;
+        } else { // valid
+            setInputStatusMessage(message);
+            return true;
+        }
+        setInputStatusMessage(message);
+        return false; // invalid
+
+    }
+
+    private ModifyListener inputTextModifyListener = new ModifyListener() {
+        @Override
+        public void modifyText(ModifyEvent event) {
+            String viewName = inputText.getText().trim();
+            if (validateInputText(viewName)) {
+                btnAdd.setEnabled(true);
+            } else {
+                btnAdd.setEnabled(false);
+            }
+            boolean isUpdated = true;
+            if (isWizardUserViewMode) {
+                isUpdated = (!currentUserViews.equals(prevUserViews)) || (deletedUserViews.size() > 0);
+            }
+            setPageComplete(!btnAdd.isEnabled() && isUpdated);
+        }
+    };
+
+    private KeyAdapter inputTextKeyListener = new KeyAdapter() {
+        @Override
+        public void keyReleased(KeyEvent event) {
+            switch (event.keyCode) {
+                case SWT.CR:
+                    String viewName = inputText.getText().trim();
+                    if (validateInputText(viewName)) {
+                        btnAdd.setFocus();
+                        addUserViewListItem(viewName);
+                    }
+                    break;
+            }
+        }
+    };
+
+    private void createBodyComposite(Composite parent) {
+        Composite baseFormLayoutComp = new Composite(parent, SWT.NONE);
+        baseFormLayoutComp.setLayout(new FormLayout());
+        baseFormLayoutComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        int startYOffset = createStartupDescComposite(baseFormLayoutComp, 0);
+        startYOffset = createInputTextComposite(baseFormLayoutComp, startYOffset);
+        createUserViewListComposite(baseFormLayoutComp, startYOffset);
+    }
+
+    private int createUserViewListComposite(Composite parent, int startYOffset) {
+        startYOffset += 25;
+
+        // user views...
+        Composite userViewsTitleComp = new Composite(parent, SWT.NONE);
+
+        FormData formDataUserViews = UIUtil.createFormData(new FormAttachment(0, CONTENTS_INDENT_OFFSET), new FormAttachment(100, -CONTENTS_INDENT_OFFSET),
+                                                           new FormAttachment(0, startYOffset));
+        userViewsTitleComp.setLayoutData(formDataUserViews);
+
+        GridLayout layoutUserViewsTitle = new GridLayout(2, false);
+        layoutUserViewsTitle.marginWidth = 0;
+        layoutUserViewsTitle.marginHeight = 0;
+        layoutUserViewsTitle.verticalSpacing = 0;
+        layoutUserViewsTitle.horizontalSpacing = UIUtil.HORIZONTAL_SPACING;
+        userViewsTitleComp.setLayout(layoutUserViewsTitle);
+
+        GridData gdLabelUserViews = UIUtil.createGridData(GridData.GRAB_HORIZONTAL, 1, SWT.LEFT, -1);
+
+        Label labelUserViews = new Label(userViewsTitleComp, SWT.NONE);
+
+        labelUserViews.setLayoutData(gdLabelUserViews);
+        labelUserViews.setBackground(TizenColors.getTizenLightGrey());
+        labelUserViews.setText(Messages.PAGE_USERVIEW_MSG_USER_VIEWS);
+        labelUserViews.setFont(TizenFonts.getBoldFont());
+
+        Composite userViewsImagesComp = new Composite(userViewsTitleComp, SWT.NONE);
+        GridData gdImagesComp = UIUtil.createGridData(GridData.GRAB_HORIZONTAL, 1, SWT.RIGHT, -1);
+        userViewsImagesComp.setLayoutData(gdImagesComp);
+        GridLayout layoutImages = new GridLayout(2, false);
+        layoutImages.marginWidth = 0;
+        layoutImages.marginHeight = 0;
+        layoutImages.verticalSpacing = 0;
+        layoutImages.horizontalSpacing = 15;
+        userViewsImagesComp.setLayout(layoutImages);
+
+        labelDelete = new Label(userViewsImagesComp, SWT.NONE);
+        GridData gd = UIUtil.createGridData(GridData.FILL_HORIZONTAL, 1, SWT.RIGHT, -1);
+        labelDelete.setLayoutData(gd);
+        Image image = ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_DELETE_NOR);
+        labelDelete.setImage(image);
+        labelDelete.addMouseListener(deleteMouseListener);
+        labelDelete.addMouseTrackListener(deleteMouseTrackListener);
+        labelDelete.setToolTipText(Messages.PAGE_USERVIEW_MSG_BTN_DEL);
+
+        labelStartUp = new Label(userViewsImagesComp, SWT.NONE);
+        gd = UIUtil.createGridData(GridData.FILL_HORIZONTAL, 1, SWT.RIGHT, -1);
+        labelStartUp.setLayoutData(gd);
+        image = ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_SETSTARTUP_NOR);
+        labelStartUp.setImage(image);
+        labelStartUp.addMouseListener(startUpMouseListener);
+        labelStartUp.addMouseTrackListener(startUpMouseTrackListener);
+        labelStartUp.setToolTipText(Messages.PAGE_USERVIEW_MSG_BTN_STARTUP);
+
+        startYOffset += 15;
+
+        FormData formData = UIUtil.createFormData(new FormAttachment(0, CONTENTS_INDENT_OFFSET), new FormAttachment(100,
+                                                                                                                    -CONTENTS_INDENT_OFFSET),
+                                                  new FormAttachment(0, startYOffset));
+
+        // Area: user view list
+        Composite listComp = new Composite(parent, SWT.NONE);
+        GridLayout listLayout = new GridLayout(1, false);
+        listLayout.marginHeight = 15;
+        listLayout.marginWidth = 0;
+        listLayout.verticalSpacing = 0;
+
+        gd = new GridData(GridData.FILL_HORIZONTAL);
+
+        listComp.setLayout(listLayout);
+        listComp.setLayoutData(formData);
+
+        list = new List(listComp, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);
+
+        gd = new GridData(GridData.FILL_HORIZONTAL);
+        gd.heightHint = LIST_HEIGHT_SIZE;
+        list.setLayoutData(gd);
+        list.addSelectionListener(listSelectionListener);
+        list.addFocusListener(listFocusListener);
+
+        return startYOffset;
+    }
+
+    private MouseAdapter deleteMouseListener = new MouseAdapter() {
+
+        @Override
+        public void mouseDown(MouseEvent event) {
+            final Image image = ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_DELETE_SEL);
+            labelDelete.setImage(image);
+        }
+
+        @Override
+        public void mouseUp(MouseEvent event) {
+            final Image image = ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_DELETE_NOR);
+            labelDelete.setImage(image);
+            deleteSelected();
+        }
+    };
+
+    private MouseTrackAdapter deleteMouseTrackListener = new MouseTrackAdapter() {
+        @Override
+        public void mouseEnter(MouseEvent arg0) {
+            final Image image =
+                    ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_DELETE_OVER);
+            labelDelete.setImage(image);
+        }
+
+        @Override
+        public void mouseExit(MouseEvent arg0) {
+            final Image image =
+                    ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_DELETE_NOR);
+            labelDelete.setImage(image);
+        }
+    };
+
+    private MouseAdapter startUpMouseListener = new MouseAdapter() {
+
+        @Override
+        public void mouseDown(MouseEvent event) {
+            final Image image = ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_SETSTARTUP_SEL);
+            labelStartUp.setImage(image);
+        }
+
+        @Override
+        public void mouseUp(MouseEvent event) {
+            final Image image = ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_SETSTARTUP_NOR);
+            labelStartUp.setImage(image);
+            startUpSelected();
+        }
+    };
+
+    private MouseTrackAdapter startUpMouseTrackListener = new MouseTrackAdapter() {
+
+        @Override
+        public void mouseEnter(MouseEvent arg0) {
+            final Image image =
+                    ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_SETSTARTUP_OVER);
+            labelStartUp.setImage(image);
+        }
+
+        @Override
+        public void mouseExit(MouseEvent arg0) {
+            final Image image =
+                    ImageResources.getImage(ImageResources.UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_SETSTARTUP_NOR);
+            labelStartUp.setImage(image);
+        }
+    };
+
+    private int createStartupDescComposite(Composite parent, int startYOffset) {
+        startYOffset += 40;
+        FormData formData = UIUtil.createFormData(new FormAttachment(0, CONTENTS_INDENT_OFFSET), new FormAttachment(100, -CONTENTS_INDENT_OFFSET),
+                                                  new FormAttachment(0, startYOffset));
+
+        Label labelStartupDesc = new Label(parent, SWT.NONE);
+        labelStartupDesc.setLayoutData(formData);
+        labelStartupDesc.setFont(JFaceResources.getDialogFont());
+        labelStartupDesc.setText(Messages.PAGE_USERVIEW_MSG_STARTUP_DESC);
+
+        startYOffset += 13; // font size
+        return startYOffset;
+    }
+
+    private int createInputTextComposite(Composite parent, int startYOffset) {
+
+        Label labelAddUserView = new Label(parent, SWT.NONE);
+
+        startYOffset += 25;
+        FormData formDataLabel = UIUtil.createFormData(new FormAttachment(0, CONTENTS_INDENT_OFFSET), new FormAttachment(100, -CONTENTS_INDENT_OFFSET),
+                                                       new FormAttachment(0, startYOffset));
+
+        labelAddUserView.setLayoutData(formDataLabel);
+        labelAddUserView.setBackground(TizenColors.getTizenLightGrey());
+        labelAddUserView.setText(Messages.PAGE_USERVIEW_MSG_ADD_USER_VIEW);
+        labelAddUserView.setFont(TizenFonts.getBoldFont());
+        startYOffset += 13; // font size
+
+        Composite inputTextBtnComp = new Composite(parent, SWT.NONE);
+
+        startYOffset += 15; // between label and textbox
+        FormData formDataComp = UIUtil.createFormData(new FormAttachment(0, CONTENTS_INDENT_OFFSET), new FormAttachment(100, -CONTENTS_INDENT_OFFSET),
+                                                      new FormAttachment(0, startYOffset));
+        inputTextBtnComp.setLayoutData(formDataComp);
+
+        GridLayout layoutTextBtn = new GridLayout(2, false);
+        layoutTextBtn.marginWidth = 0;
+        layoutTextBtn.marginHeight = 9;
+        layoutTextBtn.verticalSpacing = 0;
+        layoutTextBtn.horizontalSpacing = UIUtil.HORIZONTAL_SPACING;
+        inputTextBtnComp.setLayout(layoutTextBtn);
+
+        inputText = new Text(inputTextBtnComp, SWT.BORDER);
+        inputText.setTextLimit(INPUT_TEXT_MAX_LEN);
+        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+
+        inputText.setLayoutData(gd);
+        inputText.setMessage(Messages.PAGE_USERVIEW_MSG_INPUT);
+        inputText.addModifyListener(inputTextModifyListener);
+        inputText.addKeyListener(inputTextKeyListener);
+
+        gd = new GridData();
+        gd.widthHint = UIUtil.BUTTON_SIZE;
+        btnAdd = UIUtil.createButtonWithGridLayout(inputTextBtnComp, Messages.PAGE_USERVIEW_MSG_BTN_ADD, gd, SWT.PUSH, true, false, false);
+        btnAdd.addSelectionListener(btnAddListener);
+
+        startYOffset += UIUtil.INPUT_TEXT_HEIGHT_SIZE;
+        startYOffset += 9;
+        labelErrorMessage = new Label(parent, SWT.NONE);
+        FormData formDataLabelError = UIUtil.createFormData(new FormAttachment(0, CONTENTS_INDENT_OFFSET + 10),
+                                                            new FormAttachment(100, -CONTENTS_INDENT_OFFSET), new FormAttachment(0, startYOffset));
+
+        labelErrorMessage.setLayoutData(formDataLabelError);
+        labelErrorMessage.setBackground(TizenColors.getTizenLightGrey());
+        labelErrorMessage.setForeground(ColorResources.PROJECT_MIGRATER_USERVIEW_ERROR_COLOR);
+        labelErrorMessage.setVisible(false);
+
+        startYOffset += 13;
+        return startYOffset;
+    }
+
+    public ArrayList<String> getUserViews() {
+        return currentUserViews;
+    }
+
+    public ArrayList<String> getDeletedUserViews() {
+        return deletedUserViews;
+    }
+
+    private void refreshStartupViewIdx() {
+        int listSize = list.getItemCount();
+        curStartupViewIdx = -1;
+        for (int i = 0; i < listSize; i++) {
+            if (list.getItem(i).endsWith(UNICODENUM_STARTUP)) {
+                curStartupViewIdx = i;
+            }
+        }
+    }
+
+    public String getStartupViewName() {
+        return (curStartupViewIdx < 0) ? null : currentUserViews.get(curStartupViewIdx);
+    }
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/util/FileUtil.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/util/FileUtil.java
new file mode 100644 (file)
index 0000000..9f52d6c
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.util;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.navigator.resources.ProjectExplorer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class FileUtil {
+
+    private static Logger logger = LoggerFactory.getLogger(FileUtil.class);
+    public static final int MAX_SEQUENCE_NUM = Integer.MAX_VALUE - 1000;
+
+    public static void createFolder(IProject project, String target) throws CoreException {
+        IFolder folder = project.getFolder(target);
+        if (!folder.exists()) {
+            folder.create(IResource.NONE, true, null);
+        }
+    }
+
+    public static IFile getFile(IProject project, String folderName, String fileName) {
+        IFolder folder = project.getFolder(folderName);
+        IFile file = folder.getFile(fileName);
+        return file;
+    }
+
+    public static IFile getFile(IProject project, String fileName) {
+        IFile file = project.getFile(fileName);
+        return file;
+    }
+
+    public static void selectProjectInProjectExplorer(IProject project) {
+        try {
+
+            final String id = IPageLayout.ID_PROJECT_EXPLORER; // org.eclipse.ui.navigator.ProjectExplorer
+
+            IWorkbenchWindow[] winList = PlatformUI.getWorkbench().getWorkbenchWindows();
+            if (winList == null)
+                return;
+
+            for (IWorkbenchWindow win : winList) {
+                IWorkbenchPage page = win.getActivePage();
+
+                if ((page != null) && (page.findView(id) != null)) {
+                    IViewPart vp = page.findView(id);
+                    if (vp != null) {
+                        vp.setFocus();
+                        if (vp instanceof ProjectExplorer) {
+                            ISelectionProvider selProvider = vp.getSite().getSelectionProvider();
+                            selProvider.setSelection(new StructuredSelection(project));
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage());
+        }
+    }
+
+    public static IProject cloneProject(String srcProjectName, String cloneProjectName) throws CoreException {
+        IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+        IProject project = workspaceRoot.getProject(srcProjectName);
+
+        IProjectDescription projectDescription = project.getDescription();
+
+        // create clone project in workspace
+        IProjectDescription cloneDescription = workspaceRoot.getWorkspace().newProjectDescription(cloneProjectName);
+        // copy project files
+        project.copy(cloneDescription, true, new NullProgressMonitor());
+        IProject clone = workspaceRoot.getProject(cloneProjectName);
+        // copy the project properties
+        cloneDescription.setNatureIds(projectDescription.getNatureIds());
+        cloneDescription.setReferencedProjects(projectDescription.getReferencedProjects());
+        cloneDescription.setDynamicReferences(projectDescription.getDynamicReferences());
+        cloneDescription.setBuildSpec(projectDescription.getBuildSpec());
+        cloneDescription.setReferencedProjects(projectDescription.getReferencedProjects());
+        clone.setDescription(cloneDescription, null);
+        return clone;
+    }
+
+    public static String findCloneProjectNameforConvert(String srcProjectName) {
+        String postfix = "withUIB", postfixItor, newProjectName = ""; //$NON-NLS-1$
+        String tempName = "";
+
+        tempName = StringUtil.removeEndsWithDigit(srcProjectName); // remove end digits
+        if (tempName != null && tempName.endsWith(postfix)) {
+            srcProjectName = tempName;
+        }
+        srcProjectName = StringUtil.removeEndsWith(srcProjectName, postfix); // remove postfix
+        ArrayList<String> projectNames = getProjectNamesInWorkspace(srcProjectName);
+
+        boolean isValid = false;
+
+        for (int i = 0; i < MAX_SEQUENCE_NUM; i++) {
+            isValid = true;
+            postfixItor = (i < 1) ? postfix : postfix + i; // $NON-NLS-1$
+            for (String projectName : projectNames) {
+                // 1th: is already exists "xxxWithUIB"
+                // 2nd: is already exists "xxxWithUIB1~N"
+
+                newProjectName = srcProjectName + postfixItor;
+                if (projectName.endsWith(postfixItor)) {
+                    isValid = false;
+                    break;
+                }
+            } // end of 2th for
+            if (isValid) {
+                logger.debug(">Clone project name is {%s} for convert", newProjectName); //$NON-NLS-1$
+                return newProjectName;
+            }
+        }
+
+        return newProjectName;
+    }
+
+    public static ArrayList<String> getProjectNamesInWorkspace(String prefixFilter) {
+        IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+        IProject[] projects = workspaceRoot.getProjects();
+
+        ArrayList<String> projectNames = new ArrayList<String>();
+        String projectName;
+        for (IProject project : projects) {
+            projectName = project.getName();
+            if ((prefixFilter != null) && projectName.startsWith(prefixFilter)) {
+                projectNames.add(projectName);
+            }
+        }
+
+        return projectNames;
+    }
+
+    public static void renameProject(IProject iProject, String projectName) throws CoreException {
+        IProjectDescription description = iProject.getDescription();
+        description.setName(projectName);
+        iProject.move(description, IResource.FORCE | IResource.SHALLOW, null);
+    }
+
+    public static void deleteProject(IProject project) throws CoreException {
+        boolean deleteContent = true, force = true;
+        if (project != null && project.exists()) {
+            project.delete(deleteContent, force, null);
+        }
+    }
+
+    public static void refreshProject(IProject project) throws CoreException {
+        // Finally, refresh the project so that the new files show up
+        project.refreshLocal(IResource.DEPTH_INFINITE, null);
+    }
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/util/StringUtil.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/util/StringUtil.java
new file mode 100644 (file)
index 0000000..9cbca69
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.util;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class StringUtil {
+
+    private static Logger logger = LoggerFactory.getLogger(StringUtil.class);
+
+    public static boolean isNullorEmpty(String str) {
+        return (str == null) || (str.isEmpty());
+    }
+
+    public static int endsWithNotDigitPos(String str) {
+        if (!isNullorEmpty(str)) {
+            char[] chars = str.toCharArray();
+            for (int i = chars.length - 1; i >= 0; i--) {
+                if (!Character.isDigit(chars[i])) {
+                    return i;
+                }
+            }
+        }
+        return -1;
+    }
+
+    public static String removeEndsWithDigit(String str) {
+        int i = endsWithNotDigitPos(str);
+        if (i >= 0) {
+            return str.substring(0, i + 1);
+        }
+        return null;
+    }
+
+    public static String removeEndsWith(String str, String postfix) {
+        if ((isNullorEmpty(str)) || (isNullorEmpty(postfix))) {
+            return null;
+        }
+        int i = str.lastIndexOf(postfix);
+        if (i >= 0) {
+            return str.substring(0, i);
+        }
+        return str; // return original string (exclude postfix)
+    }
+
+    public static String getStackTraceToString(Exception e) {
+        StringWriter sw = new StringWriter();
+        e.printStackTrace(new PrintWriter(sw));
+        return sw.toString();
+    }
+
+}
diff --git a/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/util/UIUtil.java b/org.tizen.efluibuilder.projectmigrator/src/org/tizen/efluibuilder/projectmigrator/util/UIUtil.java
new file mode 100644 (file)
index 0000000..e4efa14
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.projectmigrator.util;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolTip;
+import org.tizen.common.ui.font.TizenFonts;
+
+
+public final class UIUtil {
+
+    public static final int INPUT_TEXT_HEIGHT_SIZE = 37;
+    public static final int BUTTON_SIZE = 100;
+    public static final int HORIZONTAL_SPACING = 9;
+
+    public static GridData createGridData(int style, int horizontalSpan, int horizontalAlignment, int widthHint) {
+        GridData gd = new GridData(style);
+        if (horizontalSpan > 0)
+            gd.horizontalSpan = horizontalSpan;
+        if (horizontalAlignment > 0)
+            gd.horizontalAlignment = horizontalAlignment;
+        if (widthHint > 0)
+            gd.widthHint = widthHint;
+        return gd;
+    }
+
+    private static final String NAME_PATTERN = "^[a-zA-Z_]+[a-zA-Z0-9_]*$"; //$NON-NLS-1$ User view
+                                                                            // name pattern
+
+    public static boolean validateRegExp(String strValue) {
+        if (strValue != null && strValue.matches(NAME_PATTERN)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private static ToolTip tooltip = null;
+
+    // Usage: UIUtil.showTooltipText(inputText, Messages.PAGE_USERVIEW_MSG_NAME_REGX);
+    public static void showTooltipText(Text textEditor, String message) {
+        if (tooltip == null || tooltip.isDisposed()) {
+            tooltip = new ToolTip(textEditor.getShell(), SWT.ICON_WARNING | SWT.BALLOON);
+        }
+        tooltip.setMessage(message);
+
+        Point location = textEditor.toDisplay(textEditor.getSize().x, textEditor.getSize().y);
+
+        tooltip.setLocation(location.x - textEditor.getSize().x + textEditor.getBorderWidth(), location.y - textEditor.getBorderWidth());
+        tooltip.setAutoHide(true);
+        tooltip.setVisible(true);
+    }
+
+    public static void hideTooltipText() {
+        if (tooltip != null && !tooltip.isDisposed()) {
+            tooltip.setVisible(false);
+            tooltip.dispose();
+            tooltip = null;
+        }
+    }
+
+    public static FormData createFormData(FormAttachment left, FormAttachment right, FormAttachment top) {
+        FormData formData = new FormData();
+        formData.left = left;
+        formData.right = right;
+        formData.top = top;
+        return formData;
+    }
+
+    public static Button createButtonWithGridLayout(Composite parent, String text, GridData gd, int style, boolean enabled, boolean isIncrementNumColumns,
+                                                    boolean isBoldFont) {
+        if (isIncrementNumColumns) {
+            ((GridLayout) parent.getLayout()).numColumns += 1;
+        }
+        Button btn = new Button(parent, style);
+        if (isBoldFont) {
+            btn.setFont(TizenFonts.getBoldFont());
+        }
+        btn.setText(text);
+        btn.setLayoutData(gd);
+        btn.setEnabled(enabled);
+        return btn;
+    }
+
+    public static void showMessagePopup(Shell shell, int style, String text, String message) {
+        if (shell != null) {
+            MessageBox msgBox = new MessageBox(shell, style);
+            msgBox.setText(text);
+            msgBox.setMessage(message);
+            msgBox.open();
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/.classpath b/org.tizen.efluibuilder.renderer/.classpath
new file mode 100644 (file)
index 0000000..35cd827
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+        <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+        <classpathentry kind="src" path="src"/>
+        <classpathentry exported="true" kind="lib" path="lib/gson-2.2.4.jar"/>
+        <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.efluibuilder.renderer/.gitignore b/org.tizen.efluibuilder.renderer/.gitignore
new file mode 100644 (file)
index 0000000..ae3c172
--- /dev/null
@@ -0,0 +1 @@
+/bin/
diff --git a/org.tizen.efluibuilder.renderer/.project b/org.tizen.efluibuilder.renderer/.project
new file mode 100644 (file)
index 0000000..1e80f1a
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.efluibuilder.renderer</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.efluibuilder.renderer/.settings/org.eclipse.jdt.core.prefs b/org.tizen.efluibuilder.renderer/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..6dffab0
--- /dev/null
@@ -0,0 +1,98 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.tizen.efluibuilder.renderer/META-INF/MANIFEST.MF b/org.tizen.efluibuilder.renderer/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..2e31b3f
--- /dev/null
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.efluibuilder.renderer;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.tizen.efluibuilder.renderer.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.draw2d,
+ org.tizen.common,
+  org.eclipse.core.net
+Bundle-ActivationPolicy: lazy
+Export-Package: org.tizen.efluibuilder.internal.renderer.command,
+ org.tizen.efluibuilder.renderer,
+ org.tizen.efluibuilder.renderer.event
+Bundle-ClassPath: .,
+ lib/gson-2.2.4.jar
+Bundle-Vendor: %Bundle-Vendor
diff --git a/org.tizen.efluibuilder.renderer/OSGI-INF/l10n/bundle.properties b/org.tizen.efluibuilder.renderer/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..76e749d
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for org.tizen.efluibuilder.renderer
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen EFL UI Builder  Renderer
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/build.properties b/org.tizen.efluibuilder.renderer/build.properties
new file mode 100644 (file)
index 0000000..f49c951
--- /dev/null
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               lib/,\
+               OSGI-INF/
diff --git a/org.tizen.efluibuilder.renderer/lib/gson-2.2.4.jar b/org.tizen.efluibuilder.renderer/lib/gson-2.2.4.jar
new file mode 100644 (file)
index 0000000..9478253
Binary files /dev/null and b/org.tizen.efluibuilder.renderer/lib/gson-2.2.4.jar differ
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ChecksumValidator.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ChecksumValidator.java
new file mode 100644 (file)
index 0000000..4832fce
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+public final class ChecksumValidator {
+
+    public static boolean isValid(int checksum, byte[] buffer) {
+        if (checksum != createChecksum(buffer)) {
+            return false;
+        }
+        return true;
+    }
+
+    public static int createChecksum(byte[] buffer) {
+        int checksum = 0;
+        for (int i = 0; i < buffer.length; i++) {
+            checksum += buffer[i];
+        }
+        return checksum;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/Connector.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/Connector.java
new file mode 100644 (file)
index 0000000..47b2c7e
--- /dev/null
@@ -0,0 +1,253 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.InetSocketAddress;
+import java.net.Proxy;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.commands.common.EventManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.internal.renderer.util.DebugUtil;
+
+
+public final class Connector extends EventManager implements IConnector {
+    private static Logger logger = LoggerFactory.getLogger(Connector.class);
+    private static final int TIME_OUT = 1000;
+
+    private String id = null;
+    private Socket socket = null;
+    private MessageReader reader = null;
+    private MessageWriter writer = null;
+    private Thread receiver = null;
+    private Thread worker = null;
+
+    private List<IMessage> messages = Collections.synchronizedList(new LinkedList<IMessage>());
+
+    private final class Receiver extends Thread {
+        @Override
+        public void run() {
+            while (isConnected()) {
+                receive();
+            }
+        }
+    }
+
+    private final class Worker extends Thread {
+        @Override
+        public void run() {
+            while (isConnected()) {
+                work();
+            }
+        }
+    }
+
+    void setId(String id) {
+        this.id = id;
+    }
+
+    String getId() {
+        return id;
+    }
+
+    Connector(IService service) throws IOException {
+        super();
+        create(service);
+    }
+
+    private void create(IService service) throws IOException {
+        String ip = service.getIp();
+        int port = service.getPort();
+
+        // create socket
+        socket = new Socket(Proxy.NO_PROXY);
+        try {
+            socket.connect(new InetSocketAddress(ip, port), TIME_OUT);
+            socket.setKeepAlive(true);
+            socket.setSoLinger(true, 0);
+        } catch (IOException e) {
+            logger.error(e.getMessage());
+            logger.error(String.format("IP : %s | Port : %d", ip, port));
+            throw e;
+        }
+
+        try {
+            // open stream
+            InputStream inputStream = socket.getInputStream();
+            OutputStream outputStream = socket.getOutputStream();
+            reader = new MessageReader(inputStream);
+            writer = new MessageWriter(outputStream);
+        } catch (IOException e) {
+            logger.error(e.getMessage());
+            throw e;
+        }
+
+        receiver = new Receiver();
+        receiver.setName(service.getId() + " Receiver");
+        receiver.start();
+
+        worker = new Worker();
+        worker.setName(service.getId() + " Worker");
+        worker.start();
+    }
+
+    void destroy() {
+        // FIXME :
+        // close socket
+        try {
+            if (socket != null && !socket.isInputShutdown()) {
+                socket.shutdownInput();
+            }
+            if (socket != null && !socket.isOutputShutdown()) {
+                socket.shutdownOutput();
+            }
+            if (socket != null) {
+                socket.close();
+            }
+        } catch (IOException e) {
+            logger.error(e.getMessage());
+        }
+
+        socket = null;
+    }
+
+    @Override
+    public void send(IMessage message) {
+        if (!isConnected()) {
+            logger.error("Renderer connection not found");
+            // MessageBox msgBox = new MessageBox(Display.getDefault().getActiveShell(), SWT.OK |
+            // SWT.ICON_ERROR);
+            // msgBox.setText("Renderer Error");
+            // msgBox.setMessage("Renderer connection not found\nPlease restart IDE.\n");
+            // msgBox.open();
+        } else {
+
+            try {
+                writer.write(message);
+            } catch (IOException e) {
+                logger.error(e.getMessage());
+            }
+        }
+    }
+
+    @Override
+    public void addConnectorListener(IConnectorListener listener) {
+        addListenerObject(listener);
+    }
+
+    @Override
+    public void removeConnectorListener(IConnectorListener listener) {
+        removeListenerObject(listener);
+    }
+
+    public boolean isConnected() {
+        if (socket == null) {
+            return false;
+        }
+        return socket.isConnected();
+    }
+
+    /**
+     * Notifies all listeners that message has received. This sends the given event to all of the
+     * listeners, if any.
+     * 
+     * @param event
+     *            The event to send to the listeners; must not be <code>null</code>.
+     */
+    private void fireEvent(ConnectorEvent event) {
+        if (event == null) {
+            throw new NullPointerException("Cannot send a null event to listeners."); //$NON-NLS-1$
+        }
+
+        if (!isListenerAttached()) {
+            return;
+        }
+
+        Object[] listeners = getListeners();
+        for (final Object listener : listeners) {
+            ((IConnectorListener) listener).receiveEvent(event);
+        }
+    }
+
+    private void receive() {
+        IMessage message = null;
+        try {
+            message = reader.read();
+            Assert.notNull(message);
+        } catch (IOException e) {
+            DebugUtil.debug(logger, getClass().getName(), e);
+            destroy();
+            return;
+
+        }
+
+        if (message.getType() == IMessage.RESPONSE_PAINT && (messages.size() > 0)) {
+            synchronized (messages) {
+                for (int i = 0; i < messages.size(); i++) {
+                    IMessage previous = messages.get(i);
+                    if (message.getId() == previous.getId() && previous.getType() == IMessage.RESPONSE_PAINT) {
+                        messages.set(i, message);
+                        return;
+                    }
+                }
+            }
+        }
+        messages.add(message);
+    }
+
+    private void work() {
+        // if there is no message, sleep
+        if (messages.isEmpty()) {
+            try {
+                Thread.sleep(1);
+            } catch (InterruptedException e) {
+                logger.error(e.getMessage());
+            }
+            return;
+        }
+
+        List<ConnectorEvent> events = new ArrayList<ConnectorEvent>();
+
+        synchronized (messages) {
+            for (int i = 0; i < messages.size(); i++) {
+                events.add(new ConnectorEvent(messages.get(i).getId(), messages.get(i).getType(), messages.get(i)));
+            }
+            messages.clear();
+        }
+
+        for (int i = 0; i < events.size(); i++) {
+            fireEvent(events.get(i));
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ConnectorEvent.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ConnectorEvent.java
new file mode 100644 (file)
index 0000000..72d3ede
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+public final class ConnectorEvent {
+    public static final int RESPONSE_PAINT = IMessage.RESPONSE_PAINT;
+    public static final int RESPONSE_EVENT = IMessage.RESPONSE_EVENT;
+
+    private int id = 0;
+    private IMessage message = null;
+    private int type = 0;
+    private int width = 0;
+    private int height = 0;
+    private int depth = 0;
+    private byte[] buffer = null;
+
+    public ConnectorEvent() {
+    }
+
+    public ConnectorEvent(int id, int type, IMessage message) {
+        setId(id);
+        setType(type);
+        setMessage(message);
+    }
+
+    public void setMessage(IMessage message) {
+        this.message = message;
+    }
+
+    public IMessage getMessage() {
+        return message;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setType(int type) {
+        this.type = type;
+    }
+
+    public int getType() {
+        return type;
+    }
+
+    public void setWidth(int width) {
+        this.width = width;
+    }
+
+    public int getWidth() {
+        return width;
+    }
+
+    public void setHeight(int height) {
+        this.height = height;
+    }
+
+    public int getHeight() {
+        return height;
+    }
+
+    public void setDepth(int depth) {
+        this.depth = depth;
+    }
+
+    public int getDepth() {
+        return depth;
+    }
+
+    public void setBuffer(byte[] buffer) {
+        this.buffer = buffer;
+    }
+
+    public byte[] getBuffer() {
+        return buffer;
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ConnectorFactory.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ConnectorFactory.java
new file mode 100644 (file)
index 0000000..a777afd
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+
+public final class ConnectorFactory {
+
+    private static ConnectorFactory instance = null;
+    private Map<String, IConnector> connectors = new HashMap<String, IConnector>();
+    private Map<String, Integer> references = new HashMap<String, Integer>();
+
+    public static synchronized ConnectorFactory getDefault() {
+        if (instance == null) {
+            instance = new ConnectorFactory();
+        }
+        return instance;
+    }
+
+    private ConnectorFactory() {
+    }
+
+    private String createId(String version, String profile) {
+        String id = version + "-" + profile;
+        return id;
+    }
+
+    private int getReference(String id) {
+        return references.get(id);
+    }
+
+    private void addReference(String id) {
+        // new
+        if (!references.containsKey(id)) {
+            references.put(id, 1);
+            return;
+        }
+
+        // add ref
+        int count = getReference(id);
+        references.put(id, count + 1);
+    }
+
+    private void removeReference(String id) {
+        int count = getReference(id);
+        // Assert.notNull(count);
+        // Assert.isTrue(count > 0);
+        references.put(id, count - 1);
+    }
+
+    /**
+     * Creates new connector
+     * 
+     * @param version
+     * @param profile
+     * @return a new connector
+     * @throws IOException
+     *             if connector can not be created.
+     */
+    public IConnector create(String version, String profile) throws IOException {
+        // Assert.notNull(version);
+        // Assert.notNull(profile);
+
+        String id = createId(version, profile);
+        // if connector is already created
+        if (connectors.containsKey(id)) {
+            // ref count++
+            addReference(id);
+            return connectors.get(id);
+        }
+
+        // create service
+        ServiceFactory factory = ServiceFactory.getDefault();
+        IService service = factory.create(version, profile);
+        IConnector connector = null;
+        if (service instanceof Service == true) {
+            if (((Service) service).isConnected == true) {
+                // create connector
+                connector = new Connector(service);
+                ((Connector) connector).setId(id);
+                // ref count++
+                addReference(id);
+                connectors.put(id, connector);
+            }
+        }
+        return connector;
+    }
+
+    /**
+     * Destroys connector
+     */
+    public void destroy(String version, String profile) {
+        // Assert.notNull(version);
+        // Assert.notNull(profile);
+
+        String id = createId(version, profile);
+        // ref count--
+        removeReference(id);
+        int refCount = getReference(id);
+        if (refCount != 0) {
+            return;
+        }
+
+        // destroy connector
+        // Assert.isTrue(connectors.containsKey(id), "Connector can not be found. Connector id : " +
+        // id);
+        IConnector connector = connectors.get(id);
+        // Assert.notNull(connector, "Connector not found : " + id);
+        connectors.remove(id);
+        ((Connector) connector).destroy();
+
+        // destroy service
+        ServiceFactory factory = ServiceFactory.getDefault();
+        factory.destroy(version, profile);
+    }
+
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/Header.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/Header.java
new file mode 100644 (file)
index 0000000..ce5b390
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+import org.tizen.efluibuilder.internal.connector.util.ByteUtil;
+
+
+public final class Header {
+    // fixed size of header;
+    private static final int SIZE = 20;
+
+    private String id = null;
+    private int version = 0;
+    private int size = 0;
+    private int checksum = 0;
+    private int format = 0;
+
+    public static int getSize() {
+        return SIZE;
+    }
+
+    public Header() {
+        super();
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setVersion(int version) {
+        this.version = version;
+    }
+
+    public int getVersion() {
+        return version;
+    }
+
+    public void setBodySize(int size) {
+        this.size = size;
+    }
+
+    public int getBodySize() {
+        return size;
+    }
+
+    public void setChecksum(int checkSum) {
+        this.checksum = checkSum;
+    }
+
+    public int getChecksum() {
+        return checksum;
+    }
+
+    public void setFormat(int format) {
+        this.format = format;
+    }
+
+    public int getFormat() {
+        return format;
+    }
+
+    @Override
+    public String toString() {
+        return getClass().getName() + "HeaderSize : " + getSize() + " ID : " + getId() + " Version : " + getVersion() + " BodySize : " + getBodySize()
+                + " Checksum : " + getChecksum() + " Format : " + getFormat();
+    }
+
+    public byte[] serialize() {
+        byte[] buffer = new byte[SIZE];
+
+        // id
+        byte[] writeBuffer = id.getBytes();
+        System.arraycopy(writeBuffer, 0, buffer, 0, 4);
+
+        // version
+        writeBuffer = ByteUtil.intToBytes(getVersion());
+        System.arraycopy(writeBuffer, 0, buffer, 4, 4);
+
+        // bodySize
+        writeBuffer = ByteUtil.intToBytes(getBodySize());
+        System.arraycopy(writeBuffer, 0, buffer, 8, 4);
+
+        // checksum
+        writeBuffer = ByteUtil.intToBytes(getChecksum());
+        System.arraycopy(writeBuffer, 0, buffer, 12, 4);
+
+        // format
+        writeBuffer = ByteUtil.intToBytes(getFormat());
+        System.arraycopy(writeBuffer, 0, buffer, 16, 4);
+
+        return buffer;
+    }
+
+    public void deserialize(byte[] buffer) {
+        // id
+        byte[] readBuffer = new byte[4];
+        System.arraycopy(buffer, 0, readBuffer, 0, 4);
+        String id = new String(readBuffer);
+        setId(id);
+
+        // version
+        System.arraycopy(buffer, 4, readBuffer, 0, 4);
+        setVersion(ByteUtil.bytesToInt(readBuffer));
+
+        // bodySize
+        System.arraycopy(buffer, 8, readBuffer, 0, 4);
+        setBodySize(ByteUtil.bytesToInt(readBuffer));
+
+        // checkSum
+        System.arraycopy(buffer, 12, readBuffer, 0, 4);
+        setChecksum(ByteUtil.bytesToInt(readBuffer));
+
+        // format
+        System.arraycopy(buffer, 16, readBuffer, 0, 4);
+        setFormat(ByteUtil.bytesToInt(readBuffer));
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IConnector.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IConnector.java
new file mode 100644 (file)
index 0000000..49eb27f
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+public interface IConnector {
+
+    /**
+     * Sends message
+     * 
+     * @param message
+     */
+    public void send(IMessage message);
+
+    /**
+     * Adds a connector listener to this connector that will be notified when connector events
+     * occur.
+     * 
+     * @param listener
+     *            The listener to be added; must not be <code>null</code>.
+     */
+    public void addConnectorListener(IConnectorListener listener);
+
+    /**
+     * Removes a connector listener from this connector.
+     * 
+     * @param listener
+     *            The listener to be removed; must not be <code>null</code>.
+     */
+    public void removeConnectorListener(IConnectorListener listener);
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IConnectorListener.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IConnectorListener.java
new file mode 100644 (file)
index 0000000..cb6395f
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+public interface IConnectorListener {
+    /**
+     * Called when a receive event occurs in the connector.
+     * 
+     * @param event
+     *            notify event
+     */
+    public void receiveEvent(ConnectorEvent event);
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IMessage.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IMessage.java
new file mode 100644 (file)
index 0000000..5200a9c
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+public interface IMessage {
+    public static final int REQUEST_COMMAND = ProtocolConstants.MESSAGE_REQUEST_COMMAND;
+    public static final int RESPONSE_PAINT = ProtocolConstants.MESSAGE_RESPONSE_PAINT;
+    public static final int RESPONSE_EVENT = ProtocolConstants.MESSAGE_RESPONSE_EVENT;
+
+    /**
+     * Set id
+     * 
+     * @param id
+     *            id of this message
+     */
+    public void setId(int id);
+
+    /**
+     * Get id
+     * 
+     * @return id of this message
+     */
+    public int getId();
+
+    /**
+     * Set type
+     * 
+     * @param type
+     *            type of this message
+     */
+    public void setType(int type);
+
+    /**
+     * Get type
+     * 
+     * @return type of this message
+     */
+    public int getType();
+
+    /**
+     * Serialize
+     * 
+     * @return buffer
+     */
+    public byte[] serialize();
+
+    /**
+     * Deserialize
+     * 
+     * @param buffer
+     */
+    public void deserialize(byte[] buffer);
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IService.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/IService.java
new file mode 100644 (file)
index 0000000..5c21bea
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+public interface IService {
+
+    /**
+     * 
+     * @return
+     */
+    public String getId();
+
+    /**
+     * 
+     * @return
+     */
+    public String getIp();
+
+    /**
+     * 
+     * @return
+     */
+    public int getPort();
+
+    /**
+     * 
+     */
+    public void stop();
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/MessageReader.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/MessageReader.java
new file mode 100644 (file)
index 0000000..fca3309
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.internal.connector.message.ResponseEventMessage;
+import org.tizen.efluibuilder.internal.connector.message.ResponsePaintMessage;
+
+
+public final class MessageReader {
+    protected Logger logger = LoggerFactory.getLogger(MessageReader.class);
+    private InputStream stream = null;
+
+    public MessageReader(InputStream stream) {
+        this.stream = stream;
+    }
+
+    public IMessage read() throws IOException {
+        // read header
+        Header header = readHeader();
+        if (!isValidProtocol(header)) {
+            throw new IOException("Invalid protocol : " + header.getId() + " : " + header.getVersion());
+        }
+
+        byte[] buffer = readMessage(header);
+        if (!ChecksumValidator.isValid(header.getChecksum(), buffer)) {
+            throw new IOException("Invalid checksum : " + header.getChecksum());
+        }
+
+        IMessage message = null;
+        if (header.getFormat() == ProtocolConstants.PROTOCOL_FORMAT_JSON) {
+            message = parseJson(buffer);
+        } else if (header.getFormat() == ProtocolConstants.PROTOCOL_FORMAT_BYTE_STREAM) {
+            message = parseByte(buffer);
+        } else {
+            throw new IOException("Invalid format : " + header.getFormat());
+        }
+
+        return message;
+    }
+
+    private Header readHeader() throws IOException {
+        int size = Header.getSize();
+        byte[] buffer = new byte[size];
+        int readSize = stream.read(buffer, 0, size);
+        // if readSize == -1, there is no more data because the end of the stream has been reached.
+        if (readSize == -1) {
+            throw new IOException("Socket closed.\n There is no more data because the end of the stream has been reached");
+        }
+
+        Header header = new Header();
+        header.deserialize(buffer);
+        return header;
+    }
+
+    private boolean isValidProtocol(Header header) {
+        String id = header.getId();
+        if (!id.equals(ProtocolConstants.PROTOCOL_ID)) {
+            return false;
+        }
+        int version = header.getVersion();
+        if (version != ProtocolConstants.PROTOCOL_VERSION) {
+            return false;
+        }
+        return true;
+    }
+
+    private byte[] readMessage(Header header) throws IOException {
+        int totalSize = header.getBodySize();
+        byte[] buffer = new byte[totalSize];
+        int readSize = 0;
+        int length = 0;
+        while (totalSize != readSize) {
+            length = stream.read(buffer, readSize, totalSize - readSize);
+            readSize += length;
+        }
+        return buffer;
+    }
+
+    private IMessage parseJson(byte[] buffer) {
+        IMessage message = new ResponseEventMessage();
+        message.deserialize(buffer);
+        return message;
+    }
+
+    public IMessage parseByte(byte[] buffer) {
+        IMessage message = new ResponsePaintMessage();
+        message.deserialize(buffer);
+        return message;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/MessageWriter.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/MessageWriter.java
new file mode 100644 (file)
index 0000000..779c818
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+
+public final class MessageWriter {
+    private OutputStream stream = null;
+
+    public MessageWriter(OutputStream stream) {
+        this.stream = stream;
+    }
+
+    public void write(IMessage message) throws IOException {
+        byte[] messageBuffer = message.serialize();
+        Header header = createHeader(messageBuffer);
+        byte[] headerBuffer = header.serialize();
+
+        // write header
+        write(headerBuffer);
+        // write message
+        write(messageBuffer);
+    }
+
+    private Header createHeader(byte[] buffer) {
+        Header header = new Header();
+        header.setId(ProtocolConstants.PROTOCOL_ID);
+        header.setVersion(ProtocolConstants.PROTOCOL_VERSION);
+        header.setBodySize(buffer.length);
+        int checksum = ChecksumValidator.createChecksum(buffer);
+        header.setChecksum(checksum);
+        header.setFormat(ProtocolConstants.PROTOCOL_FORMAT_JSON);
+        return header;
+    }
+
+    private void write(byte[] buffer) throws IOException {
+        stream.write(buffer, 0, buffer.length);
+        stream.flush();
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ProtocolConstants.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ProtocolConstants.java
new file mode 100644 (file)
index 0000000..c07868a
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+public final class ProtocolConstants {
+    /*************************************************************************************
+     * Header Protocol Protocol Header (20bytes) <br>
+     * PROTOCOL_ID(4bytes) <br>
+     * PROTOCOL_VERSION(4bytes) <br>
+     * BODY_SIZE(4bytes) <br>
+     * CHECKSUM(4bytes) <br>
+     * PROTOCOL_FORMAT(4bytes) <br>
+     *************************************************************************************/
+    public static final String PROTOCOL_ID = "NUIB";
+    public static final int PROTOCOL_VERSION = 1;
+    public static final int PROTOCOL_FORMAT_JSON = 0;
+    public static final int PROTOCOL_FORMAT_BYTE_STREAM = 1;
+
+    /*************************************************************************************
+     * Messages
+     *************************************************************************************/
+    public static final int MESSAGE_REQUEST_COMMAND = 1;
+    public static final int MESSAGE_RESPONSE_PAINT = 11;
+    public static final int MESSAGE_RESPONSE_EVENT = 12;
+
+    /*************************************************************************************
+     * Parsing keys
+     *************************************************************************************/
+    public static final String KEY_ID = "id";
+    public static final String KEY_TYPE = "msg-type";
+    public static final String KEY_COMMAND_NAME = "command-name";
+    public static final String KEY_COMMAND_DATA = "command-data";
+    public static final String KEY_EVENT_NAME = "event-name";
+    public static final String KEY_EVENT_DATA = "event-data";
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/Service.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/Service.java
new file mode 100644 (file)
index 0000000..421d71d
--- /dev/null
@@ -0,0 +1,203 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.net.proxy.IProxyData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.internal.connector.util.ProxyEnvUtil;
+import org.tizen.efluibuilder.internal.renderer.util.DebugUtil;
+
+
+public final class Service implements IService {
+    private Logger logger = LoggerFactory.getLogger(Service.class);
+    private static final String SERVICE_IP = "127.0.0.1";
+    private static final int SERVICE_PORT = 18216;
+    private static final String MESSAGE_PORT = "NUIB-CMD-PORT:";
+    private static final String MESSAGE_LISTEN = "NUIB-CMD-LISTEN";
+    private static final String MESSAGE_ACCEPT = "NUIB-CMD-ACCEPT";
+    private static int TCP_HANDSHAKE_TIMEOUT = 30000;// 30 sec
+
+    private String id = null;
+    private String path = null;
+    private String profile = null;
+    private Map<String, String> environments = null;
+
+    private int port = SERVICE_PORT;
+
+    private Process process = null;
+    private final Object lock = new Object();
+    public boolean isConnected = false;
+
+    private ServiceThread thread = null;
+
+    Service(String id, String path, String profile) {
+        this.id = id;
+        this.path = path;
+        this.profile = profile;
+        setEnvironments();
+        start();
+    }
+
+    @Override
+    public String getId() {
+        return id;
+    }
+
+    @Override
+    public String getIp() {
+        return SERVICE_IP;
+    }
+
+    @Override
+    public int getPort() {
+        return port;
+    }
+
+    private void start() {
+        thread = new ServiceThread();
+        thread.setName(id);
+        thread.start();
+
+        Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
+            public void run() {
+                stop();
+            }
+        }));
+
+        // wait service listen
+        synchronized (lock) {
+            if (isConnected == false) {
+                try {
+                    logger.debug("wait connection");
+                    lock.wait(TCP_HANDSHAKE_TIMEOUT);
+                    logger.debug("connected");
+                } catch (InterruptedException e) {
+                    if (thread != null) { // time out
+                        thread.interrupt(); // kill thread
+                        thread = null;
+                    }
+                    logger.error(e.getMessage());
+                }
+            }
+        }
+    }
+
+    @Override
+    public void stop() {
+        if (process != null) {
+            // child process kill
+            process.destroy();
+        }
+    }
+
+    private void setEnvironments() {
+        this.environments = new HashMap<String, String>();
+        environments.put("ELM_PROFILE", profile);
+        String proxy = ProxyEnvUtil.getProxyEnv(IProxyData.HTTP_PROXY_TYPE);
+        if (proxy != null) {
+            environments.put("http_proxy", proxy);
+        }
+
+        proxy = ProxyEnvUtil.getProxyEnv(IProxyData.HTTPS_PROXY_TYPE);
+        if (proxy != null) {
+            environments.put("https_proxy", proxy);
+        }
+    }
+
+    private class ServiceThread extends Thread {
+        @Override
+        public void run() {
+            // start child process
+            List<String> command = new ArrayList<String>();
+            command.add(path);
+            ProcessBuilder builder = new ProcessBuilder(command);
+            // add environment variables
+            // this codes temporary implementation for efl-tools
+            Map<String, String> env = builder.environment();
+            env.putAll(environments);
+
+            try {
+                process = builder.start();
+                // process.getInputStream().close();
+                process.getOutputStream().close();
+                process.getErrorStream().close();
+                InputStream inputStream = process.getInputStream();
+                InputStreamReader streamReader = new InputStreamReader(inputStream);
+                final BufferedReader reader = new BufferedReader(streamReader);
+
+                String message = null;
+                while ((message = reader.readLine()) != null) {
+                    if (message.contains(MESSAGE_PORT)) {
+                        message = message.replace("[", "");
+                        message = message.replace("]", "");
+                        String[] portNumber = message.split(MESSAGE_PORT);
+                        if (portNumber != null && portNumber.length > 0) {
+                            port = Integer.parseInt(portNumber[1]);
+                        }
+                    } else if (message.contains(MESSAGE_LISTEN)) {
+                        synchronized (lock) {
+                            isConnected = true;
+                            lock.notifyAll();
+                        }
+                    } else if (message.contains(MESSAGE_ACCEPT)) {
+                        // break;
+                    } else {
+                        // Do not remove following codes (for debug)
+                        DebugUtil.debug(logger, message);
+                    }
+                }
+
+                int exitcode = process.waitFor();
+                DebugUtil.debug(logger, "child process exit : " + exitcode);
+            } catch (IOException e) {
+                synchronized (lock) {
+                    lock.notifyAll();
+                }
+                /*
+                 * The operating system program file was not found. Access to the program file was
+                 * denied. The working directory does not exist.
+                 */
+                DebugUtil.debug(logger, getClass().getName(), e);
+            } catch (InterruptedException e) {
+                // do not need unlock
+                DebugUtil.debug(logger, getClass().getName(), e);
+            } catch (RuntimeException e) {
+                synchronized (lock) {
+                    lock.notifyAll();
+                }
+                DebugUtil.debug(logger, getClass().getName(), e);
+            }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ServiceFactory.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/ServiceFactory.java
new file mode 100644 (file)
index 0000000..68bc50e
--- /dev/null
@@ -0,0 +1,171 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Platform;
+import org.tizen.common.core.application.InstallPathConfig;
+import org.tizen.common.util.Assert;
+
+
+public final class ServiceFactory {
+    private static final String VERSION_2_3 = "2.3";
+    private static final String VERSION_2_3_1 = "2.3.1";
+    private static final String VERSION_2_3_2 = "2.3.2";
+    private static final String VERSION_2_4 = "2.4";
+    private static final String VERSION_3_0 = "3.0";
+    private static final String VERSION_4_0 = "4.0";
+
+    private static final String PROFILE_MOBILE = "mobile";
+    private static final String PROFILE_WEARABLE = "wearable";
+    private static final String PROFILE_WEARABLE_CIRCLE = "wearable-circle";
+    private static final String PROFILE_TV = "tv";
+
+    private static final String SERVICE_DIRECTORY_2_3 = "/platforms/tizen-2.3/common/efl-tool/efl-renderer/";
+    private static final String SERVICE_DIRECTORY_2_3_1 = "/platforms/tizen-2.3.1/common/efl-tool/efl-renderer/";
+    private static final String SERVICE_DIRECTORY_2_3_2 = "/platforms/tizen-2.3.2/common/efl-tool/efl-renderer/";
+    private static final String SERVICE_DIRECTORY_2_4 = "/platforms/tizen-2.4/common/efl-tool/efl-renderer/";
+    private static final String SERVICE_DIRECTORY_3_0 = "/platforms/tizen-3.0/common/efl-tool/efl-renderer/";
+    private static final String SERVICE_DIRECTORY_3_0_wearable = "/platforms/tizen-3.0/wearable/efl-tool/efl-renderer/";
+    private static final String SERVICE_DIRECTORY_4_0 = "/platforms/tizen-4.0/common/efl-tool/efl-renderer/";
+    private static final String SERVICE_DIRECTORY_4_0_wearable = "/platforms/tizen-4.0/wearable/efl-tool/efl-renderer/";
+
+    private static final String SERVICE_BINARY_LINUX = "efl-renderer.sh";
+    private static final String SERVICE_BINARY_WINDOWS = "efl-renderer.bat";
+    private static final String SERVICE_BINARY_MACOS = "efl-renderer-macos.sh";
+
+    private static ServiceFactory instance = null;
+    private Map<String, String> pathTable = null;
+    private Map<String, IService> services = null;
+
+    public static synchronized ServiceFactory getDefault() {
+        if (instance == null) {
+            instance = new ServiceFactory();
+        }
+        return instance;
+    }
+
+    private ServiceFactory() {
+        pathTable = new HashMap<String, String>();
+        services = new HashMap<String, IService>();
+        createTable();
+    }
+
+    private String createId(String version, String profile) {
+        String id = version + "-" + profile;
+        return id;
+    }
+
+    private void createTable() {
+        // create service path table
+        String sdkPath = InstallPathConfig.getSDKPath();
+        String binary = getBinary();
+        // 2.3 mobile
+        // 2.3 has only mobile profile
+        String path = sdkPath + SERVICE_DIRECTORY_2_3 + binary;
+        String id = VERSION_2_3 + "-" + PROFILE_MOBILE;
+        pathTable.put(id, path);
+
+        // 2.3.1 mobile
+        path = sdkPath + SERVICE_DIRECTORY_2_3_1 + binary;
+        id = VERSION_2_3_1 + "-" + PROFILE_MOBILE;
+        pathTable.put(id, path);
+        // 2.3.1 wearable
+        id = VERSION_2_3_1 + "-" + PROFILE_WEARABLE;
+        pathTable.put(id, path);
+        // 2.3.1 wearable circle
+        id = VERSION_2_3_1 + "-" + PROFILE_WEARABLE_CIRCLE;
+        pathTable.put(id, path);
+
+        // 2.3.2 wearable circle
+        path = sdkPath + SERVICE_DIRECTORY_2_3_2 + binary;
+        id = VERSION_2_3_2 + "-" + PROFILE_WEARABLE_CIRCLE;
+        pathTable.put(id, path);
+
+        // 2.4 mobile
+        path = sdkPath + SERVICE_DIRECTORY_2_4 + binary;
+        id = VERSION_2_4 + "-" + PROFILE_MOBILE;
+        pathTable.put(id, path);
+
+        // 3.0 mobile
+        path = sdkPath + SERVICE_DIRECTORY_3_0 + binary;
+        id = VERSION_3_0 + "-" + PROFILE_MOBILE;
+        pathTable.put(id, path);
+        // 3.0 tv
+        id = VERSION_3_0 + "-" + PROFILE_TV;
+        pathTable.put(id, path);
+        // 3.0 wearable circle
+        path = sdkPath + SERVICE_DIRECTORY_3_0_wearable + binary;
+        id = VERSION_3_0 + "-" + PROFILE_WEARABLE_CIRCLE;
+        pathTable.put(id, path);
+
+        // 4.0 mobile
+        path = sdkPath + SERVICE_DIRECTORY_4_0 + binary;
+        id = VERSION_4_0 + "-" + PROFILE_MOBILE;
+        pathTable.put(id, path);
+        // 4.0 wearable circle
+        path = sdkPath + SERVICE_DIRECTORY_4_0_wearable + binary;
+        id = VERSION_4_0 + "-" + PROFILE_WEARABLE_CIRCLE;
+        pathTable.put(id, path);
+    }
+
+    private String getBinary() {
+        String os = Platform.getOS();
+        String binary = null;
+        if (os.equals(Platform.OS_LINUX)) {
+            binary = SERVICE_BINARY_LINUX;
+        } else if (os.equals(Platform.OS_WIN32)) {
+            binary = SERVICE_BINARY_WINDOWS;
+        } else if (os.equals(Platform.OS_MACOSX)) {
+            binary = SERVICE_BINARY_MACOS;
+        }
+        return binary;
+    }
+
+    IService create(String version, String profile) {
+        Assert.notNull(version);
+        Assert.notNull(profile);
+
+        String id = createId(version, profile);
+        // find
+        String path = pathTable.get(id);
+        Assert.notNull(path, "Service path not found : " + id);
+
+        Service service = new Service(id, path, profile);
+        services.put(id, service);
+        return service;
+    }
+
+    void destroy(String version, String profile) {
+        Assert.notNull(version);
+        Assert.notNull(profile);
+
+        String id = createId(version, profile);
+        IService service = services.get(id);
+        Assert.notNull(service, "Service not found : " + id);
+        service.stop();
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/Message.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/Message.java
new file mode 100644 (file)
index 0000000..d4adbe1
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector.message;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.internal.connector.IMessage;
+
+
+public abstract class Message implements IMessage {
+    protected Logger logger = LoggerFactory.getLogger(Message.class);
+    private int id = 0;
+    private int type = 0;
+
+    @Override
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    @Override
+    public int getId() {
+        return id;
+    }
+
+    @Override
+    public void setType(int type) {
+        this.type = type;
+    }
+
+    @Override
+    public int getType() {
+        return type;
+    }
+
+    @Override
+    public byte[] serialize() {
+        return null;
+    }
+
+    @Override
+    public void deserialize(byte[] buffer) {
+    }
+
+    @Override
+    public String toString() {
+        return "id : " + id + " type : " + type;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/RequestCommandMessage.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/RequestCommandMessage.java
new file mode 100644 (file)
index 0000000..a42a1fc
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector.message;
+
+import org.tizen.efluibuilder.internal.connector.ProtocolConstants;
+
+import com.google.gson.JsonObject;
+
+
+public final class RequestCommandMessage extends Message {
+    public String name = null;
+    public String data = null;
+
+    public RequestCommandMessage() {
+        super();
+        setType(REQUEST_COMMAND);
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setData(String data) {
+        this.data = data;
+    }
+
+    public String getData() {
+        return data;
+    }
+
+    @Override
+    public byte[] serialize() {
+        JsonObject json = new JsonObject();
+        json.addProperty(ProtocolConstants.KEY_ID, getId());
+        json.addProperty(ProtocolConstants.KEY_TYPE, getType());
+        json.addProperty(ProtocolConstants.KEY_COMMAND_NAME, getName());
+        json.addProperty(ProtocolConstants.KEY_COMMAND_DATA, getData());
+        String jsonString = json.toString();
+        return jsonString.getBytes();
+    }
+
+    @Override
+    public String toString() {
+        String string = super.toString() + " name : " + getName() + "data : " + getData();
+        return string;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/ResponseEventMessage.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/ResponseEventMessage.java
new file mode 100644 (file)
index 0000000..96244c4
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector.message;
+
+import org.tizen.efluibuilder.internal.connector.ProtocolConstants;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import com.google.gson.JsonPrimitive;
+
+
+public final class ResponseEventMessage extends Message {
+    private String name = null;
+    private String data = null;
+
+    public ResponseEventMessage() {
+        setType(RESPONSE_EVENT);
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setData(String data) {
+        this.data = data;
+    }
+
+    public String getData() {
+        return data;
+    }
+
+    @Override
+    public void deserialize(byte[] buffer) {
+        String jsonString = new String(buffer);
+        JsonParser parser = new JsonParser();
+        JsonElement element = parser.parse(jsonString);
+        JsonObject json = element.getAsJsonObject();
+
+        // id
+        JsonPrimitive value = (JsonPrimitive) json.get(ProtocolConstants.KEY_ID);
+        int id = value.getAsInt();
+        setId(id);
+
+        // type
+        value = (JsonPrimitive) json.get(ProtocolConstants.KEY_TYPE);
+        int type = value.getAsInt();
+        setType(type);
+
+        // event name
+        value = (JsonPrimitive) json.get(ProtocolConstants.KEY_EVENT_NAME);
+        String name = value.getAsString();
+        setName(name);
+
+        // event data
+        value = (JsonPrimitive) json.get(ProtocolConstants.KEY_EVENT_DATA);
+        String string = value.getAsString();
+        setData(string);
+    }
+
+    @Override
+    public String toString() {
+        String string = super.toString() + " name : " + getName() + " data : " + getData();
+        return string;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/ResponsePaintMessage.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/message/ResponsePaintMessage.java
new file mode 100644 (file)
index 0000000..523d4c6
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector.message;
+
+import org.tizen.efluibuilder.internal.connector.util.ByteUtil;
+
+
+public final class ResponsePaintMessage extends Message {
+    private int width = 0;
+    private int height = 0;
+    private int depth = 0;
+    private byte[] imageBuffer = null;
+
+    public ResponsePaintMessage() {
+        setType(RESPONSE_PAINT);
+    }
+
+    public void setWidth(int width) {
+        this.width = width;
+    }
+
+    public int getWidth() {
+        return width;
+    }
+
+    public void setHeight(int height) {
+        this.height = height;
+    }
+
+    public int getHeight() {
+        return height;
+    }
+
+    public void setDepth(int depth) {
+        this.depth = depth;
+    }
+
+    public int getDepth() {
+        return depth;
+    }
+
+    public void setImageBuffer(byte[] buffer) {
+        this.imageBuffer = buffer;
+    }
+
+    public byte[] getImageBuffer() {
+        return imageBuffer;
+    }
+
+    @Override
+    public void deserialize(byte[] buffer) {
+        byte[] idBuffer = new byte[4];
+        System.arraycopy(buffer, 0, idBuffer, 0, 4);
+        byte[] typeBuffer = new byte[4];
+        System.arraycopy(buffer, 4, typeBuffer, 0, 4);
+        byte[] widthBuffer = new byte[4];
+        System.arraycopy(buffer, 8, widthBuffer, 0, 4);
+        byte[] heightBuffer = new byte[4];
+        System.arraycopy(buffer, 12, heightBuffer, 0, 4);
+        byte[] depthBuffer = new byte[4];
+        System.arraycopy(buffer, 16, depthBuffer, 0, 4);
+        byte[] imageBuffer = new byte[buffer.length - 20];
+        System.arraycopy(buffer, 20, imageBuffer, 0, buffer.length - 20);
+
+        int id = ByteUtil.bytesToInt(idBuffer);
+        int type = ByteUtil.bytesToInt(typeBuffer);
+        int width = ByteUtil.bytesToInt(widthBuffer);
+        int height = ByteUtil.bytesToInt(heightBuffer);
+        int depth = ByteUtil.bytesToInt(depthBuffer);
+
+        setId(id);
+        setType(type);
+        setWidth(width);
+        setHeight(height);
+        setDepth(depth);
+        setImageBuffer(imageBuffer);
+    }
+
+    @Override
+    public String toString() {
+        String string = super.toString() + " width : " + getWidth() + " height : " + getHeight() + " depth : " + getDepth();
+        return string;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/util/ByteUtil.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/util/ByteUtil.java
new file mode 100644 (file)
index 0000000..71f9f2f
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector.util;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+
+public final class ByteUtil {
+
+    public static byte[] intToBytes(int integer) {
+        ByteBuffer buffer = ByteBuffer.allocate(Integer.SIZE);
+        buffer.order(ByteOrder.LITTLE_ENDIAN);
+        buffer.putInt(integer);
+        return buffer.array();
+    }
+
+    public static int bytesToInt(byte[] bytes) {
+        ByteBuffer buffer = ByteBuffer.allocate(Integer.SIZE);
+        buffer.order(ByteOrder.LITTLE_ENDIAN);
+        buffer.put(bytes);
+        buffer.flip();
+        return buffer.getInt();
+    }
+
+    public static byte[] longToBytes(long integer) {
+        ByteBuffer buffer = ByteBuffer.allocate(Long.SIZE);
+        buffer.putLong(integer);
+        return buffer.array();
+    }
+
+    public static long bytesToLong(byte[] bytes) {
+        ByteBuffer buffer = ByteBuffer.allocate(Long.SIZE);
+        buffer.put(bytes);
+        buffer.flip();
+        return buffer.getLong();
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/util/ProxyEnvUtil.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/connector/util/ProxyEnvUtil.java
new file mode 100644 (file)
index 0000000..87ff906
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.connector.util;
+
+import org.eclipse.core.net.proxy.IProxyData;
+import org.eclipse.core.net.proxy.IProxyService;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.util.tracker.ServiceTracker;
+
+
+public final class ProxyEnvUtil {
+
+    private static final String HTTP_PROTOCOL = "http://"; //$NON-NLS-1$
+
+    public static String getProxyEnv(String type) {
+        IProxyData proxyData = getProxyData(type);
+        if (proxyData != null) {
+            return createProxyEnv(proxyData.getHost(), proxyData.getPort(), proxyData.getUserId(), proxyData.getPassword());
+        }
+        return null;
+    }
+
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    private static IProxyData getProxyData(String type) {
+        if (FrameworkUtil.getBundle(ProxyEnvUtil.class) == null) {
+            return null;
+        }
+        ServiceTracker proxyTracker = new ServiceTracker(FrameworkUtil.getBundle(ProxyEnvUtil.class).getBundleContext(),
+                                                         IProxyService.class.getName(), null);
+        proxyTracker.open();
+        IProxyService proxyService = (IProxyService) proxyTracker.getService();
+        IProxyData proxyDataForHost = proxyService.getProxyData(type);
+        proxyTracker.close();
+        return proxyDataForHost;
+    }
+
+    private static String createProxyEnv(String host, int port, String userId, String pwd) {
+        String result = null;
+        if (host != null) {
+            if (userId != null) {
+                result = HTTP_PROTOCOL + userId + ":" + pwd + "@" + host + ":" + port;
+            } else {
+                result = HTTP_PROTOCOL + host + ":" + port;
+            }
+        }
+
+        return result;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/AbstractRenderer.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/AbstractRenderer.java
new file mode 100644 (file)
index 0000000..d81ce5c
--- /dev/null
@@ -0,0 +1,301 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.commands.common.EventManager;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.swt.graphics.Point;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.internal.renderer.command.ICommand;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.IRenderer;
+import org.tizen.efluibuilder.renderer.IRendererListener;
+import org.tizen.efluibuilder.renderer.event.RenderEvent;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+
+public abstract class AbstractRenderer extends EventManager implements IRenderer {
+    protected static Logger logger = LoggerFactory.getLogger(Renderer.class);
+    private static final int TIMEOUT_REQUEST = 1000;
+    private final Synchronizer lock = new Synchronizer();
+
+    private int id = 0;
+    private String name = null;
+    private String version = null;
+    private String profile = null;
+    private String projectPath = null;
+
+    private int width = 0;
+    private int height = 0;
+    private Map<String, ICommand> commands = new HashMap<String, ICommand>();
+    private Map<String, String> ids = new HashMap<String, String>();
+
+    private static class Synchronizer {
+        private IArguments args = null;
+
+        public void setMessage(IArguments args) {
+            this.args = args;
+        }
+
+        public IArguments getMessage() {
+            return args;
+        }
+    }
+
+    protected enum FindType {
+        COMMAND_ID, EVENT_NAME
+    }
+
+    public AbstractRenderer() {
+        super();
+        createCommands();
+    }
+
+    private IArguments lock() {
+        synchronized (lock) {
+            try {
+                lock.setMessage(null);
+                lock.wait(TIMEOUT_REQUEST);
+            } catch (InterruptedException e) {
+                logger.error(e.getMessage());
+            }
+            return lock.getMessage();
+        }
+    }
+
+    private void unlock(IArguments args) {
+        Assert.notNull(args);
+        synchronized (lock) {
+            lock.setMessage(args);
+            lock.notify();
+        }
+    }
+
+    @Override
+    public int getId() {
+        return id;
+    }
+
+    @Override
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setProfile(String profile) {
+        this.profile = profile;
+    }
+
+    public String getProfile() {
+        return profile;
+    }
+
+    public void setProject(String projectPath) {
+        this.projectPath = projectPath;
+    }
+
+    public String getProject() {
+        return projectPath;
+    }
+
+    protected void setSize(int width, int height) {
+        this.width = width;
+        this.height = height;
+    }
+
+    @Override
+    public Point getSize() {
+        return new Point(width, height);
+    }
+
+    @Override
+    public void addRendererListener(IRendererListener listener) {
+        addListenerObject(listener);
+    }
+
+    @Override
+    public void removeRendererListener(IRendererListener listener) {
+        removeListenerObject(listener);
+    }
+
+    protected synchronized void request(IArguments args) {
+        ICommand command = findCommand(args.getId(), FindType.COMMAND_ID);
+        if (command == null) {
+            throw new NullPointerException("Can not found command");
+        }
+
+        if (command.isSynchronous()) {
+            requestSync(args);
+        } else {
+            command.request(args);
+        }
+    }
+
+    private synchronized IArguments requestSync(IArguments message) {
+        ICommand command = findCommand(message.getId(), FindType.COMMAND_ID);
+        if (command == null) {
+            throw new NullPointerException("Can not found command");
+        }
+
+        Assert.isTrue(command.isSynchronous(), "Illegal sync command : " + command.getId());
+        command.request(message);
+        IArguments replyMessage = lock();
+        if (replyMessage == null) {
+            logger.error("request timeout");
+        } else {
+            String id = replyMessage.getId();
+            if (id.equals("exception")) {
+                logger.error("Exception");
+                return null;
+            }
+        }
+        return replyMessage;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    protected int getWidth() {
+        return width;
+    }
+
+    protected int getHeight() {
+        return height;
+    }
+
+    protected void registerCommand(ICommand command) {
+        commands.put(command.getId(), command);
+        ids.put(command.getEventName(), command.getId());
+    }
+
+    protected ICommand findCommand(String key, FindType type) {
+        if (type.equals(FindType.COMMAND_ID)) {
+            return commands.get(key);
+        } else if (type.equals(FindType.EVENT_NAME)) {
+            String id = ids.get(key);
+            return commands.get(id);
+        }
+        return null;
+    }
+
+    protected void handleReceiveEvent(ReplyEvent event) {
+        ICommand command = findCommand(event.name, FindType.EVENT_NAME);
+        if (command == null) {
+            return;
+        }
+
+        IArguments message = command.reply(event);
+        if (message == null) {
+            logger.error("message is null");
+        }
+        if (!command.isSynchronous()) {
+            if (message != null) {
+                handleReply(message);
+            }
+            return;
+        }
+        Assert.notNull(message);
+        unlock(message);
+    }
+
+    /**
+     * Notifies all listeners that message has received. This sends the given event to all of the
+     * listeners, if any.
+     * 
+     * @param event
+     *            The event to send to the listeners; must not be <code>null</code>.
+     */
+    protected void fireReplyRender(final RenderEvent event) {
+        if (event == null) {
+            throw new NullPointerException("Cannot send a null event to listeners."); //$NON-NLS-1$
+        }
+
+        if (!isListenerAttached()) {
+            return;
+        }
+
+        final Object[] listeners = getListeners();
+        for (final Object listener : listeners) {
+            SafeRunner.run(new SafeRunnable() {
+                public void run() {
+                    ((IRendererListener) listener).replyRender(event);
+                }
+            });
+        }
+    }
+
+    /**
+     * Notifies all listeners that message has received. This sends the given event to all of the
+     * listeners, if any.
+     * 
+     * @param event
+     *            The event to send to the listeners; must not be <code>null</code>.
+     */
+    protected void fireEvent(final IArguments args) {
+        if (args == null) {
+            throw new NullPointerException("Cannot send a null message to listeners."); //$NON-NLS-1$
+        }
+
+        if (!isListenerAttached()) {
+            return;
+        }
+
+        final Object[] listeners = getListeners();
+        for (final Object listener : listeners) {
+            SafeRunner.run(new SafeRunnable() {
+                public void run() {
+                    ((IRendererListener) listener).reply(args);
+                }
+            });
+        }
+    }
+
+    @Override
+    public String toString() {
+        return String.format("<Renderer  id : %d | name : %s>", getId(), getName());
+    }
+
+    abstract protected void createCommands();
+
+    abstract protected boolean handleReply(IArguments args);
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/Arguments.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/Arguments.java
new file mode 100644 (file)
index 0000000..6845346
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.efluibuilder.renderer.IArguments;
+
+
+public final class Arguments implements IArguments {
+    private String id = null;
+    private List<Object> args = new ArrayList<Object>();
+
+    @Override
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    @Override
+    public String getId() {
+        return id;
+    }
+
+    @Override
+    public void addArg(int index, Object arg) {
+        args.add(index, arg);
+    }
+
+    @Override
+    public Object getArg(int index) {
+        return args.get(index);
+    }
+
+    @Override
+    public int getArgSize() {
+        return args.size();
+    }
+
+    @Override
+    public void clearArgs() {
+        args.clear();
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/Renderer.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/Renderer.java
new file mode 100644 (file)
index 0000000..d7efdac
--- /dev/null
@@ -0,0 +1,269 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.PaletteData;
+import org.eclipse.swt.graphics.Point;
+import org.tizen.efluibuilder.internal.connector.Connector;
+import org.tizen.efluibuilder.internal.connector.ConnectorEvent;
+import org.tizen.efluibuilder.internal.connector.IConnector;
+import org.tizen.efluibuilder.internal.connector.IConnectorListener;
+import org.tizen.efluibuilder.internal.connector.IMessage;
+import org.tizen.efluibuilder.internal.connector.message.RequestCommandMessage;
+import org.tizen.efluibuilder.internal.connector.message.ResponseEventMessage;
+import org.tizen.efluibuilder.internal.connector.message.ResponsePaintMessage;
+import org.tizen.efluibuilder.internal.renderer.command.CreateCommand;
+import org.tizen.efluibuilder.internal.renderer.command.DestroyCommand;
+import org.tizen.efluibuilder.internal.renderer.command.GetAllWidgetPositionsCommand;
+import org.tizen.efluibuilder.internal.renderer.command.GetGroupNamesCommand;
+import org.tizen.efluibuilder.internal.renderer.command.GetPlaceholderPositionsCommand;
+import org.tizen.efluibuilder.internal.renderer.command.GetStyleNamesCommand;
+import org.tizen.efluibuilder.internal.renderer.command.ICommand;
+import org.tizen.efluibuilder.internal.renderer.command.OverlayThemeCommand;
+import org.tizen.efluibuilder.internal.renderer.command.RemoveStyleNameCommand;
+import org.tizen.efluibuilder.internal.renderer.command.RenderCommand;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.event.RenderEvent;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+
+public final class Renderer extends AbstractRenderer {
+    private IConnector connector = null;
+    private ConnectorListener connectorListener = new ConnectorListener();
+
+    private String renderType = null;
+    private String renderData = null;
+
+    public boolean isRenderable() {
+        if (connector != null && connector instanceof Connector && ((Connector) connector).isConnected()) {
+            return true;
+        }
+        return false;
+    }
+
+    public Renderer(IConnector connector) {
+        this.connector = connector;
+        create();
+    }
+
+    private void create() {
+        connector.addConnectorListener(connectorListener);
+    }
+
+    private void setRenderType(String type) {
+        renderType = type;
+    }
+
+    private void setRenderData(String data) {
+        renderData = data;
+    }
+
+    @Override
+    public void create(int width, int height, String defaultThemePath, String customThemePath) {
+        setSize(width, height);
+        IArguments args = new Arguments();
+        args.setId(RendererConstants.COMMAND_CREATE);
+        args.addArg(0, width);
+        args.addArg(1, height);
+        args.addArg(2, getProject());
+        args.addArg(3, getProfile());
+        args.addArg(4, defaultThemePath);
+        args.addArg(5, customThemePath);
+
+        request(args);
+    }
+
+    @Override
+    public void destroy() {
+        IArguments args = new Arguments();
+        args.setId(RendererConstants.COMMAND_DESTROY);
+        request(args);
+        connector.removeConnectorListener(connectorListener);
+        RendererFactoryImpl factory = RendererFactoryImpl.getDefault();
+        factory.destroy(this);
+    }
+
+    @Override
+    public void render(String type, String data) {
+        Point size = getSize();
+        int width = size.x;
+        int height = size.y;
+        setRenderType(type);
+        setRenderData(data);
+        IArguments args = new Arguments();
+        args.setId(RendererConstants.COMMAND_RENDER);
+        args.addArg(0, width);
+        args.addArg(1, height);
+        args.addArg(2, type);
+        args.addArg(3, data);
+        request(args);
+    }
+
+    @Override
+    public void requestGetGroupNames(String edjFilePath) {
+        IArguments args = new Arguments();
+        args.setId(RendererConstants.COMMAND_GET_GROUP_NAMES);
+        args.addArg(0, edjFilePath);
+        request(args);
+    }
+
+    @Override
+    public void requestGetStyleNames(String edjFilePath) {
+        IArguments args = new Arguments();
+        args.setId(RendererConstants.COMMAND_GET_STYLE_NAMES);
+        args.addArg(0, edjFilePath);
+        request(args);
+    }
+
+    @Override
+    public void requestRemoveStyleName(String path, String widgetName, String styleName, String itemStyleName) {
+        IArguments args = new Arguments();
+        args.setId(RendererConstants.COMMAND_REMOVE_STYLE_NAME);
+        args.addArg(0, path);
+        args.addArg(1, widgetName);
+        args.addArg(2, styleName);
+        args.addArg(3, itemStyleName);
+        request(args);
+    }
+
+    @Override
+    public void requestOverlayTheme(String edjFilePath) {
+        IArguments args = new Arguments();
+        args.setId(RendererConstants.COMMAND_OVERLAY_THEME);
+        args.addArg(0, edjFilePath);
+        request(args);
+    }
+
+    @Override
+    protected void createCommands() {
+        ICommand command = null;
+        command = new CreateCommand(this);
+        registerCommand(command);
+        command = new DestroyCommand(this);
+        registerCommand(command);
+        command = new RenderCommand(this);
+        registerCommand(command);
+        command = new GetAllWidgetPositionsCommand(this);
+        registerCommand(command);
+        command = new GetPlaceholderPositionsCommand(this);
+        registerCommand(command);
+        command = new GetGroupNamesCommand(this);
+        registerCommand(command);
+        command = new GetStyleNamesCommand(this);
+        registerCommand(command);
+        command = new RemoveStyleNameCommand(this);
+        registerCommand(command);
+        command = new OverlayThemeCommand(this);
+        registerCommand(command);
+    }
+
+    @Override
+    public void resize(int width, int height) {
+        setSize(width, height);
+        render(renderType, renderData);
+    }
+
+    public void requestCommand(ICommand command) {
+        String commandData = command.serialize();
+        RequestCommandMessage message = new RequestCommandMessage();
+        message.setId(getId());
+        message.setName(command.getId());
+        message.setData(commandData);
+        connector.send(message);
+    }
+
+    private class ConnectorListener implements IConnectorListener {
+        @Override
+        public void receiveEvent(ConnectorEvent event) {
+            handleConnetorEvent(event);
+        }
+    }
+
+    private void handleConnetorEvent(ConnectorEvent event) {
+        if (getId() != event.getId()) {
+            return;
+        }
+        int type = event.getType();
+        IMessage message = event.getMessage();
+        switch (type) {
+            case ConnectorEvent.RESPONSE_PAINT:
+                ResponsePaintMessage onPaintMessage = (ResponsePaintMessage) message;
+                int width = onPaintMessage.getWidth();
+                int height = onPaintMessage.getHeight();
+                int depth = onPaintMessage.getDepth();
+                byte[] buffer = onPaintMessage.getImageBuffer();
+                PaletteData palette = new PaletteData(0x0000FF00, 0x00FF0000, 0xFF000000);
+                ImageData imageData = new ImageData(width, height, depth, palette, 4, buffer);
+                ImageDescriptor imageDescriptor = ImageDescriptor.createFromImageData(imageData);
+                RenderEvent renderEvent = new RenderEvent();
+                renderEvent.renderer = this;
+                renderEvent.imageDescriptor = imageDescriptor;
+                fireReplyRender(renderEvent);
+                return;
+            case ConnectorEvent.RESPONSE_EVENT:
+                ResponseEventMessage onReceiveEventMessage = (ResponseEventMessage) message;
+                String name = onReceiveEventMessage.getName();
+                String data = onReceiveEventMessage.getData();
+                ReplyEvent replyEvent = new ReplyEvent();
+                replyEvent.name = name;
+                replyEvent.contents = data;
+                handleReceiveEvent(replyEvent);
+                return;
+            default:
+                logger.error("Unknown Event");
+        }
+    }
+
+    protected boolean handleReply(IArguments args) {
+        if (args.getId().equals(RendererConstants.EVENT_CREATE)) {
+            fireEvent(args);
+        } else if (args.getId().equals(RendererConstants.EVENT_DESTROY)) {
+            fireEvent(args);
+        } else if (args.getId().equals(RendererConstants.EVENT_GET_ALL_WIDGET_POSITIONS)) {
+            fireEvent(args);
+            return true;
+        } else if (args.getId().equals(RendererConstants.EVENT_GET_PLACEHOLDER_POSITIONS)) {
+            fireEvent(args);
+            return true;
+        } else if (args.getId().equals(RendererConstants.EVENT_GET_GROUP_NAMES)) {
+            fireEvent(args);
+            return true;
+        } else if (args.getId().equals(RendererConstants.EVENT_GET_STYLE_NAMES)) {
+            fireEvent(args);
+            return true;
+        } else if (args.getId().equals(RendererConstants.EVENT_REMOVE_STYLE_NAME)) {
+            fireEvent(args);
+            return true;
+        } else if (args.getId().equals(RendererConstants.EVENT_OVERLAY_THEME)) {
+            fireEvent(args);
+            return true;
+        }
+
+        return false;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/RendererFactoryImpl.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/RendererFactoryImpl.java
new file mode 100644 (file)
index 0000000..c6f588d
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.tizen.efluibuilder.internal.connector.ConnectorFactory;
+import org.tizen.efluibuilder.internal.connector.IConnector;
+import org.tizen.efluibuilder.renderer.IRenderer;
+
+
+public final class RendererFactoryImpl {
+    private static RendererFactoryImpl instance = null;
+    private Map<Integer, IRenderer> renderers = new HashMap<Integer, IRenderer>();
+
+    public static synchronized RendererFactoryImpl getDefault() {
+        if (instance == null) {
+            instance = new RendererFactoryImpl();
+        }
+        return instance;
+    }
+
+    private RendererFactoryImpl() {
+    }
+
+    private int createId() {
+        int id = 0;
+        while (renderers.containsKey(id)) {
+            id++;
+        }
+        return id;
+    }
+
+    public IRenderer create(String version, String profile, String project) throws IOException {
+        // Assert.notNull(version);
+        // Assert.notNull(profile);
+        // Assert.notNull(project);
+
+        // create connector
+        ConnectorFactory factory = ConnectorFactory.getDefault();
+        IConnector connector = null;
+        connector = factory.create(version, profile);
+        Renderer renderer = null;
+        if (connector != null) {
+            renderer = new Renderer(connector);
+            int id = createId();
+            renderer.setId(id);
+            renderer.setVersion(version);
+            renderer.setProfile(profile);
+            renderer.setProject(project);
+            renderers.put(id, renderer);
+        }
+        return renderer;
+    }
+
+    void destroy(IRenderer renderer) {
+        // remove renderer in the map
+        int id = renderer.getId();
+        renderers.remove(id);
+
+        // destroy connector
+        ConnectorFactory factory = ConnectorFactory.getDefault();
+        String version = ((Renderer) renderer).getVersion();
+        String profile = ((Renderer) renderer).getProfile();
+        factory.destroy(version, profile);
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/AbstractCommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/AbstractCommand.java
new file mode 100644 (file)
index 0000000..422507a
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+public abstract class AbstractCommand implements ICommand {
+    private String id = null;
+    private String eventName = null;
+    private boolean isSynchronous = false;
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setEventName(String eventName) {
+        this.eventName = eventName;
+    }
+
+    public String getEventName() {
+        return eventName;
+    }
+
+    public void setSynchronous(boolean isSynchronous) {
+        this.isSynchronous = isSynchronous;
+    }
+
+    public boolean isSynchronous() {
+        return isSynchronous;
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/CreateCommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/CreateCommand.java
new file mode 100644 (file)
index 0000000..32a9247
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.internal.renderer.Renderer;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+import com.google.gson.JsonObject;
+
+
+public final class CreateCommand extends RendererCommand {
+    private static final String KEY_WIDTH = "width"; //$NON-NLS-1$
+    private static final String KEY_HEIGHT = "height"; //$NON-NLS-1$
+    private static final String KEY_PROJECT_PATH = "project-path"; //$NON-NLS-1$
+    private static final String KEY_ELM_PROFILE = "elm-profile"; //$NON-NLS-1$
+    private static final String KEY_DEFAULT_THEME_PATH = "default-theme-path"; //$NON-NLS-1$
+    private static final String KEY_CUSTOM_THEME_PATH = "custom-theme-path"; //$NON-NLS-1$
+
+    private int width = 0;
+    private int height = 0;
+    private String projectPath = null;
+    private String profile = null;
+    private String defaultThemePath = null;
+    private String customThemePath = null;
+
+    public CreateCommand(Renderer renderer) {
+        super(renderer);
+        setId(RendererConstants.COMMAND_CREATE);
+        setEventName(RendererConstants.EVENT_CREATE);
+    }
+
+    @Override
+    public void request(IArguments message) {
+        Object arg = message.getArg(0);
+        Assert.isTrue(arg instanceof Integer, "Illegal request message args (need Integer type)"); //$NON-NLS-1$
+        width = (Integer) arg;
+        arg = message.getArg(1);
+        Assert.isTrue(arg instanceof Integer, "Illegal request message args (need Integer type)"); //$NON-NLS-1$
+        height = (Integer) arg;
+        arg = message.getArg(2);
+        Assert.isTrue(arg instanceof String, "Illegal request message args (need String type)"); //$NON-NLS-1$
+        projectPath = (String) arg;
+        arg = message.getArg(3);
+        Assert.isTrue(arg instanceof String, "Illegal request message args (need String type)"); //$NON-NLS-1$
+        profile = (String) arg;
+        arg = message.getArg(4);
+        Assert.isTrue(arg instanceof String, "Illegal request message args (need String type)"); //$NON-NLS-1$
+        defaultThemePath = (String) arg;
+        arg = message.getArg(5);
+        customThemePath = (String) arg;
+        requestCommand();
+    }
+
+    @Override
+    public IArguments reply(ReplyEvent event) {
+        String string = event.contents;
+        IArguments message = super.reply();
+        message.addArg(0, string);
+        return message;
+    }
+
+    @Override
+    public String serialize() {
+        JsonObject json = new JsonObject();
+        json.addProperty(KEY_WIDTH, width);
+        json.addProperty(KEY_HEIGHT, height);
+        json.addProperty(KEY_PROJECT_PATH, projectPath);
+        json.addProperty(KEY_ELM_PROFILE, profile);
+        json.addProperty(KEY_DEFAULT_THEME_PATH, defaultThemePath);
+        json.addProperty(KEY_CUSTOM_THEME_PATH, customThemePath);
+        return json.toString();
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/DestroyCommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/DestroyCommand.java
new file mode 100644 (file)
index 0000000..45714ce
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+import org.tizen.efluibuilder.internal.renderer.Renderer;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+
+public final class DestroyCommand extends RendererCommand {
+    public DestroyCommand(Renderer renderer) {
+        super(renderer);
+        setId(RendererConstants.COMMAND_DESTROY);
+        setEventName(RendererConstants.EVENT_DESTROY);
+    }
+
+    @Override
+    public IArguments reply(ReplyEvent event) {
+        String string = event.contents;
+        IArguments message = super.reply();
+        message.addArg(0, string);
+        return message;
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetAllWidgetPositionsCommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetAllWidgetPositionsCommand.java
new file mode 100644 (file)
index 0000000..860fe41
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.tizen.efluibuilder.internal.renderer.Renderer;
+import org.tizen.efluibuilder.internal.renderer.util.DebugUtil;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.Position;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import com.google.gson.JsonPrimitive;
+
+
+/**
+ * Returns the positions of all widgets.
+ */
+public final class GetAllWidgetPositionsCommand extends RendererCommand {
+    public GetAllWidgetPositionsCommand(Renderer renderer) {
+        super(renderer);
+        setId(RendererConstants.COMMAND_GET_ALL_WIDGET_POSITIONS);
+        setEventName(RendererConstants.EVENT_GET_ALL_WIDGET_POSITIONS);
+    }
+
+    @Override
+    public IArguments reply(ReplyEvent event) {
+        String string = event.contents;
+        IArguments arguments = super.reply();
+        JsonParser parser = new JsonParser();
+        JsonElement rootElement = parser.parse(string);
+        JsonArray jsonArray = rootElement.getAsJsonArray();
+
+        // parse
+        Map<String, Position> map = new HashMap<String, Position>();
+        for (JsonElement jsonElement : jsonArray) {
+            JsonObject jsonObject = jsonElement.getAsJsonObject();
+            // id
+            JsonPrimitive value = jsonObject.getAsJsonPrimitive("wid");
+            String wid = value.getAsString();
+
+            // rectangle
+            JsonElement rectangleElement = jsonObject.get("rectangle");
+            JsonObject rectangleObject = rectangleElement.getAsJsonObject();
+            // x
+            value = rectangleObject.getAsJsonPrimitive("x");
+            int x = value.getAsInt();
+            // y
+            value = rectangleObject.getAsJsonPrimitive("y");
+            int y = value.getAsInt();
+            // width
+            value = rectangleObject.getAsJsonPrimitive("w");
+            int width = value.getAsInt();
+            // height
+            value = rectangleObject.getAsJsonPrimitive("h");
+            int height = value.getAsInt();
+
+            Position position = new Position();
+            position.wid = Integer.parseInt(wid);
+            position.x = x;
+            position.y = y;
+            position.width = width;
+            position.height = height;
+            map.put(wid, position);
+        }
+
+        // this codes for debug
+        Collection<Position> positions = map.values();
+        StringBuffer log = new StringBuffer();
+        for (Position position : positions) {
+            log.append("\n[ " + getRenderer().toString() + " | " + position.toString() + " ]");
+        }
+        DebugUtil.debug(logger, log.toString());
+        arguments.addArg(0, map);
+        arguments.addArg(1, this.getRenderer());
+        return arguments;
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetGroupNamesCommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetGroupNamesCommand.java
new file mode 100644 (file)
index 0000000..79eec07
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+import java.util.ArrayList;
+
+import org.tizen.efluibuilder.internal.renderer.Renderer;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+
+
+public final class GetGroupNamesCommand extends RendererCommand {
+    private static final String KEY_PATH = "path";
+    private static final String KEY_GROUP_NAMES = "group_names";
+    private static final String KEY_GROUP_LENGTH = "length";
+
+    private String path = null;
+
+    public GetGroupNamesCommand(Renderer renderer) {
+        super(renderer);
+        setId(RendererConstants.COMMAND_GET_GROUP_NAMES);
+        setEventName(RendererConstants.EVENT_GET_GROUP_NAMES);
+    }
+
+    @Override
+    public IArguments reply(ReplyEvent event) {
+        ArrayList<String> groupNames = new ArrayList<String>();
+
+        String contents = event.contents;
+        IArguments arguments = super.reply();
+        JsonParser parser = new JsonParser();
+        JsonElement rootElement = parser.parse(contents);
+        JsonElement groupJsonElement = rootElement.getAsJsonArray().get(0);
+        JsonObject groupJsonObject = groupJsonElement.getAsJsonObject();
+
+        if (groupJsonObject.get(KEY_GROUP_NAMES) != null) {
+            JsonObject groups = groupJsonObject.get(KEY_GROUP_NAMES).getAsJsonObject();
+
+            int length = Integer.parseInt(groups.get(KEY_GROUP_LENGTH).toString());
+            String path = groups.get(KEY_PATH).getAsString();
+            for (int i = 0; i < length; i++) {
+                groupNames.add(groups.get(i + "").getAsString());
+            }
+
+            if (path != null)
+                arguments.addArg(0, path);
+            if (groupNames != null)
+                arguments.addArg(1, groupNames);
+            arguments.addArg(2, this.getRenderer());
+        }
+        return arguments;
+    }
+
+    @Override
+    public void request(IArguments message) {
+        Object arg = message.getArg(0);
+        path = (String) arg;
+        requestCommand();
+    }
+
+    @Override
+    public String serialize() {
+        JsonObject json = new JsonObject();
+        json.addProperty(KEY_PATH, this.path);
+        return json.toString();
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetPlaceholderPositionsCommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetPlaceholderPositionsCommand.java
new file mode 100644 (file)
index 0000000..7dd75bc
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.internal.renderer.Renderer;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.PlaceholderPosition;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import com.google.gson.JsonPrimitive;
+
+
+public final class GetPlaceholderPositionsCommand extends RendererCommand {
+    public GetPlaceholderPositionsCommand(Renderer renderer) {
+        super(renderer);
+        setId(RendererConstants.COMMAND_GET_PLACEHOLDER_POSITIONS);
+        setEventName(RendererConstants.EVENT_GET_PLACEHOLDER_POSITIONS);
+    }
+
+    @Override
+    public IArguments reply(ReplyEvent event) {
+        String string = event.contents;
+        Map<String, List<PlaceholderPosition>> map = parse(string);
+        IArguments arguments = super.reply();
+        arguments.addArg(0, map);
+        arguments.addArg(1, this.getRenderer());
+        return arguments;
+    }
+
+    private Map<String, List<PlaceholderPosition>> parse(String string) {
+        JsonParser parser = new JsonParser();
+        JsonElement rootElement = parser.parse(string);
+        if (rootElement.isJsonNull()) {
+            return null;
+        }
+        JsonArray jsonArray = rootElement.getAsJsonArray();
+
+        // parse
+        Map<String, List<PlaceholderPosition>> map = new HashMap<String, List<PlaceholderPosition>>();
+        for (int i = 0; i < jsonArray.size(); i++) {
+            JsonElement jsonElement = jsonArray.get(i);
+            JsonObject jsonObject = jsonElement.getAsJsonObject();
+            // id
+            JsonPrimitive value = jsonObject.getAsJsonPrimitive("wid");
+            Assert.notNull(value);
+            String id = value.getAsString();
+            // Deprecated
+            // placeholder count
+            // value = jsonObject.getAsJsonPrimitive("ph_cnt");
+            // Assert.notNull(value);
+            // int count = value.getAsInt();
+            // placeholder list
+            JsonArray array = jsonObject.getAsJsonArray("ph_list");
+            List<PlaceholderPosition> placeholders = new ArrayList<PlaceholderPosition>();
+            if (array != null)
+                for (JsonElement element : array) {
+                    JsonObject object = element.getAsJsonObject();
+                    // rectangle
+                    JsonObject rectangle = object.getAsJsonObject("rectangle");
+                    if (rectangle != null) {
+                        // x
+                        value = rectangle.getAsJsonPrimitive("x");
+                        Assert.notNull(value);
+                        int x = value.getAsInt();
+                        // y
+                        value = rectangle.getAsJsonPrimitive("y");
+                        Assert.notNull(value);
+                        int y = value.getAsInt();
+                        // width
+                        value = rectangle.getAsJsonPrimitive("w");
+                        Assert.notNull(value);
+                        int width = value.getAsInt();
+                        // height
+                        value = rectangle.getAsJsonPrimitive("h");
+                        Assert.notNull(value);
+                        int height = value.getAsInt();
+
+                        // wid
+                        value = object.getAsJsonPrimitive("wid");
+                        String wid = "-1";
+                        if (value != null) {
+                            wid = value.getAsString();
+                        }
+
+                        PlaceholderPosition position = new PlaceholderPosition();
+                        position.wid = Integer.valueOf(wid);
+                        position.x = x;
+                        position.y = y;
+                        position.width = width;
+                        position.height = height;
+                        placeholders.add(position);
+                    }
+                }
+            map.put(id, placeholders);
+        }
+        return map;
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetStyleNamesCommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/GetStyleNamesCommand.java
new file mode 100644 (file)
index 0000000..023e871
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.internal.renderer.Renderer;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+
+
+public final class GetStyleNamesCommand extends RendererCommand {
+    private static Logger logger = LoggerFactory.getLogger(GetStyleNamesCommand.class);
+    private static final String KEY_PATH = "path";
+    private static final String KEY_WIDGETS = "widgets";
+    private static final String KEY_WIDGET_TYPE = "widgetType";
+    private static final String KEY_STYLES = "styles";
+
+    private String path = null;
+
+    public GetStyleNamesCommand(Renderer renderer) {
+        super(renderer);
+        setId(RendererConstants.COMMAND_GET_STYLE_NAMES);
+        setEventName(RendererConstants.EVENT_GET_STYLE_NAMES);
+    }
+
+    @Override
+    public IArguments reply(ReplyEvent event) {
+        String contents = event.contents;
+        IArguments arguments = super.reply();
+        JsonParser parser = new JsonParser();
+        JsonObject rootObject = parser.parse(contents).getAsJsonObject();
+
+        path = rootObject.get(KEY_PATH).getAsString();
+
+        Map<String, Map<String, List<String>>> widgetMap = new HashMap<String, Map<String, List<String>>>();
+        if (rootObject.get(KEY_WIDGETS).isJsonNull() == false) {
+            JsonArray widgetArray = rootObject.get(KEY_WIDGETS).getAsJsonArray();
+            Iterator<JsonElement> iterWidget = widgetArray.iterator();
+            while (iterWidget.hasNext()) {
+                JsonObject widget = iterWidget.next().getAsJsonObject();
+                Map<String, List<String>> styleMap = new HashMap<String, List<String>>();
+                String widgetName = widget.get(KEY_WIDGET_TYPE).getAsString();
+                logger.debug(widgetName);
+                widgetMap.put(widgetName, styleMap);
+                if (widget.get(KEY_STYLES).isJsonNull()) {
+                    continue;
+                }
+                JsonObject styles = widget.get(KEY_STYLES).getAsJsonObject();
+                Set<Entry<String, JsonElement>> styleSet = styles.entrySet();
+                Iterator<Entry<String, JsonElement>> iter = styleSet.iterator();
+                while (iter.hasNext()) {
+                    Entry<String, JsonElement> entry = iter.next();
+                    List<String> itemStyles = new ArrayList<String>();
+                    styleMap.put(entry.getKey(), itemStyles);
+                    logger.debug(" " + entry.getKey()); // Style
+                    if (entry.getValue() != null && entry.getValue().isJsonArray()) {
+                        JsonArray itemStyleArray = entry.getValue().getAsJsonArray();
+                        Iterator<JsonElement> itemStyleIter = itemStyleArray.iterator();
+                        while (itemStyleIter.hasNext()) {
+                            String itemStyle = itemStyleIter.next().getAsString();
+                            itemStyles.add(itemStyle);
+                            logger.debug(" " + itemStyle); // Item style
+                        }
+                    }
+                }
+            }
+        }
+        arguments.addArg(0, path);
+        arguments.addArg(1, widgetMap);
+        arguments.addArg(2, this.getRenderer());
+        return arguments;
+    }
+
+    @Override
+    public void request(IArguments message) {
+        path = (String) message.getArg(0);
+        requestCommand();
+    }
+
+    @Override
+    public String serialize() {
+        JsonObject json = new JsonObject();
+        json.addProperty(KEY_PATH, this.path);
+        return json.toString();
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/ICommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/ICommand.java
new file mode 100644 (file)
index 0000000..34ded24
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+
+public interface ICommand {
+    /**
+     * Get id
+     * 
+     * @return id
+     */
+    public String getId();
+
+    /**
+     * Get event name
+     * 
+     * @return event name
+     */
+    public String getEventName();
+
+    /**
+     * Return true if this command is synchronous
+     * 
+     * @return
+     */
+    public boolean isSynchronous();
+
+    /**
+     * request command
+     * 
+     * @param message
+     */
+    public void request(IArguments message);
+
+    /**
+     * replay command
+     * 
+     * @param event
+     * @return
+     */
+    public IArguments reply(ReplyEvent event);
+
+    /**
+     * serialize
+     * 
+     * @return serialized string
+     */
+    public String serialize();
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/OverlayThemeCommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/OverlayThemeCommand.java
new file mode 100644 (file)
index 0000000..c0ff417
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+import org.tizen.efluibuilder.internal.renderer.Renderer;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+import com.google.gson.JsonObject;
+
+
+public final class OverlayThemeCommand extends RendererCommand {
+    private static final String KEY_PATH = "path";
+
+    private String path = null;
+
+    public OverlayThemeCommand(Renderer renderer) {
+        super(renderer);
+        setId(RendererConstants.COMMAND_OVERLAY_THEME);
+        setEventName(RendererConstants.EVENT_OVERLAY_THEME);
+    }
+
+    @Override
+    public IArguments reply(ReplyEvent event) {
+        String string = event.contents;
+        IArguments message = super.reply();
+        message.addArg(0, string);
+        return message;
+    }
+
+    @Override
+    public void request(IArguments message) {
+        path = (String) message.getArg(0);
+        requestCommand();
+    }
+
+    @Override
+    public String serialize() {
+        JsonObject json = new JsonObject();
+        json.addProperty(KEY_PATH, this.path);
+        return json.toString();
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/RemoveStyleNameCommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/RemoveStyleNameCommand.java
new file mode 100644 (file)
index 0000000..46f8e11
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+import org.tizen.efluibuilder.internal.renderer.Renderer;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+
+
+public final class RemoveStyleNameCommand extends RendererCommand {
+    private static final String KEY_PATH = "path";
+    private static final String KEY_WIDGET_TYPE = "widgetType";
+    private static final String KEY_STYLE = "style";
+    private static final String KEY_ITEM_STYLE = "itemStyle";
+
+    private String path;
+    private String widgetType;
+    private String style;
+    private String itemStyle;
+
+    public RemoveStyleNameCommand(Renderer renderer) {
+        super(renderer);
+        setId(RendererConstants.COMMAND_REMOVE_STYLE_NAME);
+        setEventName(RendererConstants.EVENT_REMOVE_STYLE_NAME);
+    }
+
+    @Override
+    public IArguments reply(ReplyEvent event) {
+        String contents = event.contents;
+        IArguments arguments = super.reply();
+        JsonParser parser = new JsonParser();
+        String result = parser.parse(contents).getAsString();
+        arguments.addArg(0, Integer.parseInt(result));
+        return arguments;
+    }
+
+    @Override
+    public void request(IArguments message) {
+        path = (String) message.getArg(0);
+        widgetType = (String) message.getArg(1);
+        style = (String) message.getArg(2);
+        itemStyle = (String) message.getArg(3);
+        requestCommand();
+    }
+
+    @Override
+    public String serialize() {
+        JsonObject json = new JsonObject();
+        json.addProperty(KEY_PATH, path);
+        json.addProperty(KEY_WIDGET_TYPE, widgetType);
+        json.addProperty(KEY_STYLE, style);
+        json.addProperty(KEY_ITEM_STYLE, itemStyle);
+        return json.toString();
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/RenderCommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/RenderCommand.java
new file mode 100644 (file)
index 0000000..195a114
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.internal.renderer.Renderer;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+
+import com.google.gson.JsonObject;
+
+
+public final class RenderCommand extends RendererCommand {
+    private static final String KEY_WIDTH = "width";
+    private static final String KEY_HEIGHT = "height";
+    private static final String KEY_RENDER_TYPE = "render-type";
+    private static final String KEY_RENDER_DATA = "render-data";
+
+    private int width = 0;
+    private int height = 0;
+    private String renderType = null;
+    private String renderData = null;
+
+    public RenderCommand(Renderer renderer) {
+        super(renderer);
+        setId(RendererConstants.COMMAND_RENDER);
+    }
+
+    @Override
+    public void request(IArguments message) {
+        Object arg = message.getArg(0);
+        Assert.isTrue(arg instanceof Integer, "Illegal request message args (need Integer type)");
+        width = (Integer) arg;
+        arg = message.getArg(1);
+        Assert.isTrue(arg instanceof Integer, "Illegal request message args (need Integer type)");
+        height = (Integer) arg;
+        arg = message.getArg(2);
+        Assert.isTrue(arg instanceof String, "Illegal request message args (need String type)");
+        renderType = (String) arg;
+        arg = message.getArg(3);
+        Assert.isTrue(arg instanceof String, "Illegal request message args (need String type)");
+        renderData = (String) arg;
+        requestCommand();
+    }
+
+    @Override
+    public String serialize() {
+        JsonObject json = new JsonObject();
+        json.addProperty(KEY_WIDTH, width);
+        json.addProperty(KEY_HEIGHT, height);
+        json.addProperty(KEY_RENDER_TYPE, renderType);
+        json.addProperty(KEY_RENDER_DATA, renderData);
+        return json.toString();
+    }
+
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/RendererCommand.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/command/RendererCommand.java
new file mode 100644 (file)
index 0000000..0ef08f5
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.command;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.internal.renderer.Arguments;
+import org.tizen.efluibuilder.internal.renderer.Renderer;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.event.ReplyEvent;
+
+import com.google.gson.JsonObject;
+
+
+public abstract class RendererCommand extends AbstractCommand {
+    protected Logger logger = LoggerFactory.getLogger(RendererCommand.class);
+    private Renderer renderer = null;
+
+    public RendererCommand(Renderer renderer) {
+        super();
+        setRenderer(renderer);
+    }
+
+    protected void setRenderer(Renderer renderer) {
+        this.renderer = renderer;
+    }
+
+    protected Renderer getRenderer() {
+        return renderer;
+    }
+
+    @Override
+    public void request(IArguments message) {
+        requestCommand();
+    }
+
+    @Override
+    public String serialize() {
+        JsonObject json = new JsonObject();
+        return json.toString();
+    }
+
+    /**
+     * request command
+     */
+    protected void requestCommand() {
+        renderer.requestCommand(this);
+    }
+
+    /**
+     * reply if reply arg not exist
+     */
+    protected IArguments reply() {
+        IArguments message = new Arguments();
+        message.setId(getEventName());
+        return message;
+    }
+
+    @Override
+    public IArguments reply(ReplyEvent event) {
+        return reply();
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/util/DebugUtil.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/internal/renderer/util/DebugUtil.java
new file mode 100644 (file)
index 0000000..9d25f2f
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.internal.renderer.util;
+
+import org.slf4j.Logger;
+
+
+/**
+ * This class has simple implementation for debug of the Renderer
+ * 
+ * @author hwani
+ * 
+ */
+public final class DebugUtil {
+    private static final String OFF = "OFF";
+    private static final String DEBUG = "DEBUG";
+    private static final String RELEASE = "RELEASE";
+
+    private static final String mode = RELEASE;
+
+    public static void debug(Logger logger, String name, Exception e) {
+        String message = String.format("%s%n%s : %s", name, e.getClass().getName(), e.getMessage());
+        if (mode.equals(OFF)) {
+            return;
+        } else if (mode.equals(DEBUG)) {
+            logger.info(message);
+        } else if (mode.equals(RELEASE)) {
+            logger.debug(message);
+        }
+    }
+
+    public static void debug(Logger logger, String message) {
+        if (mode.equals(OFF)) {
+            return;
+        } else if (mode.equals(DEBUG)) {
+            logger.info(message);
+        } else if (mode.equals(RELEASE)) {
+            logger.debug(message);
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/Activator.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/Activator.java
new file mode 100644 (file)
index 0000000..7a406da
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.tizen.efluibuilder.renderer"; //$NON-NLS-1$
+
+    // The shared instance
+    private static Activator plugin;
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    /*
+     * 
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     * 
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+    /**
+     * Returns an image descriptor for the image file at the given plug-in relative path
+     * 
+     * @param path
+     *            the path
+     * @return the image descriptor
+     */
+    public static ImageDescriptor getImageDescriptor(String path) {
+        return imageDescriptorFromPlugin(PLUGIN_ID, path);
+    }
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/IArguments.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/IArguments.java
new file mode 100644 (file)
index 0000000..95bae54
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer;
+
+public interface IArguments {
+    /**
+     * Sets an id
+     * 
+     * @param id
+     *            id of command
+     */
+    public void setId(String id);
+
+    /**
+     * Returns an id
+     * 
+     * @return id of command
+     */
+    public String getId();
+
+    /**
+     * Add an argument
+     * 
+     * @param index
+     * @param arg
+     */
+    public void addArg(int index, Object arg);
+
+    /**
+     * Returns an argument
+     * 
+     * @param index
+     * @return
+     */
+    public Object getArg(int index);
+
+    /**
+     * Returns the number of arguments in this message.
+     * 
+     * @return the number of arguments this message
+     */
+    public int getArgSize();
+
+    /**
+     * Clear args
+     */
+    public void clearArgs();
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/IRenderer.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/IRenderer.java
new file mode 100644 (file)
index 0000000..47a9680
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer;
+
+import org.eclipse.swt.graphics.Point;
+
+
+public interface IRenderer {
+    public static final String RENDER_TYPE_DESIGN = "DESIGN";
+    public static final String RENDER_TYPE_PREVIEW = "PREVIEW";
+
+    /**
+     * Returns id of renderer
+     * 
+     * @return id of renderer
+     */
+    public int getId();
+
+    /**
+     * Sets renderer name
+     * 
+     * @return name of renderer
+     */
+    public void setName(String name);
+
+    /**
+     * Returns name of renderer
+     * 
+     * @return name of renderer
+     */
+    public String getName();
+
+    /**
+     * Returns a point describing the renderer's size. The x coordinate of the result is the width
+     * of the receiver. The y coordinate of the result is the height of the receiver.
+     * 
+     * @return the renderer's size
+     */
+    public Point getSize();
+
+    /**
+     * Create this renderer
+     * 
+     * @param width
+     *            width of renderer
+     * @param height
+     *            height of renderer
+     * @param defaultThemePath
+     *            path of default theme
+     * @param customThemePath
+     *            path of custom theme
+     */
+    public void create(int width, int height, String defaultThemePath, String customThemePath);
+
+    /**
+     * Destroy this renderer
+     */
+    public void destroy();
+
+    /**
+     * @param type
+     * @param data
+     */
+    public void render(String type, String data);
+
+    /**
+     * Resize this renderer
+     * 
+     * @param width
+     * @param height
+     */
+    public void resize(int width, int height);
+
+    /**
+     * Adds a connector listener to this connector that will be notified when connector events
+     * occur.
+     * 
+     * @param listener
+     *            The listener to be added; must not be <code>null</code>.
+     */
+    public void addRendererListener(IRendererListener listener);
+
+    /**
+     * Removes a connector listener from this connector.
+     * 
+     * @param listener
+     *            The listener to be removed; must not be <code>null</code>.
+     */
+    public void removeRendererListener(IRendererListener listener);
+
+    public boolean isRenderable();
+
+    public void requestGetGroupNames(String path);
+
+    public void requestGetStyleNames(String path);
+
+    public void requestRemoveStyleName(String path, String widgetName, String styleName, String itemStyleName);
+
+    public void requestOverlayTheme(String path);
+
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/IRendererListener.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/IRendererListener.java
new file mode 100644 (file)
index 0000000..e85ea88
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer;
+
+import org.tizen.efluibuilder.renderer.event.RenderEvent;
+
+
+public interface IRendererListener {
+    /**
+     * Called when a render event occurs in the renderer.
+     * 
+     * @param event
+     *            render event
+     */
+    public void replyRender(RenderEvent event);
+
+    /**
+     * Called when a reply event occurs in the renderer.
+     * 
+     * @param message
+     *            reply message
+     */
+    public void reply(IArguments message);
+
+    /**
+     * An empty implementation of IRendererListener for convenience.
+     */
+    public class RendererListenerStub implements IRendererListener {
+
+        @Override
+        public void replyRender(RenderEvent event) {
+        }
+
+        @Override
+        public void reply(IArguments message) {
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/PlaceholderPosition.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/PlaceholderPosition.java
new file mode 100644 (file)
index 0000000..bec2b52
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer;
+
+public final class PlaceholderPosition extends Position {
+    public PlaceholderPosition() {
+        super();
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/Position.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/Position.java
new file mode 100644 (file)
index 0000000..93dbd49
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+
+
+public class Position {
+    public int wid = -1;
+    public int x = 0;
+    public int y = 0;
+    public int width = 0;
+    public int height = 0;
+
+    public Position() {
+    }
+
+    public Position(int x, int y, int width, int height) {
+        this.x = x;
+        this.y = y;
+        this.width = width;
+        this.height = height;
+    }
+
+    public Rectangle getBounds() {
+        return new Rectangle(x, y, width, height);
+    }
+
+    public boolean contains(int x, int y) {
+        return (this.x <= x && x < this.x + this.width && this.y <= y && y < this.y + this.height);
+    }
+
+    @Override
+    public String toString() {
+        return String.format("id : %d | x : %5d | y : %5d | width : %5d | height : %5d", wid, x, y, width, height);
+    }
+
+//    public boolean equals(Position position) {
+//        return super.equals(position);
+//        if (position == null || this.wid != position.wid || this.x != position.x || this.y != position.y || this.width != position.width
+//                || this.height != position.height) {
+//            return false;
+//        }
+//        return true;
+//    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/RendererConstants.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/RendererConstants.java
new file mode 100644 (file)
index 0000000..dcdd5c7
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer;
+
+public final class RendererConstants {
+    /*************************************************************************************
+     * Commands
+     *************************************************************************************/
+    /**
+     * request create renderer<br>
+     * request args : int width, int height, String String project path<br>
+     * no reply args<br>
+     */
+    public static final String COMMAND_CREATE = "CMD_CREATE";
+    /**
+     * request destroy renderer<br>
+     * no request args<br>
+     * no reply args<br>
+     */
+    public static final String COMMAND_DESTROY = "CMD_DESTROY";
+    /**
+     * request rendering<br>
+     * request args : int width, int height, String rendering data<br>
+     * reply args : ImageDescriptor<br>
+     */
+    public static final String COMMAND_RENDER = "CMD_RENDER";
+    /**
+     * request get all widget positions<br>
+     * request args : String id<br>
+     * reply args : Map<String, ComponentPosition><br>
+     */
+    public static final String COMMAND_GET_ALL_WIDGET_POSITIONS = "CMD_GET_ALL_WIDGET_POSITIONS";
+    /**
+     * request get placeholder positions<br>
+     * request args : String id<br>
+     * reply args : Map<String, ComponentPosition><br>
+     */
+    public static final String COMMAND_GET_PLACEHOLDER_POSITIONS = "CMD_GET_PLACEHOLDER_POSITIONS";
+
+    /**
+     * request get group names<br>
+     * request args : String file path<br>
+     * reply args : String group names<br>
+     */
+    public static final String COMMAND_GET_GROUP_NAMES = "CMD_GET_GROUP_NAMES";
+
+    /**
+     * request get style names<br>
+     * request args : String file path<br>
+     * reply args : String style names<br>
+     */
+    public static final String COMMAND_GET_STYLE_NAMES = "CMD_GET_STYLE_NAMES";
+
+    /**
+     * request remove style name from file<br>
+     * request args : String file path, widgetType, styleName, itemStyleName<br>
+     * reply args : If it failed to remove, negative number. otherwise positive number.<br>
+     */
+    public static final String COMMAND_REMOVE_STYLE_NAME = "CMD_REMOVE_STYLE_NAME";
+
+    /**
+     * request overlay theme<br>
+     * request args : String edj file path to overlay<br>
+     * reply args : empty string<br>
+     */
+    public static final String COMMAND_OVERLAY_THEME = "CMD_OVERLAY_THEME";
+
+    /*************************************************************************************
+     * Events
+     *************************************************************************************/
+    public static final String EVENT_CREATE = "EVENT_CREATE";
+    public static final String EVENT_DESTROY = "EVENT_DESTROY";
+    public static final String EVENT_GET_ALL_WIDGET_POSITIONS = "EVENT_GET_ALL_WIDGET_POSITIONS";
+    public static final String EVENT_GET_PLACEHOLDER_POSITIONS = "EVENT_GET_PLACEHOLDER_POSITIONS";
+    public static final String EVENT_GET_GROUP_NAMES = "EVENT_GET_GROUP_NAMES";
+    public static final String EVENT_GET_STYLE_NAMES = "EVENT_GET_STYLE_NAMES";
+    public static final String EVENT_REMOVE_STYLE_NAME = "EVENT_REMOVE_STYLE_NAME";
+    public static final String EVENT_OVERLAY_THEME = "EVENT_OVERLAY_THEME";
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/RendererFactory.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/RendererFactory.java
new file mode 100644 (file)
index 0000000..968bb41
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer;
+
+import java.io.IOException;
+
+import org.tizen.efluibuilder.internal.renderer.RendererFactoryImpl;
+
+
+public final class RendererFactory {
+
+    private static RendererFactory instance = null;
+
+    /**
+     * Returns the default RendererFactory.
+     * 
+     * @return the default renderer factory
+     */
+    public static synchronized RendererFactory getDefault() {
+        if (instance == null) {
+            instance = new RendererFactory();
+        }
+        return instance;
+    }
+
+    private RendererFactory() {
+    }
+
+    /**
+     * Creates the renderer
+     * 
+     * @param version
+     *            version of renderer
+     * @param profile
+     *            profile of renderer
+     * @param project
+     *            project path
+     * @return the renderer
+     */
+    public IRenderer create(String version, String profile, String project) {
+        RendererFactoryImpl factory = RendererFactoryImpl.getDefault();
+        IRenderer renderer = null;
+        try {
+            renderer = factory.create(version, profile, project);
+        } catch (IOException e) {
+            renderer = null;
+        }
+
+        return renderer;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/WidgetPosition.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/WidgetPosition.java
new file mode 100644 (file)
index 0000000..4282470
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer;
+
+public final class WidgetPosition extends Position {
+
+    public WidgetPosition() {
+        super();
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/event/RenderEvent.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/event/RenderEvent.java
new file mode 100644 (file)
index 0000000..ce40c80
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer.event;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+public final class RenderEvent extends RendererEvent {
+    public ImageDescriptor imageDescriptor = null;
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/event/RendererEvent.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/event/RendererEvent.java
new file mode 100644 (file)
index 0000000..1d634b8
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer.event;
+
+import org.tizen.efluibuilder.renderer.IRenderer;
+
+
+public abstract class RendererEvent {
+    public IRenderer renderer = null;
+}
diff --git a/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/event/ReplyEvent.java b/org.tizen.efluibuilder.renderer/src/org/tizen/efluibuilder/renderer/event/ReplyEvent.java
new file mode 100644 (file)
index 0000000..25d9a1d
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.renderer.event;
+
+public final class ReplyEvent extends RendererEvent {
+    public String name = null;
+    public String contents = null;
+
+    public String toString() {
+        return getClass().toString() + "name : " + name + " contents : " + contents;
+    }
+}
diff --git a/org.tizen.efluibuilder.ui/.classpath b/org.tizen.efluibuilder.ui/.classpath
new file mode 100644 (file)
index 0000000..1fa3e68
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.efluibuilder.ui/.project b/org.tizen.efluibuilder.ui/.project
new file mode 100644 (file)
index 0000000..17a3cd4
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.efluibuilder.ui</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.efluibuilder.ui/.settings/org.eclipse.jdt.core.prefs b/org.tizen.efluibuilder.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..da318c2
--- /dev/null
@@ -0,0 +1,90 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
diff --git a/org.tizen.efluibuilder.ui/META-INF/MANIFEST.MF b/org.tizen.efluibuilder.ui/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..88815e9
--- /dev/null
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.efluibuilder.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.tizen.efluibuilder.ui.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.tizen.nativeappcommon;bundle-version="2.0.0",
+ org.tizen.efluibuilder
+Bundle-ActivationPolicy: lazy
+Export-Package: org.tizen.efluibuilder.ui.perspective
+Bundle-Vendor: %Bundle-Vendor
diff --git a/org.tizen.efluibuilder.ui/OSGI-INF/l10n/bundle.properties b/org.tizen.efluibuilder.ui/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..5f68c7a
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for org.tizen.efluibuilder.ui
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen EFL UI Builder UI
\ No newline at end of file
diff --git a/org.tizen.efluibuilder.ui/build.properties b/org.tizen.efluibuilder.ui/build.properties
new file mode 100644 (file)
index 0000000..d919694
--- /dev/null
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               icons/,\
+               OSGI-INF/
diff --git a/org.tizen.efluibuilder.ui/icons/navigation.png b/org.tizen.efluibuilder.ui/icons/navigation.png
new file mode 100644 (file)
index 0000000..1669e06
Binary files /dev/null and b/org.tizen.efluibuilder.ui/icons/navigation.png differ
diff --git a/org.tizen.efluibuilder.ui/icons/perspective26/perspective_uib.png b/org.tizen.efluibuilder.ui/icons/perspective26/perspective_uib.png
new file mode 100644 (file)
index 0000000..ae26212
Binary files /dev/null and b/org.tizen.efluibuilder.ui/icons/perspective26/perspective_uib.png differ
diff --git a/org.tizen.efluibuilder.ui/icons/perspective26/perspective_uib_sel.png b/org.tizen.efluibuilder.ui/icons/perspective26/perspective_uib_sel.png
new file mode 100644 (file)
index 0000000..36868cc
Binary files /dev/null and b/org.tizen.efluibuilder.ui/icons/perspective26/perspective_uib_sel.png differ
diff --git a/org.tizen.efluibuilder.ui/icons/resources.png b/org.tizen.efluibuilder.ui/icons/resources.png
new file mode 100644 (file)
index 0000000..220f65d
Binary files /dev/null and b/org.tizen.efluibuilder.ui/icons/resources.png differ
diff --git a/org.tizen.efluibuilder.ui/icons/tizen_blank_16.png b/org.tizen.efluibuilder.ui/icons/tizen_blank_16.png
new file mode 100644 (file)
index 0000000..1030e57
Binary files /dev/null and b/org.tizen.efluibuilder.ui/icons/tizen_blank_16.png differ
diff --git a/org.tizen.efluibuilder.ui/plugin.xml b/org.tizen.efluibuilder.ui/plugin.xml
new file mode 100644 (file)
index 0000000..bcb7fb1
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+<!-- perspective start-->
+<extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            class="org.tizen.efluibuilder.ui.perspective.NUIBPerspective"
+            icon="icons/perspective26/perspective_uib.png"
+            id="org.tizen.efluibuilder.ui.perspective.NUIBPerspective"
+            name="UI Builder">
+      </perspective>
+   </extension>
+   <extension
+        point="org.eclipse.ui.perspectiveExtensions">
+        <perspectiveExtension
+            targetID="org.tizen.efluibuilder.ui.perspective.NUIBPerspective">
+            <actionSet id="org.eclipse.debug.ui.launchActionSet"/>
+            <actionSet id="org.eclipse.debug.ui.profileActionSet"/>
+        </perspectiveExtension>
+   </extension>
+
+   <!-- Native UI Builder Perspective Layout -->
+   <extension
+         point="org.eclipse.ui.perspectiveExtensions">
+      <perspectiveExtension
+            targetID="org.tizen.efluibuilder.ui.perspective.NUIBPerspective">
+         <!-- left placeholder-->
+         <view
+               id="org.eclipse.ui.navigator.ProjectExplorer"
+               minimized="true"
+               ratio="0.165"
+               relationship="left"
+               relative="org.eclipse.ui.editorss">
+         </view>
+         <view
+               id="org.eclipse.ui.views.ContentOutline"
+               minimized="false"
+               ratio="0.5"
+               relationship="bottom"
+               relative="org.eclipse.ui.navigator.ProjectExplorer">
+         </view>
+
+         <!-- right placeholder-->
+         <view
+               id="org.eclipse.ui.views.PropertySheet"
+               minimized="true"
+               ratio="0.81"
+               relationship="right"
+               relative="org.eclipse.ui.editorss">
+         </view>
+         <view
+                               id="org.tizen.nativecommon.rm.ui.view"
+                               minimized="false"
+                               ratio="0.81"
+                               relationship="stack"
+                               relative="org.eclipse.ui.views.PropertySheet">
+               </view>
+               <!-- Removes the Connection Explorer View because it is moved to Device Manager.
+               <view
+               id="org.tizen.common.connection.explorer.ConnectionExplorer"
+               minimized="false"
+               ratio="0.81"
+               relationship="stack"
+               relative="org.tizen.nativecommon.rm.ui.view">
+         </view>
+         -->
+         <view
+               id="org.tizen.efluibuilder.ui.view.databinding.DataBindingView"
+               minimized="false"
+               ratio="0.81"
+               relationship="stack"
+               relative="org.tizen.nativecommon.rm.ui.view">
+         </view>
+         <!-- advux: Disabled the navigation view and this region for expanding editor.
+         <view
+               id="org.tizen.efluibuilder.ui.view.navigation.NavigationView"
+               minimized="false"
+               ratio=".7"
+               relationship="bottom"
+               relative="org.eclipse.ui.editorss">
+         </view>
+         <view
+               id="org.eclipse.ui.console.ConsoleView"
+               minimized="false"
+               relationship="stack"
+               relative="org.tizen.efluibuilder.ui.view.navigation.NavigationView">
+         </view>
+                  <view
+               id="org.eclipse.ui.views.ProblemView"
+               minimized="false"
+               relationship="stack"
+               relative="org.tizen.efluibuilder.ui.view.navigation.NavigationView">
+         </view>
+         -->
+      </perspectiveExtension>
+   </extension>
+<!-- perspective end-->
+
+   <extension
+         point="org.tizen.native.project.templates">
+         <extra
+           type="NUIB"
+           finalPerspective="org.tizen.efluibuilder.ui.perspective.NUIBPerspective"/> 
+   </extension>
+</plugin>
diff --git a/org.tizen.efluibuilder.ui/src/org/tizen/efluibuilder/ui/Activator.java b/org.tizen.efluibuilder.ui/src/org/tizen/efluibuilder/ui/Activator.java
new file mode 100644 (file)
index 0000000..52cfaf6
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.tizen.efluibuilder.ui"; //$NON-NLS-1$
+
+    // The shared instance
+    private static Activator plugin;
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     * 
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+}
diff --git a/org.tizen.efluibuilder.ui/src/org/tizen/efluibuilder/ui/perspective/NUIBPerspective.java b/org.tizen.efluibuilder.ui/src/org/tizen/efluibuilder/ui/perspective/NUIBPerspective.java
new file mode 100644 (file)
index 0000000..a1958a0
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.perspective;
+
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+
+/**
+ * A native ui builder perspective.
+ */
+public final class NUIBPerspective implements IPerspectiveFactory {
+
+    /**
+     * An id of perspective.
+     */
+    public static final String ID = NUIBPerspective.class.getName();
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
+     */
+    @Override
+    public void createInitialLayout(IPageLayout layout) {
+    }
+
+}
diff --git a/org.tizen.efluibuilder.ui/src/org/tizen/efluibuilder/ui/perspective/PerspectiveUtil.java b/org.tizen.efluibuilder.ui/src/org/tizen/efluibuilder/ui/perspective/PerspectiveUtil.java
new file mode 100644 (file)
index 0000000..785a336
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.perspective;
+
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IPerspectiveRegistry;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.WorkbenchException;
+
+
+@Deprecated
+public final class PerspectiveUtil {
+    @Deprecated
+    public static void setPerspective(String id) {
+        IPerspectiveRegistry registry = PlatformUI.getWorkbench().getPerspectiveRegistry();
+        IPerspectiveDescriptor descriptor = registry.findPerspectiveWithId(id);
+        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+        window.getActivePage().setPerspective(descriptor);
+    }
+
+    @Deprecated
+    public static void showPerspective(String id) throws WorkbenchException {
+        IWorkbench workbench = PlatformUI.getWorkbench();
+        IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+        workbench.showPerspective(id, window);
+    }
+}
diff --git a/org.tizen.efluibuilder/.classpath b/org.tizen.efluibuilder/.classpath
new file mode 100644 (file)
index 0000000..a7af078
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry exported="true" kind="lib" path="lib/gson-2.2.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/org.eclipse.nebula.widgets.gallery_0.6.0.201307092147.jar"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.efluibuilder/.project b/org.tizen.efluibuilder/.project
new file mode 100644 (file)
index 0000000..8db06b5
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.efluibuilder</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.efluibuilder/.settings/org.eclipse.jdt.core.prefs b/org.tizen.efluibuilder/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..0f82798
--- /dev/null
@@ -0,0 +1,101 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.tizen.efluibuilder/META-INF/MANIFEST.MF b/org.tizen.efluibuilder/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..12ede6a
--- /dev/null
@@ -0,0 +1,61 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.gef,
+ org.eclipse.core.resources,
+ org.eclipse.cdt.core,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.console,
+ org.eclipse.ui.navigator,
+ org.eclipse.ui.views.properties.tabbed,
+ org.eclipse.jface.text,
+ org.tizen.common;bundle-version="2.0.0",
+ org.tizen.common.ui;bundle-version="2.0.0",
+ org.tizen.nativecommon;bundle-version="2.0.0",
+ org.tizen.efluibuilder.common;bundle-version="1.0.0",
+ org.tizen.efluibuilder.renderer;bundle-version="1.0.0",
+ org.tizen.efluibuilder.codegenerator,
+ org.tizen.efluibuilder.configurator;bundle-version="1.0.0",
+ org.tizen.efluibuilder.descriptor;bundle-version="1.0.0",
+ org.eclipse.draw2d,
+ org.eclipse.core.filesystem,
+ org.eclipse.wst.sse.ui;bundle-version="1.3.201",
+ org.eclipse.wst.validation;bundle-version="1.2.501",
+ org.eclipse.wst.xml.core,
+ org.eclipse.wst.sse.core,
+ org.eclipse.wst.common.uriresolver,
+ org.eclipse.emf.common;bundle-version="2.9.2",
+ org.tizen.nativecore.enventor;bundle-version="1.0.0",
+ org.tizen.nativecore.misc;bundle-version="3.0.0",
+ org.eclipse.e4.core.contexts,
+ org.eclipse.e4.ui.model.workbench
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.tizen.efluibuilder.BuilderPlugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.tizen.efluibuilder;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: org.eclipse.cdt.ui,
+ org.eclipse.gef.internal.ui.palette.editparts,
+ org.eclipse.ui,
+ org.eclipse.ui.internal.navigator.resources.actions,
+ org.eclipse.ui.texteditor
+Bundle-ClassPath: .,
+ lib/gson-2.2.4.jar,
+ lib/org.eclipse.nebula.widgets.gallery_0.6.0.201307092147.jar
+Export-Package: org.tizen.efluibuilder.gef.dnd.model,
+ org.tizen.efluibuilder.model.app,
+ org.tizen.efluibuilder.model.app.loader,
+ org.tizen.efluibuilder.model.app.loader.jaxb,
+ org.tizen.efluibuilder.model.part,
+ org.tizen.efluibuilder.model.snippet,
+ org.tizen.efluibuilder.model.util,
+ org.tizen.efluibuilder.ui,
+ org.tizen.efluibuilder.ui.editor,
+ org.tizen.efluibuilder.ui.editor.dnd.listener,
+ org.tizen.efluibuilder.ui.editor.palette.internal,
+ org.tizen.efluibuilder.ui.editor.texteditor.validation,
+ org.tizen.efluibuilder.ui.resources,
+ org.tizen.efluibuilder.ui.wizard.snippet
diff --git a/org.tizen.efluibuilder/about.html b/org.tizen.efluibuilder/about.html
new file mode 100644 (file)
index 0000000..d713227
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May, 2011</p>
+<h3>Tizen SDK</h3>
+
+<p><a href="https://developer.tizen.org/" target="_blank">Tizen SDK</a> 
+is a set of Eclipse plug-ins that helps programmers to develop applications for 
+the mobile platform.</p>
+
+<h3>License</h3>
+
+<p>See <a href="about_files/LICENSE-2.0.htm">Apache License, Version 2.0</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you did not
+receive this Content directly from the Eclipse Foundation, the following is provided for informational
+purposes only, and you should look to the Redistributor's license for terms and conditions of use.</p>
+
+<h4>Notification Popup Widget</h4>
+<p>
+Custom widget that displays a popup notification dialog in the bottom right corner of your screen(usually above the toolbar on Windows).
+</p>
+
+<p>
+A copy of the license is included in <a href="about_files/epl-v10.html">about_files/epl-v10.html</a>. The home page is located at:
+<ul>
+<a href="http://www.hexapixel.com/">http://www.hexapixel.com/</a>
+</ul>
+</p>
+
+<h4>FreeMarker</h4>
+<p>
+FreeMarker is a "template engine"; a generic tool to generate text output (anything from HTML to autogenerated source code) based on templates. It's a Java package, a class library for Java programmers. It's not an application for end-users in itself, but something that programmers can embed into their products.
+</p>
+
+<p>
+A copy of the license is included in <a href="about_files/freemarker-LICENSE.txt">about_files/freemarker-LICENSE.txt</a>. The home page is located at:
+<ul>
+<a href="http://freemarker.sourceforge.net/">http://freemarker.sourceforge.net/</a>
+</ul>
+</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/about.ini b/org.tizen.efluibuilder/about.ini
new file mode 100644 (file)
index 0000000..112183c
--- /dev/null
@@ -0,0 +1,32 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=res/icons/32_TIZEN_SDK_icon.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# welcomePage=$nl$/welcome.xml
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+# Property "tipsAndTricksHref" contains the Help topic href to a tips and tricks page 
+# optional
+# tipsAndTricksHref=/org.tizen.doc.user/tips/tizen_tips.htm
+
diff --git a/org.tizen.efluibuilder/about.mappings b/org.tizen.efluibuilder/about.mappings
new file mode 100644 (file)
index 0000000..e973e5a
--- /dev/null
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties and bundle.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+0=Tizen EFL Development UI Builder
+1=date-time
diff --git a/org.tizen.efluibuilder/about.properties b/org.tizen.efluibuilder/about.properties
new file mode 100644 (file)
index 0000000..5c2e80a
--- /dev/null
@@ -0,0 +1,12 @@
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb={0}\n\
+\n\
+Version : {featureVersion}\n\
+Build id : {1}\n\
+\n\
+Visit https://developer.tizen.org \n
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/build.properties b/org.tizen.efluibuilder/build.properties
new file mode 100644 (file)
index 0000000..919e182
--- /dev/null
@@ -0,0 +1,12 @@
+source.. = src/
+bin.includes = .,\
+               res/,\
+               META-INF/,\
+               about.html,\
+               about.ini,\
+               about.mappings,\
+               about.properties,\
+               plugin.properties,\
+               plugin.xml,\
+               lib/,\
+               lib/org.eclipse.nebula.widgets.gallery_0.6.0.201307092147.jar
diff --git a/org.tizen.efluibuilder/lib/gson-2.2.4.jar b/org.tizen.efluibuilder/lib/gson-2.2.4.jar
new file mode 100644 (file)
index 0000000..9478253
Binary files /dev/null and b/org.tizen.efluibuilder/lib/gson-2.2.4.jar differ
diff --git a/org.tizen.efluibuilder/lib/org.eclipse.nebula.widgets.gallery_0.6.0.201307092147.jar b/org.tizen.efluibuilder/lib/org.eclipse.nebula.widgets.gallery_0.6.0.201307092147.jar
new file mode 100644 (file)
index 0000000..db1014b
Binary files /dev/null and b/org.tizen.efluibuilder/lib/org.eclipse.nebula.widgets.gallery_0.6.0.201307092147.jar differ
diff --git a/org.tizen.efluibuilder/plugin.properties b/org.tizen.efluibuilder/plugin.properties
new file mode 100644 (file)
index 0000000..210c662
--- /dev/null
@@ -0,0 +1,10 @@
+# Plugin Name
+pluginName=Tizen EFL UI Builder
+# Provider Name
+providerName=The Linux Foundation
+
+# Editor
+WYSIWYGEditorName=WYSIWYG Editor
+
+# View
+PagesViewName=Navigation
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/plugin.xml b/org.tizen.efluibuilder/plugin.xml
new file mode 100644 (file)
index 0000000..7f70c00
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+       <extension point="org.eclipse.core.contenttype.contentTypes">
+       <content-type base-type="org.eclipse.core.runtime.xml"
+               file-names="layout.xml"
+               file-extensions="xml"
+               id="org.tizen.efluibuilder.nuib.layout"
+               name="Native UI Builder Layout"
+               priority="normal">
+               <describer class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
+                               <parameter name="element" value="document"/>
+                       </describer>
+       </content-type>
+       </extension>
+       <extension point="org.eclipse.ui.editors">
+               <editor
+                       class="org.tizen.efluibuilder.ui.editor.CombineEditorPart"
+                       contributorClass="org.tizen.efluibuilder.ui.editor.designeditor.DesignEditorActionBarContributor"
+                       default="true"
+                       icon="res/icons/TIZEN_file_icon.png"
+                       id="org.tizen.efluibuilder.ui.editor.CombineEditorPart"
+                       name="%WYSIWYGEditorName">
+                       <contentTypeBinding contentTypeId="org.tizen.efluibuilder.nuib.layout" />
+               </editor>
+       </extension>
+       <extension point="org.eclipse.wst.sse.ui.sourcevalidation">
+               <validator
+                       scope="total"
+                       class="org.tizen.efluibuilder.ui.editor.texteditor.validation.LayoutValidator"
+                       id="org.tizen.efluibuilder.ui.editor.texteditor.validation.LayoutValidator">
+                       <contentTypeIdentifier id="org.tizen.efluibuilder.nuib.layout">
+                               <partitionType id="org.eclipse.wst.xml.XML_DEFAULT">
+                               </partitionType>
+                       </contentTypeIdentifier>
+               </validator>    
+       </extension>
+       <extension point="org.eclipse.wst.xml.core.externalSchemaLocations">
+               <provider class="org.tizen.efluibuilder.ui.editor.texteditor.validation.LayoutSchemaProvider">
+               </provider>
+       </extension>
+       
+       <!-- Tizen: Internalization of eclipse's palette  -->
+       <extension
+                       point="org.eclipse.ui.views">
+               <view
+                               name="Palette"
+                               icon="res/icons/eview20/view_palette.png"
+                               category="org.eclipse.ui"
+                               class="org.tizen.efluibuilder.ui.editor.internal.gef.ui.views.palette.PaletteView"
+                               id="org.eclipse.gef.ui.palette_view">
+               </view>
+       </extension>    
+        <extension
+         point="org.eclipse.ui.views">
+      <view
+            category="org.tizen.nativeapp.viewCategory"
+            class="org.tizen.efluibuilder.ui.view.databinding.DataBindingView"
+            icon="res/icons/databinding/databinding.png"
+            id="org.tizen.efluibuilder.ui.view.databinding.DataBindingView"
+            name="Data Binding View">
+      </view>
+   </extension>
+</plugin>
diff --git a/org.tizen.efluibuilder/res/icons/32_TIZEN_SDK_icon.png b/org.tizen.efluibuilder/res/icons/32_TIZEN_SDK_icon.png
new file mode 100644 (file)
index 0000000..e511542
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/32_TIZEN_SDK_icon.png differ
diff --git a/org.tizen.efluibuilder/res/icons/TIZEN_file_icon.png b/org.tizen.efluibuilder/res/icons/TIZEN_file_icon.png
new file mode 100755 (executable)
index 0000000..4d67c98
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/TIZEN_file_icon.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/add.png b/org.tizen.efluibuilder/res/icons/databinding/add.png
new file mode 100644 (file)
index 0000000..15d536a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/add.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/array.png b/org.tizen.efluibuilder/res/icons/databinding/array.png
new file mode 100644 (file)
index 0000000..3bd7e25
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/array.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/array_link.png b/org.tizen.efluibuilder/res/icons/databinding/array_link.png
new file mode 100644 (file)
index 0000000..910f354
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/array_link.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/binding_delete.png b/org.tizen.efluibuilder/res/icons/databinding/binding_delete.png
new file mode 100644 (file)
index 0000000..7c1a4f5
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/binding_delete.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/binding_hide.png b/org.tizen.efluibuilder/res/icons/databinding/binding_hide.png
new file mode 100644 (file)
index 0000000..7a8e664
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/binding_hide.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/binding_show.png b/org.tizen.efluibuilder/res/icons/databinding/binding_show.png
new file mode 100644 (file)
index 0000000..790e6e1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/binding_show.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/boolean.png b/org.tizen.efluibuilder/res/icons/databinding/boolean.png
new file mode 100644 (file)
index 0000000..fa840c3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/boolean.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/boolean_link.png b/org.tizen.efluibuilder/res/icons/databinding/boolean_link.png
new file mode 100644 (file)
index 0000000..99fb10b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/boolean_link.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/calendar.png b/org.tizen.efluibuilder/res/icons/databinding/calendar.png
new file mode 100644 (file)
index 0000000..aeefc1a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/calendar.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/clear.png b/org.tizen.efluibuilder/res/icons/databinding/clear.png
new file mode 100644 (file)
index 0000000..34c15e1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/clear.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/collapseallfields.png b/org.tizen.efluibuilder/res/icons/databinding/collapseallfields.png
new file mode 100644 (file)
index 0000000..2ad1f72
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/collapseallfields.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/compact_jsondata.png b/org.tizen.efluibuilder/res/icons/databinding/compact_jsondata.png
new file mode 100644 (file)
index 0000000..6843377
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/compact_jsondata.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/compact_string.png b/org.tizen.efluibuilder/res/icons/databinding/compact_string.png
new file mode 100644 (file)
index 0000000..6843377
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/compact_string.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/contact.png b/org.tizen.efluibuilder/res/icons/databinding/contact.png
new file mode 100644 (file)
index 0000000..f63c137
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/contact.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/databinding.png b/org.tizen.efluibuilder/res/icons/databinding/databinding.png
new file mode 100644 (file)
index 0000000..a9ce87b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/databinding.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/datamodel_1.png b/org.tizen.efluibuilder/res/icons/databinding/datamodel_1.png
new file mode 100644 (file)
index 0000000..c75ac14
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/datamodel_1.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/datamodel_2.png b/org.tizen.efluibuilder/res/icons/databinding/datamodel_2.png
new file mode 100644 (file)
index 0000000..866c4dd
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/datamodel_2.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/datamodel_add.png b/org.tizen.efluibuilder/res/icons/databinding/datamodel_add.png
new file mode 100644 (file)
index 0000000..e2f4dc1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/datamodel_add.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/datamodel_delete.png b/org.tizen.efluibuilder/res/icons/databinding/datamodel_delete.png
new file mode 100644 (file)
index 0000000..4b49fa9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/datamodel_delete.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/datasource_add.png b/org.tizen.efluibuilder/res/icons/databinding/datasource_add.png
new file mode 100644 (file)
index 0000000..7aa8a79
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/datasource_add.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/datasource_delete.png b/org.tizen.efluibuilder/res/icons/databinding/datasource_delete.png
new file mode 100644 (file)
index 0000000..d0c60d4
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/datasource_delete.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/datasource_open.png b/org.tizen.efluibuilder/res/icons/databinding/datasource_open.png
new file mode 100644 (file)
index 0000000..a55aab0
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/datasource_open.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/delete.png b/org.tizen.efluibuilder/res/icons/databinding/delete.png
new file mode 100644 (file)
index 0000000..35319e8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/delete.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/down.png b/org.tizen.efluibuilder/res/icons/databinding/down.png
new file mode 100644 (file)
index 0000000..9680cc9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/down.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/empty.png b/org.tizen.efluibuilder/res/icons/databinding/empty.png
new file mode 100644 (file)
index 0000000..7b8526f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/empty.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/expandallfields.png b/org.tizen.efluibuilder/res/icons/databinding/expandallfields.png
new file mode 100644 (file)
index 0000000..2a0d127
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/expandallfields.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/file.png b/org.tizen.efluibuilder/res/icons/databinding/file.png
new file mode 100644 (file)
index 0000000..6866a33
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/file.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/file_system.png b/org.tizen.efluibuilder/res/icons/databinding/file_system.png
new file mode 100644 (file)
index 0000000..503028a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/file_system.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/format_jsondata.png b/org.tizen.efluibuilder/res/icons/databinding/format_jsondata.png
new file mode 100644 (file)
index 0000000..9247ad8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/format_jsondata.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/format_string.png b/org.tizen.efluibuilder/res/icons/databinding/format_string.png
new file mode 100644 (file)
index 0000000..9247ad8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/format_string.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/history.png b/org.tizen.efluibuilder/res/icons/databinding/history.png
new file mode 100644 (file)
index 0000000..6426381
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/history.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/import.png b/org.tizen.efluibuilder/res/icons/databinding/import.png
new file mode 100644 (file)
index 0000000..619b881
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/import.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/index.png b/org.tizen.efluibuilder/res/icons/databinding/index.png
new file mode 100644 (file)
index 0000000..58a8d2e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/index.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/index_link.png b/org.tizen.efluibuilder/res/icons/databinding/index_link.png
new file mode 100644 (file)
index 0000000..713b16b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/index_link.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/link.png b/org.tizen.efluibuilder/res/icons/databinding/link.png
new file mode 100644 (file)
index 0000000..8918e44
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/link.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/link_image.png b/org.tizen.efluibuilder/res/icons/databinding/link_image.png
new file mode 100644 (file)
index 0000000..1bfa978
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/link_image.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/linked.png b/org.tizen.efluibuilder/res/icons/databinding/linked.png
new file mode 100644 (file)
index 0000000..703f8da
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/linked.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/load.png b/org.tizen.efluibuilder/res/icons/databinding/load.png
new file mode 100644 (file)
index 0000000..2914999
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/load.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/modelitem_add.png b/org.tizen.efluibuilder/res/icons/databinding/modelitem_add.png
new file mode 100644 (file)
index 0000000..f0ae18b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/modelitem_add.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/number.png b/org.tizen.efluibuilder/res/icons/databinding/number.png
new file mode 100644 (file)
index 0000000..53fcbf9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/number.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/number_link.png b/org.tizen.efluibuilder/res/icons/databinding/number_link.png
new file mode 100644 (file)
index 0000000..99c40f8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/number_link.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/object.png b/org.tizen.efluibuilder/res/icons/databinding/object.png
new file mode 100644 (file)
index 0000000..3552a33
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/object.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/object_link.png b/org.tizen.efluibuilder/res/icons/databinding/object_link.png
new file mode 100644 (file)
index 0000000..1a8bd2e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/object_link.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/open.png b/org.tizen.efluibuilder/res/icons/databinding/open.png
new file mode 100644 (file)
index 0000000..cc7bdda
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/open.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/reload.png b/org.tizen.efluibuilder/res/icons/databinding/reload.png
new file mode 100644 (file)
index 0000000..bfcd54f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/reload.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/remote.png b/org.tizen.efluibuilder/res/icons/databinding/remote.png
new file mode 100644 (file)
index 0000000..74b46aa
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/remote.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/remote_call.png b/org.tizen.efluibuilder/res/icons/databinding/remote_call.png
new file mode 100644 (file)
index 0000000..a5a6539
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/remote_call.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/remove.png b/org.tizen.efluibuilder/res/icons/databinding/remove.png
new file mode 100644 (file)
index 0000000..f0eaff6
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/remove.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/removeall.png b/org.tizen.efluibuilder/res/icons/databinding/removeall.png
new file mode 100644 (file)
index 0000000..a959cf8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/removeall.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/rename.png b/org.tizen.efluibuilder/res/icons/databinding/rename.png
new file mode 100644 (file)
index 0000000..65dd1d0
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/rename.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/saveas.png b/org.tizen.efluibuilder/res/icons/databinding/saveas.png
new file mode 100644 (file)
index 0000000..73c9a2c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/saveas.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/set_target.png b/org.tizen.efluibuilder/res/icons/databinding/set_target.png
new file mode 100644 (file)
index 0000000..858a0ab
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/set_target.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/static.png b/org.tizen.efluibuilder/res/icons/databinding/static.png
new file mode 100644 (file)
index 0000000..89ba411
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/static.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/string.png b/org.tizen.efluibuilder/res/icons/databinding/string.png
new file mode 100644 (file)
index 0000000..6e9e1cc
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/string.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/string_link.png b/org.tizen.efluibuilder/res/icons/databinding/string_link.png
new file mode 100644 (file)
index 0000000..b051045
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/string_link.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/system_api_calls.png b/org.tizen.efluibuilder/res/icons/databinding/system_api_calls.png
new file mode 100644 (file)
index 0000000..4dc6892
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/system_api_calls.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/undefined.png b/org.tizen.efluibuilder/res/icons/databinding/undefined.png
new file mode 100644 (file)
index 0000000..6babfe1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/undefined.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/undefined_link.png b/org.tizen.efluibuilder/res/icons/databinding/undefined_link.png
new file mode 100644 (file)
index 0000000..de75855
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/undefined_link.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/up.png b/org.tizen.efluibuilder/res/icons/databinding/up.png
new file mode 100644 (file)
index 0000000..ca2ae3b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/up.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/view_source.png b/org.tizen.efluibuilder/res/icons/databinding/view_source.png
new file mode 100644 (file)
index 0000000..ec8aad9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/view_source.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/view_tree.png b/org.tizen.efluibuilder/res/icons/databinding/view_tree.png
new file mode 100644 (file)
index 0000000..94a3844
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/view_tree.png differ
diff --git a/org.tizen.efluibuilder/res/icons/databinding/widget_setting.png b/org.tizen.efluibuilder/res/icons/databinding/widget_setting.png
new file mode 100644 (file)
index 0000000..15b94f1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/databinding/widget_setting.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/connection_line_nor_h.png b/org.tizen.efluibuilder/res/icons/editor/connection_line_nor_h.png
new file mode 100644 (file)
index 0000000..af3a7cf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/connection_line_nor_h.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/connection_line_nor_v.png b/org.tizen.efluibuilder/res/icons/editor/connection_line_nor_v.png
new file mode 100644 (file)
index 0000000..79aa298
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/connection_line_nor_v.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/connection_line_sel_h.png b/org.tizen.efluibuilder/res/icons/editor/connection_line_sel_h.png
new file mode 100644 (file)
index 0000000..a2ff99c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/connection_line_sel_h.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/connection_line_sel_v.png b/org.tizen.efluibuilder/res/icons/editor/connection_line_sel_v.png
new file mode 100644 (file)
index 0000000..e595704
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/connection_line_sel_v.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/connection_line_top_sel_h.png b/org.tizen.efluibuilder/res/icons/editor/connection_line_top_sel_h.png
new file mode 100644 (file)
index 0000000..7012904
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/connection_line_top_sel_h.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/connection_line_top_sel_v.png b/org.tizen.efluibuilder/res/icons/editor/connection_line_top_sel_v.png
new file mode 100644 (file)
index 0000000..fd88f80
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/connection_line_top_sel_v.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_s_dim.png b/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_s_dim.png
new file mode 100644 (file)
index 0000000..b2b297f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_s_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_s_nor.png b/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_s_nor.png
new file mode 100644 (file)
index 0000000..4b71972
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_s_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_sv_dim.png b/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_sv_dim.png
new file mode 100644 (file)
index 0000000..5ba6dba
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_sv_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_sv_nor.png b/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_sv_nor.png
new file mode 100644 (file)
index 0000000..5f559b6
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/device_mobile_sv_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_nor.png b/org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_nor.png
new file mode 100644 (file)
index 0000000..3885eda
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_over.png b/org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_over.png
new file mode 100644 (file)
index 0000000..624c7d7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_over.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_sel.png b/org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_sel.png
new file mode 100644 (file)
index 0000000..569fa95
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/profile_delete_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/sc_bg.png b/org.tizen.efluibuilder/res/icons/editor/dialog/sc_bg.png
new file mode 100644 (file)
index 0000000..4d016c4
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/sc_bg.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/storyboard_arrow_left.png b/org.tizen.efluibuilder/res/icons/editor/dialog/storyboard_arrow_left.png
new file mode 100644 (file)
index 0000000..b7ad836
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/storyboard_arrow_left.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/storyboard_arrow_right.png b/org.tizen.efluibuilder/res/icons/editor/dialog/storyboard_arrow_right.png
new file mode 100644 (file)
index 0000000..e6ee937
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/storyboard_arrow_right.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/view_sample_img.png b/org.tizen.efluibuilder/res/icons/editor/dialog/view_sample_img.png
new file mode 100644 (file)
index 0000000..67baa14
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/view_sample_img.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/view_tab_help_mv.png b/org.tizen.efluibuilder/res/icons/editor/dialog/view_tab_help_mv.png
new file mode 100644 (file)
index 0000000..441339b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/view_tab_help_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/dialog/view_tab_help_nor.png b/org.tizen.efluibuilder/res/icons/editor/dialog/view_tab_help_nor.png
new file mode 100644 (file)
index 0000000..60478ed
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/dialog/view_tab_help_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/down_arrow.png b/org.tizen.efluibuilder/res/icons/editor/down_arrow.png
new file mode 100644 (file)
index 0000000..008299b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/down_arrow.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/edc_icon_32.png b/org.tizen.efluibuilder/res/icons/editor/edc_icon_32.png
new file mode 100644 (file)
index 0000000..75871ac
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/edc_icon_32.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/fit.png b/org.tizen.efluibuilder/res/icons/editor/fit.png
new file mode 100644 (file)
index 0000000..7498f25
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/fit.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/ic_view_startup.png b/org.tizen.efluibuilder/res/icons/editor/ic_view_startup.png
new file mode 100644 (file)
index 0000000..683b337
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/ic_view_startup.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/ic_view_startup_b.png b/org.tizen.efluibuilder/res/icons/editor/ic_view_startup_b.png
new file mode 100644 (file)
index 0000000..9d4b4eb
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/ic_view_startup_b.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/ic_view_startup_w.png b/org.tizen.efluibuilder/res/icons/editor/ic_view_startup_w.png
new file mode 100644 (file)
index 0000000..c4111bf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/ic_view_startup_w.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/icon_link_to_edc.png b/org.tizen.efluibuilder/res/icons/editor/icon_link_to_edc.png
new file mode 100644 (file)
index 0000000..cb9af52
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/icon_link_to_edc.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/left_arrow.png b/org.tizen.efluibuilder/res/icons/editor/left_arrow.png
new file mode 100644 (file)
index 0000000..442d1ae
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/left_arrow.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/ms_config_btn.png b/org.tizen.efluibuilder/res/icons/editor/ms_config_btn.png
new file mode 100644 (file)
index 0000000..3b6a3ac
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/ms_config_btn.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/ms_config_delete.png b/org.tizen.efluibuilder/res/icons/editor/ms_config_delete.png
new file mode 100644 (file)
index 0000000..1e5f6de
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/ms_config_delete.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/ms_config_land_off.png b/org.tizen.efluibuilder/res/icons/editor/ms_config_land_off.png
new file mode 100644 (file)
index 0000000..597ce36
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/ms_config_land_off.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/ms_config_land_on.png b/org.tizen.efluibuilder/res/icons/editor/ms_config_land_on.png
new file mode 100644 (file)
index 0000000..541fdf7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/ms_config_land_on.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/ms_config_port_off.png b/org.tizen.efluibuilder/res/icons/editor/ms_config_port_off.png
new file mode 100644 (file)
index 0000000..d13c3e0
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/ms_config_port_off.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/ms_config_port_on.png b/org.tizen.efluibuilder/res/icons/editor/ms_config_port_on.png
new file mode 100644 (file)
index 0000000..32fdd80
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/ms_config_port_on.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/palette/pal_title.png b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title.png
new file mode 100644 (file)
index 0000000..39e742e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_arrow_down_nor.png b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_arrow_down_nor.png
new file mode 100644 (file)
index 0000000..ebe69ea
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_arrow_down_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_arrow_up_nor.png b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_arrow_up_nor.png
new file mode 100644 (file)
index 0000000..bd9e51e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_arrow_up_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_snippet_nor.png b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_snippet_nor.png
new file mode 100644 (file)
index 0000000..ad1f811
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_snippet_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_snippet_sel.png b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_snippet_sel.png
new file mode 100644 (file)
index 0000000..42bb0a7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_snippet_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicomponent_nor.png b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicomponent_nor.png
new file mode 100644 (file)
index 0000000..d40b303
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicomponent_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicomponent_sel.png b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicomponent_sel.png
new file mode 100644 (file)
index 0000000..43836ae
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicomponent_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicontainer_nor.png b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicontainer_nor.png
new file mode 100644 (file)
index 0000000..c033b57
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicontainer_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicontainer_sel.png b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicontainer_sel.png
new file mode 100644 (file)
index 0000000..d7b67f6
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_uicontainer_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_view_nor.png b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_view_nor.png
new file mode 100644 (file)
index 0000000..7d2dbe9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_view_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_view_sel.png b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_view_sel.png
new file mode 100644 (file)
index 0000000..5b5ec9e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/palette/pal_title_view_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/right_arrow.png b/org.tizen.efluibuilder/res/icons/editor/right_arrow.png
new file mode 100644 (file)
index 0000000..5c8f3a4
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/right_arrow.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/startup_arrow_page.png b/org.tizen.efluibuilder/res/icons/editor/startup_arrow_page.png
new file mode 100644 (file)
index 0000000..7740bcb
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/startup_arrow_page.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_dim.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_dim.png
new file mode 100644 (file)
index 0000000..d0049ee
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_mv.png
new file mode 100644 (file)
index 0000000..2211dfc
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_nor.png
new file mode 100644 (file)
index 0000000..b06d2ab
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_sel.png
new file mode 100644 (file)
index 0000000..4df2835
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_bottom_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_dim.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_dim.png
new file mode 100644 (file)
index 0000000..bd741b3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_mv.png
new file mode 100644 (file)
index 0000000..6411823
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_nor.png
new file mode 100644 (file)
index 0000000..6b2405a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_sel.png
new file mode 100644 (file)
index 0000000..4de0724
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_center_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_dim.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_dim.png
new file mode 100644 (file)
index 0000000..713f926
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_mv.png
new file mode 100644 (file)
index 0000000..2fd72da
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_nor.png
new file mode 100644 (file)
index 0000000..dc7838c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_sel.png
new file mode 100644 (file)
index 0000000..cc99246
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_left_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_dim.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_dim.png
new file mode 100644 (file)
index 0000000..d501b68
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_mv.png
new file mode 100644 (file)
index 0000000..2b62b8c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_nor.png
new file mode 100644 (file)
index 0000000..2122f06
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_sel.png
new file mode 100644 (file)
index 0000000..873bdd2
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_middle_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_dim.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_dim.png
new file mode 100644 (file)
index 0000000..8ac506a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_mv.png
new file mode 100644 (file)
index 0000000..1bdaac5
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_nor.png
new file mode 100644 (file)
index 0000000..c6d6227
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_sel.png
new file mode 100644 (file)
index 0000000..daae26c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_right_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_dim.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_dim.png
new file mode 100644 (file)
index 0000000..7157cca
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_mv.png
new file mode 100644 (file)
index 0000000..37da078
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_nor.png
new file mode 100644 (file)
index 0000000..f20099b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_sel.png
new file mode 100644 (file)
index 0000000..7b74edf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_align_top_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_dim.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_dim.png
new file mode 100644 (file)
index 0000000..d845c7a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_mv.png
new file mode 100644 (file)
index 0000000..7b69c9e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_nor.png
new file mode 100644 (file)
index 0000000..38a59b7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_sel.png
new file mode 100644 (file)
index 0000000..fc9b528
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_autofit_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_design_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_design_nor.png
new file mode 100644 (file)
index 0000000..0952458
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_design_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_design_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_design_sel.png
new file mode 100644 (file)
index 0000000..cbe8d92
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_design_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_dim.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_dim.png
new file mode 100644 (file)
index 0000000..411ed61
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_mv.png
new file mode 100644 (file)
index 0000000..995bc4e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_nor.png
new file mode 100644 (file)
index 0000000..5d51fdd
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_sel.png
new file mode 100644 (file)
index 0000000..9281048
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_auto_layout_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_dim.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_dim.png
new file mode 100644 (file)
index 0000000..fbf1a0f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_mv.png
new file mode 100644 (file)
index 0000000..b6f7056
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_nor.png
new file mode 100644 (file)
index 0000000..47c6ce0
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_sel.png
new file mode 100644 (file)
index 0000000..45f2e42
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_height_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_dim.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_dim.png
new file mode 100644 (file)
index 0000000..9d99bf7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_mv.png
new file mode 100644 (file)
index 0000000..31dee96
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_nor.png
new file mode 100644 (file)
index 0000000..c4e77bf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_sel.png
new file mode 100644 (file)
index 0000000..35800e2
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_match_width_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_percent_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_percent_nor.png
new file mode 100644 (file)
index 0000000..595c833
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_percent_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_source_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_source_nor.png
new file mode 100644 (file)
index 0000000..e40f3a4
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_source_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_source_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_source_sel.png
new file mode 100644 (file)
index 0000000..ac34879
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_source_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_mv.png
new file mode 100644 (file)
index 0000000..3315440
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_nor.png
new file mode 100644 (file)
index 0000000..d86b054
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_sel.png
new file mode 100644 (file)
index 0000000..fad6c57
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_in_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_mv.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_mv.png
new file mode 100644 (file)
index 0000000..6e0ffbf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_nor.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_nor.png
new file mode 100644 (file)
index 0000000..e3ac4df
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_sel.png b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_sel.png
new file mode 100644 (file)
index 0000000..25eaad1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/toolbar/tool_zoom_out_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/zoom_in.png b/org.tizen.efluibuilder/res/icons/editor/zoom_in.png
new file mode 100644 (file)
index 0000000..efbb9fd
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/zoom_in.png differ
diff --git a/org.tizen.efluibuilder/res/icons/editor/zoom_out.png b/org.tizen.efluibuilder/res/icons/editor/zoom_out.png
new file mode 100644 (file)
index 0000000..a13020f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/editor/zoom_out.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_arrow.png b/org.tizen.efluibuilder/res/icons/event/event_arrow.png
new file mode 100644 (file)
index 0000000..1899a1a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_arrow.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_dim.png b/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_dim.png
new file mode 100644 (file)
index 0000000..6b09c11
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_mv.png b/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_mv.png
new file mode 100644 (file)
index 0000000..680f21f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_nor.png b/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_nor.png
new file mode 100644 (file)
index 0000000..c86304e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_sel.png b/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_sel.png
new file mode 100644 (file)
index 0000000..a681a7f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_arrow_btn_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_delete_dim.png b/org.tizen.efluibuilder/res/icons/event/event_delete_dim.png
new file mode 100644 (file)
index 0000000..b264c12
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_delete_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_delete_mv.png b/org.tizen.efluibuilder/res/icons/event/event_delete_mv.png
new file mode 100644 (file)
index 0000000..6891636
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_delete_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_delete_nor.png b/org.tizen.efluibuilder/res/icons/event/event_delete_nor.png
new file mode 100644 (file)
index 0000000..ca08c53
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_delete_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_delete_sel.png b/org.tizen.efluibuilder/res/icons/event/event_delete_sel.png
new file mode 100644 (file)
index 0000000..277ea4c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_delete_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_plus_dim.png b/org.tizen.efluibuilder/res/icons/event/event_plus_dim.png
new file mode 100644 (file)
index 0000000..4fc7ced
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_plus_dim.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_plus_mv.png b/org.tizen.efluibuilder/res/icons/event/event_plus_mv.png
new file mode 100644 (file)
index 0000000..7c3cccd
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_plus_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_plus_nor.png b/org.tizen.efluibuilder/res/icons/event/event_plus_nor.png
new file mode 100644 (file)
index 0000000..8a177a3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_plus_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/event/event_plus_sel.png b/org.tizen.efluibuilder/res/icons/event/event_plus_sel.png
new file mode 100644 (file)
index 0000000..0822cae
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/event/event_plus_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/eview20/view_palette.png b/org.tizen.efluibuilder/res/icons/eview20/view_palette.png
new file mode 100644 (file)
index 0000000..cab6671
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/eview20/view_palette.png differ
diff --git a/org.tizen.efluibuilder/res/icons/eview20/view_palette_sel.png b/org.tizen.efluibuilder/res/icons/eview20/view_palette_sel.png
new file mode 100644 (file)
index 0000000..fd1c257
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/eview20/view_palette_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/go.png b/org.tizen.efluibuilder/res/icons/go.png
new file mode 100755 (executable)
index 0000000..40cad41
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/go.png differ
diff --git a/org.tizen.efluibuilder/res/icons/ic_error.png b/org.tizen.efluibuilder/res/icons/ic_error.png
new file mode 100644 (file)
index 0000000..57e37b6
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/ic_error.png differ
diff --git a/org.tizen.efluibuilder/res/icons/maximize.png b/org.tizen.efluibuilder/res/icons/maximize.png
new file mode 100644 (file)
index 0000000..86423ee
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/maximize.png differ
diff --git a/org.tizen.efluibuilder/res/icons/minimize.png b/org.tizen.efluibuilder/res/icons/minimize.png
new file mode 100644 (file)
index 0000000..07b7d07
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/minimize.png differ
diff --git a/org.tizen.efluibuilder/res/icons/outline/show_popup.png b/org.tizen.efluibuilder/res/icons/outline/show_popup.png
new file mode 100644 (file)
index 0000000..e22ecf7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/outline/show_popup.png differ
diff --git a/org.tizen.efluibuilder/res/icons/outline/show_view.png b/org.tizen.efluibuilder/res/icons/outline/show_view.png
new file mode 100644 (file)
index 0000000..2ae53a7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/outline/show_view.png differ
diff --git a/org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_mv.png b/org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_mv.png
new file mode 100644 (file)
index 0000000..db28bcf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_nor.png b/org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_nor.png
new file mode 100644 (file)
index 0000000..b4dd2d2
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_sel.png b/org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_sel.png
new file mode 100644 (file)
index 0000000..3828817
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/outline/t_outline_icon2_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/page_16.png b/org.tizen.efluibuilder/res/icons/page_16.png
new file mode 100644 (file)
index 0000000..5392e8a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/page_16.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_1.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_1.png
new file mode 100644 (file)
index 0000000..63be6e9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_1.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_2.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_2.png
new file mode 100644 (file)
index 0000000..9e6d84a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_2.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_bottom.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_bottom.png
new file mode 100644 (file)
index 0000000..ab0cc74
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left.png
new file mode 100644 (file)
index 0000000..0337a03
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left_bottom.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left_bottom.png
new file mode 100644 (file)
index 0000000..1cb17d7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left_top.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left_top.png
new file mode 100644 (file)
index 0000000..4d0210f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_left_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_panel_back.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_panel_back.png
new file mode 100644 (file)
index 0000000..67e1f28
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_panel_back.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right.png
new file mode 100644 (file)
index 0000000..e9c6cb4
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right_bottom.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right_bottom.png
new file mode 100644 (file)
index 0000000..2ea6bb4
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right_top.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right_top.png
new file mode 100644 (file)
index 0000000..bb53df4
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_right_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_support.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_support.png
new file mode 100644 (file)
index 0000000..5f703e8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_support.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_top.png b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_top.png
new file mode 100644 (file)
index 0000000..02cc71c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_FHD/TV_FHD_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_1.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_1.png
new file mode 100644 (file)
index 0000000..03e15d1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_1.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_2.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_2.png
new file mode 100644 (file)
index 0000000..08b4917
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_2.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_bottom.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_bottom.png
new file mode 100644 (file)
index 0000000..4502111
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left.png
new file mode 100644 (file)
index 0000000..2b93664
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left_bottom.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left_bottom.png
new file mode 100644 (file)
index 0000000..4221557
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left_top.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left_top.png
new file mode 100644 (file)
index 0000000..5703c34
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_left_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_panel_back.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_panel_back.png
new file mode 100644 (file)
index 0000000..2cb9360
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_panel_back.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right.png
new file mode 100644 (file)
index 0000000..72e05f3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right_bottom.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right_bottom.png
new file mode 100644 (file)
index 0000000..791d63c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right_top.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right_top.png
new file mode 100644 (file)
index 0000000..5c2034a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_right_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_support.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_support.png
new file mode 100644 (file)
index 0000000..38981b4
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_support.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_top.png b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_top.png
new file mode 100644 (file)
index 0000000..881bc9e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/TV_HD/TV_HD_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD.png b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD.png
new file mode 100644 (file)
index 0000000..b4c2e93
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_bottom.png b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_bottom.png
new file mode 100644 (file)
index 0000000..df00cf2
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_landscape.png b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_landscape.png
new file mode 100644 (file)
index 0000000..121f9b3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_landscape.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left.png b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left.png
new file mode 100644 (file)
index 0000000..866226f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left_bottom.png b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left_bottom.png
new file mode 100644 (file)
index 0000000..33aa693
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left_top.png b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left_top.png
new file mode 100644 (file)
index 0000000..eb58e67
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_left_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_panel_back.png b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_panel_back.png
new file mode 100644 (file)
index 0000000..a8cf70c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_panel_back.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right.png b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right.png
new file mode 100644 (file)
index 0000000..4a1b70b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right_bottom.png b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right_bottom.png
new file mode 100644 (file)
index 0000000..6efccac
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right_top.png b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right_top.png
new file mode 100644 (file)
index 0000000..090146d
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_right_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_top.png b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_top.png
new file mode 100644 (file)
index 0000000..0a14444
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_HD/mobile_HD_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA.png b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA.png
new file mode 100644 (file)
index 0000000..f6c6794
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_bottom.png b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_bottom.png
new file mode 100644 (file)
index 0000000..2aa4f1b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_landscape.png b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_landscape.png
new file mode 100644 (file)
index 0000000..987936c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_landscape.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left.png b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left.png
new file mode 100644 (file)
index 0000000..ca02449
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left_bottom.png b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left_bottom.png
new file mode 100644 (file)
index 0000000..951f8f5
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left_top.png b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left_top.png
new file mode 100644 (file)
index 0000000..d07bb32
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_left_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_panel_back.png b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_panel_back.png
new file mode 100644 (file)
index 0000000..cfc9944
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_panel_back.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right.png b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right.png
new file mode 100644 (file)
index 0000000..41030e8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right_bottom.png b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right_bottom.png
new file mode 100644 (file)
index 0000000..8b3c5d5
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right_bottom.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right_top.png b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right_top.png
new file mode 100644 (file)
index 0000000..4a2f7f7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_right_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_top.png b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_top.png
new file mode 100644 (file)
index 0000000..2ffca8c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/mobile_WVGA/mobile_WVGA_top.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/wearable_320.png b/org.tizen.efluibuilder/res/icons/preview/wearable_320.png
new file mode 100644 (file)
index 0000000..41be369
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/wearable_320.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/wearable_360.png b/org.tizen.efluibuilder/res/icons/preview/wearable_360.png
new file mode 100644 (file)
index 0000000..b376d6a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/wearable_360.png differ
diff --git a/org.tizen.efluibuilder/res/icons/preview/wearable_circle.png b/org.tizen.efluibuilder/res/icons/preview/wearable_circle.png
new file mode 100644 (file)
index 0000000..bcd3a19
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/preview/wearable_circle.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/align_center.png b/org.tizen.efluibuilder/res/icons/properties/align_center.png
new file mode 100644 (file)
index 0000000..02bcd78
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/align_center.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/align_left.png b/org.tizen.efluibuilder/res/icons/properties/align_left.png
new file mode 100644 (file)
index 0000000..3deab08
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/align_left.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/align_right.png b/org.tizen.efluibuilder/res/icons/properties/align_right.png
new file mode 100644 (file)
index 0000000..c0f5350
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/align_right.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/bold.png b/org.tizen.efluibuilder/res/icons/properties/bold.png
new file mode 100644 (file)
index 0000000..8e276be
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/bold.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/btn_ic_location_nor.png b/org.tizen.efluibuilder/res/icons/properties/btn_ic_location_nor.png
new file mode 100644 (file)
index 0000000..9acd59f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/btn_ic_location_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/btn_ic_location_over.png b/org.tizen.efluibuilder/res/icons/properties/btn_ic_location_over.png
new file mode 100644 (file)
index 0000000..09fed20
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/btn_ic_location_over.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/btn_ic_location_sel.png b/org.tizen.efluibuilder/res/icons/properties/btn_ic_location_sel.png
new file mode 100644 (file)
index 0000000..edb42ec
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/btn_ic_location_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/cancelline.png b/org.tizen.efluibuilder/res/icons/properties/cancelline.png
new file mode 100644 (file)
index 0000000..fd613dd
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/cancelline.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/cd_icon.png b/org.tizen.efluibuilder/res/icons/properties/cd_icon.png
new file mode 100644 (file)
index 0000000..5cce2fd
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/cd_icon.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/down_arrow.png b/org.tizen.efluibuilder/res/icons/properties/down_arrow.png
new file mode 100644 (file)
index 0000000..0604b56
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/down_arrow.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/image.png b/org.tizen.efluibuilder/res/icons/properties/image.png
new file mode 100644 (file)
index 0000000..953eeff
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/image.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/italic.png b/org.tizen.efluibuilder/res/icons/properties/italic.png
new file mode 100644 (file)
index 0000000..cb9457d
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/italic.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/ms_key_autocomplete.png b/org.tizen.efluibuilder/res/icons/properties/ms_key_autocomplete.png
new file mode 100644 (file)
index 0000000..346329e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/ms_key_autocomplete.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/reset.png b/org.tizen.efluibuilder/res/icons/properties/reset.png
new file mode 100644 (file)
index 0000000..4592270
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/reset.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/underline.png b/org.tizen.efluibuilder/res/icons/properties/underline.png
new file mode 100644 (file)
index 0000000..1bd277e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/underline.png differ
diff --git a/org.tizen.efluibuilder/res/icons/properties/up_arrow.png b/org.tizen.efluibuilder/res/icons/properties/up_arrow.png
new file mode 100644 (file)
index 0000000..b219582
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/properties/up_arrow.png differ
diff --git a/org.tizen.efluibuilder/res/icons/snippet/default_snippet.png b/org.tizen.efluibuilder/res/icons/snippet/default_snippet.png
new file mode 100644 (file)
index 0000000..4a90cd8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/snippet/default_snippet.png differ
diff --git a/org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_mv.png b/org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_mv.png
new file mode 100644 (file)
index 0000000..a12d535
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_nor.png b/org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_nor.png
new file mode 100644 (file)
index 0000000..33ad795
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_sel.png b/org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_sel.png
new file mode 100644 (file)
index 0000000..6a14446
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/snippet/pt_block_icon_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/style_clip_down_arrow.png b/org.tizen.efluibuilder/res/icons/style_clip_down_arrow.png
new file mode 100644 (file)
index 0000000..ce1ffda
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/style_clip_down_arrow.png differ
diff --git a/org.tizen.efluibuilder/res/icons/style_clip_left_arrow.png b/org.tizen.efluibuilder/res/icons/style_clip_left_arrow.png
new file mode 100644 (file)
index 0000000..3595a2f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/style_clip_left_arrow.png differ
diff --git a/org.tizen.efluibuilder/res/icons/style_clip_right_arrow.png b/org.tizen.efluibuilder/res/icons/style_clip_right_arrow.png
new file mode 100644 (file)
index 0000000..6578511
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/style_clip_right_arrow.png differ
diff --git a/org.tizen.efluibuilder/res/icons/style_clip_up_arrow.png b/org.tizen.efluibuilder/res/icons/style_clip_up_arrow.png
new file mode 100644 (file)
index 0000000..01352f6
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/style_clip_up_arrow.png differ
diff --git a/org.tizen.efluibuilder/res/icons/style_lowercase.png b/org.tizen.efluibuilder/res/icons/style_lowercase.png
new file mode 100644 (file)
index 0000000..15ba534
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/style_lowercase.png differ
diff --git a/org.tizen.efluibuilder/res/icons/transparent_dummy.png b/org.tizen.efluibuilder/res/icons/transparent_dummy.png
new file mode 100644 (file)
index 0000000..3f34b57
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/transparent_dummy.png differ
diff --git a/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_app_entry/code_legacy.png b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_app_entry/code_legacy.png
new file mode 100644 (file)
index 0000000..59886cf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_app_entry/code_legacy.png differ
diff --git a/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_app_entry/code_uib.png b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_app_entry/code_uib.png
new file mode 100644 (file)
index 0000000..8a95f8c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_app_entry/code_uib.png differ
diff --git a/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_main/uib_screenshot.png b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_main/uib_screenshot.png
new file mode 100644 (file)
index 0000000..271dea2
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_main/uib_screenshot.png differ
diff --git a/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_shape_type/wearable_circle.png b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_shape_type/wearable_circle.png
new file mode 100644 (file)
index 0000000..386e2c0
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_shape_type/wearable_circle.png differ
diff --git a/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_shape_type/wearable_square.png b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_shape_type/wearable_square.png
new file mode 100644 (file)
index 0000000..377d39c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_shape_type/wearable_square.png differ
diff --git a/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_nor.png b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_nor.png
new file mode 100644 (file)
index 0000000..6e57d65
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_over.png b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_over.png
new file mode 100644 (file)
index 0000000..ea49c86
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_over.png differ
diff --git a/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_sel.png b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_sel.png
new file mode 100644 (file)
index 0000000..d69b1c0
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_delete_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_nor.png b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_nor.png
new file mode 100644 (file)
index 0000000..c467c96
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_over.png b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_over.png
new file mode 100644 (file)
index 0000000..0e8c658
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_over.png differ
diff --git a/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_sel.png b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_sel.png
new file mode 100644 (file)
index 0000000..2f79579
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/uibconverter/wizard_page_user_view/userviews_setasstartup_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_mv.png
new file mode 100644 (file)
index 0000000..5c4b921
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_nor.png
new file mode 100644 (file)
index 0000000..2645bb1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_sel.png
new file mode 100644 (file)
index 0000000..3cd5e13
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_bg_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_block_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_block_mv.png
new file mode 100644 (file)
index 0000000..c2af703
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_block_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_block_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_block_nor.png
new file mode 100644 (file)
index 0000000..fc98ea9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_block_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_block_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_block_sel.png
new file mode 100644 (file)
index 0000000..6364447
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_block_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_box_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_box_mv.png
new file mode 100644 (file)
index 0000000..f3a4c64
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_box_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_box_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_box_nor.png
new file mode 100644 (file)
index 0000000..ae094e4
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_box_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_box_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_box_sel.png
new file mode 100644 (file)
index 0000000..eea9d40
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_box_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_button_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_button_mv.png
new file mode 100644 (file)
index 0000000..916c862
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_button_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_button_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_button_nor.png
new file mode 100644 (file)
index 0000000..a5d3428
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_button_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_button_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_button_sel.png
new file mode 100644 (file)
index 0000000..31efb7e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_button_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_mv.png
new file mode 100644 (file)
index 0000000..0757965
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_nor.png
new file mode 100644 (file)
index 0000000..345d11a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_sel.png
new file mode 100644 (file)
index 0000000..29615f2
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_calendar_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_check_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_check_mv.png
new file mode 100644 (file)
index 0000000..4b0285b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_check_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_check_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_check_nor.png
new file mode 100644 (file)
index 0000000..83acffb
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_check_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_check_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_check_sel.png
new file mode 100644 (file)
index 0000000..0ba6b29
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_check_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_color_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_color_mv.png
new file mode 100644 (file)
index 0000000..9f10421
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_color_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_color_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_color_nor.png
new file mode 100644 (file)
index 0000000..5561f6a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_color_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_color_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_color_sel.png
new file mode 100644 (file)
index 0000000..60d819c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_color_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_mv.png
new file mode 100644 (file)
index 0000000..b758619
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_nor.png
new file mode 100644 (file)
index 0000000..215b48a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_sel.png
new file mode 100644 (file)
index 0000000..8c1b9ea
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_ctxp_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_date_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_date_mv.png
new file mode 100644 (file)
index 0000000..544bd6b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_date_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_date_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_date_nor.png
new file mode 100644 (file)
index 0000000..e53ef5c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_date_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_date_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_date_sel.png
new file mode 100644 (file)
index 0000000..c045486
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_date_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_mv.png
new file mode 100644 (file)
index 0000000..45e0f59
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_nor.png
new file mode 100644 (file)
index 0000000..1a34b71
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_sel.png
new file mode 100644 (file)
index 0000000..0685349
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_entry_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_mv.png
new file mode 100644 (file)
index 0000000..c4bd5ba
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_nor.png
new file mode 100644 (file)
index 0000000..6d136c8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_sel.png
new file mode 100644 (file)
index 0000000..99006c5
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_filip_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_mv.png
new file mode 100644 (file)
index 0000000..4734821
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_nor.png
new file mode 100644 (file)
index 0000000..290d412
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_sel.png
new file mode 100644 (file)
index 0000000..4d0db72
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_gengrid_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_mv.png
new file mode 100644 (file)
index 0000000..e10e96c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_nor.png
new file mode 100644 (file)
index 0000000..265703d
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_sel.png
new file mode 100644 (file)
index 0000000..a2429dd
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_genlist_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_mv.png
new file mode 100644 (file)
index 0000000..ae86f0c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_nor.png
new file mode 100644 (file)
index 0000000..f21e53a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_sel.png
new file mode 100644 (file)
index 0000000..8c8de84
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_grid_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_mv.png
new file mode 100644 (file)
index 0000000..e785cf0
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_nor.png
new file mode 100644 (file)
index 0000000..ad90a87
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_sel.png
new file mode 100644 (file)
index 0000000..819c4d4
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_hoversel_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_image_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_image_mv.png
new file mode 100644 (file)
index 0000000..8176c17
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_image_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_image_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_image_nor.png
new file mode 100644 (file)
index 0000000..a40e4e4
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_image_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_image_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_image_sel.png
new file mode 100644 (file)
index 0000000..4042bda
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_image_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_index_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_index_mv.png
new file mode 100644 (file)
index 0000000..5306274
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_index_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_index_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_index_nor.png
new file mode 100644 (file)
index 0000000..a2d28cb
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_index_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_index_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_index_sel.png
new file mode 100644 (file)
index 0000000..75e258c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_index_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_item_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_item_mv.png
new file mode 100644 (file)
index 0000000..9d41487
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_item_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_item_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_item_nor.png
new file mode 100644 (file)
index 0000000..8567914
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_item_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_item_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_item_sel.png
new file mode 100644 (file)
index 0000000..26fc617
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_item_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_label_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_label_mv.png
new file mode 100644 (file)
index 0000000..1333e01
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_label_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_label_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_label_nor.png
new file mode 100644 (file)
index 0000000..139bb4f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_label_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_label_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_label_sel.png
new file mode 100644 (file)
index 0000000..db8acd6
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_label_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_mv.png
new file mode 100644 (file)
index 0000000..5b961fd
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_nor.png
new file mode 100644 (file)
index 0000000..46553e5
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_sel.png
new file mode 100644 (file)
index 0000000..1648326
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_layout_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_list_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_list_mv.png
new file mode 100644 (file)
index 0000000..70fdcaf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_list_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_list_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_list_nor.png
new file mode 100644 (file)
index 0000000..192794a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_list_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_list_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_list_sel.png
new file mode 100644 (file)
index 0000000..cdeb6e3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_list_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_map_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_map_mv.png
new file mode 100644 (file)
index 0000000..3ed2922
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_map_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_map_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_map_nor.png
new file mode 100644 (file)
index 0000000..0385fcb
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_map_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_map_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_map_sel.png
new file mode 100644 (file)
index 0000000..caaaee7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_map_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_mv.png
new file mode 100644 (file)
index 0000000..bdca063
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_nor.png
new file mode 100644 (file)
index 0000000..52b34ca
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_sel.png
new file mode 100644 (file)
index 0000000..4fea834
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_multi_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_mv.png
new file mode 100644 (file)
index 0000000..50e104d
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_nor.png
new file mode 100644 (file)
index 0000000..6eba06c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_sel.png
new file mode 100644 (file)
index 0000000..55fa0ab
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panel_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_mv.png
new file mode 100644 (file)
index 0000000..bf787ee
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_nor.png
new file mode 100644 (file)
index 0000000..9ca4919
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_sel.png
new file mode 100644 (file)
index 0000000..ce60b9a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_panes_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_mv.png
new file mode 100644 (file)
index 0000000..5356b19
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_nor.png
new file mode 100644 (file)
index 0000000..8d6c4c9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_sel.png
new file mode 100644 (file)
index 0000000..61f9811
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_popup_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_mv.png
new file mode 100644 (file)
index 0000000..631ae69
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_nor.png
new file mode 100644 (file)
index 0000000..ed09848
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_sel.png
new file mode 100644 (file)
index 0000000..0ee0299
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_progress_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_mv.png
new file mode 100644 (file)
index 0000000..2770d2b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_nor.png
new file mode 100644 (file)
index 0000000..c162b77
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_sel.png
new file mode 100644 (file)
index 0000000..7406a54
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_radio_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_mv.png
new file mode 100644 (file)
index 0000000..a8b5c87
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_nor.png
new file mode 100644 (file)
index 0000000..519042d
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_sel.png
new file mode 100644 (file)
index 0000000..b2efb41
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_scroller_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_mv.png
new file mode 100644 (file)
index 0000000..cbad939
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_nor.png
new file mode 100644 (file)
index 0000000..50bbe58
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_sel.png
new file mode 100644 (file)
index 0000000..87f33af
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_slider_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_mv.png
new file mode 100644 (file)
index 0000000..01756f3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_nor.png
new file mode 100644 (file)
index 0000000..addc748
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_sel.png
new file mode 100644 (file)
index 0000000..cc3616b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_spinner_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_table_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_table_mv.png
new file mode 100644 (file)
index 0000000..9f20942
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_table_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_table_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_table_nor.png
new file mode 100644 (file)
index 0000000..fdd9526
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_table_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_table_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_table_sel.png
new file mode 100644 (file)
index 0000000..5cac3c3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_table_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_mv.png
new file mode 100644 (file)
index 0000000..35cb297
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_nor.png
new file mode 100644 (file)
index 0000000..dbc6ae6
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_sel.png
new file mode 100644 (file)
index 0000000..f7649c0
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_toolbar_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_view_mv.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_view_mv.png
new file mode 100644 (file)
index 0000000..e796a7c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_view_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_view_nor.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_view_nor.png
new file mode 100644 (file)
index 0000000..7d2dbe9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_view_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/16/view_p_view_sel.png b/org.tizen.efluibuilder/res/icons/widget/16/view_p_view_sel.png
new file mode 100644 (file)
index 0000000..5b5ec9e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/16/view_p_view_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_bg_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_bg_mv.png
new file mode 100644 (file)
index 0000000..777e799
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_bg_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_bg_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_bg_nor.png
new file mode 100644 (file)
index 0000000..8354c24
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_bg_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_bg_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_bg_sel.png
new file mode 100644 (file)
index 0000000..2104cf9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_bg_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_block_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_block_mv.png
new file mode 100644 (file)
index 0000000..9ab7453
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_block_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_block_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_block_nor.png
new file mode 100644 (file)
index 0000000..ed20148
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_block_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_block_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_block_sel.png
new file mode 100644 (file)
index 0000000..dbf5550
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_block_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_box_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_box_mv.png
new file mode 100644 (file)
index 0000000..20dd42e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_box_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_box_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_box_nor.png
new file mode 100644 (file)
index 0000000..0b31a06
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_box_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_box_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_box_sel.png
new file mode 100644 (file)
index 0000000..d691037
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_box_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_button_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_button_mv.png
new file mode 100644 (file)
index 0000000..1053ad3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_button_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_button_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_button_nor.png
new file mode 100644 (file)
index 0000000..b3671b7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_button_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_button_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_button_sel.png
new file mode 100644 (file)
index 0000000..c9eac22
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_button_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_mv.png
new file mode 100644 (file)
index 0000000..35d2235
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_nor.png
new file mode 100644 (file)
index 0000000..4fa5caf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_sel.png
new file mode 100644 (file)
index 0000000..1e32b94
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_calendar_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_check_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_check_mv.png
new file mode 100644 (file)
index 0000000..d43dbc8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_check_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_check_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_check_nor.png
new file mode 100644 (file)
index 0000000..73db21a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_check_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_check_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_check_sel.png
new file mode 100644 (file)
index 0000000..25b0811
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_check_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_color_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_color_mv.png
new file mode 100644 (file)
index 0000000..5e93f07
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_color_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_color_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_color_nor.png
new file mode 100644 (file)
index 0000000..749cbd1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_color_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_color_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_color_sel.png
new file mode 100644 (file)
index 0000000..9e21ddf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_color_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_mv.png
new file mode 100644 (file)
index 0000000..6962509
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_nor.png
new file mode 100644 (file)
index 0000000..1769e04
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_sel.png
new file mode 100644 (file)
index 0000000..1dfa8a6
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_ctx_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_date_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_date_mv.png
new file mode 100644 (file)
index 0000000..38f4475
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_date_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_date_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_date_nor.png
new file mode 100644 (file)
index 0000000..c5edf62
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_date_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_date_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_date_sel.png
new file mode 100644 (file)
index 0000000..9780380
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_date_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_empty_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_empty_mv.png
new file mode 100644 (file)
index 0000000..0ce06b1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_empty_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_empty_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_empty_nor.png
new file mode 100644 (file)
index 0000000..cafb92a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_empty_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_empty_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_empty_sel.png
new file mode 100644 (file)
index 0000000..494f884
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_empty_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_entry_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_entry_mv.png
new file mode 100644 (file)
index 0000000..1b7d51a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_entry_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_entry_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_entry_nor.png
new file mode 100644 (file)
index 0000000..6f068f5
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_entry_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_entry_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_entry_sel.png
new file mode 100644 (file)
index 0000000..3b52667
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_entry_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_filip_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_filip_mv.png
new file mode 100644 (file)
index 0000000..3fd2a51
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_filip_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_filip_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_filip_nor.png
new file mode 100644 (file)
index 0000000..58d2172
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_filip_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_filip_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_filip_sel.png
new file mode 100644 (file)
index 0000000..baada1b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_filip_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_mv.png
new file mode 100644 (file)
index 0000000..deda305
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_nor.png
new file mode 100644 (file)
index 0000000..da81fbd
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_sel.png
new file mode 100644 (file)
index 0000000..53e4547
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_gengrid_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_mv.png
new file mode 100644 (file)
index 0000000..98da977
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_nor.png
new file mode 100644 (file)
index 0000000..bd952f2
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_sel.png
new file mode 100644 (file)
index 0000000..e6037fe
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_genlist_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_grid_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_grid_mv.png
new file mode 100644 (file)
index 0000000..b6b6233
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_grid_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_grid_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_grid_nor.png
new file mode 100644 (file)
index 0000000..caa8b42
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_grid_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_grid_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_grid_sel.png
new file mode 100644 (file)
index 0000000..d100b59
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_grid_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_mv.png
new file mode 100644 (file)
index 0000000..67977f3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_nor.png
new file mode 100644 (file)
index 0000000..1801c4e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_sel.png
new file mode 100644 (file)
index 0000000..65c1b44
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_hoversel_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_image_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_image_mv.png
new file mode 100644 (file)
index 0000000..17e2268
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_image_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_image_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_image_nor.png
new file mode 100644 (file)
index 0000000..859790f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_image_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_image_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_image_sel.png
new file mode 100644 (file)
index 0000000..18015fb
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_image_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_index_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_index_mv.png
new file mode 100644 (file)
index 0000000..f1b6644
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_index_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_index_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_index_nor.png
new file mode 100644 (file)
index 0000000..3460b57
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_index_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_index_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_index_sel.png
new file mode 100644 (file)
index 0000000..6948bf5
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_index_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_label_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_label_mv.png
new file mode 100644 (file)
index 0000000..8cfde30
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_label_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_label_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_label_nor.png
new file mode 100644 (file)
index 0000000..f49b9a6
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_label_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_label_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_label_sel.png
new file mode 100644 (file)
index 0000000..8a016ac
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_label_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_layout_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_layout_mv.png
new file mode 100644 (file)
index 0000000..39693dd
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_layout_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_layout_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_layout_nor.png
new file mode 100644 (file)
index 0000000..32d82f8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_layout_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_layout_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_layout_sel.png
new file mode 100644 (file)
index 0000000..775c8ff
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_layout_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_list_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_list_mv.png
new file mode 100644 (file)
index 0000000..c10eca7
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_list_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_list_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_list_nor.png
new file mode 100644 (file)
index 0000000..c6962aa
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_list_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_list_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_list_sel.png
new file mode 100644 (file)
index 0000000..4ac217d
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_list_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_map_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_map_mv.png
new file mode 100644 (file)
index 0000000..904be93
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_map_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_map_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_map_nor.png
new file mode 100644 (file)
index 0000000..c0baa7f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_map_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_map_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_map_sel.png
new file mode 100644 (file)
index 0000000..233748e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_map_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_multi_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_multi_mv.png
new file mode 100644 (file)
index 0000000..2797697
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_multi_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_multi_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_multi_nor.png
new file mode 100644 (file)
index 0000000..37420ef
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_multi_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_multi_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_multi_sel.png
new file mode 100644 (file)
index 0000000..2d0a064
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_multi_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_panel_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_panel_mv.png
new file mode 100644 (file)
index 0000000..2e7191c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_panel_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_panel_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_panel_nor.png
new file mode 100644 (file)
index 0000000..fdab637
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_panel_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_panel_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_panel_sel.png
new file mode 100644 (file)
index 0000000..d321d5c
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_panel_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_panes_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_panes_mv.png
new file mode 100644 (file)
index 0000000..91fbc0f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_panes_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_panes_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_panes_nor.png
new file mode 100644 (file)
index 0000000..311d91e
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_panes_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_panes_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_panes_sel.png
new file mode 100644 (file)
index 0000000..1b93029
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_panes_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_popup_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_popup_mv.png
new file mode 100644 (file)
index 0000000..ac4e3e0
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_popup_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_popup_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_popup_nor.png
new file mode 100644 (file)
index 0000000..6405c4a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_popup_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_popup_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_popup_sel.png
new file mode 100644 (file)
index 0000000..d0f11b2
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_popup_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_progress_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_progress_mv.png
new file mode 100644 (file)
index 0000000..7a695d1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_progress_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_progress_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_progress_nor.png
new file mode 100644 (file)
index 0000000..0e869e5
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_progress_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_progress_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_progress_sel.png
new file mode 100644 (file)
index 0000000..2e39ac2
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_progress_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_radio_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_radio_mv.png
new file mode 100644 (file)
index 0000000..fcdd59b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_radio_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_radio_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_radio_nor.png
new file mode 100644 (file)
index 0000000..050df73
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_radio_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_radio_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_radio_sel.png
new file mode 100644 (file)
index 0000000..0b408f9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_radio_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_mv.png
new file mode 100644 (file)
index 0000000..801feea
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_nor.png
new file mode 100644 (file)
index 0000000..198c5fa
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_sel.png
new file mode 100644 (file)
index 0000000..4afa919
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_scroller_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_slider_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_slider_mv.png
new file mode 100644 (file)
index 0000000..f7e059f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_slider_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_slider_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_slider_nor.png
new file mode 100644 (file)
index 0000000..6a73f70
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_slider_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_slider_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_slider_sel.png
new file mode 100644 (file)
index 0000000..855a31d
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_slider_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_mv.png
new file mode 100644 (file)
index 0000000..0de186b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_nor.png
new file mode 100644 (file)
index 0000000..e16ea0b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_sel.png
new file mode 100644 (file)
index 0000000..914af6f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_spinner_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_table_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_table_mv.png
new file mode 100644 (file)
index 0000000..62678ae
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_table_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_table_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_table_nor.png
new file mode 100644 (file)
index 0000000..16181a3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_table_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_table_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_table_sel.png
new file mode 100644 (file)
index 0000000..0c74733
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_table_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_mv.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_mv.png
new file mode 100644 (file)
index 0000000..2272cee
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_mv.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_nor.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_nor.png
new file mode 100644 (file)
index 0000000..595c55f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_nor.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_sel.png b/org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_sel.png
new file mode 100644 (file)
index 0000000..539b88d
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/32/pal_toolbar_sel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/background.png b/org.tizen.efluibuilder/res/icons/widget/64/background.png
new file mode 100644 (file)
index 0000000..7463713
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/background.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/box.png b/org.tizen.efluibuilder/res/icons/widget/64/box.png
new file mode 100644 (file)
index 0000000..a416481
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/box.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/button.png b/org.tizen.efluibuilder/res/icons/widget/64/button.png
new file mode 100644 (file)
index 0000000..8023659
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/button.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/calendar.png b/org.tizen.efluibuilder/res/icons/widget/64/calendar.png
new file mode 100644 (file)
index 0000000..360a45b
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/calendar.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/checkboxitem.png b/org.tizen.efluibuilder/res/icons/widget/64/checkboxitem.png
new file mode 100644 (file)
index 0000000..6e52e48
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/checkboxitem.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/color_selector.png b/org.tizen.efluibuilder/res/icons/widget/64/color_selector.png
new file mode 100644 (file)
index 0000000..04db5c8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/color_selector.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/date_time_picker.png b/org.tizen.efluibuilder/res/icons/widget/64/date_time_picker.png
new file mode 100644 (file)
index 0000000..71dc6cb
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/date_time_picker.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/entry.png b/org.tizen.efluibuilder/res/icons/widget/64/entry.png
new file mode 100644 (file)
index 0000000..afeec42
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/entry.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/flipselector.png b/org.tizen.efluibuilder/res/icons/widget/64/flipselector.png
new file mode 100644 (file)
index 0000000..82f349d
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/flipselector.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/gengrid.png b/org.tizen.efluibuilder/res/icons/widget/64/gengrid.png
new file mode 100644 (file)
index 0000000..1b6d06f
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/gengrid.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/genlist.png b/org.tizen.efluibuilder/res/icons/widget/64/genlist.png
new file mode 100644 (file)
index 0000000..a0409d9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/genlist.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/grid.png b/org.tizen.efluibuilder/res/icons/widget/64/grid.png
new file mode 100644 (file)
index 0000000..f5770c2
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/grid.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/icon.png b/org.tizen.efluibuilder/res/icons/widget/64/icon.png
new file mode 100644 (file)
index 0000000..6dd67cf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/icon.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/image.png b/org.tizen.efluibuilder/res/icons/widget/64/image.png
new file mode 100644 (file)
index 0000000..506f7a8
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/image.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/index.png b/org.tizen.efluibuilder/res/icons/widget/64/index.png
new file mode 100644 (file)
index 0000000..1a3dea1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/index.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/label.png b/org.tizen.efluibuilder/res/icons/widget/64/label.png
new file mode 100644 (file)
index 0000000..1549e7d
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/label.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/layout.png b/org.tizen.efluibuilder/res/icons/widget/64/layout.png
new file mode 100644 (file)
index 0000000..adcefbf
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/layout.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/list.png b/org.tizen.efluibuilder/res/icons/widget/64/list.png
new file mode 100644 (file)
index 0000000..3e57e85
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/list.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/map.png b/org.tizen.efluibuilder/res/icons/widget/64/map.png
new file mode 100644 (file)
index 0000000..c829857
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/map.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/multi_button_entry.png b/org.tizen.efluibuilder/res/icons/widget/64/multi_button_entry.png
new file mode 100644 (file)
index 0000000..adef2d2
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/multi_button_entry.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/naviframe.png b/org.tizen.efluibuilder/res/icons/widget/64/naviframe.png
new file mode 100644 (file)
index 0000000..78301e9
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/naviframe.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/panel.png b/org.tizen.efluibuilder/res/icons/widget/64/panel.png
new file mode 100644 (file)
index 0000000..a1fde45
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/panel.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/panes.png b/org.tizen.efluibuilder/res/icons/widget/64/panes.png
new file mode 100644 (file)
index 0000000..09f68f3
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/panes.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/photocam.png b/org.tizen.efluibuilder/res/icons/widget/64/photocam.png
new file mode 100644 (file)
index 0000000..58530b1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/photocam.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/progressbar.png b/org.tizen.efluibuilder/res/icons/widget/64/progressbar.png
new file mode 100644 (file)
index 0000000..b283a39
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/progressbar.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/radiobuttonitem.png b/org.tizen.efluibuilder/res/icons/widget/64/radiobuttonitem.png
new file mode 100644 (file)
index 0000000..8b1beb1
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/radiobuttonitem.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/scroller.png b/org.tizen.efluibuilder/res/icons/widget/64/scroller.png
new file mode 100644 (file)
index 0000000..7d5df48
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/scroller.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/segment_control.png b/org.tizen.efluibuilder/res/icons/widget/64/segment_control.png
new file mode 100644 (file)
index 0000000..53faa96
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/segment_control.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/slider.png b/org.tizen.efluibuilder/res/icons/widget/64/slider.png
new file mode 100644 (file)
index 0000000..8f1d352
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/slider.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/spinner.png b/org.tizen.efluibuilder/res/icons/widget/64/spinner.png
new file mode 100644 (file)
index 0000000..9c63b69
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/spinner.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/table.png b/org.tizen.efluibuilder/res/icons/widget/64/table.png
new file mode 100644 (file)
index 0000000..add3d3a
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/table.png differ
diff --git a/org.tizen.efluibuilder/res/icons/widget/64/toolbar.png b/org.tizen.efluibuilder/res/icons/widget/64/toolbar.png
new file mode 100644 (file)
index 0000000..ab95013
Binary files /dev/null and b/org.tizen.efluibuilder/res/icons/widget/64/toolbar.png differ
diff --git a/org.tizen.efluibuilder/res/json/databinding/callHistory.json b/org.tizen.efluibuilder/res/json/databinding/callHistory.json
new file mode 100644 (file)
index 0000000..5523627
--- /dev/null
@@ -0,0 +1,21 @@
+{\r
+   "callhistory":{\r
+        "length":1,\r
+        "entries":[\r
+            {\r
+                "uid":"123",\r
+                "type":"TEL",\r
+                "features":["feature1", "feature2"],\r
+                "remoteParties":[\r
+                    {\r
+                        "remoteParty":"123",\r
+                        "personId":"3"\r
+                    }\r
+                ],\r
+                "startTime":"Thu Apr 03 2014 15:20:51 GMT+0900 (KST)",\r
+                "duration":100,\r
+                "direction":"DIALED"\r
+            }\r
+        ]\r
+    }\r
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/json/databinding/contact.json b/org.tizen.efluibuilder/res/json/databinding/contact.json
new file mode 100644 (file)
index 0000000..6e5bd99
--- /dev/null
@@ -0,0 +1,145 @@
+{\r
+  "addressbooks": [\r
+    {\r
+      "contacts": [\r
+        {\r
+          "addressBookId": "0",\r
+          "addresses": [\r
+            {\r
+              "additionalInformation": null,\r
+              "city": null,\r
+              "country": null,\r
+              "isDefault": true,\r
+              "label": null,\r
+              "postalCode": null,\r
+              "region": null,\r
+              "streetAddress": "11F, Yemigee Bld, Sunae-Dong",\r
+              "types": [\r
+                "HOME"\r
+              ]\r
+            },\r
+            {\r
+              "additionalInformation": null,\r
+              "city": null,\r
+              "country": null,\r
+              "isDefault": false,\r
+              "label": null,\r
+              "postalCode": null,\r
+              "region": null,\r
+              "streetAddress": "City Bld, Seoul",\r
+              "types": [\r
+                "HOME"\r
+              ]\r
+            }\r
+          ],\r
+          "anniversaries": [\r
+            {\r
+              "date": "Mon Oct 21 2013 00: 00: 00 GMT + 0900(KST)",\r
+              "label": null\r
+            }\r
+          ],\r
+          "birthday": "Mon Oct 21 2013 00: 00: 00 GMT + 0900(KST)",\r
+          "emails": [\r
+            {\r
+              "email": "sample@tizen.com",\r
+              "isDefault": true,\r
+              "label": "",\r
+              "types": [\r
+                "HOME"\r
+              ]\r
+            },\r
+            {\r
+              "email": "sample@tizen.com",\r
+              "isDefault": false,\r
+              "label": "",\r
+              "types": [\r
+                "HOME"\r
+              ]\r
+            }\r
+          ],\r
+          "groupIds": [\r
+            "2",\r
+            "3"\r
+          ],\r
+          "id": "1",\r
+          "isFavorite": false,\r
+          "lastUpdated": "Mon Sep 16 2013 05: 34: 20 GMT + 0900(KST)",\r
+          "name": {\r
+            "displayName": "Firstname Middlename Lastname, Suffix",\r
+            "firstName": "Firstname",\r
+            "lastName": "Lastname",\r
+            "middleName": "Middlename",\r
+            "nicknames": [\r
+              "Nickname"\r
+            ],\r
+            "phoneticFirstName": null,\r
+            "phoneticLastName": null,\r
+            "phoneticMiddleName": null,\r
+            "phoneticName": null,\r
+            "prefix": null,\r
+            "suffix": "Suffix"\r
+          },\r
+          "notes": [\r
+            "Sample Data"\r
+          ],\r
+          "organizations": [\r
+            {\r
+              "assistant": null,\r
+              "department": "Department",\r
+              "description": null,\r
+              "label": "",\r
+              "location": "",\r
+              "logoURI": null,\r
+              "name": "Company",\r
+              "phoneticName": null,\r
+              "role": null,\r
+              "title": "Jobtitle",\r
+              "type": "WORK"\r
+            }\r
+          ],\r
+          "personId": "1",\r
+          "phoneNumbers": [\r
+            {\r
+              "isDefault": true,\r
+              "label": "",\r
+              "number": 8221113333,\r
+              "types": [\r
+                "WORK",\r
+                "VOICE"\r
+              ]\r
+            },\r
+            {\r
+              "isDefault": false,\r
+              "label": "",\r
+              "number": "8221112222",\r
+              "types": [\r
+                "HOME",\r
+                "VOICE"\r
+              ]\r
+            },\r
+            {\r
+              "isDefault": false,\r
+              "label": "",\r
+              "number": "82102223333",\r
+              "types": [\r
+                "CELL"\r
+              ]\r
+            }\r
+          ],\r
+          "photoURI": "file:///opt/usr/data/contacts-svc/img/3_31-15.jpg",\r
+          "ringtoneURI": null,\r
+          "urls": [\r
+            {\r
+              "label": "",\r
+              "type": "HOMEPAGE",\r
+              "url": "http://tizen.org"\r
+            }\r
+          ]\r
+        }\r
+      ],\r
+      "id": "0",\r
+      "name": "http://tizen.org/addressbook/phone",\r
+      "readOnly": false\r
+    }\r
+  ]\r
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/snippets/snippet1/descriptor.xml b/org.tizen.efluibuilder/res/snippets/snippet1/descriptor.xml
new file mode 100644 (file)
index 0000000..a872f23
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<views>
+       <view id="" type="view" />
+</views>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet1/image.png b/org.tizen.efluibuilder/res/snippets/snippet1/image.png
new file mode 100644 (file)
index 0000000..c03517b
Binary files /dev/null and b/org.tizen.efluibuilder/res/snippets/snippet1/image.png differ
diff --git a/org.tizen.efluibuilder/res/snippets/snippet1/meta.xml b/org.tizen.efluibuilder/res/snippets/snippet1/meta.xml
new file mode 100644 (file)
index 0000000..76713da
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<meta version="1.0">
+       <version>1</version>
+       <id>snippet1</id>
+       <name>Blank</name>
+       <type>view</type>
+       <category>system</category>
+       <description>Blank View</description>
+</meta>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet10/descriptor.xml b/org.tizen.efluibuilder/res/snippets/snippet10/descriptor.xml
new file mode 100644 (file)
index 0000000..388eae6
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<views>
+       <view id="" type="popup" indicator="true">
+               <popup align_h="fill" align_v="fill" disable="false" height="200" id="popup1" title="Title" visible="true" weight_h="1" weight_v="1">
+                       <grid align_h="fill" align_v="fill" id="grid1" visible="true" vsize_h="1000" vsize_w="1000" weight_h="1" weight_v="1" />
+               </popup>
+       </view>
+</views>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet10/image.png b/org.tizen.efluibuilder/res/snippets/snippet10/image.png
new file mode 100644 (file)
index 0000000..d9bc7a1
Binary files /dev/null and b/org.tizen.efluibuilder/res/snippets/snippet10/image.png differ
diff --git a/org.tizen.efluibuilder/res/snippets/snippet10/meta.xml b/org.tizen.efluibuilder/res/snippets/snippet10/meta.xml
new file mode 100644 (file)
index 0000000..07250e6
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<meta>
+       <id>snippet10</id>
+       <name>Popup</name>
+       <type>view</type>
+       <category>system</category>
+       <description />
+</meta>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet2/descriptor.xml b/org.tizen.efluibuilder/res/snippets/snippet2/descriptor.xml
new file mode 100644 (file)
index 0000000..2154a61
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<views>
+       <view id="" type="view">
+               <table align_h="fill" align_v="fill" cols="1" homogeneous="false" id="table1" padding_h="0" padding_v="0" rows="5" visible="true" weight_h="1" weight_v="1">
+                       <label align_h="0.5" align_v="fill" col_span="1" ellipsis="false" id="label1" line_wrap="none" pack_col="0" pack_row="1" row_span="1"
+                               text="&lt;font_size=48&gt;&lt;color=#1000ff&gt;&lt;b&gt;Title&lt;/b&gt;&lt;/color&gt;&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="0.2"
+                               wrap_width="0" />
+                       <label align_h="0.5" align_v="fill" col_span="1" ellipsis="false" id="label2" line_wrap="none" pack_col="0" pack_row="3" row_span="1"
+                               text="&lt;font_size=32&gt;Sub Title&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="0.1" wrap_width="0" />
+               </table>
+       </view>
+</views>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet2/image.png b/org.tizen.efluibuilder/res/snippets/snippet2/image.png
new file mode 100644 (file)
index 0000000..c78506a
Binary files /dev/null and b/org.tizen.efluibuilder/res/snippets/snippet2/image.png differ
diff --git a/org.tizen.efluibuilder/res/snippets/snippet2/meta.xml b/org.tizen.efluibuilder/res/snippets/snippet2/meta.xml
new file mode 100644 (file)
index 0000000..861ce92
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<meta version="1.0">
+       <id>snippet2</id>
+       <name>Book Cover</name>
+       <type>view</type>
+       <category>system</category>
+       <description>Book Cover</description>
+</meta>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet3/descriptor.xml b/org.tizen.efluibuilder/res/snippets/snippet3/descriptor.xml
new file mode 100644 (file)
index 0000000..42fd6f0
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<views>
+       <view id="" type="view">
+               <grid align_h="fill" align_v="fill" id="grid1" visible="true" vsize_h="800" vsize_w="480" weight_h="1" weight_v="1">
+                       <button align_h="fill" align_v="fill" disable="false" id="button1" pack_h="47" pack_w="334" pack_x="81" pack_y="729" text="Back" visible="true"
+                               weight_h="1" weight_v="1" />
+                       <entry align_h="fill" align_v="fill" context_menu="true" disable="false" editable="false" file_text_format="plain_utf8" id="entry1" pack_h="520"
+                               pack_w="400" pack_x="46" pack_y="95" password="false" scroll="false" single_line="false" src=""
+                               text="You can use this page template to move to the previous or next page." visible="true" weight_h="1" weight_v="1" />
+                       <bg align_h="fill" align_v="fill" color="#266ABF" id="bg1" option="scale" pack_h="60" pack_w="480" pack_x="0" pack_y="0" src="" visible="true" weight_h="1"
+                               weight_v="1" />
+                       <label align_h="fill" align_v="fill" ellipsis="false" id="label1" line_wrap="none" pack_h="47" pack_w="384" pack_x="43" pack_y="9"
+                               text="&lt;font_size=32&gt;&lt;color=#ffffff&gt;&lt;b&gt;Header&lt;/b&gt;&lt;/color&gt;&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="1"
+                               wrap_width="0" />
+               </grid>
+       </view>
+</views>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet3/image.png b/org.tizen.efluibuilder/res/snippets/snippet3/image.png
new file mode 100644 (file)
index 0000000..32806c0
Binary files /dev/null and b/org.tizen.efluibuilder/res/snippets/snippet3/image.png differ
diff --git a/org.tizen.efluibuilder/res/snippets/snippet3/meta.xml b/org.tizen.efluibuilder/res/snippets/snippet3/meta.xml
new file mode 100644 (file)
index 0000000..8644923
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<meta version="1.0">
+       <version>1</version>
+       <id>snippet3</id>
+       <name>Footer</name>
+       <type>view</type>
+       <category>system</category>
+       <description>Footer</description>
+</meta>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet4/descriptor.xml b/org.tizen.efluibuilder/res/snippets/snippet4/descriptor.xml
new file mode 100644 (file)
index 0000000..26cd99d
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<views>
+       <view id="" type="view" indicator="true">
+               <grid align_h="fill" align_v="fill" id="grid1" visible="true" vsize_h="800" vsize_w="480" weight_h="1" weight_v="1">
+                       <bg align_h="fill" align_v="fill" color="#266ABF" id="bg1" option="scale" pack_h="60" pack_w="480" pack_x="0" pack_y="0" src="" visible="true" weight_h="1"
+                               weight_v="1" />
+                       <label align_h="fill" align_v="fill" ellipsis="false" id="label1" line_wrap="none" pack_h="47" pack_w="384" pack_x="43" pack_y="9"
+                               text="&lt;font_size=32&gt;&lt;color=#ffffff&gt;&lt;b&gt;Header&lt;/b&gt;&lt;/color&gt;&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="1"
+                               wrap_width="0" />
+                       <table align_h="fill" align_v="fill" cols="3" homogeneous="false" id="table1" pack_h="316" pack_w="430" pack_x="21" pack_y="94" padding_h="0"
+                               padding_v="0" rows="3" visible="true" weight_h="1" weight_v="1">
+                               <label align_h="0.5" align_v="fill" col_span="1" ellipsis="false" id="label2" line_wrap="none" pack_col="0" pack_row="0" row_span="1"
+                                       text="&lt;font_size=24&gt;Item #1&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="1" wrap_width="0" />
+                               <label align_h="0.5" align_v="fill" col_span="1" ellipsis="false" id="label3" line_wrap="none" pack_col="1" pack_row="0" row_span="1"
+                                       text="&lt;font_size=24&gt;Item #2&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="1" wrap_width="0" />
+                               <label align_h="0.5" align_v="fill" col_span="1" ellipsis="false" id="label4" line_wrap="none" pack_col="2" pack_row="0" row_span="1"
+                                       text="&lt;font_size=24&gt;Item #3&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="1" wrap_width="0" />
+                               <label align_h="0.5" align_v="fill" col_span="1" ellipsis="false" id="label5" line_wrap="none" pack_col="0" pack_row="1" row_span="1"
+                                       text="&lt;font_size=24&gt;Item #4&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="1" wrap_width="0" />
+                               <label align_h="0.5" align_v="fill" col_span="1" ellipsis="false" id="label6" line_wrap="none" pack_col="1" pack_row="1" row_span="1"
+                                       text="&lt;font_size=24&gt;Item #5&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="1" wrap_width="0" />
+                               <label align_h="0.5" align_v="fill" col_span="1" ellipsis="false" id="label7" line_wrap="none" pack_col="2" pack_row="1" row_span="1"
+                                       text="&lt;font_size=24&gt;Item #6&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="1" wrap_width="0" />
+                               <label align_h="0.5" align_v="fill" col_span="1" ellipsis="false" id="label8" line_wrap="none" pack_col="0" pack_row="2" row_span="1"
+                                       text="&lt;font_size=24&gt;Item #7&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="1" wrap_width="0" />
+                               <label align_h="0.5" align_v="fill" col_span="1" ellipsis="false" id="label9" line_wrap="none" pack_col="1" pack_row="2" row_span="1"
+                                       text="&lt;font_size=24&gt;Item #8&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="1" wrap_width="0" />
+                               <label align_h="0.5" align_v="fill" col_span="1" ellipsis="false" id="label10" line_wrap="none" pack_col="2" pack_row="2" row_span="1"
+                                       text="&lt;font_size=24&gt;Item #9&lt;/font_size&gt;" visible="true" weight_h="1" weight_v="1" wrap_width="0" />
+                       </table>
+               </grid>
+       </view>
+</views>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet4/image.png b/org.tizen.efluibuilder/res/snippets/snippet4/image.png
new file mode 100644 (file)
index 0000000..4ab5b28
Binary files /dev/null and b/org.tizen.efluibuilder/res/snippets/snippet4/image.png differ
diff --git a/org.tizen.efluibuilder/res/snippets/snippet4/meta.xml b/org.tizen.efluibuilder/res/snippets/snippet4/meta.xml
new file mode 100644 (file)
index 0000000..1309305
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<meta>
+       <id>snippet4</id>
+       <name>Table</name>
+       <type>view</type>
+       <category>system</category>
+       <description>Table</description>
+</meta>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet6/descriptor.xml b/org.tizen.efluibuilder/res/snippets/snippet6/descriptor.xml
new file mode 100644 (file)
index 0000000..cd3aa1c
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<views>
+       <view id="" type="view" indicator="true">
+               <grid align_h="fill" align_v="fill" id="grid1" visible="true" vsize_h="1000" vsize_w="1000" weight_h="1" weight_v="1">
+                       <toolbar align_h="fill" align_v="0" direction="horizontal" homogeneous="true" icon_size="32" id="toolbar1" pack_h="65" pack_w="1000" pack_x="2"
+                               pack_y="2" select_mode="default" shrink_mode="none" transverse_expand="true" visible="true" weight_h="0" weight_v="0">
+                               <toolbaritem disable="false" id="toolbaritem1" text="item" selected="false" src="" />
+                               <toolbaritem disable="false" id="toolbaritem2" text="item" selected="false" src="" />
+                               <toolbaritem disable="false" id="toolbaritem3" text="item" selected="false" src="" />
+                       </toolbar>
+               </grid>
+       </view>
+</views>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet6/image.png b/org.tizen.efluibuilder/res/snippets/snippet6/image.png
new file mode 100644 (file)
index 0000000..cb31cd6
Binary files /dev/null and b/org.tizen.efluibuilder/res/snippets/snippet6/image.png differ
diff --git a/org.tizen.efluibuilder/res/snippets/snippet6/meta.xml b/org.tizen.efluibuilder/res/snippets/snippet6/meta.xml
new file mode 100644 (file)
index 0000000..f1f5096
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<meta>
+       <id>snippet6</id>
+       <name>Toolbar</name>
+       <type>view</type>
+       <category>system</category>
+       <description />
+</meta>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet7/descriptor.xml b/org.tizen.efluibuilder/res/snippets/snippet7/descriptor.xml
new file mode 100644 (file)
index 0000000..b5e21e5
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<views>
+       <view id="" type="view" indicator="true">
+               <box align_h="fill" align_v="fill" direction="vertical" homogeneous="false" id="box1" padding_h="0" padding_v="0" visible="true" weight_h="1" weight_v="1">
+                       <genlist align_h="fill" align_v="fill" disable="false" homogeneous="false" id="genlist1" scrollbar_h="auto" scrollbar_v="auto" select_mode="default"
+                               visible="true" weight_h="1" weight_v="1">
+                               <genlistitem end_image_path="" end_standard_icon="" id="genlistitem1" image_path="" text="Default" selected="false"
+                                       standard_icon="" sub_text="Sub Text" />
+                               <genlistitem end_image_path="" end_standard_icon="" id="genlistitem2" image_path="" text="Home" selected="false" standard_icon="home"
+                                       sub_text="Sub Text" />
+                               <genlistitem end_image_path="" end_standard_icon="" id="genlistitem3" image_path="" text="Play" selected="false" standard_icon="media_player/play"
+                                       sub_text="Sub Text" />
+                               <genlistitem end_image_path="" end_standard_icon="" id="genlistitem4" image_path="" text="Apps" selected="false" standard_icon="apps"
+                                       sub_text="Sub Text" />
+                               <genlistitem end_image_path="" end_standard_icon="" id="genlistitem5" image_path="" text="Apps" selected="false"
+                                       standard_icon="" sub_text="Sub Text" />
+                               <genlistitem end_image_path="" end_standard_icon="" id="genlistitem6" image_path="" text="Clock" selected="false"
+                                       standard_icon="clock" sub_text="Sub Text" />
+                               <genlistitem end_image_path="" end_standard_icon="" id="genlistitem7" image_path="" text="Messages" selected="false"
+                                       standard_icon="chat" sub_text="Sub Text" />
+                               <genlistitem end_image_path="" end_standard_icon="" id="genlistitem8" image_path="" text="Files" selected="false"
+                                       standard_icon="menu/folder" sub_text="Sub Text" />
+                       </genlist>
+               </box>
+       </view>
+</views>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet7/image.png b/org.tizen.efluibuilder/res/snippets/snippet7/image.png
new file mode 100644 (file)
index 0000000..1617c50
Binary files /dev/null and b/org.tizen.efluibuilder/res/snippets/snippet7/image.png differ
diff --git a/org.tizen.efluibuilder/res/snippets/snippet7/meta.xml b/org.tizen.efluibuilder/res/snippets/snippet7/meta.xml
new file mode 100644 (file)
index 0000000..6b5ab17
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<meta>
+       <id>snippet7</id>
+       <name>Settings</name>
+       <type>view</type>
+       <category>system</category>
+       <description />
+</meta>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet8/descriptor.xml b/org.tizen.efluibuilder/res/snippets/snippet8/descriptor.xml
new file mode 100644 (file)
index 0000000..dbbcc85
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<views>
+       <view id="" type="popup" indicator="true">
+               <ctxpopup align_h="fill" align_v="fill" disable="false" id="ctxpopup1" visible="true" weight_h="1" weight_v="1" />
+       </view>
+</views>
diff --git a/org.tizen.efluibuilder/res/snippets/snippet8/image.png b/org.tizen.efluibuilder/res/snippets/snippet8/image.png
new file mode 100644 (file)
index 0000000..c76e0e6
Binary files /dev/null and b/org.tizen.efluibuilder/res/snippets/snippet8/image.png differ
diff --git a/org.tizen.efluibuilder/res/snippets/snippet8/meta.xml b/org.tizen.efluibuilder/res/snippets/snippet8/meta.xml
new file mode 100644 (file)
index 0000000..a35da40
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<meta>
+       <id>snippet8</id>
+       <name>Ctxpopup</name>
+       <type>view</type>
+       <category>system</category>
+       <description />
+</meta>
diff --git a/org.tizen.efluibuilder/res/xsd/default/attribute/group.xsd b/org.tizen.efluibuilder/res/xsd/default/attribute/group.xsd
new file mode 100644 (file)
index 0000000..ee5c438
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+       
+       <xs:include schemaLocation="type.xsd" />
+       
+       <xs:attributeGroup name="common">
+               <xs:attribute name="id" use="required" type="function_name" />
+               <xs:attribute type="align_h" name="align_h" default="fill" />
+               <xs:attribute type="align_v" name="align_v" default="fill" />
+               <xs:attribute type="weight" name="weight_h" default="expand"/>
+               <xs:attribute type="weight" name="weight_v" default="expand"/>
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnGrid">
+               <xs:attribute type="xs:integer" name="pack_x" />
+               <xs:attribute type="xs:integer" name="pack_y" />
+               <xs:attribute type="xs:positiveInteger" name="pack_w" />
+               <xs:attribute type="xs:positiveInteger" name="pack_h" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnTable">
+               <xs:attribute type="xs:integer" name="pack_col" />
+               <xs:attribute type="xs:integer" name="pack_row" />
+               <xs:attribute type="xs:positiveInteger" name="col_span" />
+               <xs:attribute type="xs:positiveInteger" name="row_span" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnPanes">
+               <xs:attribute name="pack">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:attributeGroup>
+
+       <xs:complexType name="item.event">
+               <xs:attribute name="signal">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="itemselected" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="function_name" type="xs:string" />  <!-- FIXME : regex for function name -->
+               <xs:attributeGroup ref="storyboard"/>
+       </xs:complexType>
+
+       <xs:attributeGroup name="storyboard">
+               <xs:attribute name="connection_wrapper" type="xs:string" />
+               <xs:attribute name="event_name" type="xs:string" />
+               <xs:attribute name="target" type="xs:string" />
+       </xs:attributeGroup>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/default/attribute/type.xsd b/org.tizen.efluibuilder/res/xsd/default/attribute/type.xsd
new file mode 100644 (file)
index 0000000..0fb971d
--- /dev/null
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:simpleType name="function_name">
+               <xs:restriction base="xs:string">
+                       <xs:pattern value="[a-zA-Z_]+[a-zA-Z0-9_]*" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="nonNegativeDouble">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="ratio">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+                       <xs:maxInclusive value="1"></xs:maxInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="align_h">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="align_v">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="top" />
+                                       <xs:enumeration value="bottom" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="weight">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="expand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="standard.icon">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="" />
+                       <xs:enumeration value="apps" />
+                       <xs:enumeration value="arrow_down" />
+                       <xs:enumeration value="arrow_left" />
+                       <xs:enumeration value="arrow_right" />
+                       <xs:enumeration value="arrow_up" />
+                       <xs:enumeration value="chat" />
+                       <xs:enumeration value="clock" />
+                       <xs:enumeration value="close" />
+                       <xs:enumeration value="delete" />
+                       <xs:enumeration value="edit" />
+                       <xs:enumeration value="file" />
+                       <xs:enumeration value="home" />
+                       <xs:enumeration value="media_player/forward" />
+                       <xs:enumeration value="media_player/info" />
+                       <xs:enumeration value="media_player/next" />
+                       <xs:enumeration value="media_player/pause" />
+                       <xs:enumeration value="media_player/play" />
+                       <xs:enumeration value="media_player/prev" />
+                       <xs:enumeration value="media_player/rewind" />
+                       <xs:enumeration value="media_player/stop" />
+                       <xs:enumeration value="menu/apps" />
+                       <xs:enumeration value="menu/arrow_up" />
+                       <xs:enumeration value="menu/arrow_down" />
+                       <xs:enumeration value="menu/arrow_left" />
+                       <xs:enumeration value="menu/arrow_right" />
+                       <xs:enumeration value="menu/chat" />
+                       <xs:enumeration value="menu/clock" />
+                       <xs:enumeration value="menu/close" />
+                       <xs:enumeration value="menu/delete" />
+                       <xs:enumeration value="menu/edit" />
+                       <xs:enumeration value="menu/folder" />
+                       <xs:enumeration value="menu/file" />
+                       <xs:enumeration value="menu/home" />
+                       <xs:enumeration value="menu/refresh" />
+                       <xs:enumeration value="no_photo" />
+                       <xs:enumeration value="photo/no_photo" />
+                       <xs:enumeration value="refresh" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="list.selectmode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="display_only" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.policy">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="auto" />
+                                       <xs:enumeration value="true" />
+                                       <xs:enumeration value="false" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="direction">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="vertical" />
+                       <xs:enumeration value="horizontal" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.direction">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="direction" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_block" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="list.mode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="compress" />
+                                       <xs:enumeration value="scroll" />
+                                       <xs:enumeration value="limit" />
+                                       <xs:enumeration value="expand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/element/configuration.xsd b/org.tizen.efluibuilder/res/xsd/default/element/configuration.xsd
new file mode 100644 (file)
index 0000000..81e59c4
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/type.xsd" />
+
+       <xs:element name="configuration"> <!-- FIXME -->
+               <xs:complexType>
+                       <xs:attribute name="device" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="WVGA" />
+                                               <xs:enumeration value="qHD" />
+                                               <xs:enumeration value="HD" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="id" type="function_name" use="required" />
+            <xs:attribute name="name" use="required">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:minLength value="1"/>
+                </xs:restriction>
+            </xs:simpleType>
+            </xs:attribute>
+                       <xs:attribute name="orientation" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="portrait" />
+                                               <xs:enumeration value="landscape" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="type" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="common" />
+                                               <xs:enumeration value="specific" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+               </xs:complexType>
+       </xs:element>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/element/group.xsd b/org.tizen.efluibuilder/res/xsd/default/element/group.xsd
new file mode 100644 (file)
index 0000000..e3cf8d7
--- /dev/null
@@ -0,0 +1,597 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../widget/bg.xsd" />
+       <xs:include schemaLocation="../widget/box.xsd" />
+       <xs:include schemaLocation="../widget/button.xsd" />
+       <xs:include schemaLocation="../widget/calendar.xsd" />
+       <xs:include schemaLocation="../widget/check.xsd" />
+       <xs:include schemaLocation="../widget/colorselector.xsd" />
+       <xs:include schemaLocation="../widget/ctxpopup.xsd" />
+       <xs:include schemaLocation="../widget/datetime.xsd" />
+       <xs:include schemaLocation="../widget/entry.xsd" />
+       <xs:include schemaLocation="../widget/flipselector.xsd" />
+       <xs:include schemaLocation="../widget/gengrid.xsd" />
+       <xs:include schemaLocation="../widget/genlist.xsd" />
+       <xs:include schemaLocation="../widget/grid.xsd" />
+       <xs:include schemaLocation="../widget/hoversel.xsd" />
+       <xs:include schemaLocation="../widget/image.xsd" />
+       <xs:include schemaLocation="../widget/index.xsd" />
+       <xs:include schemaLocation="../widget/label.xsd" />
+       <xs:include schemaLocation="../widget/layout.xsd" />
+       <xs:include schemaLocation="../widget/list.xsd" />
+       <xs:include schemaLocation="../widget/map.xsd" />
+       <xs:include schemaLocation="../widget/multibuttonentry.xsd" />
+       <xs:include schemaLocation="../widget/panel.xsd" />
+       <xs:include schemaLocation="../widget/panes.xsd" />
+       <xs:include schemaLocation="../widget/popup.xsd" />
+       <xs:include schemaLocation="../widget/progressbar.xsd" />
+       <xs:include schemaLocation="../widget/radio.xsd" />
+       <xs:include schemaLocation="../widget/scroller.xsd" />
+       <xs:include schemaLocation="../widget/slider.xsd" />
+       <xs:include schemaLocation="../widget/spinner.xsd" />
+       <xs:include schemaLocation="../widget/table.xsd" />
+       <xs:include schemaLocation="../widget/toolbar.xsd" />
+
+       <xs:group name="rootContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="panes" />
+                       <xs:element ref="panel" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="popup">
+               <xs:choice>
+                       <xs:element ref="popup" />
+                       <xs:element ref="ctxpopup" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="panes" />
+                       <xs:element ref="panel" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainer">
+               <xs:choice>
+                       <xs:element ref="flipselector" />
+                       <xs:element ref="gengrid" />
+                       <xs:element ref="genlist" />
+                       <xs:element ref="index" />
+                       <xs:element ref="list" />
+                       <xs:element ref="multibuttonentry" />
+                       <xs:element ref="toolbar" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidget">
+               <xs:choice>
+                       <xs:element ref="bg" />
+                       <xs:element ref="button" />
+                       <xs:element ref="calendar" />
+                       <xs:element ref="check" />
+                       <xs:element ref="colorselector" />
+                       <xs:element ref="datetime" />
+                       <xs:element ref="entry" />
+                       <xs:element ref="image" />
+                       <xs:element ref="label" />
+                       <xs:element ref="layout" />
+                       <xs:element ref="map" />
+                       <xs:element ref="progressbar" />
+                       <xs:element ref="radio" />
+                       <xs:element ref="slider" />
+                       <xs:element ref="spinner" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_grid" />
+                       <xs:element name="box" type="box_on_grid" />
+                       <xs:element name="table" type="table_on_grid" />
+                       <xs:element name="panes" type="panes_on_grid">
+                               <xs:unique name="event_panes_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_grid">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_grid">
+                               <xs:unique name="event_panel_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_grid">
+                               <xs:unique name="event_scroller_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="flipselector" type="flipselector_on_grid">
+                               <xs:unique name="event_flipselector_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="gengrid" type="gengrid_on_grid">
+                               <xs:unique name="event_gengrid_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_grid">
+                               <xs:unique name="event_genlist_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_grid">
+                               <xs:unique name="event_index_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_grid">
+                               <xs:unique name="event_list_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_grid">
+                               <xs:unique name="event_multibuttonentry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_grid">
+                               <xs:unique name="event_toolbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnGrid">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_grid" />
+                       <xs:element name="button" type="button_on_grid">
+                               <xs:unique name="event_button_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="calendar" type="calendar_on_grid">
+                               <xs:unique name="event_calendar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_grid">
+                               <xs:unique name="event_check_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_grid">
+                               <xs:unique name="event_colorselector_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_grid">
+                               <xs:unique name="event_datetime_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_grid">
+                               <xs:unique name="event_entry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_grid">
+                               <xs:unique name="event_image_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_grid">
+                               <xs:unique name="event_label_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_grid">
+                               <xs:unique name="event_layout_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_grid">
+                               <xs:unique name="event_map_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_grid">
+                               <xs:unique name="event_progressbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_grid">
+                               <xs:unique name="event_radio_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_grid">
+                               <xs:unique name="event_slider_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_grid">
+                               <xs:unique name="event_spinner_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnTable">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_table" />
+                       <xs:element name="box" type="box_on_table" />
+                       <xs:element name="table" type="table_on_table" />
+                       <xs:element name="panes" type="panes_on_table">
+                               <xs:unique name="event_panes_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_table">
+                               <xs:unique name="event_panel_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_table">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_table">
+                               <xs:unique name="event_scroller_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnTable">
+               <xs:choice>
+                       <xs:element name="flipselector" type="flipselector_on_table">
+                               <xs:unique name="event_flipselector_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="gengrid" type="gengrid_on_table">
+                               <xs:unique name="event_gengrid_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_table">
+                               <xs:unique name="event_genlist_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_table">
+                               <xs:unique name="event_index_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_table">
+                               <xs:unique name="event_list_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_table">
+                               <xs:unique name="event_multibuttonentry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_table">
+                               <xs:unique name="event_toolbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnTable">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_table" />
+                       <xs:element name="button" type="button_on_table">
+                               <xs:unique name="event_button_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="calendar" type="calendar_on_table">
+                               <xs:unique name="event_calendar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_table">
+                               <xs:unique name="event_check_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_table">
+                               <xs:unique name="event_colorselector_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_table">
+                               <xs:unique name="event_datetime_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_table">
+                               <xs:unique name="event_entry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_table">
+                               <xs:unique name="event_image_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_table">
+                               <xs:unique name="event_label_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_table">
+                               <xs:unique name="event_layout_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_table">
+                               <xs:unique name="event_map_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_table">
+                               <xs:unique name="event_progressbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_table">
+                               <xs:unique name="event_radio_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_table">
+                               <xs:unique name="event_slider_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_table">
+                               <xs:unique name="event_spinner_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_panes" />
+                       <xs:element name="box" type="box_on_panes" />
+                       <xs:element name="table" type="table_on_panes" />
+                       <xs:element name="panes" type="panes_on_panes">
+                               <xs:unique name="event_panes_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_panes">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_panes">
+                               <xs:unique name="event_panel_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_panes">
+                               <xs:unique name="event_scroller_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="flipselector" type="flipselector_on_panes">
+                               <xs:unique name="event_flipselector_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="gengrid" type="gengrid_on_panes">
+                               <xs:unique name="event_gengrid_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_panes">
+                               <xs:unique name="event_genlist_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_panes">
+                               <xs:unique name="event_index_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_panes">
+                               <xs:unique name="event_list_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_panes">
+                               <xs:unique name="event_multibuttonentry_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_panes">
+                               <xs:unique name="event_toolbar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnPanes">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_panes" />
+                       <xs:element name="button" type="button_on_panes">
+                               <xs:unique name="event_button_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="calendar" type="calendar_on_panes">
+                               <xs:unique name="event_calendar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_panes">
+                               <xs:unique name="event_check_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_panes">
+                               <xs:unique name="event_colorselector_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_panes">
+                               <xs:unique name="event_datetime_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_panes">
+                               <xs:unique name="event_entry_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_panes">
+                               <xs:unique name="event_image_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_panes">
+                               <xs:unique name="event_label_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_panes">
+                               <xs:unique name="event_layout_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_panes">
+                               <xs:unique name="event_map_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_panes">
+                               <xs:unique name="event_progressbar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_panes">
+                               <xs:unique name="event_radio_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_panes">
+                               <xs:unique name="event_slider_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_panes">
+                               <xs:unique name="event_spinner_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/element/variation.xsd b/org.tizen.efluibuilder/res/xsd/default/element/variation.xsd
new file mode 100644 (file)
index 0000000..b106524
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd"></xs:include>
+
+       <xs:element name="variation" type="variation" />
+
+       <xs:complexType name="variation">
+               <xs:attribute type="xs:string" name="config_ref" />
+               <xs:attribute type="xs:boolean" name="visible" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnGrid"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_table">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnTable"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnPanes"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/layout.xsd b/org.tizen.efluibuilder/res/xsd/default/layout.xsd
new file mode 100644 (file)
index 0000000..dd52c90
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="element/configuration.xsd" />
+
+       <!-- definition of tizen.view -->
+       <xs:include schemaLocation="widget/view.xsd" />
+
+       <xs:element name="document">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element name="info" />
+                               <xs:element ref="data" />
+                       </xs:sequence>
+               </xs:complexType>
+       </xs:element>
+       <xs:element name="data">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="mscreen" />
+                               <xs:element ref="views" />
+                       </xs:sequence>
+               </xs:complexType>
+       </xs:element>
+       <xs:element name="mscreen">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="configuration" minOccurs="1" maxOccurs="unbounded" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:unique name="config-id">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@id" />
+               </xs:unique>
+               <xs:unique name="qualifiers">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@device" />
+                       <xs:field xpath="@orientation" />
+               </xs:unique>
+               <xs:unique name="config-name">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@name" />
+               </xs:unique>
+       </xs:element>
+       <xs:element name="views">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="view" minOccurs="0" maxOccurs="unbounded" />
+                       </xs:sequence>
+                       <xs:attribute type="xs:string" name="startup"></xs:attribute>
+               </xs:complexType>
+               <xs:key name="view_id">
+                       <xs:selector xpath="view" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="startup" refer="view_id">
+                       <xs:selector xpath="." />
+                       <xs:field xpath="@startup" />
+               </xs:keyref>
+               <xs:keyref name="view_ref" refer="view_id">
+                       <xs:selector xpath=".//naviframe" />
+                       <xs:field xpath="@view" />
+               </xs:keyref>
+               <xs:keyref name="event_target" refer="view_id">
+                       <xs:selector xpath=".//event" />
+                       <xs:field xpath="@target" />
+               </xs:keyref>
+       </xs:element>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/bg.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/bg.xsd
new file mode 100644 (file)
index 0000000..3f87e10
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="bg" type="background" />
+
+       <xs:complexType name="background_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="color" default="#ffffff">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="option" default="scale">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="center" />
+                                                       <xs:enumeration value="scale" />
+                                                       <xs:enumeration value="stretch" />
+                                                       <xs:enumeration value="tile" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="background">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_table">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/box.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/box.xsd
new file mode 100644 (file)
index 0000000..e2ab8fc
--- /dev/null
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="box" type="box" />
+
+       <xs:complexType name="box_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:group ref="widgetContainer" />
+                       <xs:group ref="itemContainer" />
+                       <xs:group ref="primitiveWidget" />
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" default="0" />
+       </xs:complexType>
+
+       <xs:complexType name="box">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_table">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/button.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/button.xsd
new file mode 100644 (file)
index 0000000..97b3778
--- /dev/null
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="button" type="button">
+               <xs:unique name="event_button">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="button_common">
+               <xs:choice>
+                       <xs:element ref="image" minOccurs="0" maxOccurs="1" />
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="repeated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="unpressed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Button" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="anchor" />
+                                                       <xs:enumeration value="bottom" />
+                                                       <xs:enumeration value="circle" />
+                                                       <xs:enumeration value="dropdown" />
+                                                       <xs:enumeration value="icon_reorder" />
+                                                       <xs:enumeration value="option" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="button">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_table">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/calendar.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/calendar.xsd
new file mode 100644 (file)
index 0000000..5223a86
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="calendar" type="calendar">
+               <xs:unique name="event_calendar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="calendar_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="5">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="display,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="min_year" default="1902">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:positiveInteger">
+                                       <xs:minInclusive value="1902" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="max_year" default="-1">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:positiveInteger">
+                                                       <xs:minInclusive value="1902" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:integer">
+                                                       <xs:enumeration value="-1"></xs:enumeration>
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="ondemand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="interval" type="nonNegativeDouble" default="0.85" />
+       </xs:complexType>
+
+       <xs:complexType name="calendar">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="calendar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="calendar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="calendar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/check.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/check.xsd
new file mode 100644 (file)
index 0000000..61efefa
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="check" type="check">
+               <xs:unique name="event_check">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="check_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Check" />
+               <xs:attribute name="state" type="xs:boolean" default="false" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">       <!-- FIXME -->
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="favorite" />
+                                       <xs:enumeration value="on&amp;off" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="check">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_table">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/colorselector.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/colorselector.xsd
new file mode 100644 (file)
index 0000000..4724428
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="colorselector" type="colorselector">
+               <xs:unique name="event_colorselector">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="colorselector_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="color,item,selected" />
+                                                               <xs:enumeration value="color,item,longpressed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="mode" default="both">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="palette" />
+                                       <xs:enumeration value="components" />
+                                       <xs:enumeration value="both" />
+                                       <xs:enumeration value="picker" />
+                                       <xs:enumeration value="plane" />
+                                       <xs:enumeration value="palette_plane" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="color">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}|#{1}[0-9a-fA-F]{8}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="colorselector">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_table">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/ctxpopup.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/ctxpopup.xsd
new file mode 100644 (file)
index 0000000..fa4f41d
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="ctxpopup" type="ctxpopup">
+               <xs:unique name="event_ctxpopup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="ctxpopup">
+               <xs:choice minOccurs="1">
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="dismissed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="ctxpopupitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="CtxPopupItem" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">       <!-- TODO : default style? -->
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="dropdown/list" />
+                                       <xs:enumeration value="dropdown/label" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/datetime.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/datetime.xsd
new file mode 100644 (file)
index 0000000..2f8bacb
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="datetime" type="datetime">
+               <xs:unique name="event_datetime">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="datetime_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <!-- <xs:attribute name="format"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64" /> </xs:restriction> </xs:simpleType> </xs:attribute> -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="date_layout">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="date_layout" />
+                                       <xs:enumeration value="time_layout" />
+                                       <xs:enumeration value="time_layout_24hr" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="datetime">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_table">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/entry.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/entry.xsd
new file mode 100644 (file)
index 0000000..883154c
--- /dev/null
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="entry" type="entry">
+               <xs:unique name="event_entry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="entry_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="33">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="aborted" />
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="anchor,clicked" />
+                                                               <xs:enumeration value="anchor,down" />
+                                                               <xs:enumeration value="anchor,hover,opened" />
+                                                               <xs:enumeration value="anchor,in" />
+                                                               <xs:enumeration value="anchor,out" />
+                                                               <xs:enumeration value="anchor,up" />
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="changed,user" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,triple" />
+                                                               <xs:enumeration value="cursor,changed" />
+                                                               <xs:enumeration value="cursor,changed,manual" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="maxlength,reached" />
+                                                               <xs:enumeration value="preedit,changed" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="redo,request" />
+                                                               <xs:enumeration value="selection,changed" />
+                                                               <xs:enumeration value="selection,cleared" />
+                                                               <xs:enumeration value="selection,copy" />
+                                                               <xs:enumeration value="selection,cut" />
+                                                               <xs:enumeration value="selection,paste" />
+                                                               <xs:enumeration value="selection,start" />
+                                                               <xs:enumeration value="text,set,done" />
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="undo,request" />
+                                                               <xs:enumeration value="rejected" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="scroll" type="xs:boolean" default="false" />
+               <xs:attribute name="single_line" type="xs:boolean" default="false" />
+               <xs:attribute name="password" type="xs:boolean" default="false" />
+               <xs:attribute name="line_wrap">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="char" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="mixed" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <!-- <xs:attribute type="xs:boolean" name="prediction_allow" default="false" /> TODO -->
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="context_menu" type="xs:boolean" default="true" />
+               <xs:attribute name="autocapital_type" default="none">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="sentence" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="file_text_format" default="plain_utf8">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="plain_utf8" />
+                                                       <xs:enumeration value="markup_utf8" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="input_panel_return_key" type="xs:boolean" default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Entry" />
+               <xs:attribute name="src" type="xs:string" />
+       </xs:complexType>
+
+       <xs:complexType name="entry">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/flipselector.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/flipselector.xsd
new file mode 100644 (file)
index 0000000..2b142a6
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="flipselector" type="flipselector">
+               <xs:unique name="event_flipselector">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="flipselector_common">
+               <xs:choice minOccurs="1">
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="overflowed" />
+                                                               <xs:enumeration value="underflowed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="flipselectoritem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="1">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="flipselector">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="flipselector_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="flipselector_on_table">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="flipselector_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/gengrid.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/gengrid.xsd
new file mode 100644 (file)
index 0000000..9de316f
--- /dev/null
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+
+       <xs:element name="gengrid" type="gengrid">      <!-- TODO : FIXME -->
+               <xs:unique name="event_gengrid">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="gengrid_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="38">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,right" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="scroll,page,changed" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="index,update" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                               <xs:enumeration value="item,reorder,anim,start" />
+                                                               <xs:enumeration value="item,reorder,anim,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="gengriditem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="style" default="none">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="none" />
+                                                               <xs:enumeration value="album-preview" />
+                                                               <xs:enumeration value="block" />
+                                                               <xs:enumeration value="group_index" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="src" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean" default="false" />
+                                       <xs:attribute name="disabled" type="xs:boolean" default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="default_style" />
+                                       <xs:enumeration value="default_grid" />
+                                       <xs:enumeration value="default_gridtext" />
+                                       <xs:enumeration value="default_gridtext2" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" type="list.selectmode" default="default" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="item_size_h" type="xs:integer" default="200" />
+               <xs:attribute name="item_size_w" type="xs:integer" default="200" />
+               <xs:attribute name="multi_select" type="xs:boolean" default="false" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+       </xs:complexType>
+
+       <xs:complexType name="gengrid">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/genlist.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/genlist.xsd
new file mode 100644 (file)
index 0000000..43d9872
--- /dev/null
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="genlist" type="genlist">
+               <xs:unique name="event_genlist">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="genlist_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="48">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,right" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,request" />
+                                                               <xs:enumeration value="contract,request" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="multi,swipe,left" />
+                                                               <xs:enumeration value="multi,swipe,right" />
+                                                               <xs:enumeration value="multi,swipe,up" />
+                                                               <xs:enumeration value="multi,swipe,down" />
+                                                               <xs:enumeration value="multi,pinch,out" />
+                                                               <xs:enumeration value="multi,pinch,in" />
+                                                               <xs:enumeration value="swipe" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="moved,after" />
+                                                               <xs:enumeration value="moved,before" />
+                                                               <xs:enumeration value="index,update" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="tree,effect,finished" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <!-- <xs:element name="genlistitem" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="event" type="item.event" minOccurs="0" 
+                               /> </xs:sequence> <xs:attribute name="id" type="function_name" use="required" /> <xs:attribute type="xs:string" name="label" /> <xs:attribute type="xs:string" name="sub-label" 
+                               /> <xs:attribute name="item-type" default="ELM_GENLIST_ITEM_NONE"> <xs:simpleType> <xs:union> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="ELM_GENLIST_ITEM_NONE" 
+                               /> <xs:enumeration value="ELM_GENLIST_ITEM_TREE" /> <xs:enumeration value="ELM_GENLIST_ITEM_GROUP" /> </xs:restriction> </xs:simpleType> <xs:simpleType> <xs:restriction 
+                               base="xs:integer"> <xs:minInclusive value="0"></xs:minInclusive> <xs:maxInclusive value="2"></xs:maxInclusive> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> 
+                               </xs:attribute> <xs:attribute type="xs:boolean" name="selected" default="false" /> <xs:attribute type="xs:string" name="image-path" /> <xs:attribute type="standard.icon" 
+                               name="standard-icon" default="" /> <xs:attribute type="xs:string" name="end-image-path" /> <xs:attribute type="standard.icon" name="end-standard-icon" default="" 
+                               /> </xs:complexType> </xs:element> -->
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="select_mode" type="list.selectmode" default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean" default="false" />
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="homogeneous" type="xs:boolean" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+               <!-- <xs:attribute name="item-style" default="default"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="default_style" 
+                       /> <xs:enumeration value="double_label" /> <xs:enumeration value="icon_top_text_bottom" /> </xs:restriction> </xs:simpleType> </xs:attribute> -->
+       </xs:complexType>
+
+       <xs:complexType name="genlist">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_table">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/grid.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/grid.xsd
new file mode 100644 (file)
index 0000000..d4754fc
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="hoversel.xsd" />
+
+       <xs:element name="grid" type="grid" />
+
+       <xs:complexType name="grid_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:group ref="widgetContainerOnGrid" />
+                       <xs:group ref="itemContainerOnGrid" />
+                       <xs:group ref="primitiveWidgetOnGrid" />
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="vsize_w" type="xs:positiveInteger" default="1000" />
+               <xs:attribute name="vsize_h" type="xs:positiveInteger" default="1000" />
+       </xs:complexType>
+
+       <xs:complexType name="grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/hoversel.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/hoversel.xsd
new file mode 100644 (file)
index 0000000..0ac22a4
--- /dev/null
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="hoversel" type="hoversel">
+               <xs:unique name="event_hoversel">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="hoversel_common">
+               <xs:choice minOccurs="1">
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="dismissed" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="hoverselitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute type="xs:string" name="text" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="horizontal" type="xs:boolean" default="false" />
+               <xs:attribute name="style" type="xs:string" />
+       </xs:complexType>
+
+       <!-- <xs:complexType name="hoversel_grid"> <xs:choice minOccurs="1"> <xs:element name="event" minOccurs="0"> <xs:complexType> <xs:attribute name="ondismissed" type="xs:string" 
+               /> </xs:complexType> </xs:element> <xs:element name="hoverselitem" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="2"> 
+               <xs:element name="event" type="item.event" minOccurs="0" /> <xs:element ref="image" minOccurs="0" /> </xs:choice> <xs:attribute name="id" type="function_name" use="required" 
+               /> <xs:attribute type="xs:string" name="text" /> </xs:complexType> </xs:element> </xs:choice> <xs:attributeGroup ref="common" /> <xs:attributeGroup ref="packOnGrid" 
+               /> <xs:attribute type="xs:boolean" name="disable" default="false" /> <xs:attribute type="xs:boolean" name="visible" default="true" /> <xs:attribute type="xs:boolean" 
+               name="horizontal" default="false" /> <xs:attribute name="style" type="xs:string" /> </xs:complexType> <xs:complexType name="hoversel_table"> <xs:choice minOccurs="1"> 
+               <xs:element name="event" minOccurs="0"> <xs:complexType> <xs:attribute name="ondismissed" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="hoverselitem" 
+               minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="2"> <xs:element name="event" type="item.event" minOccurs="0" /> <xs:element 
+               ref="image" minOccurs="0" /> </xs:choice> <xs:attribute name="id" type="function_name" use="required" /> <xs:attribute type="xs:string" name="text" /> </xs:complexType> 
+               </xs:element> </xs:choice> <xs:attributeGroup ref="common" /> <xs:attributeGroup ref="packOnTable" /> <xs:attribute type="xs:boolean" name="disable" default="false" 
+               /> <xs:attribute type="xs:boolean" name="visible" default="true" /> <xs:attribute type="xs:boolean" name="horizontal" default="false" /> <xs:attribute name="style" 
+               type="xs:string" /> </xs:complexType> <xs:complexType name="hoversel_panes"> <xs:choice minOccurs="1"> <xs:element name="event" minOccurs="0"> <xs:complexType> <xs:attribute 
+               name="ondismissed" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="hoverselitem" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:choice 
+               minOccurs="0" maxOccurs="2"> <xs:element name="event" type="item.event" minOccurs="0" /> <xs:element ref="image" minOccurs="0" /> </xs:choice> <xs:attribute name="id" 
+               type="function_name" use="required" /> <xs:attribute type="xs:string" name="text" /> </xs:complexType> </xs:element> </xs:choice> <xs:attributeGroup ref="common" 
+               /> <xs:attributeGroup ref="packOnPanes" /> <xs:attribute type="xs:boolean" name="disable" default="false" /> <xs:attribute type="xs:boolean" name="visible" default="true" 
+               /> <xs:attribute type="xs:boolean" name="horizontal" default="false" /> <xs:attribute name="style" type="xs:string" /> </xs:complexType> -->
+
+       <xs:complexType name="hoversel">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="hoversel_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="hoversel_on_table">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="hoversel_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/image.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/image.xsd
new file mode 100644 (file)
index 0000000..5e9708b
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="image" type="image">
+               <xs:unique name="event_image">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="image_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="drop" />
+                                                               <xs:enumeration value="clicked" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="aspect_fixed" type="xs:boolean" default="false" />
+               <xs:attribute name="fill_outside" type="xs:boolean" default="false" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="resizable_up" type="xs:boolean" default="true" />
+               <xs:attribute name="resizable_down" type="xs:boolean" default="true" />
+               <xs:attribute name="no_scale" type="xs:boolean" default="false" />
+
+       </xs:complexType>
+
+       <xs:complexType name="image">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_table">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/index.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/index.xsd
new file mode 100644 (file)
index 0000000..b243c6c
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="index" type="index">
+               <xs:unique name="event_index">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="index_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="8">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="level,up" />
+                                                               <xs:enumeration value="level,down" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="indexitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="autohide" type="xs:boolean" default="false" />
+               <!-- <xs:attribute type="xs:boolean" name="omit" default="false" /> TODO -->
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <!-- <xs:attribute type="xs:double" name="delay_change" default="0.2"/> TODO -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="index">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_table">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/label.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/label.xsd
new file mode 100644 (file)
index 0000000..85ce0db
--- /dev/null
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="label" type="label">
+               <xs:unique name="event_label">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="label_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="slide,end" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="ellipsis" type="xs:boolean" default="false" />
+               <xs:attribute name="wrap_width" type="xs:positiveInteger" />
+               <xs:attribute name="line_wrap" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="char" />
+                                                       <xs:enumeration value="word" />
+                                                       <xs:enumeration value="mixed" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Label" />
+       </xs:complexType>
+
+       <xs:complexType name="label">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_table">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/layout.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/layout.xsd
new file mode 100644 (file)
index 0000000..ad9b501
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="layout" type="layout">
+               <xs:unique name="event_layout">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="layout_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="group" type="xs:string" default="" />
+       </xs:complexType>
+
+       <xs:complexType name="layout">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_table">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/list.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/list.xsd
new file mode 100644 (file)
index 0000000..8a65f5f
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+
+       <xs:element name="list" type="list">
+               <xs:unique name="event_list">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="list_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="17">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,right" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean" default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <!-- <xs:attribute name="focus_on_selection" type="xs:boolean" default="false" /> -->
+               <xs:attribute name="select_mode" type="list.selectmode" default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean" default="false" />
+               <!-- <xs:attribute name="multi_select_mode" default="default"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration 
+                       value="with_control" /> </xs:restriction> </xs:simpleType> </xs:attribute> -->
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+       </xs:complexType>
+
+       <xs:complexType name="list">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_table">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/map.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/map.xsd
new file mode 100644 (file)
index 0000000..371160a
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="map" type="map">
+               <xs:unique name="event_map">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="map_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="26">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="zoom,start" />
+                                                               <xs:enumeration value="zoom,stop" />
+                                                               <xs:enumeration value="zoom,change" />
+                                                               <xs:enumeration value="tile,load" />
+                                                               <xs:enumeration value="tile,loaded" />
+                                                               <xs:enumeration value="tile,loaded,fail" />
+                                                               <xs:enumeration value="route,load" />
+                                                               <xs:enumeration value="route,loaded" />
+                                                               <xs:enumeration value="route,loaded,fail" />
+                                                               <xs:enumeration value="name,load" />
+                                                               <xs:enumeration value="name,loaded" />
+                                                               <xs:enumeration value="name,loaded,fail" />
+                                                               <xs:enumeration value="overlay,clicked" />
+                                                               <xs:enumeration value="loaded" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="zoom_level" type="xs:nonNegativeInteger" default="15" />
+               <xs:attribute name="longitude" type="xs:double" />
+               <xs:attribute name="latitude" type="xs:double" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+       </xs:complexType>
+
+       <xs:complexType name="map">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_table">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/multibuttonentry.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/multibuttonentry.xsd
new file mode 100644 (file)
index 0000000..780ba4e
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="multibuttonentry" type="multibuttonentry">
+               <xs:unique name="event_multibuttonentry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="multibuttonentry_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="11">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="item,selected" />
+                                                               <xs:enumeration value="item,added" />
+                                                               <xs:enumeration value="item,deleted" />
+                                                               <xs:enumeration value="item,clicked" />
+                                                               <xs:enumeration value="item,longpressed" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,state,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="multibuttonentryitem" maxOccurs="unbounded" minOccurs="0">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="expanded" type="xs:boolean" default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/panel.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/panel.xsd
new file mode 100644 (file)
index 0000000..fb0b168
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="panel" type="panel">
+               <xs:unique name="event_panel">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="panel_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="3">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:group ref="widgetContainer" />
+                       <xs:group ref="itemContainer" />
+                       <xs:group ref="primitiveWidget" />
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="orient" default="top">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="top" />
+                                                       <xs:enumeration value="bottom" />
+                                                       <xs:enumeration value="left" />
+                                                       <xs:enumeration value="right" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="hidden" type="xs:boolean" default="false" />
+       </xs:complexType>
+
+       <xs:complexType name="panel">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_table">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/panes.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/panes.xsd
new file mode 100644 (file)
index 0000000..ce8d4bd
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="hoversel.xsd"></xs:include>
+
+       <xs:element name="panes" type="panes">
+               <xs:unique name="event_panes">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+               <xs:unique name="pack_panes">
+                       <xs:selector xpath="./*" />
+                       <xs:field xpath="@pack" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="panes_common">
+               <xs:choice minOccurs="0" maxOccurs="2">
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="unpress" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:group ref="widgetContainerOnPanes" />
+                       <xs:group ref="itemContainerOnPanes" />
+                       <xs:group ref="primitiveWidgetOnPanes" />
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="fixed" type="xs:boolean" default="false" />
+               <xs:attribute name="right_size" type="ratio" default="0.5" />
+       </xs:complexType>
+
+       <xs:complexType name="panes">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_table">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/popup.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/popup.xsd
new file mode 100644 (file)
index 0000000..2cb1db6
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="popup" type="popup">
+               <xs:unique name="event_popup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="popup">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="timeout" />
+                                                               <xs:enumeration value="block,clicked" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="title" type="xs:string" default="Title" />
+               <xs:attribute name="height" default="200">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:nonNegativeInteger">
+                                       <xs:maxInclusive value="400"></xs:maxInclusive>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="timeout" type="xs:nonNegativeInteger" default="0" />
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/progressbar.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/progressbar.xsd
new file mode 100644 (file)
index 0000000..99b3a58
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="progressbar" type="progressbar">
+               <xs:unique name="event_progressbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="progressbar_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="pulse_mode" type="xs:boolean" default="false" />
+               <xs:attribute name="pulse" type="xs:boolean" default="false" />
+               <xs:attribute name="direction" type="direction" default="horizontal" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="value" type="ratio" default="0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <!-- <xs:attribute name="unit_format" type="xs:string" /> TODO -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="pending" />
+                                       <xs:enumeration value="process_large" />
+                                       <xs:enumeration value="process_medium" />
+                                       <xs:enumeration value="process_small" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/radio.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/radio.xsd
new file mode 100644 (file)
index 0000000..3d2b343
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="radio" type="radio">
+               <xs:unique name="event_radio">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="radio_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="state_value" type="xs:integer" />
+               <xs:attribute name="value" type="xs:integer" />
+               <xs:attribute name="text" type="xs:string" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="radio">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_table">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/scroller.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/scroller.xsd
new file mode 100644 (file)
index 0000000..cbf62ae
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="scroller" type="scroller">
+               <xs:unique name="event_scroller">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="scroller_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="22">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,left" />
+                                                               <xs:enumeration value="scroll,right" />
+                                                               <xs:enumeration value="scroll,up" />
+                                                               <xs:enumeration value="scroll,down" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="vbar,drag" />
+                                                               <xs:enumeration value="vbar,press" />
+                                                               <xs:enumeration value="vbar,unpress" />
+                                                               <xs:enumeration value="hbar,drag" />
+                                                               <xs:enumeration value="hbar,press" />
+                                                               <xs:enumeration value="hbar,unpress" />
+                                                               <xs:enumeration value="scroll,page,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:group ref="widgetContainer" />
+                       <xs:group ref="itemContainer" />
+                       <xs:group ref="primitiveWidget" />
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="scroller.direction" default="no_block" />
+               <!-- <xs:attribute name="loop_h" type="xs:boolean" default="false" /> -->
+               <!-- <xs:attribute name="loop_v" type="xs:boolean" default="false" /> -->
+               <xs:attribute name="content_min_w" type="xs:boolean" default="false" />
+               <xs:attribute name="content_min_h" type="xs:boolean" default="false" />
+               <xs:attribute name="page_relative_w" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_relative_h" type="nonNegativeDouble" default="0" />
+               <!-- <xs:attribute name="wheel" type="xs:boolean" default="true" /> -->
+               <xs:attribute name="page_size_w" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="page_size_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="propagate_events" type="xs:boolean" default="true" />
+               <xs:attribute name="page_scroll_limit_w" type="xs:positiveInteger" />
+               <xs:attribute name="page_scroll_limit_h" type="xs:positiveInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+       </xs:complexType>
+
+       <xs:complexType name="scroller">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_table">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/slider.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/slider.xsd
new file mode 100644 (file)
index 0000000..8a98faa
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="slider" type="slider"> <!-- FIXME -->
+               <xs:unique name="event_slider">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="slider_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="slider,drag,start" />
+                                                               <xs:enumeration value="slider,drag,stop" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="indicator" type="xs:boolean" default="false" />
+               <xs:attribute name="min" type="xs:double" default="0.0" />
+               <xs:attribute name="max" type="xs:double" default="1.0" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="step" type="xs:double" default="0.05" />
+               <xs:attribute name="visible_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="on_focus" />
+                                       <xs:enumeration value="none" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="value" type="xs:double" default="0.0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <xs:attribute name="indicator_format" type="xs:string" />
+               <xs:attribute name="direction" type="direction" default="horizontal" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="center_point" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="slider">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_table">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/spinner.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/spinner.xsd
new file mode 100644 (file)
index 0000000..f5e564d
--- /dev/null
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="spinner" type="spinner"> <!-- FIXME -->
+               <xs:unique name="event_spinner">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="spinner_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="spinner,drag,start" />
+                                                               <xs:enumeration value="spinner,drag,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <!-- <xs:attribute name="label_format" type="xs:string" /> -->
+               <xs:attribute name="step" type="xs:double" default="1" />
+               <xs:attribute name="min" type="xs:double" default="0" />
+               <xs:attribute name="max" type="xs:double" default="100" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="vertical" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="spinner">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_table">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/table.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/table.xsd
new file mode 100644 (file)
index 0000000..a0616ea
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="hoversel.xsd" />
+
+       <xs:element name="table" type="table" />
+
+       <xs:complexType name="table_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:group ref="widgetContainerOnTable" />
+                       <xs:group ref="itemContainerOnTable" />
+                       <xs:group ref="primitiveWidgetOnTable" />
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="cols" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="rows" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+
+       <xs:complexType name="table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/toolbar.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/toolbar.xsd
new file mode 100644 (file)
index 0000000..3a66cfa
--- /dev/null
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="toolbar" type="toolbar">
+               <xs:unique name="event_toolbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="toolbar_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="9">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="toolbartoolbaritem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="disable" type="xs:boolean" default="false" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                                       <xs:attribute name="src" type="xs:string" />
+                                       <!-- <xs:attribute name="standard-icon" type="standard.icon" default="" /> TODO : remove it -->
+                                       <xs:attribute name="selected" type="xs:boolean" default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <!-- <xs:attribute type="xs:boolean" name="disable" default="false"/> -->
+               <xs:attribute name="homogeneous" type="xs:boolean" default="true" />
+               <xs:attribute name="align">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="ratio" />
+                                       </xs:simpleType>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="left" />
+                                                       <xs:enumeration value="right" />
+                                                       <xs:enumeration value="center" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" type="list.selectmode" default="default" />
+               <xs:attribute name="icon_size" type="xs:nonNegativeInteger" default="32" />
+               <xs:attribute name="direction" type="direction" default="horizontal" />
+               <xs:attribute name="shrink_mode" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="hide" />
+                                                       <xs:enumeration value="scroll" />
+                                                       <xs:enumeration value="menu" />
+                                                       <xs:enumeration value="expand" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="transverse_expand" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="toolbar">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/default/widget/view.xsd b/org.tizen.efluibuilder/res/xsd/default/widget/view.xsd
new file mode 100644 (file)
index 0000000..f68901d
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="view" type="view">
+               <xs:unique name="widget_id">
+                       <xs:selector xpath=".//*" />
+                       <xs:field xpath="@id" />
+               </xs:unique>
+               <xs:key name="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="radioGroup" refer="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@radio_group" />
+               </xs:keyref>
+               <xs:unique name="event_signal">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="view">
+               <xs:choice minOccurs="0">
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="uib,view,create" />
+                                                               <xs:enumeration value="uib,view,destroy" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                               <xs:group ref="popup" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attribute name="id" type="function_name" use="required" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="page_location_x" type="xs:integer" default="0" />
+               <xs:attribute name="page_location_y" type="xs:integer" default="0" />
+               <xs:attribute name="screen_orientation" default="full_sensor">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_sensor" />
+                                       <xs:enumeration value="only_sortrait" />
+                                       <xs:enumeration value="only_sandscape" />
+                                       <xs:enumeration value="full_sensor" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="type">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="view" />
+                                       <xs:enumeration value="popup" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/attribute/group.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/attribute/group.xsd
new file mode 100644 (file)
index 0000000..2f47181
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="type.xsd" />
+
+       <xs:attributeGroup name="common">
+               <xs:attribute name="id" use="required" type="function_name" />
+               <xs:attribute type="align_h" name="align_h" default="fill" />
+               <xs:attribute type="align_v" name="align_v" default="fill" />
+               <xs:attribute type="weight" name="weight_h" default="1" />
+               <xs:attribute type="weight" name="weight_v" default="1" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnGrid">
+               <xs:attribute type="xs:integer" name="pack_x" />
+               <xs:attribute type="xs:integer" name="pack_y" />
+               <xs:attribute type="xs:positiveInteger" name="pack_w" />
+               <xs:attribute type="xs:positiveInteger" name="pack_h" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnTable">
+               <xs:attribute type="xs:integer" name="pack_col" />
+               <xs:attribute type="xs:integer" name="pack_row" />
+               <xs:attribute type="xs:positiveInteger" name="col_span" />
+               <xs:attribute type="xs:positiveInteger" name="row_span" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnPanes">
+               <xs:attribute name="pack">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                                       <!-- <xs:enumeration value="top" /> TODO : FIXME <xs:enumeration value="bottom" /> -->
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:attributeGroup>
+
+       <xs:complexType name="item.event">
+               <xs:attribute name="signal">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="itemselected" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="function_name" type="xs:string" />  <!-- FIXME : regex for function name -->
+               <xs:attributeGroup ref="storyboard" />
+       </xs:complexType>
+
+       <xs:attributeGroup name="storyboard">
+               <xs:attribute name="connection_wrapper" type="xs:string" />
+               <xs:attribute name="event_name" type="xs:string" />
+               <xs:attribute name="target" type="xs:string" />
+       </xs:attributeGroup>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/attribute/type.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/attribute/type.xsd
new file mode 100644 (file)
index 0000000..93ea2e8
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:simpleType name="function_name">
+               <xs:restriction base="xs:string">
+                       <xs:pattern value="[a-zA-Z_]+[a-zA-Z0-9_]*" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="nonNegativeDouble">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="ratio">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+                       <xs:maxInclusive value="1"></xs:maxInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="align_h">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="align_v">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="top" />
+                                       <xs:enumeration value="bottom" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="weight">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="standard.icon">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="" />
+                       <xs:enumeration value="apps" />
+                       <xs:enumeration value="arrow_down" />
+                       <xs:enumeration value="arrow_left" />
+                       <xs:enumeration value="arrow_right" />
+                       <xs:enumeration value="arrow_up" />
+                       <xs:enumeration value="chat" />
+                       <xs:enumeration value="clock" />
+                       <xs:enumeration value="close" />
+                       <xs:enumeration value="delete" />
+                       <xs:enumeration value="edit" />
+                       <xs:enumeration value="file" />
+                       <xs:enumeration value="home" />
+                       <xs:enumeration value="media_player/forward" />
+                       <xs:enumeration value="media_player/info" />
+                       <xs:enumeration value="media_player/next" />
+                       <xs:enumeration value="media_player/pause" />
+                       <xs:enumeration value="media_player/play" />
+                       <xs:enumeration value="media_player/prev" />
+                       <xs:enumeration value="media_player/rewind" />
+                       <xs:enumeration value="media_player/stop" />
+                       <xs:enumeration value="menu/apps" />
+                       <xs:enumeration value="menu/arrow_up" />
+                       <xs:enumeration value="menu/arrow_down" />
+                       <xs:enumeration value="menu/arrow_left" />
+                       <xs:enumeration value="menu/arrow_right" />
+                       <xs:enumeration value="menu/chat" />
+                       <xs:enumeration value="menu/clock" />
+                       <xs:enumeration value="menu/close" />
+                       <xs:enumeration value="menu/delete" />
+                       <xs:enumeration value="menu/edit" />
+                       <xs:enumeration value="menu/folder" />
+                       <xs:enumeration value="menu/file" />
+                       <xs:enumeration value="menu/home" />
+                       <xs:enumeration value="menu/refresh" />
+                       <xs:enumeration value="no_photo" />
+                       <xs:enumeration value="photo/no_photo" />
+                       <xs:enumeration value="refresh" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="list.selectmode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="display_only" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.policy">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="auto" />
+                                       <xs:enumeration value="true" />
+                                       <xs:enumeration value="false" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="direction">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="vertical" />
+                       <xs:enumeration value="horizontal" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.direction">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="direction" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_block" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="list.mode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="compress" />
+                                       <xs:enumeration value="scroll" />
+                                       <xs:enumeration value="limit" />
+                                       <xs:enumeration value="expand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/element/configuration.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/element/configuration.xsd
new file mode 100644 (file)
index 0000000..0f501b0
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/type.xsd" />
+
+       <xs:element name="configuration"> <!-- FIXME -->
+               <xs:complexType>
+                       <xs:attribute name="device" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="WVGA" />
+                                               <xs:enumeration value="HD" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="id" type="function_name" use="required" />
+            <xs:attribute name="name" use="required">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:minLength value="1"/>
+                </xs:restriction>
+            </xs:simpleType>
+            </xs:attribute>
+                       <xs:attribute name="orientation" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="portrait" />
+                                               <xs:enumeration value="landscape" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="type" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="common" />
+                                               <xs:enumeration value="specific" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+               </xs:complexType>
+       </xs:element>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/element/group.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/element/group.xsd
new file mode 100644 (file)
index 0000000..acd4538
--- /dev/null
@@ -0,0 +1,556 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../widget/bg.xsd" />
+       <xs:include schemaLocation="../widget/box.xsd" />
+       <xs:include schemaLocation="../widget/button.xsd" />
+       <xs:include schemaLocation="../widget/check.xsd" />
+       <xs:include schemaLocation="../widget/colorselector.xsd" />
+       <xs:include schemaLocation="../widget/ctxpopup.xsd" />
+       <xs:include schemaLocation="../widget/datetime.xsd" />
+       <xs:include schemaLocation="../widget/entry.xsd" />
+       <xs:include schemaLocation="../widget/gengrid.xsd" />
+       <xs:include schemaLocation="../widget/genlist.xsd" />
+       <xs:include schemaLocation="../widget/grid.xsd" />
+       <xs:include schemaLocation="../widget/image.xsd" />
+       <xs:include schemaLocation="../widget/index.xsd" />
+       <xs:include schemaLocation="../widget/label.xsd" />
+       <xs:include schemaLocation="../widget/layout.xsd" />
+       <xs:include schemaLocation="../widget/list.xsd" />
+       <xs:include schemaLocation="../widget/map.xsd" />
+       <xs:include schemaLocation="../widget/multibuttonentry.xsd" />
+       <xs:include schemaLocation="../widget/panel.xsd" />
+       <xs:include schemaLocation="../widget/panes.xsd" />
+       <xs:include schemaLocation="../widget/popup.xsd" />
+       <xs:include schemaLocation="../widget/progressbar.xsd" />
+       <xs:include schemaLocation="../widget/radio.xsd" />
+       <xs:include schemaLocation="../widget/scroller.xsd" />
+       <xs:include schemaLocation="../widget/slider.xsd" />
+       <xs:include schemaLocation="../widget/spinner.xsd" />
+       <xs:include schemaLocation="../widget/table.xsd" />
+       <xs:include schemaLocation="../widget/toolbar.xsd" />
+
+       <xs:group name="rootContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="panes" />
+                       <xs:element ref="panel" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="popup">
+               <xs:choice>
+                       <xs:element ref="popup" />
+                       <xs:element ref="ctxpopup" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="panes" />
+                       <xs:element ref="panel" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainer">
+               <xs:choice>
+                       <xs:element ref="gengrid" />
+                       <xs:element ref="genlist" />
+                       <xs:element ref="index" />
+                       <xs:element ref="list" />
+                       <xs:element ref="multibuttonentry" />
+                       <xs:element ref="toolbar" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidget">
+               <xs:choice>
+                       <xs:element ref="bg" />
+                       <xs:element ref="button" />
+                       <xs:element ref="check" />
+                       <xs:element ref="colorselector" />
+                       <xs:element ref="datetime" />
+                       <xs:element ref="entry" />
+                       <xs:element ref="image" />
+                       <xs:element ref="label" />
+                       <xs:element ref="layout" />
+                       <xs:element ref="map" />
+                       <xs:element ref="progressbar" />
+                       <xs:element ref="radio" />
+                       <xs:element ref="slider" />
+                       <xs:element ref="spinner" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_grid" />
+                       <xs:element name="box" type="box_on_grid" />
+                       <xs:element name="table" type="table_on_grid" />
+                       <xs:element name="panes" type="panes_on_grid">
+                               <xs:unique name="event_panes_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_grid">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_grid">
+                               <xs:unique name="event_panel_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_grid">
+                               <xs:unique name="event_scroller_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="gengrid" type="gengrid_on_grid">
+                               <xs:unique name="event_gengrid_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_grid">
+                               <xs:unique name="event_genlist_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_grid">
+                               <xs:unique name="event_index_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_grid">
+                               <xs:unique name="event_list_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_grid">
+                               <xs:unique name="event_multibuttonentry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_grid">
+                               <xs:unique name="event_toolbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnGrid">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_grid" />
+                       <xs:element name="button" type="button_on_grid">
+                               <xs:unique name="event_button_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_grid">
+                               <xs:unique name="event_check_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_grid">
+                               <xs:unique name="event_colorselector_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_grid">
+                               <xs:unique name="event_datetime_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_grid">
+                               <xs:unique name="event_entry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_grid">
+                               <xs:unique name="event_image_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_grid">
+                               <xs:unique name="event_label_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_grid">
+                               <xs:unique name="event_layout_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_grid">
+                               <xs:unique name="event_map_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_grid">
+                               <xs:unique name="event_progressbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_grid">
+                               <xs:unique name="event_radio_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_grid">
+                               <xs:unique name="event_slider_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_grid">
+                               <xs:unique name="event_spinner_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnTable">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_table" />
+                       <xs:element name="box" type="box_on_table" />
+                       <xs:element name="table" type="table_on_table" />
+                       <xs:element name="panes" type="panes_on_table">
+                               <xs:unique name="event_panes_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_table">
+                               <xs:unique name="event_panel_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_table">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_table">
+                               <xs:unique name="event_scroller_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnTable">
+               <xs:choice>
+                       <xs:element name="gengrid" type="gengrid_on_table">
+                               <xs:unique name="event_gengrid_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_table">
+                               <xs:unique name="event_genlist_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_table">
+                               <xs:unique name="event_index_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_table">
+                               <xs:unique name="event_list_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_table">
+                               <xs:unique name="event_multibuttonentry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_table">
+                               <xs:unique name="event_toolbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnTable">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_table" />
+                       <xs:element name="button" type="button_on_table">
+                               <xs:unique name="event_button_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_table">
+                               <xs:unique name="event_check_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_table">
+                               <xs:unique name="event_colorselector_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_table">
+                               <xs:unique name="event_datetime_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_table">
+                               <xs:unique name="event_entry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_table">
+                               <xs:unique name="event_image_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_table">
+                               <xs:unique name="event_label_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_table">
+                               <xs:unique name="event_layout_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_table">
+                               <xs:unique name="event_map_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_table">
+                               <xs:unique name="event_progressbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_table">
+                               <xs:unique name="event_radio_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_table">
+                               <xs:unique name="event_slider_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_table">
+                               <xs:unique name="event_spinner_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_panes" />
+                       <xs:element name="box" type="box_on_panes" />
+                       <xs:element name="table" type="table_on_panes" />
+                       <xs:element name="panes" type="panes_on_panes">
+                               <xs:unique name="event_panes_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_panes">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_panes">
+                               <xs:unique name="event_panel_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_panes">
+                               <xs:unique name="event_scroller_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="gengrid" type="gengrid_on_panes">
+                               <xs:unique name="event_gengrid_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_panes">
+                               <xs:unique name="event_genlist_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_panes">
+                               <xs:unique name="event_index_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_panes">
+                               <xs:unique name="event_list_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_panes">
+                               <xs:unique name="event_multibuttonentry_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_panes">
+                               <xs:unique name="event_toolbar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnPanes">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_panes" />
+                       <xs:element name="button" type="button_on_panes">
+                               <xs:unique name="event_button_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_panes">
+                               <xs:unique name="event_check_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_panes">
+                               <xs:unique name="event_colorselector_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_panes">
+                               <xs:unique name="event_datetime_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_panes">
+                               <xs:unique name="event_entry_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_panes">
+                               <xs:unique name="event_image_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_panes">
+                               <xs:unique name="event_label_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_panes">
+                               <xs:unique name="event_layout_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_panes">
+                               <xs:unique name="event_map_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_panes">
+                               <xs:unique name="event_progressbar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_panes">
+                               <xs:unique name="event_radio_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_panes">
+                               <xs:unique name="event_slider_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_panes">
+                               <xs:unique name="event_spinner_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/element/variation.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/element/variation.xsd
new file mode 100644 (file)
index 0000000..b106524
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd"></xs:include>
+
+       <xs:element name="variation" type="variation" />
+
+       <xs:complexType name="variation">
+               <xs:attribute type="xs:string" name="config_ref" />
+               <xs:attribute type="xs:boolean" name="visible" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnGrid"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_table">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnTable"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnPanes"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/layout.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/layout.xsd
new file mode 100644 (file)
index 0000000..094acee
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="element/configuration.xsd" />
+
+       <!-- definition of tizen.view -->
+       <xs:include schemaLocation="widget/view.xsd" />
+
+       <xs:element name="document">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="mscreen" />
+                               <xs:element ref="views" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:key name="config">
+                       <xs:selector xpath="mscreen/configuration" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="config_ref" refer="config">
+                       <xs:selector xpath=".//variation" />
+                       <xs:field xpath="@config_ref" />
+               </xs:keyref>
+       </xs:element>
+       <xs:element name="mscreen">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="configuration" minOccurs="1" maxOccurs="6" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:unique name="qualifiers">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@device" />
+                       <xs:field xpath="@orientation" />
+               </xs:unique>
+               <xs:unique name="config-name">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@name" />
+               </xs:unique>
+       </xs:element>
+       <xs:element name="views">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="view" minOccurs="0" maxOccurs="unbounded" />
+                       </xs:sequence>
+                       <xs:attribute type="xs:string" name="startup"></xs:attribute>
+               </xs:complexType>
+               <xs:key name="view_id">
+                       <xs:selector xpath="view" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="startup" refer="view_id">
+                       <xs:selector xpath="." />
+                       <xs:field xpath="@startup" />
+               </xs:keyref>
+               <xs:keyref name="view_ref" refer="view_id">
+                       <xs:selector xpath=".//naviframe" />
+                       <xs:field xpath="@view" />
+               </xs:keyref>
+               <xs:keyref name="event_target" refer="view_id">
+                       <xs:selector xpath=".//event" />
+                       <xs:field xpath="@target" />
+               </xs:keyref>
+       </xs:element>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/bg.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/bg.xsd
new file mode 100644 (file)
index 0000000..3f87e10
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="bg" type="background" />
+
+       <xs:complexType name="background_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="color" default="#ffffff">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="option" default="scale">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="center" />
+                                                       <xs:enumeration value="scale" />
+                                                       <xs:enumeration value="stretch" />
+                                                       <xs:enumeration value="tile" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="background">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_table">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/box.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/box.xsd
new file mode 100644 (file)
index 0000000..ccfe5e3
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="box" type="box" />
+
+       <xs:complexType name="box_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" default="0" />
+       </xs:complexType>
+
+       <xs:complexType name="box">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_table">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/button.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/button.xsd
new file mode 100644 (file)
index 0000000..ec53d40
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="button" type="button">
+               <xs:unique name="event_button">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="button_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Button" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="anchor" />
+                                                       <xs:enumeration value="bottom" />
+                                                       <xs:enumeration value="circle" />
+                                                       <xs:enumeration value="dropdown" />
+                                                       <xs:enumeration value="hoversel_horizontal/default" />
+                                                       <xs:enumeration value="hoversel_horizontal_entry/default" />
+                                                       <xs:enumeration value="hoversel_vertical/default" />
+                                                       <xs:enumeration value="hoversel_vertical_entry/default" />
+                                                       <xs:enumeration value="icon_reorder" />
+                                                       <xs:enumeration value="naviframe/drawers" />
+                                                       <xs:enumeration value="naviframe/title_cancel" />
+                                                       <xs:enumeration value="naviframe/title_done" />
+                                                       <xs:enumeration value="option" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="button_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="repeated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="unpressed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="button">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_table">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/check.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/check.xsd
new file mode 100644 (file)
index 0000000..d3a0e38
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="check" type="check">
+               <xs:unique name="event_check">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="check_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="state" type="xs:boolean" default="false" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">       <!-- FIXME -->
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="favorite" />
+                                       <xs:enumeration value="on&amp;off" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="check_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="check">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_table">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/colorselector.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/colorselector.xsd
new file mode 100644 (file)
index 0000000..21efc7f
--- /dev/null
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="colorselector" type="colorselector">
+               <xs:unique name="event_colorselector">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="colorselector_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="mode" default="both">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="palette" />
+                                       <xs:enumeration value="components" />
+                                       <xs:enumeration value="both" />
+                                       <xs:enumeration value="picker" />
+                                       <xs:enumeration value="plane" />
+                                       <xs:enumeration value="palette_plane" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="color">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}|#{1}[0-9a-fA-F]{8}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="colorselector_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="3">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="color,item,selected" />
+                                                               <xs:enumeration value="color,item,longpressed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="colorselector">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_table">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/ctxpopup.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/ctxpopup.xsd
new file mode 100644 (file)
index 0000000..c4ff442
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="ctxpopup" type="ctxpopup">
+               <xs:unique name="event_ctxpopup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="ctxpopup">
+               <xs:choice minOccurs="1">
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="dismissed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="ctxpopupitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="CtxPopupItem" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">       <!-- TODO : default style? -->
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="dropdown/list" />
+                                       <xs:enumeration value="dropdown/label" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/datetime.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/datetime.xsd
new file mode 100644 (file)
index 0000000..fb5cd01
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="datetime" type="datetime">
+               <xs:unique name="event_datetime">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="datetime_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="date_layout">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="date_layout" />
+                                       <xs:enumeration value="time_layout" />
+                                       <xs:enumeration value="time_layout_24hr" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="datetime_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="datetime">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_table">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/entry.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/entry.xsd
new file mode 100644 (file)
index 0000000..1e87ea6
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="entry" type="entry">
+               <xs:unique name="event_entry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="entry_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="scroll" type="xs:boolean" default="false" />
+               <xs:attribute name="single_line" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="password" type="xs:boolean" default="false" />
+               <xs:attribute name="line_wrap">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="char" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="mixed" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="context_menu" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="autocapital_type" default="none">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="sentence" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="file_text_format" default="plain_utf8">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="plain_utf8" />
+                                                       <xs:enumeration value="markup_utf8" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+
+               <xs:attribute name="input_panel_return_key" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Entry" />
+               <xs:attribute name="src" type="xs:string" />
+       </xs:complexType>
+       <xs:group name="entry_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="25">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="changed,user" />
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="aborted" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,triple" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="selection,paste" />
+                                                               <xs:enumeration value="selection,copy" />
+                                                               <xs:enumeration value="selection,cut" />
+                                                               <xs:enumeration value="selection,start" />
+                                                               <xs:enumeration value="selection,changed" />
+                                                               <xs:enumeration value="selection,cleared" />
+                                                               <xs:enumeration value="cursor,changed" />
+                                                               <xs:enumeration value="anchor,clicked" />
+                                                               <xs:enumeration value="anchor,in" />
+                                                               <xs:enumeration value="anchor,out" />
+                                                               <xs:enumeration value="anchor,up" />
+                                                               <xs:enumeration value="anchor,down" />
+                                                               <xs:enumeration value="preedit,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="entry">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/gengrid.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/gengrid.xsd
new file mode 100644 (file)
index 0000000..db4bb02
--- /dev/null
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+
+       <xs:element name="gengrid" type="gengrid">      <!-- TODO : FIXME -->
+               <xs:unique name="event_gengrid">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="gengrid_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="item_size_h" type="xs:integer"
+                       default="200" />
+               <xs:attribute name="item_size_w" type="xs:integer"
+                       default="200" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+       </xs:complexType>
+       <xs:group name="gengrid_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="27">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="gengriditem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="style" default="default">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="default" />
+                                                               <xs:enumeration value="album-preview" />
+                                                               <xs:enumeration value="block" />
+                                                               <xs:enumeration value="group_index" />
+                                                               <xs:enumeration value="default_grid" />
+                                                               <xs:enumeration value="default_gridtext2" />
+                                                               <xs:enumeration value="default_gridtext" />
+                                                               <xs:enumeration value="default_style" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="src" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="disabled" type="xs:boolean"
+                                               default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="gengrid">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/genlist.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/genlist.xsd
new file mode 100644 (file)
index 0000000..e82cc64
--- /dev/null
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="genlist" type="genlist">
+               <xs:unique name="event_genlist">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="genlist_common">
+
+               <xs:attributeGroup ref="common" />
+               <!-- <xs:attribute name="focus_on_selection" type="xs:boolean" default="false" 
+                       /> -->
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="homogeneous" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="item-style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="default_style" />
+                                       <xs:enumeration value="double_label" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="genlist_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="41">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,request" />
+                                                               <xs:enumeration value="contract,request" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="multi,swipe,left" />
+                                                               <xs:enumeration value="multi,swipe,right" />
+                                                               <xs:enumeration value="multi,swipe,up" />
+                                                               <xs:enumeration value="multi,swipe,down" />
+                                                               <xs:enumeration value="multi,pinch,out" />
+                                                               <xs:enumeration value="multi,pinch,in" />
+                                                               <xs:enumeration value="swipe" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="moved,after" />
+                                                               <xs:enumeration value="moved,before" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="tree,effect,finished" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="genlistitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="style" default="default">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="default" />
+                                                               <xs:enumeration value="default_style" />
+                                                               <xs:enumeration value="double_label" />
+                                                               <xs:enumeration value="end_icon" />
+                                                               <xs:enumeration value="full" />
+                                                               <xs:enumeration value="group_index" />
+                                                               <xs:enumeration value="one_icon" />
+                                                               <xs:enumeration value="message" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="sub_text" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="image_path" type="xs:string" />
+                                       <xs:attribute name="standard_icon" type="standard.icon"
+                                               default="" />
+                                       <xs:attribute name="end_image_path" type="xs:string" />
+                                       <xs:attribute name="end_standard_icon" type="standard.icon"
+                                               default="" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="genlist">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_table">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/grid.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/grid.xsd
new file mode 100644 (file)
index 0000000..e949fef
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="grid" type="grid" />
+
+       <xs:complexType name="grid_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="vsize_w" type="xs:positiveInteger" default="1000" />
+               <xs:attribute name="vsize_h" type="xs:positiveInteger" default="1000" />
+       </xs:complexType>
+
+       <xs:complexType name="grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/image.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/image.xsd
new file mode 100644 (file)
index 0000000..d2f7bbf
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="image" type="image">
+               <xs:unique name="event_image">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="image_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="aspect_fixed" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="fill_outside" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="resizable_up" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="resizable_down" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="no_scale" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="image_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="drop" />
+                                                               <xs:enumeration value="clicked" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="image">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_table">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/index.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/index.xsd
new file mode 100644 (file)
index 0000000..f6283d0
--- /dev/null
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="index" type="index">
+               <xs:unique name="event_index">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="index_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="autohide" type="xs:boolean" default="false" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="index_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="level,up" />
+                                                               <xs:enumeration value="level,down" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="indexitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="index">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_table">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/label.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/label.xsd
new file mode 100644 (file)
index 0000000..349a47b
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="label" type="label">
+               <xs:unique name="event_label">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="label_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="ellipsis" type="xs:boolean" default="false" />
+               <xs:attribute name="wrap_width" type="xs:nonNegativeInteger"
+                       default="0" />
+               <xs:attribute name="line_wrap" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="char" />
+                                                       <xs:enumeration value="word" />
+                                                       <xs:enumeration value="mixed" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Label" />
+       </xs:complexType>
+       <xs:group name="label_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="slide,end" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="label">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_table">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/layout.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/layout.xsd
new file mode 100644 (file)
index 0000000..549a40c
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="layout" type="layout">
+               <xs:unique name="event_layout">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="layout_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="group" type="xs:string" default="" />
+       </xs:complexType>
+       <xs:group name="layout_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="layout">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_table">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/list.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/list.xsd
new file mode 100644 (file)
index 0000000..9b3f301
--- /dev/null
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+
+       <xs:element name="list" type="list">
+               <xs:unique name="event_list">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="list_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+       </xs:complexType>
+       <xs:group name="list_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="12">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="list">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_table">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/map.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/map.xsd
new file mode 100644 (file)
index 0000000..5c5514c
--- /dev/null
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="map" type="map">
+               <xs:unique name="event_map">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="map_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="zoom_level" type="xs:nonNegativeInteger"
+                       default="15" />
+               <xs:attribute name="longitude" type="xs:double" />
+               <xs:attribute name="latitude" type="xs:double" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="map_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="24">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="zoom,start" />
+                                                               <xs:enumeration value="zoom,stop" />
+                                                               <xs:enumeration value="zoom,change" />
+                                                               <xs:enumeration value="tile,load" />
+                                                               <xs:enumeration value="tile,loaded" />
+                                                               <xs:enumeration value="tile,loaded,fail" />
+                                                               <xs:enumeration value="route,load" />
+                                                               <xs:enumeration value="route,loaded" />
+                                                               <xs:enumeration value="route,loaded,fail" />
+                                                               <xs:enumeration value="name,load" />
+                                                               <xs:enumeration value="name,loaded" />
+                                                               <xs:enumeration value="name,loaded,fail" />
+                                                               <xs:enumeration value="overlay,clicked" />
+                                                               <xs:enumeration value="loaded" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="map">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_table">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/multibuttonentry.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/multibuttonentry.xsd
new file mode 100644 (file)
index 0000000..8249ea3
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="multibuttonentry" type="multibuttonentry">
+               <xs:unique name="event_multibuttonentry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="multibuttonentry_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="expanded" type="xs:boolean" default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="multibuttonentry_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="11">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="item,selected" />
+                                                               <xs:enumeration value="item,added" />
+                                                               <xs:enumeration value="item,deleted" />
+                                                               <xs:enumeration value="item,clicked" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,state,changed" />
+                                                               <xs:enumeration value="longpressed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="multibuttonentryitem" maxOccurs="unbounded"
+                               minOccurs="0">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="multibuttonentry">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="multibuttonentry_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="multibuttonentry_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="multibuttonentry_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="multibuttonentry_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/panel.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/panel.xsd
new file mode 100644 (file)
index 0000000..94ba99f
--- /dev/null
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="panel" type="panel">
+               <xs:unique name="event_panel">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="panel_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="scroll" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="orient" default="top">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="top" />
+                                                       <xs:enumeration value="bottom" />
+                                                       <xs:enumeration value="left" />
+                                                       <xs:enumeration value="right" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="hidden" type="xs:boolean" default="false" />
+       </xs:complexType>
+
+       <xs:complexType name="panel">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_table">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/panes.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/panes.xsd
new file mode 100644 (file)
index 0000000..60b826a
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="panes" type="panes">
+               <xs:unique name="event_panes">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+               <xs:unique name="pack_panes">
+                       <xs:selector xpath="./*" />
+                       <xs:field xpath="@pack" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="panes_common">
+               <xs:choice minOccurs="0" maxOccurs="2">
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="unpressed" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="fixed" type="xs:boolean" default="false" />
+               <xs:attribute name="right_size" type="ratio" default="0.5" />
+       </xs:complexType>
+
+       <xs:complexType name="panes">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_table">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/popup.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/popup.xsd
new file mode 100644 (file)
index 0000000..e7cfc04
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="popup" type="popup">
+               <xs:unique name="event_popup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="popup">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="timeout" />
+                                                               <xs:enumeration value="block,clicked" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="show,finished" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="title" type="xs:string" default="Title" />
+               <xs:attribute name="height" default="200">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:nonNegativeInteger">
+                                       <xs:maxInclusive value="400"></xs:maxInclusive>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="timeout" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/progressbar.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/progressbar.xsd
new file mode 100644 (file)
index 0000000..247df42
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="progressbar" type="progressbar">
+               <xs:unique name="event_progressbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="progressbar_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="pulse_mode" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="pulse" type="xs:boolean" default="false" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="value" type="ratio" default="0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="progressbar_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="progressbar">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/radio.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/radio.xsd
new file mode 100644 (file)
index 0000000..dfadc0a
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="radio" type="radio">
+               <xs:unique name="event_radio">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="radio_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="state_value" type="xs:integer" />
+               <xs:attribute name="value" type="xs:integer" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="radio_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="radio">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_grid">
+               <xs:complexContent>
+
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_table">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/scroller.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/scroller.xsd
new file mode 100644 (file)
index 0000000..2133cd8
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="scroller" type="scroller">
+               <xs:unique name="event_scroller">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="scroller_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="9">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="scroller.direction" default="no_block" />
+               <xs:attribute name="content_min_w" type="xs:boolean" default="false" />
+               <xs:attribute name="content_min_h" type="xs:boolean" default="false" />
+               <xs:attribute name="page_relative_w" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_relative_h" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_size_w" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="page_size_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="propagate_events" type="xs:boolean" default="true" />
+               <xs:attribute name="page_scroll_limit_w" type="xs:positiveInteger" />
+               <xs:attribute name="page_scroll_limit_h" type="xs:positiveInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+       </xs:complexType>
+
+       <xs:complexType name="scroller">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_table">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/slider.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/slider.xsd
new file mode 100644 (file)
index 0000000..d4f6d56
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="slider" type="slider"> <!-- FIXME -->
+               <xs:unique name="event_slider">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="slider_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="indicator" type="xs:boolean" default="false" />
+               <xs:attribute name="min" type="xs:double" default="0.0" />
+               <xs:attribute name="max" type="xs:double" default="1.0" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="step" type="xs:double" default="0.05" />
+               <xs:attribute name="visible_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="on_focus" />
+                                       <xs:enumeration value="none" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="value" type="xs:double" default="0.0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <xs:attribute name="indicator_format" type="xs:string" />
+               <xs:attribute name="direction" type="direction" default="horizontal" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="center_point" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="slider_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="slider,drag,start" />
+                                                               <xs:enumeration value="slider,drag,stop" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="slider">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_table">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/spinner.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/spinner.xsd
new file mode 100644 (file)
index 0000000..5a7e76b
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="spinner" type="spinner"> <!-- FIXME -->
+               <xs:unique name="event_spinner">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="spinner_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="step" type="xs:double" default="1" />
+               <xs:attribute name="min" type="xs:double" default="0" />
+               <xs:attribute name="max" type="xs:double" default="100" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="horizontal">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="horizontal" />
+                                       <xs:enumeration value="vertical" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="spinner_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="3">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="spinner">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_table">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/table.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/table.xsd
new file mode 100644 (file)
index 0000000..cc92b41
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="table" type="table" />
+
+       <xs:complexType name="table_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="cols" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="rows" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+
+       <xs:complexType name="table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/toolbar.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/toolbar.xsd
new file mode 100644 (file)
index 0000000..bca1894
--- /dev/null
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="toolbar" type="toolbar">
+               <xs:unique name="event_toolbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="toolbar_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="homogeneous" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="align">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="ratio" />
+                                       </xs:simpleType>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="left" />
+                                                       <xs:enumeration value="right" />
+                                                       <xs:enumeration value="center" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="icon_size" type="xs:nonNegativeInteger"
+                       default="32" />
+               <xs:attribute name="direction" type="direction" default="horizontal" />
+               <xs:attribute name="shrink_mode" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="hide" />
+                                                       <xs:enumeration value="scroll" />
+                                                       <xs:enumeration value="menu" />
+                                                       <xs:enumeration value="expand" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="transverse_expand" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="navigationbar" />
+                                                       <!-- <xs:enumeration value="tabbar_with_title" /> -->
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="toolbar_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="3">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="toolbaritem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="disable" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                                       <xs:attribute name="src" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="toolbar">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/view.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.3/widget/view.xsd
new file mode 100644 (file)
index 0000000..9cc07e5
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="view" type="view">
+               <xs:unique name="widget_id">
+                       <xs:selector xpath=".//*" />
+                       <xs:field xpath="@id" />
+               </xs:unique>
+               <xs:key name="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="radioGroup" refer="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@radio_group" />
+               </xs:keyref>
+               <xs:unique name="event_signal">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="view">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="uib,view,create" />
+                                                               <xs:enumeration value="uib,view,destroy" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                               <xs:group ref="popup" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attribute name="id" type="function_name" use="required" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="page_location_x" type="xs:integer" default="0" />
+               <xs:attribute name="page_location_y" type="xs:integer" default="0" />
+               <xs:attribute name="screen_orientation" default="full_sensor">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_sensor" />
+                                       <xs:enumeration value="only_portrait" />
+                                       <xs:enumeration value="only_landscape" />
+                                       <xs:enumeration value="full_sensor" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="type">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="view" />
+                                       <xs:enumeration value="popup" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/attribute/group.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/attribute/group.xsd
new file mode 100644 (file)
index 0000000..b1621fe
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="type.xsd" />
+
+       <xs:attributeGroup name="common">
+               <xs:attribute name="id" use="required" type="function_name" />
+               <xs:attribute type="align_h" name="align_h" default="fill" />
+               <xs:attribute type="align_v" name="align_v" default="fill" />
+               <xs:attribute type="weight" name="weight_h" default="1" />
+               <xs:attribute type="weight" name="weight_v" default="1" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnGrid">
+               <xs:attribute type="xs:integer" name="pack_x" />
+               <xs:attribute type="xs:integer" name="pack_y" />
+               <xs:attribute type="xs:positiveInteger" name="pack_w" />
+               <xs:attribute type="xs:positiveInteger" name="pack_h" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnTable">
+               <xs:attribute type="xs:integer" name="pack_col" />
+               <xs:attribute type="xs:integer" name="pack_row" />
+               <xs:attribute type="xs:positiveInteger" name="col_span" />
+               <xs:attribute type="xs:positiveInteger" name="row_span" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnPanes">
+               <xs:attribute name="pack">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:attributeGroup>
+
+       <xs:complexType name="item.event">
+               <xs:attribute name="signal">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="itemselected" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="function_name" type="xs:string" />  <!-- FIXME : regex for function name -->
+               <xs:attributeGroup ref="storyboard" />
+       </xs:complexType>
+
+       <xs:attributeGroup name="storyboard">
+               <xs:attribute name="connection_wrapper" type="xs:string" />
+               <xs:attribute name="event_name" type="xs:string" />
+               <xs:attribute name="target" type="xs:string" />
+       </xs:attributeGroup>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/attribute/type.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/attribute/type.xsd
new file mode 100644 (file)
index 0000000..93ea2e8
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:simpleType name="function_name">
+               <xs:restriction base="xs:string">
+                       <xs:pattern value="[a-zA-Z_]+[a-zA-Z0-9_]*" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="nonNegativeDouble">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="ratio">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+                       <xs:maxInclusive value="1"></xs:maxInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="align_h">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="align_v">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="top" />
+                                       <xs:enumeration value="bottom" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="weight">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="standard.icon">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="" />
+                       <xs:enumeration value="apps" />
+                       <xs:enumeration value="arrow_down" />
+                       <xs:enumeration value="arrow_left" />
+                       <xs:enumeration value="arrow_right" />
+                       <xs:enumeration value="arrow_up" />
+                       <xs:enumeration value="chat" />
+                       <xs:enumeration value="clock" />
+                       <xs:enumeration value="close" />
+                       <xs:enumeration value="delete" />
+                       <xs:enumeration value="edit" />
+                       <xs:enumeration value="file" />
+                       <xs:enumeration value="home" />
+                       <xs:enumeration value="media_player/forward" />
+                       <xs:enumeration value="media_player/info" />
+                       <xs:enumeration value="media_player/next" />
+                       <xs:enumeration value="media_player/pause" />
+                       <xs:enumeration value="media_player/play" />
+                       <xs:enumeration value="media_player/prev" />
+                       <xs:enumeration value="media_player/rewind" />
+                       <xs:enumeration value="media_player/stop" />
+                       <xs:enumeration value="menu/apps" />
+                       <xs:enumeration value="menu/arrow_up" />
+                       <xs:enumeration value="menu/arrow_down" />
+                       <xs:enumeration value="menu/arrow_left" />
+                       <xs:enumeration value="menu/arrow_right" />
+                       <xs:enumeration value="menu/chat" />
+                       <xs:enumeration value="menu/clock" />
+                       <xs:enumeration value="menu/close" />
+                       <xs:enumeration value="menu/delete" />
+                       <xs:enumeration value="menu/edit" />
+                       <xs:enumeration value="menu/folder" />
+                       <xs:enumeration value="menu/file" />
+                       <xs:enumeration value="menu/home" />
+                       <xs:enumeration value="menu/refresh" />
+                       <xs:enumeration value="no_photo" />
+                       <xs:enumeration value="photo/no_photo" />
+                       <xs:enumeration value="refresh" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="list.selectmode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="display_only" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.policy">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="auto" />
+                                       <xs:enumeration value="true" />
+                                       <xs:enumeration value="false" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="direction">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="vertical" />
+                       <xs:enumeration value="horizontal" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.direction">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="direction" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_block" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="list.mode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="compress" />
+                                       <xs:enumeration value="scroll" />
+                                       <xs:enumeration value="limit" />
+                                       <xs:enumeration value="expand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/element/configuration.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/element/configuration.xsd
new file mode 100644 (file)
index 0000000..ea7f4a2
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/type.xsd" />
+
+       <xs:element name="configuration"> <!-- FIXME -->
+               <xs:complexType>
+                       <xs:attribute name="device" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="WVGA" />
+                                               <xs:enumeration value="HD" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="id" type="function_name" use="required" />
+                       <xs:attribute name="name" use="required">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:minLength value="1"/>
+                </xs:restriction>
+            </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="orientation" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="portrait" />
+                                               <xs:enumeration value="landscape" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="type" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="common" />
+                                               <xs:enumeration value="specific" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+               </xs:complexType>
+       </xs:element>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/element/group.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/element/group.xsd
new file mode 100644 (file)
index 0000000..4896a52
--- /dev/null
@@ -0,0 +1,616 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../widget/bg.xsd" />
+       <xs:include schemaLocation="../widget/box.xsd" />
+       <xs:include schemaLocation="../widget/button.xsd" />
+       <xs:include schemaLocation="../widget/calendar.xsd" />
+       <xs:include schemaLocation="../widget/check.xsd" />
+       <xs:include schemaLocation="../widget/colorselector.xsd" />
+       <xs:include schemaLocation="../widget/ctxpopup.xsd" />
+       <xs:include schemaLocation="../widget/datetime.xsd" />
+       <xs:include schemaLocation="../widget/entry.xsd" />
+       <xs:include schemaLocation="../widget/flipselector.xsd" />
+       <xs:include schemaLocation="../widget/gengrid.xsd" />
+       <xs:include schemaLocation="../widget/genlist.xsd" />
+       <xs:include schemaLocation="../widget/grid.xsd" />
+       <xs:include schemaLocation="../widget/hoversel.xsd" />
+       <xs:include schemaLocation="../widget/image.xsd" />
+       <xs:include schemaLocation="../widget/index.xsd" />
+       <xs:include schemaLocation="../widget/label.xsd" />
+       <xs:include schemaLocation="../widget/layout.xsd" />
+       <xs:include schemaLocation="../widget/list.xsd" />
+       <xs:include schemaLocation="../widget/map.xsd" />
+       <xs:include schemaLocation="../widget/multibuttonentry.xsd" />
+       <xs:include schemaLocation="../widget/panel.xsd" />
+       <xs:include schemaLocation="../widget/panes.xsd" />
+       <xs:include schemaLocation="../widget/popup.xsd" />
+       <xs:include schemaLocation="../widget/progressbar.xsd" />
+       <xs:include schemaLocation="../widget/radio.xsd" />
+       <xs:include schemaLocation="../widget/scroller.xsd" />
+       <xs:include schemaLocation="../widget/slider.xsd" />
+       <xs:include schemaLocation="../widget/spinner.xsd" />
+       <xs:include schemaLocation="../widget/table.xsd" />
+       <xs:include schemaLocation="../widget/toolbar.xsd" />
+
+       <xs:group name="rootContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="panes" />
+                       <xs:element ref="panel" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="popup">
+               <xs:choice>
+                       <xs:element ref="popup" />
+                       <xs:element ref="ctxpopup" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="panes" />
+                       <xs:element ref="panel" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainer">
+               <xs:choice>
+                       <xs:element ref="flipselector" />
+                       <xs:element ref="gengrid" />
+                       <xs:element ref="genlist" />
+                       <xs:element ref="index" />
+                       <xs:element ref="list" />
+                       <xs:element ref="multibuttonentry" />
+                       <xs:element ref="toolbar" />
+                       <xs:element ref="hoversel" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidget">
+               <xs:choice>
+                       <xs:element ref="bg" />
+                       <xs:element ref="button" />
+                       <xs:element ref="calendar" />
+                       <xs:element ref="check" />
+                       <xs:element ref="colorselector" />
+                       <xs:element ref="datetime" />
+                       <xs:element ref="entry" />
+                       <xs:element ref="image" />
+                       <xs:element ref="label" />
+                       <xs:element ref="layout" />
+                       <xs:element ref="map" />
+                       <xs:element ref="progressbar" />
+                       <xs:element ref="radio" />
+                       <xs:element ref="slider" />
+                       <xs:element ref="spinner" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_grid" />
+                       <xs:element name="box" type="box_on_grid" />
+                       <xs:element name="table" type="table_on_grid" />
+                       <xs:element name="panes" type="panes_on_grid">
+                               <xs:unique name="event_panes_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_grid">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_grid">
+                               <xs:unique name="event_panel_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_grid">
+                               <xs:unique name="event_scroller_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="flipselector" type="flipselector_on_grid">
+                               <xs:unique name="event_flipselector_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="gengrid" type="gengrid_on_grid">
+                               <xs:unique name="event_gengrid_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_grid">
+                               <xs:unique name="event_genlist_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_grid">
+                               <xs:unique name="event_index_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_grid">
+                               <xs:unique name="event_list_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_grid">
+                               <xs:unique name="event_multibuttonentry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_grid">
+                               <xs:unique name="event_toolbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="hoversel" type="hoversel_on_grid">
+                               <xs:unique name="event_hoversel_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnGrid">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_grid" />
+                       <xs:element name="button" type="button_on_grid">
+                               <xs:unique name="event_button_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="calendar" type="calendar_on_grid">
+                               <xs:unique name="event_calendar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_grid">
+                               <xs:unique name="event_check_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_grid">
+                               <xs:unique name="event_colorselector_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_grid">
+                               <xs:unique name="event_datetime_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_grid">
+                               <xs:unique name="event_entry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_grid">
+                               <xs:unique name="event_image_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_grid">
+                               <xs:unique name="event_label_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_grid">
+                               <xs:unique name="event_layout_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_grid">
+                               <xs:unique name="event_map_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_grid">
+                               <xs:unique name="event_progressbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_grid">
+                               <xs:unique name="event_radio_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_grid">
+                               <xs:unique name="event_slider_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_grid">
+                               <xs:unique name="event_spinner_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnTable">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_table" />
+                       <xs:element name="box" type="box_on_table" />
+                       <xs:element name="table" type="table_on_table" />
+                       <xs:element name="panes" type="panes_on_table">
+                               <xs:unique name="event_panes_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_table">
+                               <xs:unique name="event_panel_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_table">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_table">
+                               <xs:unique name="event_scroller_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnTable">
+               <xs:choice>
+                       <xs:element name="flipselector" type="flipselector_on_table">
+                               <xs:unique name="event_flipselector_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="gengrid" type="gengrid_on_table">
+                               <xs:unique name="event_gengrid_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_table">
+                               <xs:unique name="event_genlist_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_table">
+                               <xs:unique name="event_index_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_table">
+                               <xs:unique name="event_list_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_table">
+                               <xs:unique name="event_multibuttonentry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_table">
+                               <xs:unique name="event_toolbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="hoversel" type="hoversel_on_table">
+                               <xs:unique name="event_hoversel_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnTable">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_table" />
+                       <xs:element name="button" type="button_on_table">
+                               <xs:unique name="event_button_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="calendar" type="calendar_on_table">
+                               <xs:unique name="event_calendar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_table">
+                               <xs:unique name="event_check_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_table">
+                               <xs:unique name="event_colorselector_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_table">
+                               <xs:unique name="event_datetime_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_table">
+                               <xs:unique name="event_entry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_table">
+                               <xs:unique name="event_image_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_table">
+                               <xs:unique name="event_label_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_table">
+                               <xs:unique name="event_layout_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_table">
+                               <xs:unique name="event_map_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_table">
+                               <xs:unique name="event_progressbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_table">
+                               <xs:unique name="event_radio_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_table">
+                               <xs:unique name="event_slider_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_table">
+                               <xs:unique name="event_spinner_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_panes" />
+                       <xs:element name="box" type="box_on_panes" />
+                       <xs:element name="table" type="table_on_panes" />
+                       <xs:element name="panes" type="panes_on_panes">
+                               <xs:unique name="event_panes_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_panes">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_panes">
+                               <xs:unique name="event_panel_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_panes">
+                               <xs:unique name="event_scroller_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="flipselector" type="flipselector_on_panes">
+                               <xs:unique name="event_flipselector_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="gengrid" type="gengrid_on_panes">
+                               <xs:unique name="event_gengrid_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_panes">
+                               <xs:unique name="event_genlist_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_panes">
+                               <xs:unique name="event_index_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_panes">
+                               <xs:unique name="event_list_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_panes">
+                               <xs:unique name="event_multibuttonentry_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_panes">
+                               <xs:unique name="event_toolbar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="hoversel" type="hoversel_on_panes">
+                               <xs:unique name="event_hoversel_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnPanes">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_panes" />
+                       <xs:element name="button" type="button_on_panes">
+                               <xs:unique name="event_button_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="calendar" type="calendar_on_panes">
+                               <xs:unique name="event_calendar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_panes">
+                               <xs:unique name="event_check_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_panes">
+                               <xs:unique name="event_colorselector_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_panes">
+                               <xs:unique name="event_datetime_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_panes">
+                               <xs:unique name="event_entry_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_panes">
+                               <xs:unique name="event_image_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_panes">
+                               <xs:unique name="event_label_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_panes">
+                               <xs:unique name="event_layout_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_panes">
+                               <xs:unique name="event_map_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_panes">
+                               <xs:unique name="event_progressbar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_panes">
+                               <xs:unique name="event_radio_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_panes">
+                               <xs:unique name="event_slider_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_panes">
+                               <xs:unique name="event_spinner_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/element/variation.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/element/variation.xsd
new file mode 100644 (file)
index 0000000..b106524
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd"></xs:include>
+
+       <xs:element name="variation" type="variation" />
+
+       <xs:complexType name="variation">
+               <xs:attribute type="xs:string" name="config_ref" />
+               <xs:attribute type="xs:boolean" name="visible" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnGrid"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_table">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnTable"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnPanes"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/layout.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/layout.xsd
new file mode 100644 (file)
index 0000000..f7f6c39
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="element/configuration.xsd" />
+
+       <!-- definition of tizen.view -->
+       <xs:include schemaLocation="widget/view.xsd" />
+
+       <xs:element name="document">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="mscreen" />
+                               <xs:element ref="views" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:key name="config">
+                       <xs:selector xpath="mscreen/configuration" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="config_ref" refer="config">
+                       <xs:selector xpath=".//variation" />
+                       <xs:field xpath="@config_ref" />
+               </xs:keyref>
+       </xs:element>
+       <xs:element name="mscreen">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="configuration" minOccurs="1" maxOccurs="6" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:unique name="qualifiers">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@device" />
+                       <xs:field xpath="@orientation" />
+               </xs:unique>
+               <xs:unique name="config_name">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@name" />
+               </xs:unique>
+       </xs:element>
+       <xs:element name="views">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="view" minOccurs="0" maxOccurs="unbounded" />
+                       </xs:sequence>
+                       <xs:attribute type="xs:string" name="startup"></xs:attribute>
+               </xs:complexType>
+               <xs:key name="view_id">
+                       <xs:selector xpath="view" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="startup" refer="view_id">
+                       <xs:selector xpath="." />
+                       <xs:field xpath="@startup" />
+               </xs:keyref>
+               <xs:keyref name="view_ref" refer="view_id">
+                       <xs:selector xpath=".//naviframe" />
+                       <xs:field xpath="@view" />
+               </xs:keyref>
+               <xs:keyref name="event_target" refer="view_id">
+                       <xs:selector xpath=".//event" />
+                       <xs:field xpath="@target" />
+               </xs:keyref>
+       </xs:element>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/bg.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/bg.xsd
new file mode 100644 (file)
index 0000000..3f87e10
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="bg" type="background" />
+
+       <xs:complexType name="background_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="color" default="#ffffff">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="option" default="scale">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="center" />
+                                                       <xs:enumeration value="scale" />
+                                                       <xs:enumeration value="stretch" />
+                                                       <xs:enumeration value="tile" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="background">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_table">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/box.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/box.xsd
new file mode 100644 (file)
index 0000000..ccfe5e3
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="box" type="box" />
+
+       <xs:complexType name="box_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" default="0" />
+       </xs:complexType>
+
+       <xs:complexType name="box">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_table">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/button.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/button.xsd
new file mode 100644 (file)
index 0000000..92d40b9
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="button" type="button">
+               <xs:unique name="event_button">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="button_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Button" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="circle" />
+                                                       <xs:enumeration value="editfield_clear" />
+                                                       <xs:enumeration value="bottom" />
+                                                       <xs:enumeration value="icon_reorder" />
+                                                       <xs:enumeration value="icon_expand_add" />
+                                                       <xs:enumeration value="icon_expand_delete" />
+                                                       <xs:enumeration value="naviframe/title_left" />
+                                                       <xs:enumeration value="naviframe/title_right" />
+                                                       <xs:enumeration value="naviframe/back_btn" />
+                                                       <xs:enumeration value="dropdown" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:group name="button_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="repeated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="unpressed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:complexType name="button">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_table">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/calendar.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/calendar.xsd
new file mode 100644 (file)
index 0000000..cd4b60c
--- /dev/null
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="calendar" type="calendar">
+               <xs:unique name="event_calendar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="calendar_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="min_year" default="1902">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:positiveInteger">
+                                       <xs:minInclusive value="1902" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="max_year" default="-1">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:positiveInteger">
+                                                       <xs:minInclusive value="1902" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:integer">
+                                                       <xs:enumeration value="-1"></xs:enumeration>
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="ondemand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="interval" type="nonNegativeDouble"
+                       default="0.85" />
+       </xs:complexType>
+
+       <xs:group name="calendar_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="5">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="display,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:complexType name="calendar">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="calendar_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="calendar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="calendar_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="calendar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="calendar_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="calendar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="calendar_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/check.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/check.xsd
new file mode 100644 (file)
index 0000000..44d3ab0
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="check" type="check">
+               <xs:unique name="event_check">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="check_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Check" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+               <xs:attribute name="state" type="xs:boolean" default="false" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">       <!-- FIXME -->
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="favorite" />
+                                       <xs:enumeration value="on&amp;off" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="check_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="check">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_table">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/colorselector.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/colorselector.xsd
new file mode 100644 (file)
index 0000000..9624da6
--- /dev/null
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="colorselector" type="colorselector">
+               <xs:unique name="event_colorselector">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="colorselector_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="mode" default="both">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="palette" />
+                                       <xs:enumeration value="components" />
+                                       <xs:enumeration value="both" />
+                                       <xs:enumeration value="picker" />
+                                       <xs:enumeration value="plane" />
+                                       <xs:enumeration value="palette_plane" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="color">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}|#{1}[0-9a-fA-F]{8}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="colorselector_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="color,item,selected" />
+                                                               <xs:enumeration value="color,item,longpressed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="colorselector">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_table">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/ctxpopup.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/ctxpopup.xsd
new file mode 100644 (file)
index 0000000..687850a
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="ctxpopup" type="ctxpopup">
+               <xs:unique name="event_ctxpopup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="ctxpopup">
+               <xs:choice minOccurs="1">
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="dismissed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="ctxpopupitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="CtxPopupItem" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">       <!-- TODO : default style? -->
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="more/default" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/datetime.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/datetime.xsd
new file mode 100644 (file)
index 0000000..24f6b7e
--- /dev/null
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="datetime" type="datetime">
+               <xs:unique name="event_datetime">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="datetime_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="date_layout" />
+                                       <xs:enumeration value="time_layout" />
+                                       <xs:enumeration value="time_layout_24hr" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="datetime_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="datetime">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_table">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/entry.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/entry.xsd
new file mode 100644 (file)
index 0000000..2a0feef
--- /dev/null
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="entry" type="entry">
+               <xs:unique name="event_entry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="entry_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="scroll" type="xs:boolean" default="false" />
+               <xs:attribute name="single_line" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="password" type="xs:boolean" default="false" />
+               <xs:attribute name="line_wrap">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="char" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="mixed" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="context_menu" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="autocapital_type" default="none">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="sentence" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="file_text_format" default="plain_utf8">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="plain_utf8" />
+                                                       <xs:enumeration value="markup_utf8" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <!-- <xs:attribute name="input_panel_language" default="automatic"> TODO 
+                       <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="automatic" 
+                       /> <xs:enumeration value="alphabet" /> </xs:restriction> </xs:simpleType> 
+                       </xs:attribute> -->
+               <!-- <xs:attribute type="xs:boolean" name="selection_handler" default="true" 
+                       /> TODO -->
+               <xs:attribute name="input_panel_return_key" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Entry" />
+               <xs:attribute name="src" type="xs:string" />
+       </xs:complexType>
+       <xs:group name="entry_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="33">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="aborted" />
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="anchor,clicked" />
+                                                               <xs:enumeration value="anchor,down" />
+                                                               <xs:enumeration value="anchor,hover,opened" />
+                                                               <xs:enumeration value="anchor,in" />
+                                                               <xs:enumeration value="anchor,out" />
+                                                               <xs:enumeration value="anchor,up" />
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="changed,user" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,triple" />
+                                                               <xs:enumeration value="cursor,changed" />
+                                                               <xs:enumeration value="cursor,changed,manual" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="maxlength,reached" />
+                                                               <xs:enumeration value="preedit,changed" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="redo,request" />
+                                                               <xs:enumeration value="selection,changed" />
+                                                               <xs:enumeration value="selection,cleared" />
+                                                               <xs:enumeration value="selection,copy" />
+                                                               <xs:enumeration value="selection,cut" />
+                                                               <xs:enumeration value="selection,paste" />
+                                                               <xs:enumeration value="selection,start" />
+                                                               <xs:enumeration value="text,set,done" />
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="undo,request" />
+                                                               <xs:enumeration value="rejected" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="entry">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/flipselector.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/flipselector.xsd
new file mode 100644 (file)
index 0000000..411a724
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="flipselector" type="flipselector">
+               <xs:unique name="event_flipselector">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="flipselector_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="flipselector_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="overflowed" />
+                                                               <xs:enumeration value="underflowed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="flipselectoritem" minOccurs="0"
+                               maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="1">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                                       <xs:attribute name="data_bind" type="xs:string" default=""/>
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="flipselector">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="flipselector_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="flipselector_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="flipselector_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="flipselector_on_table">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="flipselector_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="flipselector_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="flipselector_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/gengrid.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/gengrid.xsd
new file mode 100644 (file)
index 0000000..46e1a7d
--- /dev/null
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+
+       <xs:element name="gengrid" type="gengrid">      <!-- TODO : FIXME -->
+               <xs:unique name="event_gengrid">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="gengrid_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="popup" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="item_size_h" type="xs:integer"
+                       default="200" />
+               <xs:attribute name="item_size_w" type="xs:integer"
+                       default="200" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+       </xs:complexType>
+       <xs:group name="gengrid_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="38">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,right" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="scroll,page,changed" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="index,update" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                               <xs:enumeration value="item,reorder,anim,start" />
+                                                               <xs:enumeration value="item,reorder,anim,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="gengriditem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="style" default="default">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="default" />
+                                                               <xs:enumeration value="type1" />
+                                                               <xs:enumeration value="type2" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="src" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="disabled" type="xs:boolean"
+                                               default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="gengrid">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/genlist.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/genlist.xsd
new file mode 100644 (file)
index 0000000..f546bb4
--- /dev/null
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="genlist" type="genlist">
+               <xs:unique name="event_genlist">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="genlist_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="homogeneous" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="style" default="solid/default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="solid/default" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="genlist_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="48">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,right" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,request" />
+                                                               <xs:enumeration value="contract,request" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="multi,swipe,left" />
+                                                               <xs:enumeration value="multi,swipe,right" />
+                                                               <xs:enumeration value="multi,swipe,up" />
+                                                               <xs:enumeration value="multi,swipe,down" />
+                                                               <xs:enumeration value="multi,pinch,out" />
+                                                               <xs:enumeration value="multi,pinch,in" />
+                                                               <xs:enumeration value="swipe" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="moved,after" />
+                                                               <xs:enumeration value="moved,before" />
+                                                               <xs:enumeration value="index,update" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="tree,effect,finished" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="genlistitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="style" default="default">
+                                               <xs:simpleType>
+                                                       <xs:union>
+                                                               <xs:simpleType>
+                                                                       <xs:restriction base="xs:string">
+                                                                               <xs:enumeration value="type1" />
+                                                                               <xs:enumeration value="type2" />
+                                                                               <xs:enumeration value="multiline" />
+                                                                               <xs:enumeration value="full" />
+                                                                               <xs:enumeration value="group_index" />
+                                                                               <xs:enumeration value="group_index/expandable" />
+                                                                               <xs:enumeration value="default" />
+                                                                               <xs:enumeration value="double_label" />
+                                                                               <xs:enumeration value="one_icon" />
+                                                                               <xs:enumeration value="end_icon" />
+                                                                       </xs:restriction>
+                                                               </xs:simpleType>
+                                                       </xs:union>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="sub_text" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="image_path" type="xs:string" />
+                                       <xs:attribute name="standard_icon" type="standard.icon"
+                                               default="" />
+                                       <xs:attribute name="end_image_path" type="xs:string" />
+                                       <xs:attribute name="end_standard_icon" type="standard.icon"
+                                               default="" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="genlist">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_table">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/grid.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/grid.xsd
new file mode 100644 (file)
index 0000000..e949fef
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="grid" type="grid" />
+
+       <xs:complexType name="grid_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="vsize_w" type="xs:positiveInteger" default="1000" />
+               <xs:attribute name="vsize_h" type="xs:positiveInteger" default="1000" />
+       </xs:complexType>
+
+       <xs:complexType name="grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/hoversel.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/hoversel.xsd
new file mode 100644 (file)
index 0000000..266b5bd
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="hoversel" type="hoversel">
+               <xs:unique name="event_hoversel">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="hoversel_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute type="xs:string" name="text" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+       <xs:group name="hoversel_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="dismissed" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="hoverselitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute type="xs:string" name="text" />
+                                       <xs:attribute name="data_bind" type="xs:string" default=""/>
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="hoversel">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="hoversel_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="hoversel_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="hoversel_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="hoversel_on_table">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="hoversel_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="hoversel_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="hoversel_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/image.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/image.xsd
new file mode 100644 (file)
index 0000000..7569405
--- /dev/null
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="image" type="image">
+               <xs:unique name="event_image">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="image_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <!-- <xs:attribute name="group" type="xs:string" /> TODO : postpone -->
+               <xs:attribute name="aspect_fixed" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="fill_outside" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="resizable_up" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="resizable_down" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="no_scale" type="xs:boolean" default="false" />
+
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="image_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="drop" />
+                                                               <xs:enumeration value="clicked" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="image">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_table">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/index.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/index.xsd
new file mode 100644 (file)
index 0000000..81c979e
--- /dev/null
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="index" type="index">
+               <xs:unique name="event_index">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="index_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="autohide" type="xs:boolean" default="false" />
+               <!-- <xs:attribute type="xs:boolean" name="omit" default="false" /> TODO -->
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <!-- <xs:attribute type="xs:double" name="delay_change" default="0.2"/> 
+                       TODO -->
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+
+       </xs:complexType>
+       <xs:group name="index_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="8">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="level,up" />
+                                                               <xs:enumeration value="level,down" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="indexitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="index">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_table">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/label.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/label.xsd
new file mode 100644 (file)
index 0000000..8798326
--- /dev/null
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="label" type="label">
+               <xs:unique name="event_label">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="label_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="ellipsis" type="xs:boolean" default="false" />
+               <xs:attribute name="wrap_width" type="xs:nonNegativeInteger"
+                       default="0" />
+               <xs:attribute name="line_wrap" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="char" />
+                                                       <xs:enumeration value="word" />
+                                                       <xs:enumeration value="mixed" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Label" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+       </xs:complexType>
+       <xs:group name="label_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="slide,end" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="label">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_table">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/layout.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/layout.xsd
new file mode 100644 (file)
index 0000000..549a40c
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="layout" type="layout">
+               <xs:unique name="event_layout">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="layout_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="group" type="xs:string" default="" />
+       </xs:complexType>
+       <xs:group name="layout_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="layout">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_table">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/list.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/list.xsd
new file mode 100644 (file)
index 0000000..4a7d1dc
--- /dev/null
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+
+       <xs:element name="list" type="list">
+               <xs:unique name="event_list">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="list_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+       </xs:complexType>
+       <xs:group name="list_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="17">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,right" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="data_bind" type="xs:string" default=""/>
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="list">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_table">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/map.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/map.xsd
new file mode 100644 (file)
index 0000000..7932e46
--- /dev/null
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="map" type="map">
+               <xs:unique name="event_map">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="map_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="zoom_level" type="xs:nonNegativeInteger"
+                       default="15" />
+               <xs:attribute name="longitude" type="xs:double" />
+               <xs:attribute name="latitude" type="xs:double" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="map_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="26">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="zoom,start" />
+                                                               <xs:enumeration value="zoom,stop" />
+                                                               <xs:enumeration value="zoom,change" />
+                                                               <xs:enumeration value="tile,load" />
+                                                               <xs:enumeration value="tile,loaded" />
+                                                               <xs:enumeration value="tile,loaded,fail" />
+                                                               <xs:enumeration value="route,load" />
+                                                               <xs:enumeration value="route,loaded" />
+                                                               <xs:enumeration value="route,loaded,fail" />
+                                                               <xs:enumeration value="name,load" />
+                                                               <xs:enumeration value="name,loaded" />
+                                                               <xs:enumeration value="name,loaded,fail" />
+                                                               <xs:enumeration value="overlay,clicked" />
+                                                               <xs:enumeration value="loaded" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="map">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_table">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/multibuttonentry.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/multibuttonentry.xsd
new file mode 100644 (file)
index 0000000..17882f5
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="multibuttonentry" type="multibuttonentry">
+               <xs:unique name="event_multibuttonentry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="multibuttonentry_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="expanded" type="xs:boolean" default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="multibuttonentry_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="11">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="item,selected" />
+                                                               <xs:enumeration value="item,added" />
+                                                               <xs:enumeration value="item,deleted" />
+                                                               <xs:enumeration value="item,clicked" />
+                                                               <xs:enumeration value="item,longpressed" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,state,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="multibuttonentryitem" maxOccurs="unbounded"
+                               minOccurs="0">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="multibuttonentry">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="multibuttonentry_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="multibuttonentry_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="multibuttonentry_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="multibuttonentry_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/panel.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/panel.xsd
new file mode 100644 (file)
index 0000000..37ade74
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="panel" type="panel">
+               <xs:unique name="event_panel">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="panel_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="3">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="orient" default="top">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="top" />
+                                                       <xs:enumeration value="bottom" />
+                                                       <xs:enumeration value="left" />
+                                                       <xs:enumeration value="right" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="hidden" type="xs:boolean" default="false" />
+       </xs:complexType>
+
+       <xs:complexType name="panel">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_table">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/panes.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/panes.xsd
new file mode 100644 (file)
index 0000000..7ed05ef
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="panes" type="panes">
+               <xs:unique name="event_panes">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+               <xs:unique name="pack_panes">
+                       <xs:selector xpath="./*" />
+                       <xs:field xpath="@pack" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="panes_common">
+               <xs:choice minOccurs="0" maxOccurs="2">
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="unpress" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="fixed" type="xs:boolean" default="false" />
+               <xs:attribute name="right_size" type="ratio" default="0.5" />
+       </xs:complexType>
+
+       <xs:complexType name="panes">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_table">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/popup.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/popup.xsd
new file mode 100644 (file)
index 0000000..53dce42
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="popup" type="popup">
+               <xs:unique name="event_popup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="popup">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="timeout" />
+                                                               <xs:enumeration value="block,clicked" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="title" type="xs:string" default="Title" />
+               <xs:attribute name="height" default="200">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:nonNegativeInteger">
+                                       <xs:maxInclusive value="400"></xs:maxInclusive>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="timeout" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="theme_bg" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/progressbar.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/progressbar.xsd
new file mode 100644 (file)
index 0000000..8d284c9
--- /dev/null
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="progressbar" type="progressbar">
+               <xs:unique name="event_progressbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="progressbar_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="pulse_mode" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="pulse" type="xs:boolean" default="false" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="value" type="ratio" default="0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <!-- <xs:attribute name="unit_format" type="xs:string" /> TODO -->
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="pending" />
+                                       <xs:enumeration value="process_large" />
+                                       <xs:enumeration value="process_medium" />
+                                       <xs:enumeration value="process_small" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="progressbar_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="progressbar">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/radio.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/radio.xsd
new file mode 100644 (file)
index 0000000..91fe27f
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="radio" type="radio">
+               <xs:unique name="event_radio">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="radio_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="state_value" type="xs:integer" />
+               <xs:attribute name="value" type="xs:integer" />
+               <xs:attribute name="text" type="xs:string" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="radio_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="radio">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_table">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/scroller.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/scroller.xsd
new file mode 100644 (file)
index 0000000..5905a2a
--- /dev/null
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="scroller" type="scroller">
+               <xs:unique name="event_scroller">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="scroller_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="22">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,left" />
+                                                               <xs:enumeration value="scroll,right" />
+                                                               <xs:enumeration value="scroll,up" />
+                                                               <xs:enumeration value="scroll,down" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="vbar,drag" />
+                                                               <xs:enumeration value="vbar,press" />
+                                                               <xs:enumeration value="vbar,unpress" />
+                                                               <xs:enumeration value="hbar,drag" />
+                                                               <xs:enumeration value="hbar,press" />
+                                                               <xs:enumeration value="hbar,unpress" />
+                                                               <xs:enumeration value="scroll,page,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="scroller.direction" default="no_block" />
+               <xs:attribute name="content_min_w" type="xs:boolean" default="false" />
+               <xs:attribute name="content_min_h" type="xs:boolean" default="false" />
+               <xs:attribute name="page_relative_w" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_relative_h" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_size_w" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="page_size_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="propagate_events" type="xs:boolean" default="true" />
+               <xs:attribute name="page_scroll_limit_w" type="xs:positiveInteger" />
+               <xs:attribute name="page_scroll_limit_h" type="xs:positiveInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="handler" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="scroller">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_table">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/slider.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/slider.xsd
new file mode 100644 (file)
index 0000000..a12ab49
--- /dev/null
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="slider" type="slider"> <!-- FIXME -->
+               <xs:unique name="event_slider">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="slider_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="indicator" type="xs:boolean" default="false" />
+               <xs:attribute name="min" type="xs:double" default="0.0" />
+               <xs:attribute name="max" type="xs:double" default="1.0" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="step" type="xs:double" default="0.05" />
+               <xs:attribute name="visible_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="on_focus" />
+                                       <xs:enumeration value="none" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="value" type="xs:double" default="0.0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <xs:attribute name="indicator_format" type="xs:string" />
+               <xs:attribute name="direction" type="direction" default="horizontal" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="center_point" />
+                                       <xs:enumeration value="warning" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="slider_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="slider,drag,start" />
+                                                               <xs:enumeration value="slider,drag,stop" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="slider">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_table">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/spinner.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/spinner.xsd
new file mode 100644 (file)
index 0000000..61458c4
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="spinner" type="spinner"> <!-- FIXME -->
+               <xs:unique name="event_spinner">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="spinner_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="step" type="xs:double" default="1" />
+               <xs:attribute name="min" type="xs:double" default="0" />
+               <xs:attribute name="max" type="xs:double" default="100" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="horizontal">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="horizontal" />
+                                       <xs:enumeration value="vertical" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="spinner_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="spinner,drag,start" />
+                                                               <xs:enumeration value="spinner,drag,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="spinner">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_table">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/table.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/table.xsd
new file mode 100644 (file)
index 0000000..cc92b41
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="table" type="table" />
+
+       <xs:complexType name="table_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="cols" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="rows" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+
+       <xs:complexType name="table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/toolbar.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/toolbar.xsd
new file mode 100644 (file)
index 0000000..40991d4
--- /dev/null
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="toolbar" type="toolbar">
+               <xs:unique name="event_toolbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="toolbar_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="homogeneous" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="align">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="ratio" />
+                                       </xs:simpleType>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="left" />
+                                                       <xs:enumeration value="right" />
+                                                       <xs:enumeration value="center" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="icon_size" type="xs:nonNegativeInteger"
+                       default="32" />
+               <xs:attribute name="shrink_mode" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="hide" />
+                                                       <xs:enumeration value="scroll" />
+                                                       <xs:enumeration value="menu" />
+                                                       <xs:enumeration value="expand" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="transverse_expand" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="navigationbar" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="toolbar_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="9">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="toolbaritem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="disable" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                                       <xs:attribute name="src" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="toolbar">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/view.xsd b/org.tizen.efluibuilder/res/xsd/mobile_2.4/widget/view.xsd
new file mode 100644 (file)
index 0000000..7cac363
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="view" type="view">
+               <xs:unique name="widget_id">
+                       <xs:selector xpath=".//*" />
+                       <xs:field xpath="@id" />
+               </xs:unique>
+               <xs:key name="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="radioGroup" refer="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@radio_group" />
+               </xs:keyref>
+               <xs:unique name="event_signal">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="view">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="uib,view,create" />
+                                                               <xs:enumeration value="uib,view,destroy" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice minOccurs="0" maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                               <xs:group ref="popup" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attribute name="id" type="function_name" use="required" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="page_location_x" type="xs:integer" default="0" />
+               <xs:attribute name="page_location_y" type="xs:integer" default="0" />
+               <xs:attribute name="screen_orientation" default="full_sensor">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_sensor" />
+                                       <xs:enumeration value="only_portrait" />
+                                       <xs:enumeration value="only_landscape" />
+                                       <xs:enumeration value="full_sensor" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="type">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="view" />
+                                       <xs:enumeration value="popup" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/attribute/group.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/attribute/group.xsd
new file mode 100644 (file)
index 0000000..d9af720
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="type.xsd" />
+
+       <xs:attributeGroup name="common">
+               <xs:attribute name="id" use="required" type="function_name" />
+               <xs:attribute type="align_h" name="align_h" default="fill" />
+               <xs:attribute type="align_v" name="align_v" default="fill" />
+               <xs:attribute type="weight" name="weight_h" default="1" />
+               <xs:attribute type="weight" name="weight_v" default="1" />
+       </xs:attributeGroup>
+
+    <xs:attributeGroup name="widgetCommon">
+        <xs:attribute type="xs:string" name="colors" use="optional"/> <!-- for mobile 3.0 feature -->
+    </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnGrid">
+               <xs:attribute type="xs:integer" name="pack_x" />
+               <xs:attribute type="xs:integer" name="pack_y" />
+               <xs:attribute type="xs:positiveInteger" name="pack_w" />
+               <xs:attribute type="xs:positiveInteger" name="pack_h" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnTable">
+               <xs:attribute type="xs:integer" name="pack_col" />
+               <xs:attribute type="xs:integer" name="pack_row" />
+               <xs:attribute type="xs:positiveInteger" name="col_span" />
+               <xs:attribute type="xs:positiveInteger" name="row_span" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnPanes">
+               <xs:attribute name="pack">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:attributeGroup>
+
+       <xs:complexType name="item.event">
+               <xs:attribute name="signal">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="itemselected" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="function_name" type="xs:string" />  <!-- FIXME : regex for function name -->
+               <xs:attributeGroup ref="storyboard" />
+       </xs:complexType>
+
+       <xs:attributeGroup name="storyboard">
+               <xs:attribute name="connection_wrapper" type="xs:string" />
+               <xs:attribute name="event_name" type="xs:string" />
+               <xs:attribute name="target" type="xs:string" />
+       </xs:attributeGroup>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/attribute/type.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/attribute/type.xsd
new file mode 100644 (file)
index 0000000..032d31d
--- /dev/null
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+    <xs:simpleType name="style">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[a-zA-Z0-9_&amp;/]+" />
+        </xs:restriction>
+    </xs:simpleType>
+       <xs:simpleType name="function_name">
+               <xs:restriction base="xs:string">
+                       <xs:pattern value="[a-zA-Z_]+[a-zA-Z0-9_]*" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="nonNegativeDouble">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="ratio">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+                       <xs:maxInclusive value="1"></xs:maxInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="align_h">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="align_v">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="top" />
+                                       <xs:enumeration value="bottom" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="weight">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="standard.icon">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="" />
+                       <xs:enumeration value="apps" />
+                       <xs:enumeration value="arrow_down" />
+                       <xs:enumeration value="arrow_left" />
+                       <xs:enumeration value="arrow_right" />
+                       <xs:enumeration value="arrow_up" />
+                       <xs:enumeration value="chat" />
+                       <xs:enumeration value="clock" />
+                       <xs:enumeration value="close" />
+                       <xs:enumeration value="delete" />
+                       <xs:enumeration value="edit" />
+                       <xs:enumeration value="file" />
+                       <xs:enumeration value="home" />
+                       <xs:enumeration value="media_player/forward" />
+                       <xs:enumeration value="media_player/info" />
+                       <xs:enumeration value="media_player/next" />
+                       <xs:enumeration value="media_player/pause" />
+                       <xs:enumeration value="media_player/play" />
+                       <xs:enumeration value="media_player/prev" />
+                       <xs:enumeration value="media_player/rewind" />
+                       <xs:enumeration value="media_player/stop" />
+                       <xs:enumeration value="menu/apps" />
+                       <xs:enumeration value="menu/arrow_up" />
+                       <xs:enumeration value="menu/arrow_down" />
+                       <xs:enumeration value="menu/arrow_left" />
+                       <xs:enumeration value="menu/arrow_right" />
+                       <xs:enumeration value="menu/chat" />
+                       <xs:enumeration value="menu/clock" />
+                       <xs:enumeration value="menu/close" />
+                       <xs:enumeration value="menu/delete" />
+                       <xs:enumeration value="menu/edit" />
+                       <xs:enumeration value="menu/folder" />
+                       <xs:enumeration value="menu/file" />
+                       <xs:enumeration value="menu/home" />
+                       <xs:enumeration value="menu/refresh" />
+                       <xs:enumeration value="no_photo" />
+                       <xs:enumeration value="photo/no_photo" />
+                       <xs:enumeration value="refresh" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="list.selectmode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="display_only" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.policy">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="auto" />
+                                       <xs:enumeration value="true" />
+                                       <xs:enumeration value="false" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="direction">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="vertical" />
+                       <xs:enumeration value="horizontal" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.direction">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="direction" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_block" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="list.mode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="compress" />
+                                       <xs:enumeration value="scroll" />
+                                       <xs:enumeration value="limit" />
+                                       <xs:enumeration value="expand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/element/configuration.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/element/configuration.xsd
new file mode 100644 (file)
index 0000000..ea7f4a2
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/type.xsd" />
+
+       <xs:element name="configuration"> <!-- FIXME -->
+               <xs:complexType>
+                       <xs:attribute name="device" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="WVGA" />
+                                               <xs:enumeration value="HD" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="id" type="function_name" use="required" />
+                       <xs:attribute name="name" use="required">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:minLength value="1"/>
+                </xs:restriction>
+            </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="orientation" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="portrait" />
+                                               <xs:enumeration value="landscape" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="type" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="common" />
+                                               <xs:enumeration value="specific" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+               </xs:complexType>
+       </xs:element>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/element/group.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/element/group.xsd
new file mode 100644 (file)
index 0000000..4896a52
--- /dev/null
@@ -0,0 +1,616 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../widget/bg.xsd" />
+       <xs:include schemaLocation="../widget/box.xsd" />
+       <xs:include schemaLocation="../widget/button.xsd" />
+       <xs:include schemaLocation="../widget/calendar.xsd" />
+       <xs:include schemaLocation="../widget/check.xsd" />
+       <xs:include schemaLocation="../widget/colorselector.xsd" />
+       <xs:include schemaLocation="../widget/ctxpopup.xsd" />
+       <xs:include schemaLocation="../widget/datetime.xsd" />
+       <xs:include schemaLocation="../widget/entry.xsd" />
+       <xs:include schemaLocation="../widget/flipselector.xsd" />
+       <xs:include schemaLocation="../widget/gengrid.xsd" />
+       <xs:include schemaLocation="../widget/genlist.xsd" />
+       <xs:include schemaLocation="../widget/grid.xsd" />
+       <xs:include schemaLocation="../widget/hoversel.xsd" />
+       <xs:include schemaLocation="../widget/image.xsd" />
+       <xs:include schemaLocation="../widget/index.xsd" />
+       <xs:include schemaLocation="../widget/label.xsd" />
+       <xs:include schemaLocation="../widget/layout.xsd" />
+       <xs:include schemaLocation="../widget/list.xsd" />
+       <xs:include schemaLocation="../widget/map.xsd" />
+       <xs:include schemaLocation="../widget/multibuttonentry.xsd" />
+       <xs:include schemaLocation="../widget/panel.xsd" />
+       <xs:include schemaLocation="../widget/panes.xsd" />
+       <xs:include schemaLocation="../widget/popup.xsd" />
+       <xs:include schemaLocation="../widget/progressbar.xsd" />
+       <xs:include schemaLocation="../widget/radio.xsd" />
+       <xs:include schemaLocation="../widget/scroller.xsd" />
+       <xs:include schemaLocation="../widget/slider.xsd" />
+       <xs:include schemaLocation="../widget/spinner.xsd" />
+       <xs:include schemaLocation="../widget/table.xsd" />
+       <xs:include schemaLocation="../widget/toolbar.xsd" />
+
+       <xs:group name="rootContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="panes" />
+                       <xs:element ref="panel" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="popup">
+               <xs:choice>
+                       <xs:element ref="popup" />
+                       <xs:element ref="ctxpopup" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="panes" />
+                       <xs:element ref="panel" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainer">
+               <xs:choice>
+                       <xs:element ref="flipselector" />
+                       <xs:element ref="gengrid" />
+                       <xs:element ref="genlist" />
+                       <xs:element ref="index" />
+                       <xs:element ref="list" />
+                       <xs:element ref="multibuttonentry" />
+                       <xs:element ref="toolbar" />
+                       <xs:element ref="hoversel" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidget">
+               <xs:choice>
+                       <xs:element ref="bg" />
+                       <xs:element ref="button" />
+                       <xs:element ref="calendar" />
+                       <xs:element ref="check" />
+                       <xs:element ref="colorselector" />
+                       <xs:element ref="datetime" />
+                       <xs:element ref="entry" />
+                       <xs:element ref="image" />
+                       <xs:element ref="label" />
+                       <xs:element ref="layout" />
+                       <xs:element ref="map" />
+                       <xs:element ref="progressbar" />
+                       <xs:element ref="radio" />
+                       <xs:element ref="slider" />
+                       <xs:element ref="spinner" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_grid" />
+                       <xs:element name="box" type="box_on_grid" />
+                       <xs:element name="table" type="table_on_grid" />
+                       <xs:element name="panes" type="panes_on_grid">
+                               <xs:unique name="event_panes_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_grid">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_grid">
+                               <xs:unique name="event_panel_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_grid">
+                               <xs:unique name="event_scroller_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="flipselector" type="flipselector_on_grid">
+                               <xs:unique name="event_flipselector_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="gengrid" type="gengrid_on_grid">
+                               <xs:unique name="event_gengrid_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_grid">
+                               <xs:unique name="event_genlist_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_grid">
+                               <xs:unique name="event_index_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_grid">
+                               <xs:unique name="event_list_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_grid">
+                               <xs:unique name="event_multibuttonentry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_grid">
+                               <xs:unique name="event_toolbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="hoversel" type="hoversel_on_grid">
+                               <xs:unique name="event_hoversel_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnGrid">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_grid" />
+                       <xs:element name="button" type="button_on_grid">
+                               <xs:unique name="event_button_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="calendar" type="calendar_on_grid">
+                               <xs:unique name="event_calendar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_grid">
+                               <xs:unique name="event_check_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_grid">
+                               <xs:unique name="event_colorselector_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_grid">
+                               <xs:unique name="event_datetime_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_grid">
+                               <xs:unique name="event_entry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_grid">
+                               <xs:unique name="event_image_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_grid">
+                               <xs:unique name="event_label_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_grid">
+                               <xs:unique name="event_layout_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_grid">
+                               <xs:unique name="event_map_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_grid">
+                               <xs:unique name="event_progressbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_grid">
+                               <xs:unique name="event_radio_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_grid">
+                               <xs:unique name="event_slider_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_grid">
+                               <xs:unique name="event_spinner_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnTable">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_table" />
+                       <xs:element name="box" type="box_on_table" />
+                       <xs:element name="table" type="table_on_table" />
+                       <xs:element name="panes" type="panes_on_table">
+                               <xs:unique name="event_panes_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_table">
+                               <xs:unique name="event_panel_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_table">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_table">
+                               <xs:unique name="event_scroller_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnTable">
+               <xs:choice>
+                       <xs:element name="flipselector" type="flipselector_on_table">
+                               <xs:unique name="event_flipselector_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="gengrid" type="gengrid_on_table">
+                               <xs:unique name="event_gengrid_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_table">
+                               <xs:unique name="event_genlist_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_table">
+                               <xs:unique name="event_index_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_table">
+                               <xs:unique name="event_list_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_table">
+                               <xs:unique name="event_multibuttonentry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_table">
+                               <xs:unique name="event_toolbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="hoversel" type="hoversel_on_table">
+                               <xs:unique name="event_hoversel_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnTable">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_table" />
+                       <xs:element name="button" type="button_on_table">
+                               <xs:unique name="event_button_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="calendar" type="calendar_on_table">
+                               <xs:unique name="event_calendar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_table">
+                               <xs:unique name="event_check_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_table">
+                               <xs:unique name="event_colorselector_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_table">
+                               <xs:unique name="event_datetime_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_table">
+                               <xs:unique name="event_entry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_table">
+                               <xs:unique name="event_image_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_table">
+                               <xs:unique name="event_label_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_table">
+                               <xs:unique name="event_layout_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_table">
+                               <xs:unique name="event_map_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_table">
+                               <xs:unique name="event_progressbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_table">
+                               <xs:unique name="event_radio_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_table">
+                               <xs:unique name="event_slider_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_table">
+                               <xs:unique name="event_spinner_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_panes" />
+                       <xs:element name="box" type="box_on_panes" />
+                       <xs:element name="table" type="table_on_panes" />
+                       <xs:element name="panes" type="panes_on_panes">
+                               <xs:unique name="event_panes_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                               <xs:unique name="pack_panes_on_panes">
+                                       <xs:selector xpath="./*" />
+                                       <xs:field xpath="@pack" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="panel" type="panel_on_panes">
+                               <xs:unique name="event_panel_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="scroller" type="scroller_on_panes">
+                               <xs:unique name="event_scroller_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="flipselector" type="flipselector_on_panes">
+                               <xs:unique name="event_flipselector_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="gengrid" type="gengrid_on_panes">
+                               <xs:unique name="event_gengrid_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_panes">
+                               <xs:unique name="event_genlist_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_panes">
+                               <xs:unique name="event_index_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_panes">
+                               <xs:unique name="event_list_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="multibuttonentry" type="multibuttonentry_on_panes">
+                               <xs:unique name="event_multibuttonentry_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="toolbar" type="toolbar_on_panes">
+                               <xs:unique name="event_toolbar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="hoversel" type="hoversel_on_panes">
+                               <xs:unique name="event_hoversel_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnPanes">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_panes" />
+                       <xs:element name="button" type="button_on_panes">
+                               <xs:unique name="event_button_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="calendar" type="calendar_on_panes">
+                               <xs:unique name="event_calendar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_panes">
+                               <xs:unique name="event_check_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="colorselector" type="colorselector_on_panes">
+                               <xs:unique name="event_colorselector_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_panes">
+                               <xs:unique name="event_datetime_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_panes">
+                               <xs:unique name="event_entry_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_panes">
+                               <xs:unique name="event_image_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_panes">
+                               <xs:unique name="event_label_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_panes">
+                               <xs:unique name="event_layout_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_panes">
+                               <xs:unique name="event_map_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_panes">
+                               <xs:unique name="event_progressbar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_panes">
+                               <xs:unique name="event_radio_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_panes">
+                               <xs:unique name="event_slider_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_panes">
+                               <xs:unique name="event_spinner_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/element/variation.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/element/variation.xsd
new file mode 100644 (file)
index 0000000..b106524
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd"></xs:include>
+
+       <xs:element name="variation" type="variation" />
+
+       <xs:complexType name="variation">
+               <xs:attribute type="xs:string" name="config_ref" />
+               <xs:attribute type="xs:boolean" name="visible" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnGrid"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_table">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnTable"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnPanes"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/layout.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/layout.xsd
new file mode 100644 (file)
index 0000000..f7f6c39
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="element/configuration.xsd" />
+
+       <!-- definition of tizen.view -->
+       <xs:include schemaLocation="widget/view.xsd" />
+
+       <xs:element name="document">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="mscreen" />
+                               <xs:element ref="views" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:key name="config">
+                       <xs:selector xpath="mscreen/configuration" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="config_ref" refer="config">
+                       <xs:selector xpath=".//variation" />
+                       <xs:field xpath="@config_ref" />
+               </xs:keyref>
+       </xs:element>
+       <xs:element name="mscreen">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="configuration" minOccurs="1" maxOccurs="6" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:unique name="qualifiers">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@device" />
+                       <xs:field xpath="@orientation" />
+               </xs:unique>
+               <xs:unique name="config_name">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@name" />
+               </xs:unique>
+       </xs:element>
+       <xs:element name="views">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="view" minOccurs="0" maxOccurs="unbounded" />
+                       </xs:sequence>
+                       <xs:attribute type="xs:string" name="startup"></xs:attribute>
+               </xs:complexType>
+               <xs:key name="view_id">
+                       <xs:selector xpath="view" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="startup" refer="view_id">
+                       <xs:selector xpath="." />
+                       <xs:field xpath="@startup" />
+               </xs:keyref>
+               <xs:keyref name="view_ref" refer="view_id">
+                       <xs:selector xpath=".//naviframe" />
+                       <xs:field xpath="@view" />
+               </xs:keyref>
+               <xs:keyref name="event_target" refer="view_id">
+                       <xs:selector xpath=".//event" />
+                       <xs:field xpath="@target" />
+               </xs:keyref>
+       </xs:element>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/bg.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/bg.xsd
new file mode 100644 (file)
index 0000000..3f87e10
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="bg" type="background" />
+
+       <xs:complexType name="background_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="color" default="#ffffff">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="option" default="scale">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="center" />
+                                                       <xs:enumeration value="scale" />
+                                                       <xs:enumeration value="stretch" />
+                                                       <xs:enumeration value="tile" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="background">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_table">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/box.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/box.xsd
new file mode 100644 (file)
index 0000000..ccfe5e3
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="box" type="box" />
+
+       <xs:complexType name="box_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" default="0" />
+       </xs:complexType>
+
+       <xs:complexType name="box">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_table">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/button.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/button.xsd
new file mode 100644 (file)
index 0000000..dac3d5f
--- /dev/null
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="button" type="button">
+               <xs:unique name="event_button">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="button_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attributeGroup ref="widgetCommon" /> <!-- since mobile 3.0 -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Button" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="circle" />
+                                                       <xs:enumeration value="editfield_clear" />
+                                                       <xs:enumeration value="bottom" />
+                                                       <xs:enumeration value="icon_reorder" />
+                                                       <xs:enumeration value="icon_expand_add" />
+                                                       <xs:enumeration value="icon_expand_delete" />
+                                                       <xs:enumeration value="naviframe/title_left" />
+                                                       <xs:enumeration value="naviframe/title_right" />
+                                                       <xs:enumeration value="naviframe/back_btn" />
+                                                       <xs:enumeration value="dropdown" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="button_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="repeated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="unpressed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="button">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_table">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/calendar.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/calendar.xsd
new file mode 100644 (file)
index 0000000..6193170
--- /dev/null
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="calendar" type="calendar">
+               <xs:unique name="event_calendar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="calendar_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="5">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="display,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="min_year" default="1902">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:positiveInteger">
+                                       <xs:minInclusive value="1902" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="max_year" default="-1">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:positiveInteger">
+                                                       <xs:minInclusive value="1902" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:integer">
+                                                       <xs:enumeration value="-1"></xs:enumeration>
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="ondemand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="interval" type="nonNegativeDouble"
+                       default="0.85" />
+       </xs:complexType>
+       <xs:group name="calendar_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="5">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="display,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="calendar">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="calendar_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="calendar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="calendar_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="calendar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="calendar_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="calendar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="calendar_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/check.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/check.xsd
new file mode 100644 (file)
index 0000000..8dbffa7
--- /dev/null
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="check" type="check">
+               <xs:unique name="event_check">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="check_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Check" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+               <xs:attribute name="state" type="xs:boolean" default="false" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">       <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="favorite" />
+                                                       <xs:enumeration value="on&amp;off" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="check_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="check">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_table">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/colorselector.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/colorselector.xsd
new file mode 100644 (file)
index 0000000..e426a6c
--- /dev/null
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="colorselector" type="colorselector">
+               <xs:unique name="event_colorselector">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="colorselector_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="mode" default="both">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="palette" />
+                                       <xs:enumeration value="components" />
+                                       <xs:enumeration value="both" />
+                                       <xs:enumeration value="picker" />
+                                       <xs:enumeration value="plane" />
+                                       <xs:enumeration value="palette_plane" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="color">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}|#{1}[0-9a-fA-F]{8}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="colorselector_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="color,item,selected" />
+                                                               <xs:enumeration value="color,item,longpressed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="colorselector">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_table">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="colorselector_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="colorselector_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="colorselector_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/ctxpopup.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/ctxpopup.xsd
new file mode 100644 (file)
index 0000000..0b23b2b
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="ctxpopup" type="ctxpopup">
+               <xs:unique name="event_ctxpopup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="ctxpopup">
+               <xs:choice minOccurs="1">
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="dismissed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="ctxpopupitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="CtxPopupItem" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">       <!-- TODO : default style? -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="more/default" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/datetime.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/datetime.xsd
new file mode 100644 (file)
index 0000000..4c37241
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="datetime" type="datetime">
+               <xs:unique name="event_datetime">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="datetime_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attributeGroup ref="widgetCommon" /> <!-- since mobile 3.0 -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="date_layout" />
+                                                       <xs:enumeration value="time_layout" />
+                                                       <xs:enumeration value="time_layout_24hr" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="datetime_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="datetime">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_table">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/entry.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/entry.xsd
new file mode 100644 (file)
index 0000000..56ac711
--- /dev/null
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="entry" type="entry">
+               <xs:unique name="event_entry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="entry_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="scroll" type="xs:boolean" default="false" />
+               <xs:attribute name="single_line" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="password" type="xs:boolean" default="false" />
+               <xs:attribute name="line_wrap">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="char" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="mixed" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="context_menu" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="autocapital_type" default="none">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="sentence" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="file_text_format" default="plain_utf8">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="plain_utf8" />
+                                                       <xs:enumeration value="markup_utf8" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <!-- <xs:attribute name="input_panel_language" default="automatic"> TODO 
+                       <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="automatic" 
+                       /> <xs:enumeration value="alphabet" /> </xs:restriction> </xs:simpleType> 
+                       </xs:attribute> -->
+               <!-- <xs:attribute type="xs:boolean" name="selection_handler" default="true" 
+                       /> TODO -->
+               <xs:attribute name="input_panel_return_key" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Entry" />
+               <xs:attribute name="src" type="xs:string" />
+       </xs:complexType>
+       <xs:group name="entry_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="33">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="aborted" />
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="anchor,clicked" />
+                                                               <xs:enumeration value="anchor,down" />
+                                                               <xs:enumeration value="anchor,hover,opened" />
+                                                               <xs:enumeration value="anchor,in" />
+                                                               <xs:enumeration value="anchor,out" />
+                                                               <xs:enumeration value="anchor,up" />
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="changed,user" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,triple" />
+                                                               <xs:enumeration value="cursor,changed" />
+                                                               <xs:enumeration value="cursor,changed,manual" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="maxlength,reached" />
+                                                               <xs:enumeration value="preedit,changed" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="redo,request" />
+                                                               <xs:enumeration value="selection,changed" />
+                                                               <xs:enumeration value="selection,cleared" />
+                                                               <xs:enumeration value="selection,copy" />
+                                                               <xs:enumeration value="selection,cut" />
+                                                               <xs:enumeration value="selection,paste" />
+                                                               <xs:enumeration value="selection,start" />
+                                                               <xs:enumeration value="text,set,done" />
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="undo,request" />
+                                                               <xs:enumeration value="rejected" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="entry">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/flipselector.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/flipselector.xsd
new file mode 100644 (file)
index 0000000..c3b87bd
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="flipselector" type="flipselector">
+               <xs:unique name="event_flipselector">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="flipselector_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="flipselector_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="overflowed" />
+                                                               <xs:enumeration value="underflowed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="flipselectoritem" minOccurs="0"
+                               maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="1">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                                       <xs:attribute name="data_bind" type="xs:string" default=""/>
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="flipselector">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="flipselector_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="flipselector_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="flipselector_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="flipselector_on_table">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="flipselector_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="flipselector_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="flipselector_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="flipselector_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/gengrid.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/gengrid.xsd
new file mode 100644 (file)
index 0000000..85b4a92
--- /dev/null
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+
+       <xs:element name="gengrid" type="gengrid">      <!-- TODO : FIXME -->
+               <xs:unique name="event_gengrid">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="gengrid_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="popup" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="item_size_h" type="xs:integer"
+                       default="200" />
+               <xs:attribute name="item_size_w" type="xs:integer"
+                       default="200" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+       </xs:complexType>
+       <xs:group name="gengrid_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="38">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,right" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="scroll,page,changed" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="index,update" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                               <xs:enumeration value="item,reorder,anim,start" />
+                                                               <xs:enumeration value="item,reorder,anim,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="gengriditem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="style" default="default">
+                                               <xs:simpleType>
+                                                       <xs:union memberTypes="style">
+                                                               <xs:simpleType>
+                                                                       <xs:restriction base="xs:string">
+                                                                               <xs:enumeration value="default" />
+                                                                               <xs:enumeration value="type1" />
+                                                                               <xs:enumeration value="type2" />
+                                                                       </xs:restriction>
+                                                               </xs:simpleType>
+                                                       </xs:union>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attributeGroup ref="widgetCommon" /> <!-- since mobile 3.0 -->
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="src" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="disabled" type="xs:boolean"
+                                               default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               
+       </xs:group>
+       <xs:complexType name="gengrid">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="gengrid_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/genlist.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/genlist.xsd
new file mode 100644 (file)
index 0000000..e72d05e
--- /dev/null
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="genlist" type="genlist">
+               <xs:unique name="event_genlist">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="genlist_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="homogeneous" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="style" default="solid/default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="solid/default" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="genlist_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="48">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,right" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,request" />
+                                                               <xs:enumeration value="contract,request" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="multi,swipe,left" />
+                                                               <xs:enumeration value="multi,swipe,right" />
+                                                               <xs:enumeration value="multi,swipe,up" />
+                                                               <xs:enumeration value="multi,swipe,down" />
+                                                               <xs:enumeration value="multi,pinch,out" />
+                                                               <xs:enumeration value="multi,pinch,in" />
+                                                               <xs:enumeration value="swipe" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="moved,after" />
+                                                               <xs:enumeration value="moved,before" />
+                                                               <xs:enumeration value="index,update" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="tree,effect,finished" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="genlistitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="style" default="default">
+                                               <xs:simpleType>
+                                                       <xs:union memberTypes="style">
+                                                               <xs:simpleType>
+                                                                       <xs:restriction base="xs:string">
+                                                                               <xs:enumeration value="type1" />
+                                                                               <xs:enumeration value="type2" />
+                                                                               <xs:enumeration value="multiline" />
+                                                                               <xs:enumeration value="full" />
+                                                                               <xs:enumeration value="group_index" />
+                                                                               <xs:enumeration value="group_index/expandable" />
+                                                                               <xs:enumeration value="default" />
+                                                                               <xs:enumeration value="double_label" />
+                                                                               <xs:enumeration value="one_icon" />
+                                                                               <xs:enumeration value="end_icon" />
+                                                                       </xs:restriction>
+                                                               </xs:simpleType>
+                                                       </xs:union>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attributeGroup ref="widgetCommon" /> <!-- since mobile 3.0 -->
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="sub_text" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="image_path" type="xs:string" />
+                                       <xs:attribute name="standard_icon" type="standard.icon"
+                                               default="" />
+                                       <xs:attribute name="end_image_path" type="xs:string" />
+                                       <xs:attribute name="end_standard_icon" type="standard.icon"
+                                               default="" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="genlist">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_table">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/grid.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/grid.xsd
new file mode 100644 (file)
index 0000000..e949fef
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="grid" type="grid" />
+
+       <xs:complexType name="grid_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="vsize_w" type="xs:positiveInteger" default="1000" />
+               <xs:attribute name="vsize_h" type="xs:positiveInteger" default="1000" />
+       </xs:complexType>
+
+       <xs:complexType name="grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/hoversel.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/hoversel.xsd
new file mode 100644 (file)
index 0000000..9446552
--- /dev/null
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="hoversel" type="hoversel">
+               <xs:unique name="event_hoversel">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="hoversel_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute type="xs:string" name="text" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+       <xs:group name="hoversel_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="dismissed" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="hoverselitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute type="xs:string" name="text" />
+                                       <xs:attribute name="data_bind" type="xs:string" default=""/>
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="hoversel">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="hoversel_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="hoversel_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="hoversel_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="hoversel_on_table">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="hoversel_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="hoversel_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="hoversel_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/image.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/image.xsd
new file mode 100644 (file)
index 0000000..5873b25
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="image" type="image">
+               <xs:unique name="event_image">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="image_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <!-- <xs:attribute name="group" type="xs:string" /> TODO : postpone -->
+               <xs:attribute name="aspect_fixed" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="fill_outside" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="resizable_up" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="resizable_down" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="no_scale" type="xs:boolean" default="false" />
+
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="image_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="drop" />
+                                                               <xs:enumeration value="clicked" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="image">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_table">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/index.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/index.xsd
new file mode 100644 (file)
index 0000000..64e4565
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="index" type="index">
+               <xs:unique name="event_index">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="index_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="autohide" type="xs:boolean" default="false" />
+               <!-- <xs:attribute type="xs:boolean" name="omit" default="false" /> TODO -->
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <!-- <xs:attribute type="xs:double" name="delay_change" default="0.2"/> 
+                       TODO -->
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+
+       </xs:complexType>
+       <xs:group name="index_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="8">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="level,up" />
+                                                               <xs:enumeration value="level,down" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="indexitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="index">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_table">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/label.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/label.xsd
new file mode 100644 (file)
index 0000000..b852952
--- /dev/null
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="label" type="label">
+               <xs:unique name="event_label">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="label_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="ellipsis" type="xs:boolean" default="false" />
+               <xs:attribute name="wrap_width" type="xs:nonNegativeInteger"
+                       default="0" />
+               <xs:attribute name="line_wrap" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="char" />
+                                                       <xs:enumeration value="word" />
+                                                       <xs:enumeration value="mixed" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Label" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+       </xs:complexType>
+       <xs:group name="label_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="slide,end" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="label">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_table">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/layout.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/layout.xsd
new file mode 100644 (file)
index 0000000..169053c
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="layout" type="layout">
+               <xs:unique name="event_layout">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="layout_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="group" type="xs:string" default="" />
+       </xs:complexType>
+       <xs:group name="layout_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="layout">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_table">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/list.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/list.xsd
new file mode 100644 (file)
index 0000000..3671599
--- /dev/null
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+
+       <xs:element name="list" type="list">
+               <xs:unique name="event_list">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="list_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+       </xs:complexType>
+       <xs:group name="list_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="17">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,right" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="data_bind" type="xs:string" default=""/>
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="list">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_table">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/map.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/map.xsd
new file mode 100644 (file)
index 0000000..c614ee6
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="map" type="map">
+               <xs:unique name="event_map">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="map_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="zoom_level" type="xs:nonNegativeInteger"
+                       default="15" />
+               <xs:attribute name="longitude" type="xs:double" />
+               <xs:attribute name="latitude" type="xs:double" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="map_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="26">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="zoom,start" />
+                                                               <xs:enumeration value="zoom,stop" />
+                                                               <xs:enumeration value="zoom,change" />
+                                                               <xs:enumeration value="tile,load" />
+                                                               <xs:enumeration value="tile,loaded" />
+                                                               <xs:enumeration value="tile,loaded,fail" />
+                                                               <xs:enumeration value="route,load" />
+                                                               <xs:enumeration value="route,loaded" />
+                                                               <xs:enumeration value="route,loaded,fail" />
+                                                               <xs:enumeration value="name,load" />
+                                                               <xs:enumeration value="name,loaded" />
+                                                               <xs:enumeration value="name,loaded,fail" />
+                                                               <xs:enumeration value="overlay,clicked" />
+                                                               <xs:enumeration value="loaded" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="map">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_table">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/multibuttonentry.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/multibuttonentry.xsd
new file mode 100644 (file)
index 0000000..125d4b9
--- /dev/null
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="multibuttonentry" type="multibuttonentry">
+               <xs:unique name="event_multibuttonentry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="multibuttonentry_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="expanded" type="xs:boolean" default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="mulibuttonentry">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="11">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="item,selected" />
+                                                               <xs:enumeration value="item,added" />
+                                                               <xs:enumeration value="item,deleted" />
+                                                               <xs:enumeration value="item,clicked" />
+                                                               <xs:enumeration value="item,longpressed" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,state,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="multibuttonentryitem" maxOccurs="unbounded"
+                               minOccurs="0">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="multibuttonentry">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="mulibuttonentry" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="mulibuttonentry" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="mulibuttonentry" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="multibuttonentry_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="multibuttonentry_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="mulibuttonentry" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/panel.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/panel.xsd
new file mode 100644 (file)
index 0000000..c3a0054
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="panel" type="panel">
+               <xs:unique name="event_panel">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="panel_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="3">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="orient" default="top">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="top" />
+                                                       <xs:enumeration value="bottom" />
+                                                       <xs:enumeration value="left" />
+                                                       <xs:enumeration value="right" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="hidden" type="xs:boolean" default="false" />
+       </xs:complexType>
+
+       <xs:complexType name="panel">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_table">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panel_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="panel_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/panes.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/panes.xsd
new file mode 100644 (file)
index 0000000..7ed05ef
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="panes" type="panes">
+               <xs:unique name="event_panes">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+               <xs:unique name="pack_panes">
+                       <xs:selector xpath="./*" />
+                       <xs:field xpath="@pack" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="panes_common">
+               <xs:choice minOccurs="0" maxOccurs="2">
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="unpress" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="fixed" type="xs:boolean" default="false" />
+               <xs:attribute name="right_size" type="ratio" default="0.5" />
+       </xs:complexType>
+
+       <xs:complexType name="panes">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_table">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="panes_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="panes_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnPanes" />
+                                       <xs:group ref="itemContainerOnPanes" />
+                                       <xs:group ref="primitiveWidgetOnPanes" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/popup.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/popup.xsd
new file mode 100644 (file)
index 0000000..7b2da14
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="popup" type="popup">
+               <xs:unique name="event_popup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="popup">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="timeout" />
+                                                               <xs:enumeration value="block,clicked" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attributeGroup ref="widgetCommon" /> <!-- since mobile 3.0 -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="title" type="xs:string" default="Title" />
+               <xs:attribute name="height" default="200">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:nonNegativeInteger">
+                                       <xs:maxInclusive value="400"></xs:maxInclusive>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="timeout" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="theme_bg" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/progressbar.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/progressbar.xsd
new file mode 100644 (file)
index 0000000..5664a0b
--- /dev/null
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="progressbar" type="progressbar">
+               <xs:unique name="event_progressbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="progressbar_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attributeGroup ref="widgetCommon" /> <!-- since mobile 3.0 -->
+               <xs:attribute name="pulse_mode" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="pulse" type="xs:boolean" default="false" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="value" type="ratio" default="0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <!-- <xs:attribute name="unit_format" type="xs:string" /> TODO -->
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="pending" />
+                                                       <xs:enumeration value="process_large" />
+                                                       <xs:enumeration value="process_medium" />
+                                                       <xs:enumeration value="process_small" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="progressbar_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="progressbar">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/radio.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/radio.xsd
new file mode 100644 (file)
index 0000000..d27cbaf
--- /dev/null
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="radio" type="radio">
+               <xs:unique name="event_radio">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="radio_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="state_value" type="xs:integer" />
+               <xs:attribute name="value" type="xs:integer" />
+               <xs:attribute name="text" type="xs:string" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="radio_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="radio">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_table">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/scroller.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/scroller.xsd
new file mode 100644 (file)
index 0000000..db52a22
--- /dev/null
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="scroller" type="scroller">
+               <xs:unique name="event_scroller">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="scroller_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="22">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,left" />
+                                                               <xs:enumeration value="scroll,right" />
+                                                               <xs:enumeration value="scroll,up" />
+                                                               <xs:enumeration value="scroll,down" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="vbar,drag" />
+                                                               <xs:enumeration value="vbar,press" />
+                                                               <xs:enumeration value="vbar,unpress" />
+                                                               <xs:enumeration value="hbar,drag" />
+                                                               <xs:enumeration value="hbar,press" />
+                                                               <xs:enumeration value="hbar,unpress" />
+                                                               <xs:enumeration value="scroll,page,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attributeGroup ref="widgetCommon" /> <!-- since mobile 3.0 -->
+               <xs:attribute name="direction" type="scroller.direction" default="no_block" />
+               <xs:attribute name="content_min_w" type="xs:boolean" default="false" />
+               <xs:attribute name="content_min_h" type="xs:boolean" default="false" />
+               <xs:attribute name="page_relative_w" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_relative_h" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_size_w" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="page_size_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="propagate_events" type="xs:boolean" default="true" />
+               <xs:attribute name="page_scroll_limit_w" type="xs:positiveInteger" />
+               <xs:attribute name="page_scroll_limit_h" type="xs:positiveInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="handler" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="scroller">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_table">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/slider.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/slider.xsd
new file mode 100644 (file)
index 0000000..bb0169b
--- /dev/null
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="slider" type="slider"> <!-- FIXME -->
+               <xs:unique name="event_slider">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="slider_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attributeGroup ref="widgetCommon" /> <!-- since mobile 3.0 -->
+               <xs:attribute name="indicator" type="xs:boolean" default="false" />
+               <xs:attribute name="min" type="xs:double" default="0.0" />
+               <xs:attribute name="max" type="xs:double" default="1.0" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="step" type="xs:double" default="0.05" />
+               <xs:attribute name="visible_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="on_focus" />
+                                       <xs:enumeration value="none" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="value" type="xs:double" default="0.0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <xs:attribute name="indicator_format" type="xs:string" />
+               <xs:attribute name="direction" type="direction" default="horizontal" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="center_point" />
+                                                       <xs:enumeration value="warning" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="slider_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="slider,drag,start" />
+                                                               <xs:enumeration value="slider,drag,stop" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="slider">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_table">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/spinner.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/spinner.xsd
new file mode 100644 (file)
index 0000000..262f7cf
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="spinner" type="spinner"> <!-- FIXME -->
+               <xs:unique name="event_spinner">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="spinner_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attributeGroup ref="widgetCommon" /> <!-- since mobile 3.0 -->
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="step" type="xs:double" default="1" />
+               <xs:attribute name="min" type="xs:double" default="0" />
+               <xs:attribute name="max" type="xs:double" default="100" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="horizontal">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="horizontal" />
+                                                       <xs:enumeration value="vertical" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="spinner_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="spinner,drag,start" />
+                                                               <xs:enumeration value="spinner,drag,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="spinner">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_table">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/table.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/table.xsd
new file mode 100644 (file)
index 0000000..cc92b41
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="table" type="table" />
+
+       <xs:complexType name="table_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="cols" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="rows" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+
+       <xs:complexType name="table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/toolbar.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/toolbar.xsd
new file mode 100644 (file)
index 0000000..aed0818
--- /dev/null
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="toolbar" type="toolbar">
+               <xs:unique name="event_toolbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="toolbar_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="homogeneous" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="align">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="ratio" />
+                                       </xs:simpleType>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="left" />
+                                                       <xs:enumeration value="right" />
+                                                       <xs:enumeration value="center" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="icon_size" type="xs:nonNegativeInteger"
+                       default="32" />
+               <xs:attribute name="shrink_mode" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="hide" />
+                                                       <xs:enumeration value="scroll" />
+                                                       <xs:enumeration value="menu" />
+                                                       <xs:enumeration value="expand" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="transverse_expand" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:union>
+                                                       <xs:simpleType>
+                                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                                       <xs:enumeration value="default" />
+                                                                       <xs:enumeration value="navigationbar" />
+                                                               </xs:restriction>
+                                                       </xs:simpleType>
+                                               </xs:union>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="toolbar_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="9">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="toolbaritem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="disable" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                                       <xs:attribute name="src" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="toolbar">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="toolbar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="toolbar_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="toolbar_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/view.xsd b/org.tizen.efluibuilder/res/xsd/mobile_3.0/widget/view.xsd
new file mode 100644 (file)
index 0000000..2b36d93
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="view" type="view">
+               <xs:unique name="widget_id">
+                       <xs:selector xpath=".//*" />
+                       <xs:field xpath="@id" />
+               </xs:unique>
+               <xs:key name="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="radioGroup" refer="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@radio_group" />
+               </xs:keyref>
+               <xs:unique name="event_signal">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="view">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="uib,view,create" />
+                                                               <xs:enumeration value="uib,view,destroy" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice minOccurs="0" maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                               <xs:group ref="popup" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attribute name="id" type="function_name" use="required" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="page_location_x" type="xs:integer" default="0" />
+               <xs:attribute name="page_location_y" type="xs:integer" default="0" />
+               <xs:attribute name="screen_orientation" default="full_sensor">          
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_sensor" />
+                                       <xs:enumeration value="only_portrait" />
+                                       <xs:enumeration value="only_landscape" />
+                                       <xs:enumeration value="full_sensor" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="type">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="view" />
+                                       <xs:enumeration value="popup" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/properties/org/tizen/efluibuilder/model/properties/ObjectFactory.java b/org.tizen.efluibuilder/res/xsd/properties/org/tizen/efluibuilder/model/properties/ObjectFactory.java
new file mode 100644 (file)
index 0000000..00f8f7a
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.03.08 at 04:51:38 PM KST 
+//
+
+
+package org.tizen.efluibuilder.model.properties;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.tizen.efluibuilder.model.properties package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.tizen.efluibuilder.model.properties
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link Properties }
+     * 
+     */
+    public Properties createProperties() {
+        return new Properties();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/res/xsd/properties/org/tizen/efluibuilder/model/properties/Properties.java b/org.tizen.efluibuilder/res/xsd/properties/org/tizen/efluibuilder/model/properties/Properties.java
new file mode 100644 (file)
index 0000000..2dc729a
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.03.08 at 04:51:38 PM KST 
+//
+
+
+package org.tizen.efluibuilder.model.properties;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="shape">
+ *           &lt;simpleType>
+ *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               &lt;enumeration value="square"/>
+ *               &lt;enumeration value="circle"/>
+ *             &lt;/restriction>
+ *           &lt;/simpleType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "shape"
+})
+@XmlRootElement(name = "properties")
+public class Properties {
+
+    @XmlElement(required = true)
+    protected String shape;
+
+    /**
+     * Gets the value of the shape property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getShape() {
+        return shape;
+    }
+
+    /**
+     * Sets the value of the shape property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setShape(String value) {
+        this.shape = value;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/res/xsd/properties/properties.xsd b/org.tizen.efluibuilder/res/xsd/properties/properties.xsd
new file mode 100644 (file)
index 0000000..566d725
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+       <xsd:element name="properties">
+               <xsd:complexType>
+                       <xsd:sequence>
+                               <xsd:element name="shape">
+                                       <xsd:simpleType>
+                                               <xsd:restriction base="xsd:string">
+                                                       <xsd:enumeration value="square" />
+                                                       <xsd:enumeration value="circle" />
+                                               </xsd:restriction>
+                                       </xsd:simpleType>
+                               </xsd:element>
+                       </xsd:sequence>
+               </xsd:complexType>
+       </xsd:element>
+</xsd:schema>
+       
diff --git a/org.tizen.efluibuilder/res/xsd/properties/tmp/properties.xml b/org.tizen.efluibuilder/res/xsd/properties/tmp/properties.xml
new file mode 100644 (file)
index 0000000..39e8910
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<properties>
+       <shape>square</shape>
+       <storyboard>
+               <view id="view1" location_x="475" location_y="10" />
+       </storyboard>
+</properties>
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/attribute/group.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/attribute/group.xsd
new file mode 100644 (file)
index 0000000..5361014
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="type.xsd" />
+
+       <xs:attributeGroup name="common">
+               <xs:attribute name="id" use="required" type="function_name" />
+               <xs:attribute type="align_h" name="align_h" default="fill" />
+               <xs:attribute type="align_v" name="align_v" default="fill" />
+               <xs:attribute type="weight" name="weight_h" default="1" />
+               <xs:attribute type="weight" name="weight_v" default="1" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnGrid">
+               <xs:attribute type="xs:integer" name="pack_x" />
+               <xs:attribute type="xs:integer" name="pack_y" />
+               <xs:attribute type="xs:positiveInteger" name="pack_w" />
+               <xs:attribute type="xs:positiveInteger" name="pack_h" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnTable">
+               <xs:attribute type="xs:integer" name="pack_col" />
+               <xs:attribute type="xs:integer" name="pack_row" />
+               <xs:attribute type="xs:positiveInteger" name="col_span" />
+               <xs:attribute type="xs:positiveInteger" name="row_span" />
+       </xs:attributeGroup>
+
+       <xs:complexType name="item.event">
+               <xs:attribute name="signal">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="itemselected" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="function_name" type="xs:string" />  <!-- FIXME : regex for function name -->
+               <xs:attributeGroup ref="storyboard" />
+       </xs:complexType>
+
+       <xs:attributeGroup name="storyboard">
+               <xs:attribute name="connection_wrapper" type="xs:string" />
+               <xs:attribute name="event_name" type="xs:string" />
+               <xs:attribute name="target" type="xs:string" />
+       </xs:attributeGroup>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/attribute/type.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/attribute/type.xsd
new file mode 100644 (file)
index 0000000..035132c
--- /dev/null
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:simpleType name="function_name">
+               <xs:restriction base="xs:string">
+                       <xs:pattern value="[a-zA-Z_]+[a-zA-Z0-9_]*" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="nonNegativeDouble">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="ratio">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+                       <xs:maxInclusive value="1"></xs:maxInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="align_h">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="align_v">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="top" />
+                                       <xs:enumeration value="bottom" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="weight">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <!-- <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="expand" /> </xs:restriction> </xs:simpleType> -->
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="standard.icon">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="" />
+                       <xs:enumeration value="apps" />
+                       <xs:enumeration value="arrow_down" />
+                       <xs:enumeration value="arrow_left" />
+                       <xs:enumeration value="arrow_right" />
+                       <xs:enumeration value="arrow_up" />
+                       <xs:enumeration value="chat" />
+                       <xs:enumeration value="clock" />
+                       <xs:enumeration value="close" />
+                       <xs:enumeration value="delete" />
+                       <xs:enumeration value="edit" />
+                       <xs:enumeration value="file" />
+                       <xs:enumeration value="home" />
+                       <xs:enumeration value="media_player/forward" />
+                       <xs:enumeration value="media_player/info" />
+                       <xs:enumeration value="media_player/next" />
+                       <xs:enumeration value="media_player/pause" />
+                       <xs:enumeration value="media_player/play" />
+                       <xs:enumeration value="media_player/prev" />
+                       <xs:enumeration value="media_player/rewind" />
+                       <xs:enumeration value="media_player/stop" />
+                       <xs:enumeration value="menu/apps" />
+                       <xs:enumeration value="menu/arrow_up" />
+                       <xs:enumeration value="menu/arrow_down" />
+                       <xs:enumeration value="menu/arrow_left" />
+                       <xs:enumeration value="menu/arrow_right" />
+                       <xs:enumeration value="menu/chat" />
+                       <xs:enumeration value="menu/clock" />
+                       <xs:enumeration value="menu/close" />
+                       <xs:enumeration value="menu/delete" />
+                       <xs:enumeration value="menu/edit" />
+                       <xs:enumeration value="menu/folder" />
+                       <xs:enumeration value="menu/file" />
+                       <xs:enumeration value="menu/home" />
+                       <xs:enumeration value="menu/refresh" />
+                       <xs:enumeration value="no_photo" />
+                       <xs:enumeration value="photo/no_photo" />
+                       <xs:enumeration value="refresh" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="list.selectmode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="display_only" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.policy">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="auto" />
+                                       <xs:enumeration value="true" />
+                                       <xs:enumeration value="false" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="direction">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="vertical" />
+                       <xs:enumeration value="horizontal" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.direction">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="direction" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_block" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="list.mode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="compress" />
+                                       <xs:enumeration value="scroll" />
+                                       <xs:enumeration value="limit" />
+                                       <xs:enumeration value="expand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/element/configuration.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/element/configuration.xsd
new file mode 100644 (file)
index 0000000..963d810
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/type.xsd" />
+
+       <xs:element name="configuration"> <!-- FIXME -->
+               <xs:complexType>
+                       <xs:attribute name="device" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="FHD" />
+                                               <xs:enumeration value="HD" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="id" type="function_name" use="required" />
+            <xs:attribute name="name" use="required">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:minLength value="1"/>
+                </xs:restriction>
+            </xs:simpleType>
+            </xs:attribute>
+                       <xs:attribute name="orientation" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="portrait" />
+                                               <xs:enumeration value="landscape" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="type" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="common" />
+                                               <xs:enumeration value="specific" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+               </xs:complexType>
+       </xs:element>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/element/group.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/element/group.xsd
new file mode 100644 (file)
index 0000000..cb4caa6
--- /dev/null
@@ -0,0 +1,294 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../widget/bg.xsd" />
+       <xs:include schemaLocation="../widget/box.xsd" />
+       <xs:include schemaLocation="../widget/button.xsd" />
+       <xs:include schemaLocation="../widget/calendar.xsd" />
+       <xs:include schemaLocation="../widget/check.xsd" />
+       <xs:include schemaLocation="../widget/ctxpopup.xsd" />
+       <xs:include schemaLocation="../widget/datetime.xsd" />
+       <xs:include schemaLocation="../widget/entry.xsd" />
+       <xs:include schemaLocation="../widget/gengrid.xsd" />
+       <xs:include schemaLocation="../widget/genlist.xsd" />
+       <xs:include schemaLocation="../widget/grid.xsd" />
+       <!-- <xs:include schemaLocation="../widget/hoversel.xsd" /> -->
+       <xs:include schemaLocation="../widget/image.xsd" />
+       <xs:include schemaLocation="../widget/label.xsd" />
+       <xs:include schemaLocation="../widget/layout.xsd" />
+       <xs:include schemaLocation="../widget/popup.xsd" />
+       <xs:include schemaLocation="../widget/progressbar.xsd" />
+       <xs:include schemaLocation="../widget/radio.xsd" />
+       <xs:include schemaLocation="../widget/scroller.xsd" />
+       <xs:include schemaLocation="../widget/slider.xsd" />
+       <xs:include schemaLocation="../widget/spinner.xsd" />
+       <xs:include schemaLocation="../widget/table.xsd" />
+
+       <xs:group name="rootContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="popup">
+               <xs:choice>
+                       <xs:element ref="popup" />
+                       <xs:element ref="ctxpopup" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainer">
+               <xs:choice>
+                       <xs:element ref="gengrid" />
+                       <xs:element ref="genlist" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidget">
+               <xs:choice>
+                       <xs:element ref="bg" />
+                       <xs:element ref="button" />
+                       <xs:element ref="calendar" />
+                       <xs:element ref="check" />
+                       <xs:element ref="datetime" />
+                       <xs:element ref="entry" />
+                       <xs:element ref="image" />
+                       <xs:element ref="label" />
+                       <xs:element ref="layout" />
+                       <xs:element ref="progressbar" />
+                       <xs:element ref="radio" />
+                       <xs:element ref="slider" />
+                       <xs:element ref="spinner" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_grid" />
+                       <xs:element name="box" type="box_on_grid" />
+                       <xs:element name="table" type="table_on_grid" />
+                       <xs:element name="scroller" type="scroller_on_grid">
+                               <xs:unique name="event_scroller_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="gengrid" type="gengrid_on_grid">
+                               <xs:unique name="event_gengrid_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_grid">
+                               <xs:unique name="event_genlist_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnGrid">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_grid" />
+                       <xs:element name="button" type="button_on_grid">
+                               <xs:unique name="event_button_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="calendar" type="calendar_on_grid">
+                               <xs:unique name="event_calendar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_grid">
+                               <xs:unique name="event_check_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_grid">
+                               <xs:unique name="event_datetime_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_grid">
+                               <xs:unique name="event_entry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_grid">
+                               <xs:unique name="event_image_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_grid">
+                               <xs:unique name="event_label_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_grid">
+                               <xs:unique name="event_layout_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_grid">
+                               <xs:unique name="event_progressbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_grid">
+                               <xs:unique name="event_radio_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_grid">
+                               <xs:unique name="event_slider_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_grid">
+                               <xs:unique name="event_spinner_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnTable">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_table" />
+                       <xs:element name="box" type="box_on_table" />
+                       <xs:element name="table" type="table_on_table" />
+                       <xs:element name="scroller" type="scroller_on_table">
+                               <xs:unique name="event_scroller_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnTable">
+               <xs:choice>
+                       <xs:element name="gengrid" type="gengrid_on_table">
+                               <xs:unique name="event_gengrid_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="genlist" type="genlist_on_table">
+                               <xs:unique name="event_genlist_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnTable">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_table" />
+                       <xs:element name="button" type="button_on_table">
+                               <xs:unique name="event_button_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="calendar" type="calendar_on_table">
+                               <xs:unique name="event_calendar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_table">
+                               <xs:unique name="event_check_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_table">
+                               <xs:unique name="event_datetime_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_table">
+                               <xs:unique name="event_entry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_table">
+                               <xs:unique name="event_image_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_table">
+                               <xs:unique name="event_label_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_table">
+                               <xs:unique name="event_layout_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_table">
+                               <xs:unique name="event_progressbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_table">
+                               <xs:unique name="event_radio_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_table">
+                               <xs:unique name="event_slider_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_table">
+                               <xs:unique name="event_spinner_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/element/variation.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/element/variation.xsd
new file mode 100644 (file)
index 0000000..a62bfcf
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd"></xs:include>
+
+       <xs:element name="variation" type="variation" />
+
+       <xs:complexType name="variation">
+               <xs:attribute type="xs:string" name="config_ref" />
+               <xs:attribute type="xs:boolean" name="visible" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnGrid"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_table">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnTable"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/layout.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/layout.xsd
new file mode 100644 (file)
index 0000000..f7f6c39
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="element/configuration.xsd" />
+
+       <!-- definition of tizen.view -->
+       <xs:include schemaLocation="widget/view.xsd" />
+
+       <xs:element name="document">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="mscreen" />
+                               <xs:element ref="views" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:key name="config">
+                       <xs:selector xpath="mscreen/configuration" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="config_ref" refer="config">
+                       <xs:selector xpath=".//variation" />
+                       <xs:field xpath="@config_ref" />
+               </xs:keyref>
+       </xs:element>
+       <xs:element name="mscreen">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="configuration" minOccurs="1" maxOccurs="6" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:unique name="qualifiers">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@device" />
+                       <xs:field xpath="@orientation" />
+               </xs:unique>
+               <xs:unique name="config_name">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@name" />
+               </xs:unique>
+       </xs:element>
+       <xs:element name="views">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="view" minOccurs="0" maxOccurs="unbounded" />
+                       </xs:sequence>
+                       <xs:attribute type="xs:string" name="startup"></xs:attribute>
+               </xs:complexType>
+               <xs:key name="view_id">
+                       <xs:selector xpath="view" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="startup" refer="view_id">
+                       <xs:selector xpath="." />
+                       <xs:field xpath="@startup" />
+               </xs:keyref>
+               <xs:keyref name="view_ref" refer="view_id">
+                       <xs:selector xpath=".//naviframe" />
+                       <xs:field xpath="@view" />
+               </xs:keyref>
+               <xs:keyref name="event_target" refer="view_id">
+                       <xs:selector xpath=".//event" />
+                       <xs:field xpath="@target" />
+               </xs:keyref>
+       </xs:element>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/bg.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/bg.xsd
new file mode 100644 (file)
index 0000000..ee5cfd3
--- /dev/null
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="bg" type="background" />
+
+       <xs:complexType name="background_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="color" default="#000000">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="option" default="scale">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="center" />
+                                                       <xs:enumeration value="scale" />
+                                                       <xs:enumeration value="stretch" />
+                                                       <xs:enumeration value="tile" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="background">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_table">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/box.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/box.xsd
new file mode 100644 (file)
index 0000000..903b852
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="box" type="box" />
+
+       <xs:complexType name="box_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:group ref="widgetContainer" />
+                       <xs:group ref="itemContainer" />
+                       <xs:group ref="primitiveWidget" />
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="transparency" type="xs:boolean" default="false" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" default="0" />
+       </xs:complexType>
+
+       <xs:complexType name="box">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_table">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/button.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/button.xsd
new file mode 100644 (file)
index 0000000..d21587c
--- /dev/null
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="button" type="button">
+               <xs:unique name="event_button">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="button_common">
+               <xs:choice>
+                       <xs:element ref="image" minOccurs="0" maxOccurs="1" />
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="repeated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="unpressed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Button" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="anchor" />
+                                                       <xs:enumeration value="bottom" />
+                                                       <xs:enumeration value="circle" />
+                                                       <xs:enumeration value="dropdown" />
+                                                       <xs:enumeration value="icon_reorder" />
+                                                       <xs:enumeration value="option" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="button">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_table">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/calendar.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/calendar.xsd
new file mode 100644 (file)
index 0000000..d7041f6
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="calendar" type="calendar">
+               <xs:unique name="event_calendar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="calendar_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="5">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="display,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="min_year" default="1902">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:positiveInteger">
+                                       <xs:minInclusive value="1902" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="max_year" default="-1">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:positiveInteger">
+                                                       <xs:minInclusive value="1902" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:integer">
+                                                       <xs:enumeration value="-1"></xs:enumeration>
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="ondemand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="interval" type="nonNegativeDouble" default="0.85" />
+       </xs:complexType>
+
+       <xs:complexType name="calendar">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="calendar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="calendar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="calendar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/check.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/check.xsd
new file mode 100644 (file)
index 0000000..9b02960
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="check" type="check">
+               <xs:unique name="event_check">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="check_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Check" />
+               <xs:attribute name="state" type="xs:boolean" default="false" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">       <!-- FIXME -->
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="favorite" />
+                                       <xs:enumeration value="on&amp;off" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="check">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_table">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/ctxpopup.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/ctxpopup.xsd
new file mode 100644 (file)
index 0000000..fa4f41d
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="ctxpopup" type="ctxpopup">
+               <xs:unique name="event_ctxpopup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="ctxpopup">
+               <xs:choice minOccurs="1">
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="dismissed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="ctxpopupitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="CtxPopupItem" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">       <!-- TODO : default style? -->
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="dropdown/list" />
+                                       <xs:enumeration value="dropdown/label" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/datetime.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/datetime.xsd
new file mode 100644 (file)
index 0000000..d75138a
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="datetime" type="datetime">
+               <xs:unique name="event_datetime">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="datetime_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <!-- <xs:attribute name="format"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64" /> </xs:restriction> </xs:simpleType> </xs:attribute> -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="date_layout" />
+                                       <xs:enumeration value="time_layout" />
+                                       <xs:enumeration value="time_layout_24hr" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="datetime">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_table">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/entry.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/entry.xsd
new file mode 100644 (file)
index 0000000..6f4cb45
--- /dev/null
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="entry" type="entry">
+               <xs:unique name="event_entry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="entry_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="33">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="aborted" />
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="anchor,clicked" />
+                                                               <xs:enumeration value="anchor,down" />
+                                                               <xs:enumeration value="anchor,hover,opened" />
+                                                               <xs:enumeration value="anchor,in" />
+                                                               <xs:enumeration value="anchor,out" />
+                                                               <xs:enumeration value="anchor,up" />
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="changed,user" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,triple" />
+                                                               <xs:enumeration value="cursor,changed" />
+                                                               <xs:enumeration value="cursor,changed,manual" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="maxlength,reached" />
+                                                               <xs:enumeration value="preedit,changed" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="redo,request" />
+                                                               <xs:enumeration value="selection,changed" />
+                                                               <xs:enumeration value="selection,cleared" />
+                                                               <xs:enumeration value="selection,copy" />
+                                                               <xs:enumeration value="selection,cut" />
+                                                               <xs:enumeration value="selection,paste" />
+                                                               <xs:enumeration value="selection,start" />
+                                                               <xs:enumeration value="text,set,done" />
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="undo,request" />
+                                                               <xs:enumeration value="rejected" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="scroll" type="xs:boolean" default="false" />
+               <xs:attribute name="single_line" type="xs:boolean" default="false" />
+               <xs:attribute name="password" type="xs:boolean" default="false" />
+               <xs:attribute name="line_wrap">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="char" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="mixed" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <!-- <xs:attribute type="xs:boolean" name="prediction_allow" default="false" /> TODO -->
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="context_menu" type="xs:boolean" default="true" />
+               <xs:attribute name="autocapital_type" default="none">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="sentence" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="file_text_format" default="plain_utf8">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="plain_utf8" />
+                                                       <xs:enumeration value="markup_utf8" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <!-- <xs:attribute name="input_panel_language" default="automatic"> TODO <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="automatic" /> 
+                       <xs:enumeration value="alphabet" /> </xs:restriction> </xs:simpleType> </xs:attribute> -->
+               <!-- <xs:attribute type="xs:boolean" name="selection_handler" default="true" /> TODO -->
+               <xs:attribute name="input_panel_return_key" type="xs:boolean" default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Entry" />
+               <xs:attribute name="src" type="xs:string" />
+       </xs:complexType>
+
+       <xs:complexType name="entry">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/gengrid.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/gengrid.xsd
new file mode 100644 (file)
index 0000000..2d2ec78
--- /dev/null
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+
+       <xs:element name="gengrid" type="gengrid">      <!-- TODO : FIXME -->
+               <xs:unique name="event_gengrid">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="gengrid_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="38">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,right" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="scroll,page,changed" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="index,update" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                               <xs:enumeration value="item,reorder,anim,start" />
+                                                               <xs:enumeration value="item,reorder,anim,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="gengriditem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="style" default="default">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="default" />
+                                                               <xs:enumeration value="type1" />
+                                                               <xs:enumeration value="type2" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="src" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean" default="false" />
+                                       <xs:attribute name="disabled" type="xs:boolean" default="false" />
+                                       <xs:attribute name="align" default="none">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="none" />
+                                                               <xs:enumeration value="in" />
+                                                               <xs:enumeration value="left" />
+                                                               <xs:enumeration value="center" />
+                                                               <!-- <xs:enumeration value="right" /> -->
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="popup" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="select_mode" type="list.selectmode" default="default" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="item_size_h" type="xs:integer" default="200" />
+               <xs:attribute name="item_size_w" type="xs:integer" default="200" />
+               <xs:attribute name="multi_select" type="xs:boolean" default="false" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+               <xs:attribute name="scroll_loop" type="xs:boolean" default="false" />
+       </xs:complexType>
+
+       <xs:complexType name="gengrid">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="gengrid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="gengrid_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/genlist.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/genlist.xsd
new file mode 100644 (file)
index 0000000..41f96da
--- /dev/null
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="genlist" type="genlist">
+               <xs:unique name="event_genlist">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="genlist_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="48">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,right" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,request" />
+                                                               <xs:enumeration value="contract,request" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="multi,swipe,left" />
+                                                               <xs:enumeration value="multi,swipe,right" />
+                                                               <xs:enumeration value="multi,swipe,up" />
+                                                               <xs:enumeration value="multi,swipe,down" />
+                                                               <xs:enumeration value="multi,pinch,out" />
+                                                               <xs:enumeration value="multi,pinch,in" />
+                                                               <xs:enumeration value="swipe" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="moved,after" />
+                                                               <xs:enumeration value="moved,before" />
+                                                               <xs:enumeration value="index,update" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="tree,effect,finished" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="genlistitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="style" default="default">
+                                               <xs:simpleType>
+                                                       <xs:union>
+                                                               <xs:simpleType>
+                                                                       <xs:restriction base="xs:string">
+                                                                               <xs:enumeration value="type1" />
+                                                                               <xs:enumeration value="type2" />
+                                                                               <xs:enumeration value="multiline" />
+                                                                               <xs:enumeration value="full" />
+                                                                               <xs:enumeration value="group_index" />
+                                                                               <xs:enumeration value="group_index/expandable" />
+                                                                               <xs:enumeration value="default" />
+                                                                               <xs:enumeration value="double_label" />
+                                                                               <xs:enumeration value="one_icon" />
+                                                                               <xs:enumeration value="end_icon" />
+                                                                       </xs:restriction>
+                                                               </xs:simpleType>
+                                                       </xs:union>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="sub_text" type="xs:string" />
+                                       <xs:attribute name="item_type" default="none">
+                                               <xs:simpleType>
+                                                       <xs:union>
+                                                               <xs:simpleType>
+                                                                       <xs:restriction base="xs:string">
+                                                                               <xs:enumeration value="none" />
+                                                                               <xs:enumeration value="tree" />
+                                                                               <xs:enumeration value="group" />
+                                                                       </xs:restriction>
+                                                               </xs:simpleType>
+                                                       </xs:union>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="selected" type="xs:boolean" default="false" />
+                                       <xs:attribute name="align" default="none">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="none" />
+                                                               <xs:enumeration value="in" />
+                                                               <xs:enumeration value="left" />
+                                                               <xs:enumeration value="center" />
+                                                               <!-- <xs:enumeration value="right" /> -->
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="image_path" type="xs:string" />
+                                       <xs:attribute name="standard_icon" type="standard.icon" default="" />
+                                       <xs:attribute name="end_image_path" type="xs:string" />
+                                       <xs:attribute name="end_standard_icon" type="standard.icon" default="" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <!-- <xs:attribute name="focus_on_selection" type="xs:boolean" default="false" /> -->
+               <xs:attribute name="select_mode" type="list.selectmode" default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean" default="false" />
+               <!-- <xs:attribute name="multi_select_mode" default="default"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration 
+                       value="with_control" /> </xs:restriction> </xs:simpleType> </xs:attribute> -->
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+               <xs:attribute name="scroll_loop" type="xs:boolean" default="false" />
+               <xs:attribute name="style" default="solid/default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="solid/default" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="genlist">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_table">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/grid.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/grid.xsd
new file mode 100644 (file)
index 0000000..1387b45
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="grid" type="grid" />
+
+       <xs:complexType name="grid_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:group ref="widgetContainerOnGrid" />
+                       <xs:group ref="itemContainerOnGrid" />
+                       <xs:group ref="primitiveWidgetOnGrid" />
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="vsize_w" type="xs:positiveInteger" default="1000" />
+               <xs:attribute name="vsize_h" type="xs:positiveInteger" default="1000" />
+       </xs:complexType>
+
+       <xs:complexType name="grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/hoversel.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/hoversel.xsd
new file mode 100644 (file)
index 0000000..ac2c07d
--- /dev/null
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="hoversel" type="hoversel">
+               <xs:unique name="event_hoversel">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="hoversel_common">
+               <xs:choice minOccurs="1">
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="dismissed" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="hoverselitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute type="xs:string" name="text" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="horizontal" type="xs:boolean" default="false" />
+               <xs:attribute name="style" type="xs:string" />
+       </xs:complexType>
+
+       <!-- <xs:complexType name="hoversel_grid"> <xs:choice minOccurs="1"> <xs:element name="event" minOccurs="0"> <xs:complexType> <xs:attribute name="ondismissed" type="xs:string" 
+               /> </xs:complexType> </xs:element> <xs:element name="hoverselitem" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="2"> 
+               <xs:element name="event" type="item.event" minOccurs="0" /> <xs:element ref="image" minOccurs="0" /> </xs:choice> <xs:attribute name="id" type="function_name" use="required" 
+               /> <xs:attribute type="xs:string" name="text" /> </xs:complexType> </xs:element> </xs:choice> <xs:attributeGroup ref="common" /> <xs:attributeGroup ref="packOnGrid" 
+               /> <xs:attribute type="xs:boolean" name="disable" default="false" /> <xs:attribute type="xs:boolean" name="visible" default="true" /> <xs:attribute type="xs:boolean" 
+               name="horizontal" default="false" /> <xs:attribute name="style" type="xs:string" /> </xs:complexType> <xs:complexType name="hoversel_table"> <xs:choice minOccurs="1"> 
+               <xs:element name="event" minOccurs="0"> <xs:complexType> <xs:attribute name="ondismissed" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="hoverselitem" 
+               minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="2"> <xs:element name="event" type="item.event" minOccurs="0" /> <xs:element 
+               ref="image" minOccurs="0" /> </xs:choice> <xs:attribute name="id" type="function_name" use="required" /> <xs:attribute type="xs:string" name="text" /> </xs:complexType> 
+               </xs:element> </xs:choice> <xs:attributeGroup ref="common" /> <xs:attributeGroup ref="packOnTable" /> <xs:attribute type="xs:boolean" name="disable" default="false" 
+               /> <xs:attribute type="xs:boolean" name="visible" default="true" /> <xs:attribute type="xs:boolean" name="horizontal" default="false" /> <xs:attribute name="style" 
+               type="xs:string" /> </xs:complexType> <xs:complexType name="hoversel_panes"> <xs:choice minOccurs="1"> <xs:element name="event" minOccurs="0"> <xs:complexType> <xs:attribute 
+               name="ondismissed" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="hoverselitem" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:choice 
+               minOccurs="0" maxOccurs="2"> <xs:element name="event" type="item.event" minOccurs="0" /> <xs:element ref="image" minOccurs="0" /> </xs:choice> <xs:attribute name="id" 
+               type="function_name" use="required" /> <xs:attribute type="xs:string" name="text" /> </xs:complexType> </xs:element> </xs:choice> <xs:attributeGroup ref="common" 
+               /> <xs:attributeGroup ref="packOnPanes" /> <xs:attribute type="xs:boolean" name="disable" default="false" /> <xs:attribute type="xs:boolean" name="visible" default="true" 
+               /> <xs:attribute type="xs:boolean" name="horizontal" default="false" /> <xs:attribute name="style" type="xs:string" /> </xs:complexType> -->
+
+       <xs:complexType name="hoversel">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="hoversel_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="hoversel_on_table">
+               <xs:complexContent>
+                       <xs:extension base="hoversel_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/image.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/image.xsd
new file mode 100644 (file)
index 0000000..9c001ad
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="image" type="image">
+               <xs:unique name="event_image">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="image_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="drop" />
+                                                               <xs:enumeration value="clicked" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <!-- <xs:attribute name="group" type="xs:string" /> TODO : postpone -->
+               <xs:attribute name="aspect_fixed" type="xs:boolean" default="false" />
+               <xs:attribute name="fill_outside" type="xs:boolean" default="false" />
+               <xs:attribute name="resizable_up" type="xs:boolean" default="true" />
+               <xs:attribute name="resizable_down" type="xs:boolean" default="true" />
+               <xs:attribute name="no_scale" type="xs:boolean" default="false" />
+               <!-- <xs:attribute name="orient" default="orient_none"> <xs:simpletype> <xs:union> <xs:simpletype> <xs:restriction base="xs:string"> <xs:enumeration value="orient_none" 
+                       /> <xs:enumeration value="orient_0" /> <xs:enumeration value="rotate_90" /> <xs:enumeration value="orient_90" /> <xs:enumeration value="rotate_180" /> <xs:enumeration 
+                       value="orient_180" /> <xs:enumeration value="rotate_270" /> <xs:enumeration value="orient_270" /> <xs:enumeration value="flip_horizontal" /> <xs:enumeration value="flip_vertical" 
+                       /> <xs:enumeration value="flip_transpose" /> <xs:enumeration value="flip_transverse" /> </xs:restriction> </xs:simpleType> <xs:simpleType> <xs:restriction base="xs:integer"> 
+                       <xs:minInclusive value="0"></xs:minInclusive> <xs:maxInclusive value="7"></xs:maxInclusive> </xs:restriction> </xs:simpleType> </xs:union> </xs:simpleType> </xs:attribute> -->
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="image">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_table">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/label.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/label.xsd
new file mode 100644 (file)
index 0000000..1f8103f
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="label" type="label">
+               <xs:unique name="event_label">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="label_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="slide,end" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="ellipsis" type="xs:boolean" default="false" />
+               <xs:attribute name="wrap_width" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="line_wrap" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="char" />
+                                                       <xs:enumeration value="word" />
+                                                       <xs:enumeration value="mixed" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Label" />
+       </xs:complexType>
+
+       <xs:complexType name="label">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_table">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/layout.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/layout.xsd
new file mode 100644 (file)
index 0000000..e03278e
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="layout" type="layout">
+               <xs:unique name="event_layout">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="layout_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <!-- <xs:attribute type="xs:string" name="class" use="required" /> TODO <xs:attribute type="xs:string" name="style" use="required" /> -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="group" type="xs:string" default="" />
+       </xs:complexType>
+
+       <xs:complexType name="layout">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_table">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/popup.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/popup.xsd
new file mode 100644 (file)
index 0000000..2cb1db6
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="popup" type="popup">
+               <xs:unique name="event_popup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="popup">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="timeout" />
+                                                               <xs:enumeration value="block,clicked" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="item,focused" />
+                                                               <xs:enumeration value="item,unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="title" type="xs:string" default="Title" />
+               <xs:attribute name="height" default="200">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:nonNegativeInteger">
+                                       <xs:maxInclusive value="400"></xs:maxInclusive>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="timeout" type="xs:nonNegativeInteger" default="0" />
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/progressbar.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/progressbar.xsd
new file mode 100644 (file)
index 0000000..26349d7
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="progressbar" type="progressbar">
+               <xs:unique name="event_progressbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="progressbar_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="pulse_mode" type="xs:boolean" default="false" />
+               <xs:attribute name="pulse" type="xs:boolean" default="false" />
+               <xs:attribute name="direction" type="direction" default="horizontal" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="value" type="ratio" default="0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <!-- <xs:attribute name="unit_format" type="xs:string" /> TODO -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="pending" />
+                                       <xs:enumeration value="process_large" />
+                                       <xs:enumeration value="process_medium" />
+                                       <xs:enumeration value="process_small" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/radio.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/radio.xsd
new file mode 100644 (file)
index 0000000..41b2b47
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="radio" type="radio">
+               <xs:unique name="event_radio">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="radio_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="state_value" type="xs:integer" />
+               <xs:attribute name="value" type="xs:integer" />
+               <xs:attribute name="text" type="xs:string" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <!-- <xs:attribute name="radio_group" type="xs:string" /> -->
+       </xs:complexType>
+
+       <xs:complexType name="radio">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_table">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/scroller.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/scroller.xsd
new file mode 100644 (file)
index 0000000..d6b9355
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="scroller" type="scroller">
+               <xs:unique name="event_scroller">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="scroller_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="22">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,left" />
+                                                               <xs:enumeration value="scroll,right" />
+                                                               <xs:enumeration value="scroll,up" />
+                                                               <xs:enumeration value="scroll,down" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="vbar,drag" />
+                                                               <xs:enumeration value="vbar,press" />
+                                                               <xs:enumeration value="vbar,unpress" />
+                                                               <xs:enumeration value="hbar,drag" />
+                                                               <xs:enumeration value="hbar,press" />
+                                                               <xs:enumeration value="hbar,unpress" />
+                                                               <xs:enumeration value="scroll,page,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:group ref="widgetContainer" />
+                       <xs:group ref="itemContainer" />
+                       <xs:group ref="primitiveWidget" />
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="scroller.direction" default="no_block" />
+               <!-- <xs:attribute name="loop_h" type="xs:boolean" default="false" /> -->
+               <!-- <xs:attribute name="loop_v" type="xs:boolean" default="false" /> -->
+               <xs:attribute name="content_min_w" type="xs:boolean" default="false" />
+               <xs:attribute name="content_min_h" type="xs:boolean" default="false" />
+               <xs:attribute name="page_relative_w" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_relative_h" type="nonNegativeDouble" default="0" />
+               <!-- <xs:attribute name="wheel" type="xs:boolean" default="true" /> -->
+               <xs:attribute name="page_size_w" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="page_size_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="propagate_events" type="xs:boolean" default="true" />
+               <xs:attribute name="page_scroll_limit_w" type="xs:positiveInteger" />
+               <xs:attribute name="page_scroll_limit_h" type="xs:positiveInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+       </xs:complexType>
+
+       <xs:complexType name="scroller">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_table">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/slider.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/slider.xsd
new file mode 100644 (file)
index 0000000..b6263d7
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="slider" type="slider"> <!-- FIXME -->
+               <xs:unique name="event_slider">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="slider_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="slider,drag,start" />
+                                                               <xs:enumeration value="slider,drag,stop" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="indicator" type="xs:boolean" default="false" />
+               <xs:attribute name="min" type="xs:double" default="0.0" />
+               <xs:attribute name="max" type="xs:double" default="1.0" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="step" type="xs:double" default="0.05" />
+               <xs:attribute name="visible_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="on_focus" />
+                                       <xs:enumeration value="none" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="value" type="xs:double" default="0.0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <xs:attribute name="indicator_format" type="xs:string" />
+               <xs:attribute name="direction" type="direction" default="horizontal" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="center_point" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="slider">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_table">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/spinner.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/spinner.xsd
new file mode 100644 (file)
index 0000000..0a7abae
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="spinner" type="spinner"> <!-- FIXME -->
+               <xs:unique name="event_spinner">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="spinner_common">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="7">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="spinner,drag,start" />
+                                                               <xs:enumeration value="spinner,drag,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <!-- <xs:attribute name="label_format" type="xs:string" /> -->
+               <xs:attribute name="step" type="xs:double" default="1" />
+               <!-- <xs:attribute name="wrap" type="xs:boolean" default="false" /> -->
+               <!-- <xs:attribute name="interval" type="nonNegativeDouble" default="0.85" /> -->
+               <xs:attribute name="min" type="xs:double" default="0" />
+               <xs:attribute name="max" type="xs:double" default="100" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <!-- <xs:attribute type="xs:double" name="value" default="0" /> TODO -->
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="vertical" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="spinner">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_table">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/table.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/table.xsd
new file mode 100644 (file)
index 0000000..557c87d
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="table" type="table" />
+
+       <xs:complexType name="table_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:group ref="widgetContainerOnTable" />
+                       <xs:group ref="itemContainerOnTable" />
+                       <xs:group ref="primitiveWidgetOnTable" />
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="cols" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="rows" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+
+       <xs:complexType name="table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/view.xsd b/org.tizen.efluibuilder/res/xsd/tv_3.0/widget/view.xsd
new file mode 100644 (file)
index 0000000..7cac363
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="view" type="view">
+               <xs:unique name="widget_id">
+                       <xs:selector xpath=".//*" />
+                       <xs:field xpath="@id" />
+               </xs:unique>
+               <xs:key name="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="radioGroup" refer="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@radio_group" />
+               </xs:keyref>
+               <xs:unique name="event_signal">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="view">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="uib,view,create" />
+                                                               <xs:enumeration value="uib,view,destroy" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice minOccurs="0" maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                               <xs:group ref="popup" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attribute name="id" type="function_name" use="required" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="page_location_x" type="xs:integer" default="0" />
+               <xs:attribute name="page_location_y" type="xs:integer" default="0" />
+               <xs:attribute name="screen_orientation" default="full_sensor">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_sensor" />
+                                       <xs:enumeration value="only_portrait" />
+                                       <xs:enumeration value="only_landscape" />
+                                       <xs:enumeration value="full_sensor" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="type">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="view" />
+                                       <xs:enumeration value="popup" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/attribute/group.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/attribute/group.xsd
new file mode 100644 (file)
index 0000000..b1621fe
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="type.xsd" />
+
+       <xs:attributeGroup name="common">
+               <xs:attribute name="id" use="required" type="function_name" />
+               <xs:attribute type="align_h" name="align_h" default="fill" />
+               <xs:attribute type="align_v" name="align_v" default="fill" />
+               <xs:attribute type="weight" name="weight_h" default="1" />
+               <xs:attribute type="weight" name="weight_v" default="1" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnGrid">
+               <xs:attribute type="xs:integer" name="pack_x" />
+               <xs:attribute type="xs:integer" name="pack_y" />
+               <xs:attribute type="xs:positiveInteger" name="pack_w" />
+               <xs:attribute type="xs:positiveInteger" name="pack_h" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnTable">
+               <xs:attribute type="xs:integer" name="pack_col" />
+               <xs:attribute type="xs:integer" name="pack_row" />
+               <xs:attribute type="xs:positiveInteger" name="col_span" />
+               <xs:attribute type="xs:positiveInteger" name="row_span" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnPanes">
+               <xs:attribute name="pack">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:attributeGroup>
+
+       <xs:complexType name="item.event">
+               <xs:attribute name="signal">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="itemselected" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="function_name" type="xs:string" />  <!-- FIXME : regex for function name -->
+               <xs:attributeGroup ref="storyboard" />
+       </xs:complexType>
+
+       <xs:attributeGroup name="storyboard">
+               <xs:attribute name="connection_wrapper" type="xs:string" />
+               <xs:attribute name="event_name" type="xs:string" />
+               <xs:attribute name="target" type="xs:string" />
+       </xs:attributeGroup>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/attribute/type.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/attribute/type.xsd
new file mode 100644 (file)
index 0000000..93ea2e8
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:simpleType name="function_name">
+               <xs:restriction base="xs:string">
+                       <xs:pattern value="[a-zA-Z_]+[a-zA-Z0-9_]*" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="nonNegativeDouble">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="ratio">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+                       <xs:maxInclusive value="1"></xs:maxInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="align_h">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="align_v">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="top" />
+                                       <xs:enumeration value="bottom" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="weight">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="standard.icon">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="" />
+                       <xs:enumeration value="apps" />
+                       <xs:enumeration value="arrow_down" />
+                       <xs:enumeration value="arrow_left" />
+                       <xs:enumeration value="arrow_right" />
+                       <xs:enumeration value="arrow_up" />
+                       <xs:enumeration value="chat" />
+                       <xs:enumeration value="clock" />
+                       <xs:enumeration value="close" />
+                       <xs:enumeration value="delete" />
+                       <xs:enumeration value="edit" />
+                       <xs:enumeration value="file" />
+                       <xs:enumeration value="home" />
+                       <xs:enumeration value="media_player/forward" />
+                       <xs:enumeration value="media_player/info" />
+                       <xs:enumeration value="media_player/next" />
+                       <xs:enumeration value="media_player/pause" />
+                       <xs:enumeration value="media_player/play" />
+                       <xs:enumeration value="media_player/prev" />
+                       <xs:enumeration value="media_player/rewind" />
+                       <xs:enumeration value="media_player/stop" />
+                       <xs:enumeration value="menu/apps" />
+                       <xs:enumeration value="menu/arrow_up" />
+                       <xs:enumeration value="menu/arrow_down" />
+                       <xs:enumeration value="menu/arrow_left" />
+                       <xs:enumeration value="menu/arrow_right" />
+                       <xs:enumeration value="menu/chat" />
+                       <xs:enumeration value="menu/clock" />
+                       <xs:enumeration value="menu/close" />
+                       <xs:enumeration value="menu/delete" />
+                       <xs:enumeration value="menu/edit" />
+                       <xs:enumeration value="menu/folder" />
+                       <xs:enumeration value="menu/file" />
+                       <xs:enumeration value="menu/home" />
+                       <xs:enumeration value="menu/refresh" />
+                       <xs:enumeration value="no_photo" />
+                       <xs:enumeration value="photo/no_photo" />
+                       <xs:enumeration value="refresh" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="list.selectmode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="display_only" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.policy">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="auto" />
+                                       <xs:enumeration value="true" />
+                                       <xs:enumeration value="false" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="direction">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="vertical" />
+                       <xs:enumeration value="horizontal" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.direction">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="direction" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_block" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="list.mode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="compress" />
+                                       <xs:enumeration value="scroll" />
+                                       <xs:enumeration value="limit" />
+                                       <xs:enumeration value="expand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/element/configuration.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/element/configuration.xsd
new file mode 100644 (file)
index 0000000..47d95da
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/type.xsd" />
+
+       <xs:element name="configuration"> <!-- FIXME -->
+               <xs:complexType>
+                       <xs:attribute name="device" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="SQUARE_320x320" />
+                                               <xs:enumeration value="SQUARE_360x360" />
+                                               <xs:enumeration value="SQUARE_360x480" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="id" type="function_name" use="required" />
+            <xs:attribute name="name" use="required">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:minLength value="1"/>
+                </xs:restriction>
+            </xs:simpleType>
+            </xs:attribute>
+                       <xs:attribute name="orientation" fixed="portrait" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="portrait" />
+                                               <xs:enumeration value="landscape" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="type" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="common" />
+                                               <xs:enumeration value="specific" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+               </xs:complexType>
+       </xs:element>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/element/group.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/element/group.xsd
new file mode 100644 (file)
index 0000000..5eb5660
--- /dev/null
@@ -0,0 +1,422 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../widget/bg.xsd" />
+       <xs:include schemaLocation="../widget/box.xsd" />
+       <xs:include schemaLocation="../widget/button.xsd" />
+       <xs:include schemaLocation="../widget/check.xsd" />
+       <xs:include schemaLocation="../widget/ctxpopup.xsd" />
+       <xs:include schemaLocation="../widget/datetime.xsd" />
+       <xs:include schemaLocation="../widget/entry.xsd" />
+       <xs:include schemaLocation="../widget/genlist.xsd" />
+       <xs:include schemaLocation="../widget/grid.xsd" />
+       <xs:include schemaLocation="../widget/image.xsd" />
+       <xs:include schemaLocation="../widget/index.xsd" />
+       <xs:include schemaLocation="../widget/label.xsd" />
+       <xs:include schemaLocation="../widget/layout.xsd" />
+       <xs:include schemaLocation="../widget/list.xsd" />
+       <xs:include schemaLocation="../widget/map.xsd" />
+       <xs:include schemaLocation="../widget/popup.xsd" />
+       <xs:include schemaLocation="../widget/progressbar.xsd" />
+       <xs:include schemaLocation="../widget/radio.xsd" />
+       <xs:include schemaLocation="../widget/scroller.xsd" />
+       <xs:include schemaLocation="../widget/slider.xsd" />
+       <xs:include schemaLocation="../widget/spinner.xsd" />
+       <xs:include schemaLocation="../widget/table.xsd" />
+
+       <xs:group name="rootContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="popup">
+               <xs:choice>
+                       <xs:element ref="popup" />
+                       <xs:element ref="ctxpopup" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainer">
+               <xs:choice>
+                       <xs:element ref="genlist" />
+                       <xs:element ref="index" />
+                       <xs:element ref="list" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidget">
+               <xs:choice>
+                       <xs:element ref="bg" />
+                       <xs:element ref="button" />
+                       <xs:element ref="check" />
+                       <xs:element ref="datetime" />
+                       <xs:element ref="entry" />
+                       <xs:element ref="image" />
+                       <xs:element ref="label" />
+                       <xs:element ref="layout" />
+                       <xs:element ref="map" />
+                       <xs:element ref="progressbar" />
+                       <xs:element ref="radio" />
+                       <xs:element ref="slider" />
+                       <xs:element ref="spinner" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_grid" />
+                       <xs:element name="box" type="box_on_grid" />
+                       <xs:element name="table" type="table_on_grid" />
+                       <xs:element name="scroller" type="scroller_on_grid">
+                               <xs:unique name="event_scroller_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="genlist" type="genlist_on_grid">
+                               <xs:unique name="event_genlist_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_grid">
+                               <xs:unique name="event_index_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_grid">
+                               <xs:unique name="event_list_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnGrid">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_grid" />
+                       <xs:element name="button" type="button_on_grid">
+                               <xs:unique name="event_button_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_grid">
+                               <xs:unique name="event_check_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_grid">
+                               <xs:unique name="event_datetime_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_grid">
+                               <xs:unique name="event_entry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_grid">
+                               <xs:unique name="event_image_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_grid">
+                               <xs:unique name="event_label_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_grid">
+                               <xs:unique name="event_layout_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_grid">
+                               <xs:unique name="event_map_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_grid">
+                               <xs:unique name="event_progressbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_grid">
+                               <xs:unique name="event_radio_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_grid">
+                               <xs:unique name="event_slider_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_grid">
+                               <xs:unique name="event_spinner_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnTable">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_table" />
+                       <xs:element name="box" type="box_on_table" />
+                       <xs:element name="table" type="table_on_table" />
+                       <xs:element name="scroller" type="scroller_on_table">
+                               <xs:unique name="event_scroller_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnTable">
+               <xs:choice>
+                       <xs:element name="genlist" type="genlist_on_table">
+                               <xs:unique name="event_genlist_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_table">
+                               <xs:unique name="event_index_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_table">
+                               <xs:unique name="event_list_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnTable">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_table" />
+                       <xs:element name="button" type="button_on_table">
+                               <xs:unique name="event_button_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_table">
+                               <xs:unique name="event_check_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_table">
+                               <xs:unique name="event_datetime_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_table">
+                               <xs:unique name="event_entry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_table">
+                               <xs:unique name="event_image_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_table">
+                               <xs:unique name="event_label_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_table">
+                               <xs:unique name="event_layout_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_table">
+                               <xs:unique name="event_map_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_table">
+                               <xs:unique name="event_progressbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_table">
+                               <xs:unique name="event_radio_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_table">
+                               <xs:unique name="event_slider_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_table">
+                               <xs:unique name="event_spinner_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_panes" />
+                       <xs:element name="box" type="box_on_panes" />
+                       <xs:element name="table" type="table_on_panes" />
+                       <xs:element name="scroller" type="scroller_on_panes">
+                               <xs:unique name="event_scroller_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="genlist" type="genlist_on_panes">
+                               <xs:unique name="event_genlist_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_panes">
+                               <xs:unique name="event_index_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_panes">
+                               <xs:unique name="event_list_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnPanes">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_panes" />
+                       <xs:element name="button" type="button_on_panes">
+                               <xs:unique name="event_button_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_panes">
+                               <xs:unique name="event_check_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_panes">
+                               <xs:unique name="event_datetime_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_panes">
+                               <xs:unique name="event_entry_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_panes">
+                               <xs:unique name="event_image_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_panes">
+                               <xs:unique name="event_label_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_panes">
+                               <xs:unique name="event_layout_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_panes">
+                               <xs:unique name="event_map_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_panes">
+                               <xs:unique name="event_progressbar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_panes">
+                               <xs:unique name="event_radio_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_panes">
+                               <xs:unique name="event_slider_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="spinner" type="spinner_on_panes">
+                               <xs:unique name="event_spinner_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/element/variation.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/element/variation.xsd
new file mode 100644 (file)
index 0000000..b106524
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd"></xs:include>
+
+       <xs:element name="variation" type="variation" />
+
+       <xs:complexType name="variation">
+               <xs:attribute type="xs:string" name="config_ref" />
+               <xs:attribute type="xs:boolean" name="visible" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnGrid"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_table">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnTable"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnPanes"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/layout.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/layout.xsd
new file mode 100644 (file)
index 0000000..00a0fca
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="element/configuration.xsd" />
+
+       <!-- definition of tizen.view -->
+       <xs:include schemaLocation="widget/view.xsd" />
+
+       <xs:element name="document">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="mscreen" />
+                               <xs:element ref="views" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:key name="config">
+                       <xs:selector xpath="mscreen/configuration" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="config_ref" refer="config">
+                       <xs:selector xpath=".//variation" />
+                       <xs:field xpath="@config_ref" />
+               </xs:keyref>
+       </xs:element>
+       <xs:element name="mscreen">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="configuration" minOccurs="1" maxOccurs="3" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:unique name="qualifiers">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@device" />
+                       <xs:field xpath="@orientation" />
+               </xs:unique>
+               <xs:unique name="config-name">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@name" />
+               </xs:unique>
+       </xs:element>
+       <xs:element name="views">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="view" minOccurs="0" maxOccurs="unbounded" />
+                       </xs:sequence>
+                       <xs:attribute type="xs:string" name="startup"></xs:attribute>
+               </xs:complexType>
+               <xs:key name="view_id">
+                       <xs:selector xpath="view" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="startup" refer="view_id">
+                       <xs:selector xpath="." />
+                       <xs:field xpath="@startup" />
+               </xs:keyref>
+               <xs:keyref name="view_ref" refer="view_id">
+                       <xs:selector xpath=".//naviframe" />
+                       <xs:field xpath="@view" />
+               </xs:keyref>
+               <xs:keyref name="event_target" refer="view_id">
+                       <xs:selector xpath=".//event" />
+                       <xs:field xpath="@target" />
+               </xs:keyref>
+       </xs:element>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/bg.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/bg.xsd
new file mode 100644 (file)
index 0000000..3f87e10
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="bg" type="background" />
+
+       <xs:complexType name="background_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="color" default="#ffffff">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="option" default="scale">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="center" />
+                                                       <xs:enumeration value="scale" />
+                                                       <xs:enumeration value="stretch" />
+                                                       <xs:enumeration value="tile" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="background">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_table">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/box.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/box.xsd
new file mode 100644 (file)
index 0000000..ccfe5e3
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="box" type="box" />
+
+       <xs:complexType name="box_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" default="0" />
+       </xs:complexType>
+
+       <xs:complexType name="box">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_table">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/button.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/button.xsd
new file mode 100644 (file)
index 0000000..174e3c8
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="button" type="button">
+               <xs:unique name="event_button">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="button_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Button" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="green" />
+                                                       <xs:enumeration value="orange" />
+                                                       <xs:enumeration value="red" />
+                                                       <xs:enumeration value="nextdepth" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="button_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="repeated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="unpressed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="button">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_table">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/check.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/check.xsd
new file mode 100644 (file)
index 0000000..5bffe87
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="check" type="check">
+               <xs:unique name="event_check">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="check_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="state" type="xs:boolean" default="false" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">       <!-- FIXME -->
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="on&amp;off" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="check_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="check">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_table">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/ctxpopup.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/ctxpopup.xsd
new file mode 100644 (file)
index 0000000..fa79989
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="ctxpopup" type="ctxpopup">
+               <xs:unique name="event_ctxpopup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="ctxpopup">
+               <xs:choice minOccurs="1">
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="dismissed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="ctxpopupitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="CtxPopupItem" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/datetime.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/datetime.xsd
new file mode 100644 (file)
index 0000000..bdf0ef7
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="datetime" type="datetime">
+               <xs:unique name="event_datetime">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="datetime_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="datepicker_layout">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="datepicker_layout" />
+                                       <xs:enumeration value="timepicker_layout" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="datetime_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="datetime">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_table">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/entry.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/entry.xsd
new file mode 100644 (file)
index 0000000..1a702a0
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="entry" type="entry">
+               <xs:unique name="event_entry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="entry_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="scroll" type="xs:boolean" default="false" />
+               <xs:attribute name="single_line" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="password" type="xs:boolean" default="false" />
+               <xs:attribute name="line_wrap">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="char" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="mixed" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="autocapital_type" default="none">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="sentence" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="file_text_format" default="plain_utf8">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="plain_utf8" />
+                                                       <xs:enumeration value="markup_utf8" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="input_panel_return_key" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Entry" />
+               <xs:attribute name="src" type="xs:string" />
+       </xs:complexType>
+       <xs:group name="entry_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="25">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="changed,user" />
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="aborted" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,triple" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="selection,paste" />
+                                                               <xs:enumeration value="selection,copy" />
+                                                               <xs:enumeration value="selection,cut" />
+                                                               <xs:enumeration value="selection,start" />
+                                                               <xs:enumeration value="selection,changed" />
+                                                               <xs:enumeration value="selection,cleared" />
+                                                               <xs:enumeration value="cursor,changed" />
+                                                               <xs:enumeration value="anchor,clicked" />
+                                                               <xs:enumeration value="anchor,in" />
+                                                               <xs:enumeration value="anchor,out" />
+                                                               <xs:enumeration value="anchor,up" />
+                                                               <xs:enumeration value="anchor,down" />
+                                                               <xs:enumeration value="preedit,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="entry">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/genlist.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/genlist.xsd
new file mode 100644 (file)
index 0000000..e9db996
--- /dev/null
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="genlist" type="genlist">
+               <xs:unique name="event_genlist">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="genlist_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="homogeneous" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+       </xs:complexType>
+       <xs:group name="genlist_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="41">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,request" />
+                                                               <xs:enumeration value="contract,request" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="multi,swipe,left" />
+                                                               <xs:enumeration value="multi,swipe,right" />
+                                                               <xs:enumeration value="multi,swipe,up" />
+                                                               <xs:enumeration value="multi,swipe,down" />
+                                                               <xs:enumeration value="multi,pinch,out" />
+                                                               <xs:enumeration value="multi,pinch,in" />
+                                                               <xs:enumeration value="swipe" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="moved,after" />
+                                                               <xs:enumeration value="moved,before" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="tree,effect,finished" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="genlistitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="style" default="default">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="default" />
+                                                               <xs:enumeration value="groupindex" />
+                                                               <xs:enumeration value="1text" />
+                                                               <xs:enumeration value="1text.1icon" />
+                                                               <xs:enumeration value="2text" />
+                                                               <xs:enumeration value="2text.1" />
+                                                               <xs:enumeration value="1text.1icon.divider" />
+                                                               <xs:enumeration value="1text.1icon.1" />
+                                                               <xs:enumeration value="2text.1icon.1" />
+                                                               <xs:enumeration value="multiline/1text" />
+                                                               <xs:enumeration value="multiline/2text" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="sub_text" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="image_path" type="xs:string" />
+                                       <xs:attribute name="standard_icon" type="standard.icon"
+                                               default="" />
+                                       <xs:attribute name="end_image_path" type="xs:string" />
+                                       <xs:attribute name="end_standard_icon" type="standard.icon"
+                                               default="" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="genlist">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_table">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/grid.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/grid.xsd
new file mode 100644 (file)
index 0000000..e949fef
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="grid" type="grid" />
+
+       <xs:complexType name="grid_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="vsize_w" type="xs:positiveInteger" default="1000" />
+               <xs:attribute name="vsize_h" type="xs:positiveInteger" default="1000" />
+       </xs:complexType>
+
+       <xs:complexType name="grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/image.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/image.xsd
new file mode 100644 (file)
index 0000000..8049943
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="image" type="image">
+               <xs:unique name="event_image">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="image_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <!-- <xs:attribute name="group" type="xs:string" /> TODO : postpone -->
+               <xs:attribute name="aspect_fixed" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="fill_outside" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="resizable_up" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="resizable_down" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="no_scale" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="image_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="drop" />
+                                                               <xs:enumeration value="clicked" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="image">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_table">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/index.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/index.xsd
new file mode 100644 (file)
index 0000000..e511fc1
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="index" type="index">
+               <xs:unique name="event_index">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="index_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="autohide" type="xs:boolean" default="false" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="thumbnail" />
+                                       <xs:enumeration value="tab" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="index_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="level,up" />
+                                                               <xs:enumeration value="level,down" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="indexitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="index">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_table">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/label.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/label.xsd
new file mode 100644 (file)
index 0000000..2280d35
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="label" type="label">
+               <xs:unique name="event_label">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="label_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="ellipsis" type="xs:boolean" default="false" />
+               <xs:attribute name="wrap_width" type="xs:nonNegativeInteger"
+                       default="0" />
+               <xs:attribute name="line_wrap" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="char" />
+                                                       <xs:enumeration value="word" />
+                                                       <xs:enumeration value="mixed" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Label" />
+       </xs:complexType>
+       <xs:group name="label_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="slide,end" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="label">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_table">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/layout.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/layout.xsd
new file mode 100644 (file)
index 0000000..169053c
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="layout" type="layout">
+               <xs:unique name="event_layout">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="layout_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="group" type="xs:string" default="" />
+       </xs:complexType>
+       <xs:group name="layout_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="layout">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_table">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/list.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/list.xsd
new file mode 100644 (file)
index 0000000..6c0d861
--- /dev/null
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+
+       <xs:element name="list" type="list">
+               <xs:unique name="event_list">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="list_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+       </xs:complexType>
+       <xs:group name="list_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="12">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="list">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_table">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/map.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/map.xsd
new file mode 100644 (file)
index 0000000..45a6694
--- /dev/null
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="map" type="map">
+               <xs:unique name="event_map">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="map_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="zoom_level" type="xs:nonNegativeInteger"
+                       default="15" />
+               <xs:attribute name="longitude" type="xs:double" />
+               <xs:attribute name="latitude" type="xs:double" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="map_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="24">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="zoom,start" />
+                                                               <xs:enumeration value="zoom,stop" />
+                                                               <xs:enumeration value="zoom,change" />
+                                                               <xs:enumeration value="tile,load" />
+                                                               <xs:enumeration value="tile,loaded" />
+                                                               <xs:enumeration value="tile,loaded,fail" />
+                                                               <xs:enumeration value="route,load" />
+                                                               <xs:enumeration value="route,loaded" />
+                                                               <xs:enumeration value="route,loaded,fail" />
+                                                               <xs:enumeration value="name,load" />
+                                                               <xs:enumeration value="name,loaded" />
+                                                               <xs:enumeration value="name,loaded,fail" />
+                                                               <xs:enumeration value="overlay,clicked" />
+                                                               <xs:enumeration value="loaded" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="map">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_table">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/popup.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/popup.xsd
new file mode 100644 (file)
index 0000000..5f2358f
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="popup" type="popup">
+               <xs:unique name="event_popup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="popup">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="timeout" />
+                                                               <xs:enumeration value="block,clicked" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="show,finished" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="title" type="xs:string" default="Title" />
+               <xs:attribute name="height" default="200">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:nonNegativeInteger">
+                                       <xs:maxInclusive value="400"></xs:maxInclusive>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="timeout" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="style">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="toast" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/progressbar.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/progressbar.xsd
new file mode 100644 (file)
index 0000000..3bc10e3
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="progressbar" type="progressbar">
+               <xs:unique name="event_progressbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="progressbar_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="pulse_mode" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="pulse" type="xs:boolean" default="false" />
+               <xs:attribute name="direction" type="direction" default="horizontal" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="value" type="ratio" default="0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="pending_list" />
+                                       <xs:enumeration value="process" />
+                                       <xs:enumeration value="process/groupindex" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="progressbar_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="progressbar">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/radio.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/radio.xsd
new file mode 100644 (file)
index 0000000..2e45ada
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="radio" type="radio">
+               <xs:unique name="event_radio">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="radio_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="state_value" type="xs:integer" />
+               <xs:attribute name="value" type="xs:integer" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="radio_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="radio">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_table">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/scroller.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/scroller.xsd
new file mode 100644 (file)
index 0000000..b01b627
--- /dev/null
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="scroller" type="scroller">
+               <xs:unique name="event_scroller">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="scroller_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="9">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="scroller.direction" default="no_block" />
+               <xs:attribute name="content_min_w" type="xs:boolean" default="false" />
+               <xs:attribute name="content_min_h" type="xs:boolean" default="false" />
+               <xs:attribute name="page_relative_w" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_relative_h" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_size_w" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="page_size_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="propagate_events" type="xs:boolean" default="true" />
+               <xs:attribute name="page_scroll_limit_w" type="xs:positiveInteger" />
+               <xs:attribute name="page_scroll_limit_h" type="xs:positiveInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+       </xs:complexType>
+
+       <xs:complexType name="scroller">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_table">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/slider.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/slider.xsd
new file mode 100644 (file)
index 0000000..3bf2d64
--- /dev/null
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="slider" type="slider"> <!-- FIXME -->
+               <xs:unique name="event_slider">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="slider_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="indicator" type="xs:boolean" default="false" />
+               <xs:attribute name="min" type="xs:double" default="0.0" />
+               <xs:attribute name="max" type="xs:double" default="1.0" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="step" type="xs:double" default="0.05" />
+               <xs:attribute name="visible_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="on_focus" />
+                                       <xs:enumeration value="none" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="value" type="xs:double" default="0.0" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <xs:attribute name="indicator_format" type="xs:string" />
+               <xs:attribute name="direction" type="direction" default="horizontal" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="center_point" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="slider_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="slider,drag,start" />
+                                                               <xs:enumeration value="slider,drag,stop" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="slider">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_table">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/spinner.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/spinner.xsd
new file mode 100644 (file)
index 0000000..e5c47ea
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="spinner" type="spinner"> <!-- FIXME -->
+               <xs:unique name="event_spinner">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="spinner_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="label_format" type="xs:string" />
+               <xs:attribute name="step" type="xs:double" default="1" />
+               <xs:attribute name="interval" type="nonNegativeDouble"
+                       default="0.85" />
+               <xs:attribute name="min" type="xs:double" default="0" />
+               <xs:attribute name="max" type="xs:double" default="100" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="spinner_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="3">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="spinner">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_table">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="spinner_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="spinner_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="spinner_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/table.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/table.xsd
new file mode 100644 (file)
index 0000000..1fe2bd3
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="table" type="table" />
+
+       <xs:complexType name="table_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="cols" type="xs:nonNegativeInteger" />
+               <xs:attribute name="rows" type="xs:nonNegativeInteger" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+
+       <xs:complexType name="table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/view.xsd b/org.tizen.efluibuilder/res/xsd/wearable_2.3.1/widget/view.xsd
new file mode 100644 (file)
index 0000000..38b1557
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="view" type="view">
+               <xs:unique name="widget_id">
+                       <xs:selector xpath=".//*" />
+                       <xs:field xpath="@id" />
+               </xs:unique>
+               <xs:key name="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="radioGroup" refer="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@radio_group" />
+               </xs:keyref>
+               <xs:unique name="event_signal">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="view">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="uib,view,create" />
+                                                               <xs:enumeration value="uib,view,destroy" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                               <xs:group ref="popup" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attribute name="id" type="function_name" use="required" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="page_location_x" type="xs:integer" default="0" />
+               <xs:attribute name="page_location_y" type="xs:integer" default="0" />
+               <xs:attribute name="screen_orientation" fixed="no_sensor">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_sensor" />
+                                       <xs:enumeration value="only_portrait" />
+                                       <xs:enumeration value="only_landscape" />
+                                       <xs:enumeration value="full_sensor" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="type">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="view" />
+                                       <xs:enumeration value="popup" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/attribute/group.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/attribute/group.xsd
new file mode 100644 (file)
index 0000000..b1621fe
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="type.xsd" />
+
+       <xs:attributeGroup name="common">
+               <xs:attribute name="id" use="required" type="function_name" />
+               <xs:attribute type="align_h" name="align_h" default="fill" />
+               <xs:attribute type="align_v" name="align_v" default="fill" />
+               <xs:attribute type="weight" name="weight_h" default="1" />
+               <xs:attribute type="weight" name="weight_v" default="1" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnGrid">
+               <xs:attribute type="xs:integer" name="pack_x" />
+               <xs:attribute type="xs:integer" name="pack_y" />
+               <xs:attribute type="xs:positiveInteger" name="pack_w" />
+               <xs:attribute type="xs:positiveInteger" name="pack_h" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnTable">
+               <xs:attribute type="xs:integer" name="pack_col" />
+               <xs:attribute type="xs:integer" name="pack_row" />
+               <xs:attribute type="xs:positiveInteger" name="col_span" />
+               <xs:attribute type="xs:positiveInteger" name="row_span" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnPanes">
+               <xs:attribute name="pack">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:attributeGroup>
+
+       <xs:complexType name="item.event">
+               <xs:attribute name="signal">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="itemselected" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="function_name" type="xs:string" />  <!-- FIXME : regex for function name -->
+               <xs:attributeGroup ref="storyboard" />
+       </xs:complexType>
+
+       <xs:attributeGroup name="storyboard">
+               <xs:attribute name="connection_wrapper" type="xs:string" />
+               <xs:attribute name="event_name" type="xs:string" />
+               <xs:attribute name="target" type="xs:string" />
+       </xs:attributeGroup>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/attribute/type.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/attribute/type.xsd
new file mode 100644 (file)
index 0000000..93ea2e8
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:simpleType name="function_name">
+               <xs:restriction base="xs:string">
+                       <xs:pattern value="[a-zA-Z_]+[a-zA-Z0-9_]*" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="nonNegativeDouble">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="ratio">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+                       <xs:maxInclusive value="1"></xs:maxInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="align_h">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="align_v">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="top" />
+                                       <xs:enumeration value="bottom" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="weight">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="standard.icon">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="" />
+                       <xs:enumeration value="apps" />
+                       <xs:enumeration value="arrow_down" />
+                       <xs:enumeration value="arrow_left" />
+                       <xs:enumeration value="arrow_right" />
+                       <xs:enumeration value="arrow_up" />
+                       <xs:enumeration value="chat" />
+                       <xs:enumeration value="clock" />
+                       <xs:enumeration value="close" />
+                       <xs:enumeration value="delete" />
+                       <xs:enumeration value="edit" />
+                       <xs:enumeration value="file" />
+                       <xs:enumeration value="home" />
+                       <xs:enumeration value="media_player/forward" />
+                       <xs:enumeration value="media_player/info" />
+                       <xs:enumeration value="media_player/next" />
+                       <xs:enumeration value="media_player/pause" />
+                       <xs:enumeration value="media_player/play" />
+                       <xs:enumeration value="media_player/prev" />
+                       <xs:enumeration value="media_player/rewind" />
+                       <xs:enumeration value="media_player/stop" />
+                       <xs:enumeration value="menu/apps" />
+                       <xs:enumeration value="menu/arrow_up" />
+                       <xs:enumeration value="menu/arrow_down" />
+                       <xs:enumeration value="menu/arrow_left" />
+                       <xs:enumeration value="menu/arrow_right" />
+                       <xs:enumeration value="menu/chat" />
+                       <xs:enumeration value="menu/clock" />
+                       <xs:enumeration value="menu/close" />
+                       <xs:enumeration value="menu/delete" />
+                       <xs:enumeration value="menu/edit" />
+                       <xs:enumeration value="menu/folder" />
+                       <xs:enumeration value="menu/file" />
+                       <xs:enumeration value="menu/home" />
+                       <xs:enumeration value="menu/refresh" />
+                       <xs:enumeration value="no_photo" />
+                       <xs:enumeration value="photo/no_photo" />
+                       <xs:enumeration value="refresh" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="list.selectmode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="display_only" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.policy">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="auto" />
+                                       <xs:enumeration value="true" />
+                                       <xs:enumeration value="false" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="direction">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="vertical" />
+                       <xs:enumeration value="horizontal" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.direction">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="direction" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_block" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="list.mode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="compress" />
+                                       <xs:enumeration value="scroll" />
+                                       <xs:enumeration value="limit" />
+                                       <xs:enumeration value="expand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/element/configuration.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/element/configuration.xsd
new file mode 100644 (file)
index 0000000..b6e9a76
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/type.xsd" />
+
+       <xs:element name="configuration"> <!-- FIXME -->
+               <xs:complexType>
+                       <xs:attribute name="device" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="CIRCLE_360x360" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="id" type="function_name" use="required" />
+            <xs:attribute name="name" use="required">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:minLength value="1"/>
+                </xs:restriction>
+            </xs:simpleType>
+            </xs:attribute>
+                       <xs:attribute name="orientation" fixed="portrait" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="portrait" />
+                                               <xs:enumeration value="landscape" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="type" fixed="common" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="common" />
+                                               <xs:enumeration value="specific" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+               </xs:complexType>
+       </xs:element>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/element/group.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/element/group.xsd
new file mode 100644 (file)
index 0000000..1638136
--- /dev/null
@@ -0,0 +1,402 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../widget/bg.xsd" />
+       <xs:include schemaLocation="../widget/box.xsd" />
+       <xs:include schemaLocation="../widget/button.xsd" />
+       <xs:include schemaLocation="../widget/check.xsd" />
+       <xs:include schemaLocation="../widget/ctxpopup.xsd" />
+       <xs:include schemaLocation="../widget/datetime.xsd" />
+       <xs:include schemaLocation="../widget/entry.xsd" />
+       <xs:include schemaLocation="../widget/genlist.xsd" />
+       <xs:include schemaLocation="../widget/grid.xsd" />
+       <xs:include schemaLocation="../widget/image.xsd" />
+       <xs:include schemaLocation="../widget/index.xsd" />
+       <xs:include schemaLocation="../widget/label.xsd" />
+       <xs:include schemaLocation="../widget/layout.xsd" />
+       <xs:include schemaLocation="../widget/list.xsd" />
+       <xs:include schemaLocation="../widget/map.xsd" />
+       <xs:include schemaLocation="../widget/popup.xsd" />
+       <xs:include schemaLocation="../widget/progressbar.xsd" />
+       <xs:include schemaLocation="../widget/radio.xsd" />
+       <xs:include schemaLocation="../widget/scroller.xsd" />
+       <xs:include schemaLocation="../widget/slider.xsd" />
+       <xs:include schemaLocation="../widget/table.xsd" />
+
+       <xs:group name="rootContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="popup">
+               <xs:choice>
+                       <xs:element ref="popup" />
+                       <xs:element ref="ctxpopup" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainer">
+               <xs:choice>
+                       <xs:element ref="genlist" />
+                       <xs:element ref="index" />
+                       <xs:element ref="list" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidget">
+               <xs:choice>
+                       <xs:element ref="bg" />
+                       <xs:element ref="button" />
+                       <xs:element ref="check" />
+                       <xs:element ref="datetime" />
+                       <xs:element ref="entry" />
+                       <xs:element ref="image" />
+                       <xs:element ref="label" />
+                       <xs:element ref="layout" />
+                       <xs:element ref="map" />
+                       <xs:element ref="progressbar" />
+                       <xs:element ref="radio" />
+                       <xs:element ref="slider" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_grid" />
+                       <xs:element name="box" type="box_on_grid" />
+                       <xs:element name="table" type="table_on_grid" />
+                       <xs:element name="scroller" type="scroller_on_grid">
+                               <xs:unique name="event_scroller_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="genlist" type="genlist_on_grid">
+                               <xs:unique name="event_genlist_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_grid">
+                               <xs:unique name="event_index_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_grid">
+                               <xs:unique name="event_list_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnGrid">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_grid" />
+                       <xs:element name="button" type="button_on_grid">
+                               <xs:unique name="event_button_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_grid">
+                               <xs:unique name="event_check_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_grid">
+                               <xs:unique name="event_datetime_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_grid">
+                               <xs:unique name="event_entry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_grid">
+                               <xs:unique name="event_image_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_grid">
+                               <xs:unique name="event_label_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_grid">
+                               <xs:unique name="event_layout_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_grid">
+                               <xs:unique name="event_map_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_grid">
+                               <xs:unique name="event_progressbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_grid">
+                               <xs:unique name="event_radio_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_grid">
+                               <xs:unique name="event_slider_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnTable">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_table" />
+                       <xs:element name="box" type="box_on_table" />
+                       <xs:element name="table" type="table_on_table" />
+                       <xs:element name="scroller" type="scroller_on_table">
+                               <xs:unique name="event_scroller_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnTable">
+               <xs:choice>
+                       <xs:element name="genlist" type="genlist_on_table">
+                               <xs:unique name="event_genlist_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_table">
+                               <xs:unique name="event_index_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_table">
+                               <xs:unique name="event_list_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnTable">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_table" />
+                       <xs:element name="button" type="button_on_table">
+                               <xs:unique name="event_button_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_table">
+                               <xs:unique name="event_check_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_table">
+                               <xs:unique name="event_datetime_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_table">
+                               <xs:unique name="event_entry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_table">
+                               <xs:unique name="event_image_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_table">
+                               <xs:unique name="event_label_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_table">
+                               <xs:unique name="event_layout_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_table">
+                               <xs:unique name="event_map_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_table">
+                               <xs:unique name="event_progressbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_table">
+                               <xs:unique name="event_radio_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_table">
+                               <xs:unique name="event_slider_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_panes" />
+                       <xs:element name="box" type="box_on_panes" />
+                       <xs:element name="table" type="table_on_panes" />
+                       <xs:element name="scroller" type="scroller_on_panes">
+                               <xs:unique name="event_scroller_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="genlist" type="genlist_on_panes">
+                               <xs:unique name="event_genlist_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_panes">
+                               <xs:unique name="event_index_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_panes">
+                               <xs:unique name="event_list_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnPanes">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_panes" />
+                       <xs:element name="button" type="button_on_panes">
+                               <xs:unique name="event_button_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_panes">
+                               <xs:unique name="event_check_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_panes">
+                               <xs:unique name="event_datetime_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_panes">
+                               <xs:unique name="event_entry_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_panes">
+                               <xs:unique name="event_image_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_panes">
+                               <xs:unique name="event_label_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_panes">
+                               <xs:unique name="event_layout_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_panes">
+                               <xs:unique name="event_map_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_panes">
+                               <xs:unique name="event_progressbar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_panes">
+                               <xs:unique name="event_radio_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_panes">
+                               <xs:unique name="event_slider_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/element/variation.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/element/variation.xsd
new file mode 100644 (file)
index 0000000..b106524
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd"></xs:include>
+
+       <xs:element name="variation" type="variation" />
+
+       <xs:complexType name="variation">
+               <xs:attribute type="xs:string" name="config_ref" />
+               <xs:attribute type="xs:boolean" name="visible" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnGrid"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_table">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnTable"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnPanes"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/layout.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/layout.xsd
new file mode 100644 (file)
index 0000000..b775064
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="element/configuration.xsd" />
+
+       <!-- definition of tizen.view -->
+       <xs:include schemaLocation="widget/view.xsd" />
+
+       <xs:element name="document">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="mscreen" />
+                               <xs:element ref="views" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:key name="config">
+                       <xs:selector xpath="mscreen/configuration" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="config_ref" refer="config">
+                       <xs:selector xpath=".//variation" />
+                       <xs:field xpath="@config_ref" />
+               </xs:keyref>
+       </xs:element>
+       <xs:element name="mscreen">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="configuration" minOccurs="1" maxOccurs="1" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:unique name="qualifiers">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@device" />
+                       <xs:field xpath="@orientation" />
+               </xs:unique>
+               <xs:unique name="config-name">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@name" />
+               </xs:unique>
+       </xs:element>
+       <xs:element name="views">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="view" minOccurs="0" maxOccurs="unbounded" />
+                       </xs:sequence>
+                       <xs:attribute type="xs:string" name="startup"></xs:attribute>
+               </xs:complexType>
+               <xs:key name="view_id">
+                       <xs:selector xpath="view" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="startup" refer="view_id">
+                       <xs:selector xpath="." />
+                       <xs:field xpath="@startup" />
+               </xs:keyref>
+               <xs:keyref name="view_ref" refer="view_id">
+                       <xs:selector xpath=".//naviframe" />
+                       <xs:field xpath="@view" />
+               </xs:keyref>
+               <xs:keyref name="event_target" refer="view_id">
+                       <xs:selector xpath=".//event" />
+                       <xs:field xpath="@target" />
+               </xs:keyref>
+       </xs:element>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/bg.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/bg.xsd
new file mode 100644 (file)
index 0000000..3f87e10
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="bg" type="background" />
+
+       <xs:complexType name="background_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="color" default="#ffffff">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="option" default="scale">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="center" />
+                                                       <xs:enumeration value="scale" />
+                                                       <xs:enumeration value="stretch" />
+                                                       <xs:enumeration value="tile" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="background">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_table">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/box.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/box.xsd
new file mode 100644 (file)
index 0000000..ccfe5e3
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="box" type="box" />
+
+       <xs:complexType name="box_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" default="0" />
+       </xs:complexType>
+
+       <xs:complexType name="box">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_table">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/button.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/button.xsd
new file mode 100644 (file)
index 0000000..fead33c
--- /dev/null
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="button" type="button">
+               <xs:unique name="event_button">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="button_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Button" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="bottom" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="button_children">
+               <xs:choice>
+                       <xs:element ref="image" minOccurs="0" maxOccurs="1" />
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="repeated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="unpressed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="button">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_table">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/check.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/check.xsd
new file mode 100644 (file)
index 0000000..ac8c12e
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="check" type="check">
+               <xs:unique name="event_check">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="check_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="state" type="xs:boolean" default="false" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">       <!-- FIXME -->
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="small" />
+                                       <xs:enumeration value="on&amp;off" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="check_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="check">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_table">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/ctxpopup.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/ctxpopup.xsd
new file mode 100644 (file)
index 0000000..acc22d4
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="ctxpopup" type="ctxpopup">
+               <xs:unique name="event_ctxpopup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="ctxpopup">
+               <xs:choice minOccurs="1">
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="dismissed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="ctxpopupitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="CtxPopupItem" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="select_mode">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="select_mode" />
+                                       <xs:enumeration value="select_mode/top" />
+                                       <xs:enumeration value="select_mode/bottom" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/datetime.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/datetime.xsd
new file mode 100644 (file)
index 0000000..428dbb6
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="datetime" type="datetime">
+               <xs:unique name="event_datetime">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="datetime_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="datepicker/circle">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="datepicker/circle" />
+                                       <xs:enumeration value="timepicker/circle" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="datetime_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="datetime">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_table">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/entry.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/entry.xsd
new file mode 100644 (file)
index 0000000..1a702a0
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="entry" type="entry">
+               <xs:unique name="event_entry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="entry_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="scroll" type="xs:boolean" default="false" />
+               <xs:attribute name="single_line" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="password" type="xs:boolean" default="false" />
+               <xs:attribute name="line_wrap">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="char" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="mixed" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="autocapital_type" default="none">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="sentence" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="file_text_format" default="plain_utf8">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="plain_utf8" />
+                                                       <xs:enumeration value="markup_utf8" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="input_panel_return_key" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Entry" />
+               <xs:attribute name="src" type="xs:string" />
+       </xs:complexType>
+       <xs:group name="entry_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="25">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="changed,user" />
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="aborted" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,triple" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="selection,paste" />
+                                                               <xs:enumeration value="selection,copy" />
+                                                               <xs:enumeration value="selection,cut" />
+                                                               <xs:enumeration value="selection,start" />
+                                                               <xs:enumeration value="selection,changed" />
+                                                               <xs:enumeration value="selection,cleared" />
+                                                               <xs:enumeration value="cursor,changed" />
+                                                               <xs:enumeration value="anchor,clicked" />
+                                                               <xs:enumeration value="anchor,in" />
+                                                               <xs:enumeration value="anchor,out" />
+                                                               <xs:enumeration value="anchor,up" />
+                                                               <xs:enumeration value="anchor,down" />
+                                                               <xs:enumeration value="preedit,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="entry">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/genlist.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/genlist.xsd
new file mode 100644 (file)
index 0000000..d638cb3
--- /dev/null
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="genlist" type="genlist">
+               <xs:unique name="event_genlist">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="genlist_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="genlist_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="41">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,request" />
+                                                               <xs:enumeration value="contract,request" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="multi,swipe,left" />
+                                                               <xs:enumeration value="multi,swipe,right" />
+                                                               <xs:enumeration value="multi,swipe,up" />
+                                                               <xs:enumeration value="multi,swipe,down" />
+                                                               <xs:enumeration value="multi,pinch,out" />
+                                                               <xs:enumeration value="multi,pinch,in" />
+                                                               <xs:enumeration value="swipe" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="moved,after" />
+                                                               <xs:enumeration value="moved,before" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="tree,effect,finished" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="genlistitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute type="xs:string" name="text" />
+                                       <xs:attribute type="xs:string" name="sub_text" />
+                                       <xs:attribute name="style" default="default">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="default" />
+                                                               <xs:enumeration value="title" />
+                                                               <xs:enumeration value="groupindex" />
+                                                               <xs:enumeration value="1text" />
+                                                               <xs:enumeration value="1text.1icon" />
+                                                               <xs:enumeration value="2text" />
+                                                               <xs:enumeration value="1text.1icon.divider" />
+                                                               <xs:enumeration value="1text.1icon.1" />
+                                                               <xs:enumeration value="2text.1icon.1" />
+                                                               <xs:enumeration value="editfield" />
+                                                               <xs:enumeration value="default" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute type="xs:boolean" name="selected"
+                                               default="false" />
+                                       <xs:attribute type="xs:string" name="image_path" />
+                                       <xs:attribute type="xs:string" name="end_image_path" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="genlist">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_table">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/grid.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/grid.xsd
new file mode 100644 (file)
index 0000000..e949fef
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="grid" type="grid" />
+
+       <xs:complexType name="grid_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="vsize_w" type="xs:positiveInteger" default="1000" />
+               <xs:attribute name="vsize_h" type="xs:positiveInteger" default="1000" />
+       </xs:complexType>
+
+       <xs:complexType name="grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/image.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/image.xsd
new file mode 100644 (file)
index 0000000..8049943
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="image" type="image">
+               <xs:unique name="event_image">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="image_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <!-- <xs:attribute name="group" type="xs:string" /> TODO : postpone -->
+               <xs:attribute name="aspect_fixed" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="fill_outside" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="resizable_up" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="resizable_down" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="no_scale" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="image_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="drop" />
+                                                               <xs:enumeration value="clicked" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="image">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_table">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/index.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/index.xsd
new file mode 100644 (file)
index 0000000..117082c
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="index" type="index">
+               <xs:unique name="event_index">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="index_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="autohide" type="xs:boolean" default="false" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="thumbnail">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="thumbnail" />
+                                       <xs:enumeration value="circle" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="index_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="level,up" />
+                                                               <xs:enumeration value="level,down" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="indexitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="index">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_table">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/label.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/label.xsd
new file mode 100644 (file)
index 0000000..2280d35
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="label" type="label">
+               <xs:unique name="event_label">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="label_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="ellipsis" type="xs:boolean" default="false" />
+               <xs:attribute name="wrap_width" type="xs:nonNegativeInteger"
+                       default="0" />
+               <xs:attribute name="line_wrap" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="char" />
+                                                       <xs:enumeration value="word" />
+                                                       <xs:enumeration value="mixed" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Label" />
+       </xs:complexType>
+       <xs:group name="label_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="slide,end" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="label">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_table">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/layout.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/layout.xsd
new file mode 100644 (file)
index 0000000..169053c
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="layout" type="layout">
+               <xs:unique name="event_layout">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="layout_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="group" type="xs:string" default="" />
+       </xs:complexType>
+       <xs:group name="layout_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="layout">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_table">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/list.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/list.xsd
new file mode 100644 (file)
index 0000000..c9721ab
--- /dev/null
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+
+       <xs:element name="list" type="list">
+               <xs:unique name="event_list">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="list_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+       </xs:complexType>
+       <xs:group name="list_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="12">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="List item" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="list">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="list_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_table">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/map.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/map.xsd
new file mode 100644 (file)
index 0000000..45a6694
--- /dev/null
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="map" type="map">
+               <xs:unique name="event_map">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="map_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="zoom_level" type="xs:nonNegativeInteger"
+                       default="15" />
+               <xs:attribute name="longitude" type="xs:double" />
+               <xs:attribute name="latitude" type="xs:double" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="map_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="24">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="zoom,start" />
+                                                               <xs:enumeration value="zoom,stop" />
+                                                               <xs:enumeration value="zoom,change" />
+                                                               <xs:enumeration value="tile,load" />
+                                                               <xs:enumeration value="tile,loaded" />
+                                                               <xs:enumeration value="tile,loaded,fail" />
+                                                               <xs:enumeration value="route,load" />
+                                                               <xs:enumeration value="route,loaded" />
+                                                               <xs:enumeration value="route,loaded,fail" />
+                                                               <xs:enumeration value="name,load" />
+                                                               <xs:enumeration value="name,loaded" />
+                                                               <xs:enumeration value="name,loaded,fail" />
+                                                               <xs:enumeration value="overlay,clicked" />
+                                                               <xs:enumeration value="loaded" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="map">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_table">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/popup.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/popup.xsd
new file mode 100644 (file)
index 0000000..2dec0ad
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="popup" type="popup">
+               <xs:unique name="event_popup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="popup">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="timeout" />
+                                                               <xs:enumeration value="block,clicked" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="show,finished" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="title" type="xs:string" default="Title" />
+               <xs:attribute name="height" default="200">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:nonNegativeInteger">
+                                       <xs:maxInclusive value="400"></xs:maxInclusive>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="timeout" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="style" default="circle">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="circle" />
+                                       <xs:enumeration value="toast/circle" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/progressbar.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/progressbar.xsd
new file mode 100644 (file)
index 0000000..59d8016
--- /dev/null
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="progressbar" type="progressbar">
+               <xs:unique name="event_progressbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="progressbar_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="min" type="xs:nonNegativeInteger" />
+               <xs:attribute name="max">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:nonNegativeInteger">
+                                       <xs:maxInclusive value="999999" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="value" type="ratio" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <!-- <xs:attribute name="unit_format" type="xs:string" /> TODO -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="process">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="process" />
+                                       <xs:enumeration value="process/small" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="progressbar_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="progressbar">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/radio.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/radio.xsd
new file mode 100644 (file)
index 0000000..2e45ada
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="radio" type="radio">
+               <xs:unique name="event_radio">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="radio_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="state_value" type="xs:integer" />
+               <xs:attribute name="value" type="xs:integer" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="radio_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="radio">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_table">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/scroller.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/scroller.xsd
new file mode 100644 (file)
index 0000000..374022c
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="scroller" type="scroller">
+               <xs:unique name="event_scroller">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="scroller_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="9">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="scroller.direction" default="no_block" />
+               <xs:attribute name="content_min_w" type="xs:boolean" default="false" />
+               <xs:attribute name="content_min_h" type="xs:boolean" default="false" />
+               <xs:attribute name="page_relative_w" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_relative_h" type="nonNegativeDouble" default="0" />
+               <!-- <xs:attribute name="wheel" type="xs:boolean" default="true" /> -->
+               <xs:attribute name="page_size_w" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="page_size_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="propagate_events" type="xs:boolean" default="true" />
+               <xs:attribute name="page_scroll_limit_w" type="xs:positiveInteger" />
+               <xs:attribute name="page_scroll_limit_h" type="xs:positiveInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+       </xs:complexType>
+
+       <xs:complexType name="scroller">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_table">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/slider.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/slider.xsd
new file mode 100644 (file)
index 0000000..e89823c
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="slider" type="slider"> <!-- FIXME -->
+               <xs:unique name="event_slider">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="slider_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="indicator" type="xs:boolean" default="false" />
+               <xs:attribute name="min" type="xs:double" default="0.0" />
+               <xs:attribute name="max" type="xs:double" default="1.0" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="step" type="xs:double" default="0.05" />
+               <xs:attribute name="visible_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="on_focus" />
+                                       <xs:enumeration value="none" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="value" type="xs:double" default="0.0" />
+               <!-- <xs:attribute name="inverted" type="xs:boolean" default="false" /> -->
+               <xs:attribute name="indicator_format" type="xs:string" />
+               <!-- <xs:attribute name="direction" type="direction" default="horizontal" 
+                       /> -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="slider_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="slider,drag,start" />
+                                                               <xs:enumeration value="slider,drag,stop" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="slider">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_table">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/table.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/table.xsd
new file mode 100644 (file)
index 0000000..cc92b41
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="table" type="table" />
+
+       <xs:complexType name="table_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="cols" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="rows" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+
+       <xs:complexType name="table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/view.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_2.3.1/widget/view.xsd
new file mode 100644 (file)
index 0000000..38b1557
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="view" type="view">
+               <xs:unique name="widget_id">
+                       <xs:selector xpath=".//*" />
+                       <xs:field xpath="@id" />
+               </xs:unique>
+               <xs:key name="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="radioGroup" refer="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@radio_group" />
+               </xs:keyref>
+               <xs:unique name="event_signal">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="view">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="uib,view,create" />
+                                                               <xs:enumeration value="uib,view,destroy" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                               <xs:group ref="popup" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attribute name="id" type="function_name" use="required" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="page_location_x" type="xs:integer" default="0" />
+               <xs:attribute name="page_location_y" type="xs:integer" default="0" />
+               <xs:attribute name="screen_orientation" fixed="no_sensor">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_sensor" />
+                                       <xs:enumeration value="only_portrait" />
+                                       <xs:enumeration value="only_landscape" />
+                                       <xs:enumeration value="full_sensor" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="type">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="view" />
+                                       <xs:enumeration value="popup" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/attribute/group.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/attribute/group.xsd
new file mode 100644 (file)
index 0000000..26f2cca
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="type.xsd" />
+
+       <xs:attributeGroup name="common">
+               <xs:attribute name="id" use="required" type="function_name" />
+               <xs:attribute type="align_h" name="align_h" default="fill" />
+               <xs:attribute type="align_v" name="align_v" default="fill" />
+               <xs:attribute type="weight" name="weight_h" default="1" />
+               <xs:attribute type="weight" name="weight_v" default="1" />
+       </xs:attributeGroup>
+
+    <xs:attributeGroup name="widgetCommon">
+        <xs:attribute type="xs:string" name="colors" use="optional"/> <!-- for 3.0 feature -->
+    </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnGrid">
+               <xs:attribute type="xs:integer" name="pack_x" />
+               <xs:attribute type="xs:integer" name="pack_y" />
+               <xs:attribute type="xs:positiveInteger" name="pack_w" />
+               <xs:attribute type="xs:positiveInteger" name="pack_h" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnTable">
+               <xs:attribute type="xs:integer" name="pack_col" />
+               <xs:attribute type="xs:integer" name="pack_row" />
+               <xs:attribute type="xs:positiveInteger" name="col_span" />
+               <xs:attribute type="xs:positiveInteger" name="row_span" />
+       </xs:attributeGroup>
+
+       <xs:attributeGroup name="packOnPanes">
+               <xs:attribute name="pack">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:attributeGroup>
+
+       <xs:complexType name="item.event">
+               <xs:attribute name="signal">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="itemselected" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="function_name" type="xs:string" />  <!-- FIXME : regex for function name -->
+               <xs:attributeGroup ref="storyboard" />
+       </xs:complexType>
+
+       <xs:attributeGroup name="storyboard">
+               <xs:attribute name="connection_wrapper" type="xs:string" />
+               <xs:attribute name="event_name" type="xs:string" />
+               <xs:attribute name="target" type="xs:string" />
+       </xs:attributeGroup>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/attribute/type.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/attribute/type.xsd
new file mode 100644 (file)
index 0000000..032d31d
--- /dev/null
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+    <xs:simpleType name="style">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[a-zA-Z0-9_&amp;/]+" />
+        </xs:restriction>
+    </xs:simpleType>
+       <xs:simpleType name="function_name">
+               <xs:restriction base="xs:string">
+                       <xs:pattern value="[a-zA-Z_]+[a-zA-Z0-9_]*" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="nonNegativeDouble">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="ratio">
+               <xs:restriction base="xs:double">
+                       <xs:minInclusive value="0"></xs:minInclusive>
+                       <xs:maxInclusive value="1"></xs:maxInclusive>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="align_h">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="left" />
+                                       <xs:enumeration value="right" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="align_v">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="fill" />
+                                       <xs:enumeration value="top" />
+                                       <xs:enumeration value="bottom" />
+                                       <xs:enumeration value="center" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="weight">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="ratio" />
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="standard.icon">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="" />
+                       <xs:enumeration value="apps" />
+                       <xs:enumeration value="arrow_down" />
+                       <xs:enumeration value="arrow_left" />
+                       <xs:enumeration value="arrow_right" />
+                       <xs:enumeration value="arrow_up" />
+                       <xs:enumeration value="chat" />
+                       <xs:enumeration value="clock" />
+                       <xs:enumeration value="close" />
+                       <xs:enumeration value="delete" />
+                       <xs:enumeration value="edit" />
+                       <xs:enumeration value="file" />
+                       <xs:enumeration value="home" />
+                       <xs:enumeration value="media_player/forward" />
+                       <xs:enumeration value="media_player/info" />
+                       <xs:enumeration value="media_player/next" />
+                       <xs:enumeration value="media_player/pause" />
+                       <xs:enumeration value="media_player/play" />
+                       <xs:enumeration value="media_player/prev" />
+                       <xs:enumeration value="media_player/rewind" />
+                       <xs:enumeration value="media_player/stop" />
+                       <xs:enumeration value="menu/apps" />
+                       <xs:enumeration value="menu/arrow_up" />
+                       <xs:enumeration value="menu/arrow_down" />
+                       <xs:enumeration value="menu/arrow_left" />
+                       <xs:enumeration value="menu/arrow_right" />
+                       <xs:enumeration value="menu/chat" />
+                       <xs:enumeration value="menu/clock" />
+                       <xs:enumeration value="menu/close" />
+                       <xs:enumeration value="menu/delete" />
+                       <xs:enumeration value="menu/edit" />
+                       <xs:enumeration value="menu/folder" />
+                       <xs:enumeration value="menu/file" />
+                       <xs:enumeration value="menu/home" />
+                       <xs:enumeration value="menu/refresh" />
+                       <xs:enumeration value="no_photo" />
+                       <xs:enumeration value="photo/no_photo" />
+                       <xs:enumeration value="refresh" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="list.selectmode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="display_only" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.policy">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="auto" />
+                                       <xs:enumeration value="true" />
+                                       <xs:enumeration value="false" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="direction">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="vertical" />
+                       <xs:enumeration value="horizontal" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="scroller.direction">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="direction" />
+                       </xs:simpleType>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_block" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+       <xs:simpleType name="list.mode">
+               <xs:union>
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="compress" />
+                                       <xs:enumeration value="scroll" />
+                                       <xs:enumeration value="limit" />
+                                       <xs:enumeration value="expand" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:union>
+       </xs:simpleType>
+
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/element/configuration.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/element/configuration.xsd
new file mode 100644 (file)
index 0000000..b6e9a76
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/type.xsd" />
+
+       <xs:element name="configuration"> <!-- FIXME -->
+               <xs:complexType>
+                       <xs:attribute name="device" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="CIRCLE_360x360" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="id" type="function_name" use="required" />
+            <xs:attribute name="name" use="required">
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:minLength value="1"/>
+                </xs:restriction>
+            </xs:simpleType>
+            </xs:attribute>
+                       <xs:attribute name="orientation" fixed="portrait" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="portrait" />
+                                               <xs:enumeration value="landscape" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+                       <xs:attribute name="type" fixed="common" use="required">
+                               <xs:simpleType>
+                                       <xs:restriction base="xs:string">
+                                               <xs:enumeration value="common" />
+                                               <xs:enumeration value="specific" />
+                                       </xs:restriction>
+                               </xs:simpleType>
+                       </xs:attribute>
+               </xs:complexType>
+       </xs:element>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/element/group.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/element/group.xsd
new file mode 100644 (file)
index 0000000..1638136
--- /dev/null
@@ -0,0 +1,402 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../widget/bg.xsd" />
+       <xs:include schemaLocation="../widget/box.xsd" />
+       <xs:include schemaLocation="../widget/button.xsd" />
+       <xs:include schemaLocation="../widget/check.xsd" />
+       <xs:include schemaLocation="../widget/ctxpopup.xsd" />
+       <xs:include schemaLocation="../widget/datetime.xsd" />
+       <xs:include schemaLocation="../widget/entry.xsd" />
+       <xs:include schemaLocation="../widget/genlist.xsd" />
+       <xs:include schemaLocation="../widget/grid.xsd" />
+       <xs:include schemaLocation="../widget/image.xsd" />
+       <xs:include schemaLocation="../widget/index.xsd" />
+       <xs:include schemaLocation="../widget/label.xsd" />
+       <xs:include schemaLocation="../widget/layout.xsd" />
+       <xs:include schemaLocation="../widget/list.xsd" />
+       <xs:include schemaLocation="../widget/map.xsd" />
+       <xs:include schemaLocation="../widget/popup.xsd" />
+       <xs:include schemaLocation="../widget/progressbar.xsd" />
+       <xs:include schemaLocation="../widget/radio.xsd" />
+       <xs:include schemaLocation="../widget/scroller.xsd" />
+       <xs:include schemaLocation="../widget/slider.xsd" />
+       <xs:include schemaLocation="../widget/table.xsd" />
+
+       <xs:group name="rootContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="popup">
+               <xs:choice>
+                       <xs:element ref="popup" />
+                       <xs:element ref="ctxpopup" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainer">
+               <xs:choice>
+                       <xs:element ref="grid" />
+                       <xs:element ref="box" />
+                       <xs:element ref="table" />
+                       <xs:element ref="scroller" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainer">
+               <xs:choice>
+                       <xs:element ref="genlist" />
+                       <xs:element ref="index" />
+                       <xs:element ref="list" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidget">
+               <xs:choice>
+                       <xs:element ref="bg" />
+                       <xs:element ref="button" />
+                       <xs:element ref="check" />
+                       <xs:element ref="datetime" />
+                       <xs:element ref="entry" />
+                       <xs:element ref="image" />
+                       <xs:element ref="label" />
+                       <xs:element ref="layout" />
+                       <xs:element ref="map" />
+                       <xs:element ref="progressbar" />
+                       <xs:element ref="radio" />
+                       <xs:element ref="slider" />
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_grid" />
+                       <xs:element name="box" type="box_on_grid" />
+                       <xs:element name="table" type="table_on_grid" />
+                       <xs:element name="scroller" type="scroller_on_grid">
+                               <xs:unique name="event_scroller_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnGrid">
+               <xs:choice>
+                       <xs:element name="genlist" type="genlist_on_grid">
+                               <xs:unique name="event_genlist_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_grid">
+                               <xs:unique name="event_index_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_grid">
+                               <xs:unique name="event_list_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnGrid">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_grid" />
+                       <xs:element name="button" type="button_on_grid">
+                               <xs:unique name="event_button_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_grid">
+                               <xs:unique name="event_check_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_grid">
+                               <xs:unique name="event_datetime_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_grid">
+                               <xs:unique name="event_entry_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_grid">
+                               <xs:unique name="event_image_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_grid">
+                               <xs:unique name="event_label_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_grid">
+                               <xs:unique name="event_layout_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_grid">
+                               <xs:unique name="event_map_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_grid">
+                               <xs:unique name="event_progressbar_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_grid">
+                               <xs:unique name="event_radio_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_grid">
+                               <xs:unique name="event_slider_on_grid">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnTable">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_table" />
+                       <xs:element name="box" type="box_on_table" />
+                       <xs:element name="table" type="table_on_table" />
+                       <xs:element name="scroller" type="scroller_on_table">
+                               <xs:unique name="event_scroller_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnTable">
+               <xs:choice>
+                       <xs:element name="genlist" type="genlist_on_table">
+                               <xs:unique name="event_genlist_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_table">
+                               <xs:unique name="event_index_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_table">
+                               <xs:unique name="event_list_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnTable">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_table" />
+                       <xs:element name="button" type="button_on_table">
+                               <xs:unique name="event_button_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_table">
+                               <xs:unique name="event_check_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_table">
+                               <xs:unique name="event_datetime_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_table">
+                               <xs:unique name="event_entry_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_table">
+                               <xs:unique name="event_image_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_table">
+                               <xs:unique name="event_label_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_table">
+                               <xs:unique name="event_layout_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_table">
+                               <xs:unique name="event_map_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_table">
+                               <xs:unique name="event_progressbar_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_table">
+                               <xs:unique name="event_radio_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_table">
+                               <xs:unique name="event_slider_on_table">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="widgetContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="grid" type="grid_on_panes" />
+                       <xs:element name="box" type="box_on_panes" />
+                       <xs:element name="table" type="table_on_panes" />
+                       <xs:element name="scroller" type="scroller_on_panes">
+                               <xs:unique name="event_scroller_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="itemContainerOnPanes">
+               <xs:choice>
+                       <xs:element name="genlist" type="genlist_on_panes">
+                               <xs:unique name="event_genlist_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="index" type="index_on_panes">
+                               <xs:unique name="event_index_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="list" type="list_on_panes">
+                               <xs:unique name="event_list_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+
+       <xs:group name="primitiveWidgetOnPanes">
+               <xs:choice>
+                       <xs:element name="bg" type="background_on_panes" />
+                       <xs:element name="button" type="button_on_panes">
+                               <xs:unique name="event_button_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="check" type="check_on_panes">
+                               <xs:unique name="event_check_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="datetime" type="datetime_on_panes">
+                               <xs:unique name="event_datetime_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="entry" type="entry_on_panes">
+                               <xs:unique name="event_entry_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="image" type="image_on_panes">
+                               <xs:unique name="event_image_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="label" type="label_on_panes">
+                               <xs:unique name="event_label_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="layout" type="layout_on_panes">
+                               <xs:unique name="event_layout_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="map" type="map_on_panes">
+                               <xs:unique name="event_map_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="progressbar" type="progressbar_on_panes">
+                               <xs:unique name="event_progressbar_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="radio" type="radio_on_panes">
+                               <xs:unique name="event_radio_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+                       <xs:element name="slider" type="slider_on_panes">
+                               <xs:unique name="event_slider_on_panes">
+                                       <xs:selector xpath="./event" />
+                                       <xs:field xpath="@signal" />
+                               </xs:unique>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/element/variation.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/element/variation.xsd
new file mode 100644 (file)
index 0000000..b106524
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd"></xs:include>
+
+       <xs:element name="variation" type="variation" />
+
+       <xs:complexType name="variation">
+               <xs:attribute type="xs:string" name="config_ref" />
+               <xs:attribute type="xs:boolean" name="visible" default="true" />
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnGrid"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_table">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnTable"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="variation_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="variation">
+                               <xs:attributeGroup ref="packOnPanes"></xs:attributeGroup>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/layout.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/layout.xsd
new file mode 100644 (file)
index 0000000..b775064
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="element/configuration.xsd" />
+
+       <!-- definition of tizen.view -->
+       <xs:include schemaLocation="widget/view.xsd" />
+
+       <xs:element name="document">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="mscreen" />
+                               <xs:element ref="views" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:key name="config">
+                       <xs:selector xpath="mscreen/configuration" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="config_ref" refer="config">
+                       <xs:selector xpath=".//variation" />
+                       <xs:field xpath="@config_ref" />
+               </xs:keyref>
+       </xs:element>
+       <xs:element name="mscreen">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="configuration" minOccurs="1" maxOccurs="1" />
+                       </xs:sequence>
+               </xs:complexType>
+               <xs:unique name="qualifiers">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@device" />
+                       <xs:field xpath="@orientation" />
+               </xs:unique>
+               <xs:unique name="config-name">
+                       <xs:selector xpath="configuration" />
+                       <xs:field xpath="@name" />
+               </xs:unique>
+       </xs:element>
+       <xs:element name="views">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element ref="view" minOccurs="0" maxOccurs="unbounded" />
+                       </xs:sequence>
+                       <xs:attribute type="xs:string" name="startup"></xs:attribute>
+               </xs:complexType>
+               <xs:key name="view_id">
+                       <xs:selector xpath="view" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="startup" refer="view_id">
+                       <xs:selector xpath="." />
+                       <xs:field xpath="@startup" />
+               </xs:keyref>
+               <xs:keyref name="view_ref" refer="view_id">
+                       <xs:selector xpath=".//naviframe" />
+                       <xs:field xpath="@view" />
+               </xs:keyref>
+               <xs:keyref name="event_target" refer="view_id">
+                       <xs:selector xpath=".//event" />
+                       <xs:field xpath="@target" />
+               </xs:keyref>
+       </xs:element>
+
+</xs:schema>
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/bg.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/bg.xsd
new file mode 100644 (file)
index 0000000..3f87e10
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="bg" type="background" />
+
+       <xs:complexType name="background_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="color" default="#ffffff">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:pattern value="#{1}[0-9a-fA-F]{6}"></xs:pattern>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="option" default="scale">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="center" />
+                                                       <xs:enumeration value="scale" />
+                                                       <xs:enumeration value="stretch" />
+                                                       <xs:enumeration value="tile" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:complexType name="background">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_table">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="background_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="background_common">
+                               <xs:choice>
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/box.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/box.xsd
new file mode 100644 (file)
index 0000000..ccfe5e3
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="box" type="box" />
+
+       <xs:complexType name="box_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" default="0" />
+       </xs:complexType>
+
+       <xs:complexType name="box">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_table">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="box_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="box_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/button.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/button.xsd
new file mode 100644 (file)
index 0000000..b9f430a
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="button" type="button">
+               <xs:unique name="event_button">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="button_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attributeGroup ref="widgetCommon" /> <!-- since 3.0 -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Button" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:union>
+                                                       <xs:simpleType>
+                                                               <xs:restriction base="xs:string"> <!-- FIXME -->
+                                                                       <xs:enumeration value="default" />
+                                                                       <xs:enumeration value="bottom" />
+                                                               </xs:restriction>
+                                                       </xs:simpleType>
+                                               </xs:union>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+       <xs:group name="button_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="repeated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="unpressed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="button">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_table">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="button_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="button_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="button_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/check.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/check.xsd
new file mode 100644 (file)
index 0000000..565d3f1
--- /dev/null
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="check" type="check">
+               <xs:unique name="event_check">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="check_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="state" type="xs:boolean" default="false" />
+               <xs:attribute name="style" default="default">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">       <!-- FIXME -->
+                                                       <xs:enumeration value="default" />
+                                                       <xs:enumeration value="small" />
+                                                       <xs:enumeration value="on&amp;off" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="check_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="check">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_table">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="check_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="check_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="check_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/ctxpopup.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/ctxpopup.xsd
new file mode 100644 (file)
index 0000000..80fecf7
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+       <xs:element name="ctxpopup" type="ctxpopup">
+               <xs:unique name="event_ctxpopup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="ctxpopup">
+               <xs:choice minOccurs="1">
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="dismissed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="ctxpopupitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="CtxPopupItem" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="select_mode">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="select_mode" />
+                                                       <xs:enumeration value="select_mode/top" />
+                                                       <xs:enumeration value="select_mode/bottom" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/datetime.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/datetime.xsd
new file mode 100644 (file)
index 0000000..acb621d
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="datetime" type="datetime">
+               <xs:unique name="event_datetime">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="datetime_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="datepicker/circle">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="datepicker/circle" />
+                                                       <xs:enumeration value="timepicker/circle" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="datetime_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="datetime">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_table">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="datetime_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="datetime_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="datetime_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/entry.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/entry.xsd
new file mode 100644 (file)
index 0000000..1a702a0
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="entry" type="entry">
+               <xs:unique name="event_entry">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="entry_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="scroll" type="xs:boolean" default="false" />
+               <xs:attribute name="single_line" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="password" type="xs:boolean" default="false" />
+               <xs:attribute name="line_wrap">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="char" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="mixed" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="editable" type="xs:boolean" default="true" />
+               <xs:attribute name="autocapital_type" default="none">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="none" />
+                                       <xs:enumeration value="word" />
+                                       <xs:enumeration value="sentence" />
+                                       <xs:enumeration value="all" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="file_text_format" default="plain_utf8">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="plain_utf8" />
+                                                       <xs:enumeration value="markup_utf8" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="input_panel_return_key" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Entry" />
+               <xs:attribute name="src" type="xs:string" />
+       </xs:complexType>
+       <xs:group name="entry_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="25">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="changed,user" />
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="aborted" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="clicked,triple" />
+                                                               <xs:enumeration value="focused" />
+                                                               <xs:enumeration value="unfocused" />
+                                                               <xs:enumeration value="selection,paste" />
+                                                               <xs:enumeration value="selection,copy" />
+                                                               <xs:enumeration value="selection,cut" />
+                                                               <xs:enumeration value="selection,start" />
+                                                               <xs:enumeration value="selection,changed" />
+                                                               <xs:enumeration value="selection,cleared" />
+                                                               <xs:enumeration value="cursor,changed" />
+                                                               <xs:enumeration value="anchor,clicked" />
+                                                               <xs:enumeration value="anchor,in" />
+                                                               <xs:enumeration value="anchor,out" />
+                                                               <xs:enumeration value="anchor,up" />
+                                                               <xs:enumeration value="anchor,down" />
+                                                               <xs:enumeration value="preedit,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="entry">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_table">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="entry_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="entry_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="entry_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/genlist.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/genlist.xsd
new file mode 100644 (file)
index 0000000..d88a433
--- /dev/null
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="genlist" type="genlist">
+               <xs:unique name="event_genlist">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="genlist_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="genlist_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="41">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="pressed" />
+                                                               <xs:enumeration value="released" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="expanded" />
+                                                               <xs:enumeration value="contracted" />
+                                                               <xs:enumeration value="expand,request" />
+                                                               <xs:enumeration value="contract,request" />
+                                                               <xs:enumeration value="realized" />
+                                                               <xs:enumeration value="unrealized" />
+                                                               <xs:enumeration value="drag,start,up" />
+                                                               <xs:enumeration value="drag,start,down" />
+                                                               <xs:enumeration value="drag,start,left" />
+                                                               <xs:enumeration value="drag,start,right" />
+                                                               <xs:enumeration value="drag,stop" />
+                                                               <xs:enumeration value="drag" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="multi,swipe,left" />
+                                                               <xs:enumeration value="multi,swipe,right" />
+                                                               <xs:enumeration value="multi,swipe,up" />
+                                                               <xs:enumeration value="multi,swipe,down" />
+                                                               <xs:enumeration value="multi,pinch,out" />
+                                                               <xs:enumeration value="multi,pinch,in" />
+                                                               <xs:enumeration value="swipe" />
+                                                               <xs:enumeration value="moved" />
+                                                               <xs:enumeration value="moved,after" />
+                                                               <xs:enumeration value="moved,before" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="tree,effect,finished" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="genlistitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute type="xs:string" name="text" />
+                                       <xs:attribute type="xs:string" name="sub_text" />
+                                       <xs:attribute name="style" default="default">
+                                               <xs:simpleType>
+                                                       <xs:union memberTypes="style">
+                                                               <xs:simpleType>
+                                                                       <xs:restriction base="xs:string">
+                                                                               <xs:enumeration value="default" />
+                                                                               <xs:enumeration value="title" />
+                                                                               <xs:enumeration value="groupindex" />
+                                                                               <xs:enumeration value="1text" />
+                                                                               <xs:enumeration value="1text.1icon" />
+                                                                               <xs:enumeration value="2text" />
+                                                                               <xs:enumeration value="1text.1icon.divider" />
+                                                                               <xs:enumeration value="1text.1icon.1" />
+                                                                               <xs:enumeration value="2text.1icon.1" />
+                                                                               <xs:enumeration value="editfield" />
+                                                                               <xs:enumeration value="default" />
+                                                                       </xs:restriction>
+                                                               </xs:simpleType>
+                                                       </xs:union>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute type="xs:boolean" name="selected"
+                                               default="false" />
+                                       <xs:attribute type="xs:string" name="image_path" />
+                                       <xs:attribute type="xs:string" name="end_image_path" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="genlist">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_table">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="genlist_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="genlist_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="genlist_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/grid.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/grid.xsd
new file mode 100644 (file)
index 0000000..e949fef
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="grid" type="grid" />
+
+       <xs:complexType name="grid_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="vsize_w" type="xs:positiveInteger" default="1000" />
+               <xs:attribute name="vsize_h" type="xs:positiveInteger" default="1000" />
+       </xs:complexType>
+
+       <xs:complexType name="grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_table">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="grid_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="grid_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnGrid" />
+                                       <xs:group ref="itemContainerOnGrid" />
+                                       <xs:group ref="primitiveWidgetOnGrid" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/image.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/image.xsd
new file mode 100644 (file)
index 0000000..8049943
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="image" type="image">
+               <xs:unique name="event_image">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="image_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <!-- <xs:attribute name="group" type="xs:string" /> TODO : postpone -->
+               <xs:attribute name="aspect_fixed" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="fill_outside" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="resizable_up" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="resizable_down" type="xs:boolean"
+                       default="true" />
+               <xs:attribute name="no_scale" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="image_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="drop" />
+                                                               <xs:enumeration value="clicked" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="image">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_table">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="image_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="image_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="image_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/index.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/index.xsd
new file mode 100644 (file)
index 0000000..fb96251
--- /dev/null
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="index" type="index">
+               <xs:unique name="event_index">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="index_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="autohide" type="xs:boolean" default="false" />
+               <xs:attribute name="direction" type="direction" default="vertical" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="thumbnail">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="thumbnail" />
+                                                       <xs:enumeration value="circle" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="index_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="6">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="level,up" />
+                                                               <xs:enumeration value="level,down" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="indexitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:sequence>
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                       </xs:sequence>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="item" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="index">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_table">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="index_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="index_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="index_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/label.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/label.xsd
new file mode 100644 (file)
index 0000000..b852952
--- /dev/null
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="label" type="label">
+               <xs:unique name="event_label">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="label_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="ellipsis" type="xs:boolean" default="false" />
+               <xs:attribute name="wrap_width" type="xs:nonNegativeInteger"
+                       default="0" />
+               <xs:attribute name="line_wrap" default="none">
+                       <xs:simpleType>
+                               <xs:union>
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="none" />
+                                                       <xs:enumeration value="char" />
+                                                       <xs:enumeration value="word" />
+                                                       <xs:enumeration value="mixed" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="text" type="xs:string" default="Label" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+       </xs:complexType>
+       <xs:group name="label_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="slide,end" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="label">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_table">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="label_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="label_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="label_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/layout.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/layout.xsd
new file mode 100644 (file)
index 0000000..169053c
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="layout" type="layout">
+               <xs:unique name="event_layout">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="layout_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="src" type="xs:string" default="" />
+               <xs:attribute name="group" type="xs:string" default="" />
+       </xs:complexType>
+       <xs:group name="layout_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="theme,changed" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="layout">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_table">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="layout_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="layout_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="layout_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/list.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/list.xsd
new file mode 100644 (file)
index 0000000..bcf6a84
--- /dev/null
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="image.xsd" />
+
+
+       <xs:element name="list" type="list">
+               <xs:unique name="event_list">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="list_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="select_mode" type="list.selectmode"
+                       default="default" />
+               <xs:attribute name="multi_select" type="xs:boolean"
+                       default="false" />
+               <xs:attribute name="mode" type="list.mode" default="scroll" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy"
+                       default="auto" />
+               <xs:attribute name="data_bind" type="xs:string" default=""/>
+       </xs:complexType>
+       <xs:group name="list_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="12">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="activated" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="selected" />
+                                                               <xs:enumeration value="unselected" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="highlighted" />
+                                                               <xs:enumeration value="unhighlighted" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded">
+                               <xs:complexType>
+                                       <xs:choice minOccurs="0" maxOccurs="2">
+                                               <xs:element name="event" type="item.event" minOccurs="0" />
+                                               <xs:element ref="image" minOccurs="0" />
+                                       </xs:choice>
+                                       <xs:attribute name="id" type="function_name" use="required" />
+                                       <xs:attribute name="text" type="xs:string" default="List item" />
+                                       <xs:attribute name="selected" type="xs:boolean"
+                                               default="false" />
+                                       <xs:attribute name="data_bind" type="xs:string" default=""/>
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="list">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_table">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="list_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="list_common">
+                               <xs:choice maxOccurs="3">
+                                       <xs:group ref="list_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/map.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/map.xsd
new file mode 100644 (file)
index 0000000..45a6694
--- /dev/null
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="map" type="map">
+               <xs:unique name="event_map">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="map_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="zoom_level" type="xs:nonNegativeInteger"
+                       default="15" />
+               <xs:attribute name="longitude" type="xs:double" />
+               <xs:attribute name="latitude" type="xs:double" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="map_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="24">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="clicked" />
+                                                               <xs:enumeration value="clicked,double" />
+                                                               <xs:enumeration value="press" />
+                                                               <xs:enumeration value="longpressed" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="zoom,start" />
+                                                               <xs:enumeration value="zoom,stop" />
+                                                               <xs:enumeration value="zoom,change" />
+                                                               <xs:enumeration value="tile,load" />
+                                                               <xs:enumeration value="tile,loaded" />
+                                                               <xs:enumeration value="tile,loaded,fail" />
+                                                               <xs:enumeration value="route,load" />
+                                                               <xs:enumeration value="route,loaded" />
+                                                               <xs:enumeration value="route,loaded,fail" />
+                                                               <xs:enumeration value="name,load" />
+                                                               <xs:enumeration value="name,loaded" />
+                                                               <xs:enumeration value="name,loaded,fail" />
+                                                               <xs:enumeration value="overlay,clicked" />
+                                                               <xs:enumeration value="loaded" />
+                                                               <xs:enumeration value="language,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="map">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_table">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="map_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="map_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="map_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/popup.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/popup.xsd
new file mode 100644 (file)
index 0000000..28f1326
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="popup" type="popup">
+               <xs:unique name="event_popup">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="popup">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="timeout" />
+                                                               <xs:enumeration value="block,clicked" />
+                                                               <xs:enumeration value="language,changed" />
+                                                               <xs:enumeration value="show,finished" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="title" type="xs:string" default="Title" />
+               <xs:attribute name="height" default="200">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:nonNegativeInteger">
+                                       <xs:maxInclusive value="400"></xs:maxInclusive>
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="timeout" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="style" default="circle">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="circle" />
+                                                       <xs:enumeration value="toast/circle" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/progressbar.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/progressbar.xsd
new file mode 100644 (file)
index 0000000..6c6af0d
--- /dev/null
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="progressbar" type="progressbar">
+               <xs:unique name="event_progressbar">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="progressbar_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="min" type="xs:nonNegativeInteger" />
+               <xs:attribute name="max">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:nonNegativeInteger">
+                                       <xs:maxInclusive value="999999" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="value" type="ratio" />
+               <xs:attribute name="inverted" type="xs:boolean" default="false" />
+               <!-- <xs:attribute name="unit_format" type="xs:string" /> TODO -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="style" default="process">
+                       <xs:simpleType>
+                               <xs:union memberTypes="style">
+                                       <xs:simpleType>
+                                               <xs:restriction base="xs:string">
+                                                       <xs:enumeration value="process" />
+                                                       <xs:enumeration value="process/small" />
+                                               </xs:restriction>
+                                       </xs:simpleType>
+                               </xs:union>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+       <xs:group name="progressbar_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="progressbar">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_table">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="progressbar_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="progressbar_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="progressbar_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/radio.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/radio.xsd
new file mode 100644 (file)
index 0000000..2e45ada
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="radio" type="radio">
+               <xs:unique name="event_radio">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="radio_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="state_value" type="xs:integer" />
+               <xs:attribute name="value" type="xs:integer" />
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="radio_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="1">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="radio">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_table">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="radio_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="radio_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="radio_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/scroller.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/scroller.xsd
new file mode 100644 (file)
index 0000000..374022c
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../attribute/type.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="scroller" type="scroller">
+               <xs:unique name="event_scroller">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="scroller_common">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="9">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="edge,left" />
+                                                               <xs:enumeration value="edge,right" />
+                                                               <xs:enumeration value="edge,top" />
+                                                               <xs:enumeration value="edge,bottom" />
+                                                               <xs:enumeration value="scroll" />
+                                                               <xs:enumeration value="scroll,anim,start" />
+                                                               <xs:enumeration value="scroll,anim,stop" />
+                                                               <xs:enumeration value="scroll,drag,start" />
+                                                               <xs:enumeration value="scroll,drag,stop" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="direction" type="scroller.direction" default="no_block" />
+               <xs:attribute name="content_min_w" type="xs:boolean" default="false" />
+               <xs:attribute name="content_min_h" type="xs:boolean" default="false" />
+               <xs:attribute name="page_relative_w" type="nonNegativeDouble" default="0" />
+               <xs:attribute name="page_relative_h" type="nonNegativeDouble" default="0" />
+               <!-- <xs:attribute name="wheel" type="xs:boolean" default="true" /> -->
+               <xs:attribute name="page_size_w" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="page_size_h" type="xs:nonNegativeInteger" default="0" />
+               <xs:attribute name="propagate_events" type="xs:boolean" default="true" />
+               <xs:attribute name="page_scroll_limit_w" type="xs:positiveInteger" />
+               <xs:attribute name="page_scroll_limit_h" type="xs:positiveInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+               <xs:attribute name="scrollbar_h" type="scroller.policy" default="auto" />
+               <xs:attribute name="scrollbar_v" type="scroller.policy" default="auto" />
+       </xs:complexType>
+
+       <xs:complexType name="scroller">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_table">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="scroller_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="scroller_common">
+                               <xs:choice maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainer" />
+                                       <xs:group ref="itemContainer" />
+                                       <xs:group ref="primitiveWidget" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/slider.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/slider.xsd
new file mode 100644 (file)
index 0000000..e89823c
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="slider" type="slider"> <!-- FIXME -->
+               <xs:unique name="event_slider">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="slider_common">
+
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="indicator" type="xs:boolean" default="false" />
+               <xs:attribute name="min" type="xs:double" default="0.0" />
+               <xs:attribute name="max" type="xs:double" default="1.0" />
+               <xs:attribute name="span_size" type="xs:nonNegativeInteger" />
+               <xs:attribute name="step" type="xs:double" default="0.05" />
+               <xs:attribute name="visible_mode" default="default">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="default" />
+                                       <xs:enumeration value="always" />
+                                       <xs:enumeration value="on_focus" />
+                                       <xs:enumeration value="none" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="value" type="xs:double" default="0.0" />
+               <!-- <xs:attribute name="inverted" type="xs:boolean" default="false" /> -->
+               <xs:attribute name="indicator_format" type="xs:string" />
+               <!-- <xs:attribute name="direction" type="direction" default="horizontal" 
+                       /> -->
+               <xs:attribute name="disable" type="xs:boolean" default="false" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+       <xs:group name="slider_children">
+               <xs:choice>
+                       <xs:element name="event" minOccurs="0" maxOccurs="4">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="changed" />
+                                                               <xs:enumeration value="slider,drag,start" />
+                                                               <xs:enumeration value="slider,drag,stop" />
+                                                               <xs:enumeration value="delay,changed" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                                       <xs:attributeGroup ref="storyboard" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:choice>
+       </xs:group>
+       <xs:complexType name="slider">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_grid"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_table">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_table"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="slider_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="slider_common">
+                               <xs:choice maxOccurs="2">
+                                       <xs:group ref="slider_children" />
+                                       <xs:element name="variation" type="variation_on_panes"
+                                               minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/table.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/table.xsd
new file mode 100644 (file)
index 0000000..cc92b41
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../attribute/group.xsd" />
+       <xs:include schemaLocation="../element/group.xsd" />
+       <xs:include schemaLocation="../element/variation.xsd" />
+
+       <xs:element name="table" type="table" />
+
+       <xs:complexType name="table_common">
+               <xs:attributeGroup ref="common" />
+               <xs:attribute name="homogeneous" type="xs:boolean" default="false" />
+               <xs:attribute name="cols" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="rows" type="xs:nonNegativeInteger" default="2" />
+               <xs:attribute name="padding_h" type="xs:nonNegativeInteger" />
+               <xs:attribute name="padding_v" type="xs:nonNegativeInteger" />
+               <xs:attribute name="visible" type="xs:boolean" default="true" />
+       </xs:complexType>
+
+
+       <xs:complexType name="table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element ref="variation" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_grid">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_grid" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnGrid" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_table">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_table" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnTable" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+       <xs:complexType name="table_on_panes">
+               <xs:complexContent>
+                       <xs:extension base="table_common">
+                               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                                       <xs:group ref="widgetContainerOnTable" />
+                                       <xs:group ref="itemContainerOnTable" />
+                                       <xs:group ref="primitiveWidgetOnTable" />
+                                       <xs:element name="variation" type="variation_on_panes" minOccurs="0" maxOccurs="unbounded" />
+                               </xs:choice>
+                               <xs:attributeGroup ref="packOnPanes" />
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/view.xsd b/org.tizen.efluibuilder/res/xsd/wearable_circle_3.0/widget/view.xsd
new file mode 100644 (file)
index 0000000..38b1557
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+       <xs:include schemaLocation="../element/group.xsd" />
+
+       <xs:element name="view" type="view">
+               <xs:unique name="widget_id">
+                       <xs:selector xpath=".//*" />
+                       <xs:field xpath="@id" />
+               </xs:unique>
+               <xs:key name="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@id" />
+               </xs:key>
+               <xs:keyref name="radioGroup" refer="radio_id">
+                       <xs:selector xpath=".//radio" />
+                       <xs:field xpath="@radio_group" />
+               </xs:keyref>
+               <xs:unique name="event_signal">
+                       <xs:selector xpath="./event" />
+                       <xs:field xpath="@signal" />
+               </xs:unique>
+       </xs:element>
+
+       <xs:complexType name="view">
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element name="event" minOccurs="0" maxOccurs="2">
+                               <xs:complexType>
+                                       <xs:attribute name="signal">
+                                               <xs:simpleType>
+                                                       <xs:restriction base="xs:string">
+                                                               <xs:enumeration value="uib,view,create" />
+                                                               <xs:enumeration value="uib,view,destroy" />
+                                                       </xs:restriction>
+                                               </xs:simpleType>
+                                       </xs:attribute>
+                                       <xs:attribute name="function_name" type="function_name" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:choice maxOccurs="1">
+                               <xs:group ref="rootContainer" maxOccurs="1" />
+                               <xs:group ref="popup" maxOccurs="1" />
+                       </xs:choice>
+               </xs:choice>
+               <xs:attribute name="id" type="function_name" use="required" />
+               <xs:attribute name="indicator" type="xs:boolean" default="true" />
+               <xs:attribute name="page_location_x" type="xs:integer" default="0" />
+               <xs:attribute name="page_location_y" type="xs:integer" default="0" />
+               <xs:attribute name="screen_orientation" fixed="no_sensor">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="no_sensor" />
+                                       <xs:enumeration value="only_portrait" />
+                                       <xs:enumeration value="only_landscape" />
+                                       <xs:enumeration value="full_sensor" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+               <xs:attribute name="type">
+                       <xs:simpleType>
+                               <xs:restriction base="xs:string">
+                                       <xs:enumeration value="view" />
+                                       <xs:enumeration value="popup" />
+                               </xs:restriction>
+                       </xs:simpleType>
+               </xs:attribute>
+       </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/res/xsl/render_script.xsl b/org.tizen.efluibuilder/res/xsl/render_script.xsl
new file mode 100644 (file)
index 0000000..bd93a1f
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="text" encoding="utf-8"/>
+    <xsl:template match="/*[node()]">
+        <!-- <xsl:text>[</xsl:text> -->
+        <xsl:apply-templates select="." mode="obj-content" />
+        <!-- <xsl:text>]</xsl:text> -->
+    </xsl:template>
+    <xsl:template match="*" mode="obj-content">
+       <xsl:choose>
+                       <xsl:when test="name() = 'event'">
+                       </xsl:when>
+                       <xsl:otherwise>
+                       <xsl:text>{</xsl:text>
+                           <xsl:variable name="properties_cnt" select="@*"/>
+                           <xsl:variable name="child_cnt" select="child::*"/>
+               
+                           <xsl:text>"widgetType" : "</xsl:text><xsl:value-of select="name()"/><xsl:text>",</xsl:text>
+                           <xsl:text>"wid" : "</xsl:text><xsl:value-of select="@part-id"/><xsl:text>"</xsl:text>
+                           <xsl:if test="$properties_cnt or $child_cnt">,</xsl:if>
+                           
+                           <xsl:if test="$properties_cnt">
+                             <xsl:text>"properties" : {</xsl:text> 
+                             <xsl:apply-templates select="@*" mode="attr" />
+                             <xsl:text>}</xsl:text>
+                             <xsl:variable name="node_cnt" select="'1'" />
+                           </xsl:if>
+                           <xsl:if test="$child_cnt">
+                             <xsl:if test="$properties_cnt">,</xsl:if>            
+                             <xsl:text>"children" : [</xsl:text>
+                             <xsl:apply-templates select="./*" mode="obj-content" />
+                             <xsl:text>]</xsl:text>
+                           </xsl:if>
+                       <xsl:text>}</xsl:text>
+                       <xsl:if test="position() &lt; last()">, </xsl:if>
+                       </xsl:otherwise>
+               </xsl:choose>        
+    </xsl:template>
+    <xsl:template match="@*" mode="attr">
+        <xsl:text>"</xsl:text><xsl:value-of select="name()"/>" : "<xsl:value-of select="."/><xsl:text>"</xsl:text>
+        <xsl:if test="position() &lt; last()">,</xsl:if>
+    </xsl:template>
+    <xsl:template match="node/@TEXT | text()" name="removeBreaks">
+        <xsl:param name="pText" select="normalize-space(.)"/>
+        <xsl:choose>
+            <xsl:when test="not(contains($pText, '&#xA;'))"><xsl:copy-of select="$pText"/></xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="concat(substring-before($pText, '&#xD;&#xA;'), ' ')"/>
+                <xsl:call-template name="removeBreaks">
+                    <xsl:with-param name="pText" select="substring-after($pText, '&#xD;&#xA;')"/>
+                </xsl:call-template>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template> 
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder/res/xsl/template.xsl b/org.tizen.efluibuilder/res/xsl/template.xsl
new file mode 100644 (file)
index 0000000..1c82e88
--- /dev/null
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:template match="/">
+    <html>
+      <head>
+        <style type="text/css">
+          html,body {
+          font-family:Arial;
+          margin: 0px;
+          overflow: hidden;
+          }
+          td
+          {
+          font-size:13px;
+          }
+          .name
+          {
+          font-size:16px;
+          color:#ffffff;
+          height:26px;
+          background-color:#6d96ac;
+          }
+          .category
+          {
+          font-size:16px;
+          color:#ffffff;
+          height:30px;
+          background-color:#6d96ac;
+          }
+          .contents
+          {
+          padding: 6px 10px 14px 10px;
+          }
+          table#widgets td
+          {
+          border: solid 1px #6d96ac;
+          border-collapse: collapse;
+          }
+          .widgetname
+          {
+          font-weight: bold;
+          text-align: center;
+          width: 20%;
+          word-break:break-all;
+          }
+          table#references td
+          {
+          width: 100%;
+          border: 0px;
+          border-spacing: 0px;
+          padding: 5px;
+          }
+          .refname
+          {
+          width: 100%;
+          font-weight: bold;
+          }
+        </style>
+      </head>
+      <body>
+       <img>
+         <xsl:attribute name="src">
+                   <xsl:value-of select="Metadata/image"/>
+          </xsl:attribute>
+          <xsl:attribute name="width">
+                   <xsl:value-of select="180"/>
+          </xsl:attribute>
+          <xsl:attribute name="height">
+           <xsl:value-of select="300"/>
+          </xsl:attribute>
+          <xsl:attribute name="align">
+           <xsl:value-of select="center"/>
+          </xsl:attribute>
+          <xsl:attribute name="alt">
+           <xsl:value-of select="Error"/>
+          </xsl:attribute>
+        </img>
+      </body>
+    </html>
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.tizen.efluibuilder/src/edjResourceSyncManager/DirectoryWatchService.java b/org.tizen.efluibuilder/src/edjResourceSyncManager/DirectoryWatchService.java
new file mode 100644 (file)
index 0000000..3ed5a04
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package edjResourceSyncManager;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.LinkOption;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardWatchEventKinds;
+import java.nio.file.WatchEvent;
+import java.nio.file.WatchKey;
+import java.nio.file.WatchService;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class DirectoryWatchService extends Thread {
+    private static Logger logger = LoggerFactory.getLogger(DirectoryWatchService.class);
+    String rootPath = null;
+    List<String> changedList = null;
+    List<IWatchServiceListener> listeners = new ArrayList<IWatchServiceListener>();
+    WatchService watchService = null;
+    ConcurrentHashMap<WatchKey, Path> keys = new ConcurrentHashMap<WatchKey, Path>();
+
+    DirectoryWatchService() {
+
+    }
+
+    public void init(String rootPath) {
+        this.rootPath = rootPath;
+        try {
+            watchService = FileSystems.getDefault().newWatchService();
+            register(Paths.get(rootPath), true);
+        } catch (IOException e) {
+            logger.error(e.getMessage());
+        }
+    }
+
+    private void register(Path dir, boolean bRecursive) throws IOException {
+        WatchKey key =
+                dir.register(watchService, StandardWatchEventKinds.ENTRY_CREATE, StandardWatchEventKinds.ENTRY_DELETE, StandardWatchEventKinds.ENTRY_MODIFY);
+        keys.put(key, dir);
+        if (bRecursive) {
+            String nextPath = null;
+            String[] dirList = dir.toFile().list();
+            if (dirList != null)
+                for (String name : dirList) {
+                    nextPath = dir.toString() + "/" + name;
+                    if (new File(nextPath).isDirectory()) {
+                        register(Paths.get(nextPath), bRecursive);
+                    }
+                }
+        }
+    }
+
+    private void fireEvents(List<ResourceChangedEvent> events) {
+        for (IWatchServiceListener listener : listeners) {
+            listener.contentChanged(events);
+        }
+    }
+
+    @Override
+    public void run() {
+        while (Thread.interrupted() == false && watchService != null) {
+            WatchKey key = null;
+            try {
+                key = watchService.take();
+            } catch (InterruptedException e) {
+                break;
+            }
+            if (keys.containsKey(key) == false) {
+                continue;
+            }
+            Path dir = keys.get(key);
+            List<WatchEvent<?>> keys = key.pollEvents();
+            List<ResourceChangedEvent> changedEvents = new ArrayList<ResourceChangedEvent>();
+            for (WatchEvent<?> event : keys) {
+                WatchEvent.Kind<?> kind = event.kind();
+                Path name = (Path) event.context();
+                if (kind == StandardWatchEventKinds.OVERFLOW) {
+                    continue;
+                }
+                if (kind == StandardWatchEventKinds.ENTRY_CREATE) {
+                    Path child = dir.resolve(name);
+                    changedEvents.add(new ResourceChangedEvent(ResourceChangedEvent.TYPE_ADDED, dir.resolve(name).toString()));
+
+                    if (Files.isDirectory(child, LinkOption.NOFOLLOW_LINKS) == true) {
+                        try {
+                            register(child, true);
+                        } catch (IOException e) {
+                            logger.error(e.getMessage());
+                        }
+                    }
+                } else if (kind == StandardWatchEventKinds.ENTRY_DELETE) {
+                    changedEvents.add(new ResourceChangedEvent(ResourceChangedEvent.TYPE_REMOVED, dir.resolve(name).toString()));
+                } else if (kind == StandardWatchEventKinds.ENTRY_MODIFY) {
+                    changedEvents.add(new ResourceChangedEvent(ResourceChangedEvent.TYPE_CHANGED, dir.resolve(name).toString()));
+                }
+                key.reset();
+            }
+            if (changedEvents.size() > 0) {
+                fireEvents(changedEvents);
+            }
+        }
+        try {
+            if (watchService != null)
+                watchService.close();
+        } catch (IOException e) {
+            logger.error(e.getMessage());
+        }
+    }
+
+    public void addListener(IWatchServiceListener listener) {
+        this.listeners.add(listener);
+    }
+
+    public void removeListener(IWatchServiceListener listener) {
+        this.listeners.remove(listener);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/edjResourceSyncManager/EdjResourceChangedEvent.java b/org.tizen.efluibuilder/src/edjResourceSyncManager/EdjResourceChangedEvent.java
new file mode 100644 (file)
index 0000000..1fab6c6
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package edjResourceSyncManager;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+
+public class EdjResourceChangedEvent extends ResourceChangedEvent {
+    public ArrayList<String> groupNames = null;
+    public Map<String, Map<String, List<String>>> styleNames = null;
+
+    EdjResourceChangedEvent(final String type, final String path, final ArrayList<String> groupNames) {
+        this(type, path);
+        this.groupNames = groupNames;
+    }
+
+    EdjResourceChangedEvent(final String type, final String path, final Map<String, Map<String, List<String>>> styleNames) {
+        this(type, path);
+        this.styleNames = styleNames;
+    }
+
+    EdjResourceChangedEvent(final String type, final String path) {
+        super(type, path);
+        this.type = type;
+        this.path = path;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/edjResourceSyncManager/EdjResourceSyncManager.java b/org.tizen.efluibuilder/src/edjResourceSyncManager/EdjResourceSyncManager.java
new file mode 100644 (file)
index 0000000..594dfe5
--- /dev/null
@@ -0,0 +1,295 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package edjResourceSyncManager;
+
+import java.io.File;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.IRenderer;
+import org.tizen.efluibuilder.renderer.IRendererListener;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.RendererFactory;
+import org.tizen.efluibuilder.renderer.event.RenderEvent;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleEDJManager;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+public class EdjResourceSyncManager extends ResourceChangedObserver implements IRendererListener, IWatchServiceListener {
+    private static Logger logger = LoggerFactory.getLogger(EdjResourceSyncManager.class);
+    final static String PATH_RESOURCE = "res";
+    final static String EXT_EDJ = "edj";
+    private Path resRootPath;
+    public final static String CUSTOM_STYLE_EDJ = "theme" + File.separator + "custom_theme.edj";
+
+    private HashMap<String, ArrayList<String>> groupMap = new HashMap<String, ArrayList<String>>();
+
+    private ArrayList<IEdjResourceChangeListener> listeners = new ArrayList<IEdjResourceChangeListener>();
+    IProject project = null;
+    IContainer rootContainer = null;
+    IRenderer renderer = null;
+    boolean isRendererInitialized = false;
+    private DirectoryWatchService watchService = null;
+    private ResourceFileDuplicator resFileDuplicator = null;
+    private StyleEDJManager styleEDJManager;
+
+    public EdjResourceSyncManager() {
+        super();
+    }
+
+    private void initRenderer(String version, String profile, String projectPath) {
+        int width = 100;
+        int height = 100;
+        RendererFactory factory = RendererFactory.getDefault();
+        renderer = factory.create(version, profile, projectPath);
+        if (renderer != null) {
+            renderer.setName("");
+            renderer.addRendererListener(this);
+            renderer.create(width, height, styleEDJManager.getDefaultThemePathForEflRenderer(), styleEDJManager.getCustomThemePathForEflRenderer());
+        }
+    }
+
+    public void addObserveTarget(String filePath) {
+        if (groupMap.containsKey(filePath) == false) {
+            groupMap.put(filePath, new ArrayList<String>());
+            reqEdjInfo(filePath);
+        }
+    }
+
+    public void removeObserveTarget(String filePath) {
+        groupMap.remove(filePath);
+    }
+
+    public ArrayList<String> getGroupNames(String filePath) {
+        return groupMap.get(filePath);
+    }
+
+    private void processAllTargetFiles() throws CoreException {
+        ArrayDeque<IContainer> queue = new ArrayDeque<IContainer>();
+        queue.add(this.rootContainer);
+
+        while (!queue.isEmpty()) {
+            IContainer parentContainer = queue.getFirst();
+            queue.remove();
+            for (IResource member : parentContainer.members()) {
+                if (member instanceof IContainer) {
+                    queue.add((IContainer) member);
+                } else if (member instanceof IFile && this.observeTargetExts.contains(member.getLocation().getFileExtension())) {
+                    addObserveTarget(member.getFullPath().makeRelativeTo(rootContainer.getFullPath()).toOSString());
+                }
+            }
+        }
+    }
+
+    public void initContents(IProject project, String version, String profile, ResourceFileDuplicator resFileDuplicator, StyleEDJManager styleEDJManager) {
+        this.project = project;
+        this.styleEDJManager = styleEDJManager;
+        this.resFileDuplicator = resFileDuplicator;
+        resRootPath = Paths.get(project.getLocation().append(PATH_RESOURCE).toString());
+        initRenderer(version, profile, project.getLocation().toString());
+        try {
+            for (IResource member : project.members()) {
+                if (member instanceof IContainer && member.getProjectRelativePath().toString().equals(PATH_RESOURCE)) {
+                    this.rootContainer = (IContainer) member;
+                    break;
+                }
+            }
+
+            if (this.rootContainer != null) {
+                this.addObserveExt(EXT_EDJ);
+                this.setRootPath(this.rootContainer.getFullPath().toString());
+                this.processAllTargetFiles();
+
+                // FIXED: Deletion failure problem.
+                // http://stackoverflow.com/questions/12322143/java-watch-service-appears-to-recreate-deleted-files-what-is-going-on
+                // watchService = new DirectoryWatchService();
+                // watchService.init(project.getLocation().toString() + "/" + PATH_RESOURCE);
+                // watchService.addListener(this);
+                // watchService.start();
+            }
+
+        } catch (CoreException e) {
+            logger.error(e.getMessage());
+        }
+    }
+
+    @Override
+    public void replyRender(RenderEvent event) {
+        // do nothing
+
+    }
+
+    private Path getResRootRelativePath(String path) {
+        Path relPath = Paths.get(path);
+        return this.resRootPath.relativize(relPath).normalize();
+    }
+
+    private Path getAbsolutePathFromResRelativePath(String path) {
+        return this.resRootPath.resolve(path).normalize();
+    }
+
+    @Override
+    public void reply(final IArguments message) {
+        if (message.getId().equals(RendererConstants.EVENT_GET_GROUP_NAMES)) {
+            String path = (String) message.getArg(0);
+            if (PlatformUtil.getOS().equals(PlatformUtil.OS_WIN32)) {
+                path = resFileDuplicator.getSrcPathFromClonedPath(path);
+            }
+            @SuppressWarnings("unchecked")
+            ArrayList<String> groups = (ArrayList<String>) message.getArg(1);
+            Path relativePath = this.getResRootRelativePath(path);
+            this.groupMap.put(relativePath.toString(), groups);
+            fireEvent(new EdjResourceChangedEvent(EdjResourceChangedEvent.TYPE_GROUP_NAMES_CHANGED, relativePath.toString(), groups));
+        } else if (message.getId().equals(RendererConstants.EVENT_GET_STYLE_NAMES)) {
+            String path = (String) message.getArg(0);
+            if (PlatformUtil.getOS().equals(PlatformUtil.OS_WIN32)) {
+                path = resFileDuplicator.getSrcPathFromClonedPath(path);
+            }
+            if (path.equals(styleEDJManager.getCustomThemePath())) {
+                @SuppressWarnings("unchecked")
+                Map<String, Map<String, List<String>>> styleMap = (Map<String, Map<String, List<String>>>) message.getArg(1);
+                styleEDJManager.setCustomStyleInfo(styleMap);
+                fireEvent(new EdjResourceChangedEvent(EdjResourceChangedEvent.TYPE_STYLE_LIST_CHANGED, path, styleMap));
+            }
+        } else if (message.getId().equals(RendererConstants.EVENT_CREATE)) {
+            this.isRendererInitialized = true;
+            reqAllEdjInfo();
+        }
+    }
+
+    public void fireEvent(EdjResourceChangedEvent event) {
+        for (IEdjResourceChangeListener listener : listeners) {
+            listener.edjResourceChanged(event);
+        }
+    }
+
+    private void reqAllEdjInfo() {
+        for (String path : groupMap.keySet()) {
+            reqEdjInfo(path);
+        }
+    }
+
+    private void reqEdjInfo(String path) {
+        if (renderer != null && isRendererInitialized) {
+            Path absPath = this.getAbsolutePathFromResRelativePath(path);
+            if (PlatformUtil.getOS().equals(PlatformUtil.OS_WIN32)) {
+                if (path.equals(CUSTOM_STYLE_EDJ)) {
+                    renderer.requestGetStyleNames(styleEDJManager.getCustomThemePathForEflRenderer());
+                } else {
+                    String clonedPath = resFileDuplicator.copyFileToTempFolder(absPath.toString());
+                    if (clonedPath != null) {
+                        renderer.requestGetGroupNames(clonedPath);
+                    }
+                }
+            } else {
+                renderer.requestGetGroupNames(absPath.toString());
+                if (path.equals(CUSTOM_STYLE_EDJ)) {
+                    renderer.requestGetStyleNames(styleEDJManager.getCustomThemePath());
+                }
+            }
+        }
+    }
+
+    @Override
+    protected void fireResourceChanged(ArrayList<String> addedList, ArrayList<String> removedList, ArrayList<String> changedList) {
+        HashMap<String, String> reqList = new HashMap<String, String>();
+        for (String path : addedList) {
+            addObserveTarget(path);
+            reqList.put(path, path);
+            fireEvent(new EdjResourceChangedEvent(EdjResourceChangedEvent.TYPE_ADDED, path));
+        }
+        for (String path : removedList) {
+            removeObserveTarget(path);
+            fireEvent(new EdjResourceChangedEvent(EdjResourceChangedEvent.TYPE_REMOVED, path));
+        }
+
+        for (String path : changedList) {
+            reqList.put(path, path);
+        }
+
+        for (String path : reqList.keySet()) {
+            reqEdjInfo(path);
+        }
+
+    }
+
+    public void addListener(IEdjResourceChangeListener listener) {
+        if (listeners.contains(listener)) {
+            return;
+        }
+        listeners.add(listener);
+    }
+
+    public void removeListener(IEdjResourceChangeListener listener) {
+        listeners.remove(listener);
+    }
+
+    public ArrayList<String> getAllEdjFiles() {
+        ArrayList<String> files = new ArrayList<String>();
+        files.addAll(groupMap.keySet());
+        return files;
+    }
+
+    @Override
+    public void contentChanged(List<ResourceChangedEvent> events) {
+        boolean isEdjChanged = false;
+        for (ResourceChangedEvent event : events) {
+            if (event.path.endsWith(EXT_EDJ)) {
+                isEdjChanged = true;
+                break;
+            }
+        }
+        if (this.project != null && isEdjChanged && project.getFolder(PATH_RESOURCE) != null) {
+            try {
+                this.project.getFolder(PATH_RESOURCE).refreshLocal(IResource.DEPTH_INFINITE, null);
+            } catch (CoreException e) {
+                logger.error(e.getMessage());
+            }
+        }
+
+    }
+
+    public void dispose() {
+        if (watchService != null) {
+            watchService.interrupt();
+            watchService = null;
+        }
+        super.dispose();
+
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/edjResourceSyncManager/FileDuplicator.java b/org.tizen.efluibuilder/src/edjResourceSyncManager/FileDuplicator.java
new file mode 100644 (file)
index 0000000..0d9982e
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package edjResourceSyncManager;
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.channels.FileChannel;
+
+
+public class FileDuplicator {
+
+    public static boolean duplicateFile(String srcPath, String dstPath) {
+        FileInputStream inputStream = null;
+        FileOutputStream outputStream = null;
+        FileChannel fcin = null;
+        FileChannel fcout = null;
+        long transferCheck = 0;
+        try {
+            inputStream = new FileInputStream(srcPath);
+            outputStream = new FileOutputStream(dstPath);
+            fcin = inputStream.getChannel();
+            fcout = outputStream.getChannel();
+            long size = fcin.size();
+            transferCheck = fcin.transferTo(0, size, fcout);
+            if (transferCheck < 0) {
+                return false;
+            }
+        } catch (IOException e) {
+            return false;
+        } finally {
+            if (fcin != null) {
+                try {
+                    fcin.close();
+                } catch (IOException e) {
+                    // do nothing
+                }
+            }
+            if (fcout != null) {
+                try {
+                    fcout.close();
+                } catch (IOException e) {
+                    // do nothing
+                }
+            }
+
+            if (inputStream != null) {
+                try {
+                    inputStream.close();
+                } catch (IOException e) {
+                    // do nothing
+                }
+            }
+
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                    // do nothing
+                }
+            }
+        }
+        return true;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/edjResourceSyncManager/IEdjResourceChangeListener.java b/org.tizen.efluibuilder/src/edjResourceSyncManager/IEdjResourceChangeListener.java
new file mode 100644 (file)
index 0000000..c9b9562
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package edjResourceSyncManager;
+
+public interface IEdjResourceChangeListener {
+    public void edjResourceChanged(EdjResourceChangedEvent event);
+}
diff --git a/org.tizen.efluibuilder/src/edjResourceSyncManager/IWatchServiceListener.java b/org.tizen.efluibuilder/src/edjResourceSyncManager/IWatchServiceListener.java
new file mode 100644 (file)
index 0000000..8de6dd6
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package edjResourceSyncManager;
+
+import java.util.List;
+
+
+public interface IWatchServiceListener {
+    public void contentChanged(List<ResourceChangedEvent> events);
+}
diff --git a/org.tizen.efluibuilder/src/edjResourceSyncManager/ResourceChangedEvent.java b/org.tizen.efluibuilder/src/edjResourceSyncManager/ResourceChangedEvent.java
new file mode 100644 (file)
index 0000000..34fed3b
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package edjResourceSyncManager;
+
+public class ResourceChangedEvent {
+    public final static String TYPE_ADDED = "added";
+    public final static String TYPE_REMOVED = "removed";
+    public final static String TYPE_CHANGED = "changed";
+    public final static String TYPE_GROUP_NAMES_CHANGED = "changed";
+    public final static String TYPE_STYLE_LIST_CHANGED = "changed";
+
+    public String type = null;
+    public String path = null;
+
+    ResourceChangedEvent(final String type, final String path) {
+        this.type = type;
+        this.path = path;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/edjResourceSyncManager/ResourceChangedObserver.java b/org.tizen.efluibuilder/src/edjResourceSyncManager/ResourceChangedObserver.java
new file mode 100644 (file)
index 0000000..f515bee
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package edjResourceSyncManager;
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.apache.commons.io.FilenameUtils;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+
+
+public class ResourceChangedObserver implements IResourceChangeListener {
+    private Path rootPath = null;
+    protected ArrayList<String> observeTargetExts = new ArrayList<String>();
+    protected HashMap<String, String> observeTargetPathMap = new HashMap<String, String>();
+
+    ResourceChangedObserver() {
+        ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
+    }
+
+    public void setRootPath(String rootPath) {
+        this.rootPath = Paths.get(rootPath);
+    }
+
+    public void addObserveExt(String ext) {
+        if (observeTargetExts.contains(ext) == false) {
+            observeTargetExts.add(ext);
+        }
+    }
+
+    public void removeObserveExt(String ext) {
+        if (observeTargetExts.contains(ext) == true) {
+            observeTargetExts.remove(ext);
+        }
+    }
+
+    public void addObserveTargetPath(String path) {
+        if (path != null && !observeTargetPathMap.containsKey(path)) {
+            // TODO : impl
+            // observeTargetPathMap.put(path, "");
+        }
+    }
+
+    public void removeObserveTargetPath(String path) {
+        if (path != null) {
+            observeTargetPathMap.remove(path);
+        }
+    }
+
+    protected void fireResourceChanged(ArrayList<String> addedList, ArrayList<String> removedList, ArrayList<String> changedList) {
+
+    }
+
+    @Override
+    public void resourceChanged(IResourceChangeEvent event) {
+        final ArrayList<String> addedList = new ArrayList<String>();
+        final ArrayList<String> removedList = new ArrayList<String>();
+        final ArrayList<String> changedList = new ArrayList<String>();
+        IResourceDelta rootDelta = event.getDelta();
+        if (rootDelta == null) { // res folder, extension EDJ;
+            return;
+        }
+
+        try {
+            rootDelta.accept(new IResourceDeltaVisitor() {
+                @Override
+                public boolean visit(IResourceDelta delta) throws CoreException {
+                    String fullPath = delta.getFullPath().toString();
+                    String ext = FilenameUtils.getExtension(fullPath);
+                    Path targetPath = Paths.get(fullPath);
+                    if (rootPath != null && targetPath.startsWith(rootPath)) {
+                        Path relativePath = rootPath.relativize(targetPath).normalize();
+                        if ((ext != null && observeTargetExts.contains(ext)) || (observeTargetPathMap.containsKey(relativePath.toString()))) {
+                            if (delta.getKind() == IResourceDelta.ADDED) {
+                                addedList.add(relativePath.toString());
+                            } else if (delta.getKind() == IResourceDelta.REMOVED) {
+                                removedList.add(relativePath.toString());
+                            } else if (delta.getKind() == IResourceDelta.CHANGED) {
+                                changedList.add(relativePath.toString());
+                            }
+                        }
+                    }
+                    return true;
+                }
+            });
+        } catch (CoreException e) {
+            e.printStackTrace();
+        }
+
+        if (addedList.size() > 0 || removedList.size() > 0 || changedList.size() > 0) {
+            fireResourceChanged(addedList, removedList, changedList);
+        }
+
+    }
+
+    public void dispose() {
+        ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/edjResourceSyncManager/ResourceFileDuplicator.java b/org.tizen.efluibuilder/src/edjResourceSyncManager/ResourceFileDuplicator.java
new file mode 100644 (file)
index 0000000..5144347
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package edjResourceSyncManager;
+
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+public class ResourceFileDuplicator extends FileDuplicator {
+    private static Logger logger = LoggerFactory.getLogger(ResourceFileDuplicator.class);
+    private String prefix;
+    private HashMap<String, String> resMap = new HashMap<String, String>();
+    private HashMap<String, String> requiredResMap = new HashMap<String, String>();
+    static int modifyTimeLength = 15;
+    static String ENCODING_FORMAT = "UTF-8";
+
+    public ResourceFileDuplicator(String rootPath) {
+        File rootDir = new File(rootPath);
+        if (rootDir.exists() == false) {
+            boolean result = rootDir.mkdirs();
+            if (result == false) {
+                logger.error("It failed to make directory : " + rootPath);
+            }
+        }
+        this.prefix = rootPath;
+        removeTmpFiles();
+    }
+
+    private long getLastModifiedTime(String srcPath) {
+        if (srcPath != null) {
+            File file = new File(srcPath);
+            if (file.exists() == true) {
+                return file.lastModified();
+            }
+        }
+        return 0;
+    }
+
+    String getDstPath(String srcPath) {
+        String dstPath = null;
+        long modifiedTime = getLastModifiedTime(srcPath);
+        if (modifiedTime > 0) {
+            try {
+                dstPath = URLEncoder.encode(srcPath, ENCODING_FORMAT);
+            } catch (UnsupportedEncodingException e) {
+                dstPath = null;
+            }
+
+            if (dstPath != null) {
+                dstPath = Paths.get(this.prefix).resolve(dstPath).toString() + String.format("%015d", modifiedTime);
+            }
+        }
+        return dstPath;
+    }
+
+    String getSrcPathFromClonedPath(String clonedPath) {
+        String srcPath = null;
+        if (clonedPath.length() > this.prefix.length() + modifyTimeLength) {
+            String filePath = clonedPath.substring(this.prefix.length(), clonedPath.length() - modifyTimeLength);
+            try {
+                srcPath = URLDecoder.decode(filePath, ENCODING_FORMAT);
+            } catch (UnsupportedEncodingException e) {
+                srcPath = null;
+            }
+        }
+
+        return srcPath;
+    }
+
+    public String copyFileToTempFolder(String srcPath) {
+        String copiedPath = null;
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_WIN32)) {
+            File srcFile = new File(srcPath);
+            String dstPath = getDstPath(srcPath);
+            if (srcFile.exists() == true) {
+                if (resMap.get(srcPath) != null && resMap.get(srcPath).equals(dstPath)) {
+                    copiedPath = resMap.get(srcPath);
+                } else if (dstPath != null) {
+                    File file = new File(dstPath);
+                    if (file.exists()) {
+                        resMap.put(srcPath, dstPath);
+                        copiedPath = dstPath;
+                    } else if (duplicateFile(srcPath, dstPath)) {
+                        resMap.put(srcPath, dstPath);
+                        copiedPath = dstPath;
+                    }
+                }
+            } else {
+                resMap.remove(dstPath); // remove cached file
+            }
+        }
+        return copiedPath;
+    }
+
+    void removeTmpFiles() {
+        final File folder = new File(this.prefix);
+        ArrayList<File> subFiles = new ArrayList<File>();
+        ArrayList<File> removedFiles = new ArrayList<File>();
+        if (folder.exists()) {
+            File[] files = folder.listFiles();
+            if (files != null) {
+                for (File file : files) {
+                    if (file.isFile() == true) {
+                        subFiles.add(file);
+                    }
+                }
+            }
+        }
+        Collections.sort(subFiles);
+        String previousParts = null;
+        String path, fileName;
+        for (int i = 0; i < subFiles.size(); i++) {
+            path = subFiles.get(i).toString();
+            if (path.length() > modifyTimeLength) {
+                fileName = path.substring(0, path.length() - modifyTimeLength);
+                if (previousParts == null) {
+                    previousParts = fileName;
+                } else if (previousParts.equals(fileName)) {
+                    removedFiles.add(subFiles.get(i - 1));
+                }
+            }
+        }
+
+        for (File removePath : removedFiles) {
+            boolean result = removePath.delete();
+            if (result == false) {
+                logger.error("It failed to delete the file");
+            }
+        }
+    }
+
+    public HashMap<String, String> getRequiredResMap() {
+        return this.requiredResMap;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/graphicalDataManager/ComponentGraphicalData.java b/org.tizen.efluibuilder/src/graphicalDataManager/ComponentGraphicalData.java
new file mode 100644 (file)
index 0000000..4414870
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package graphicalDataManager;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.tizen.efluibuilder.renderer.PlaceholderPosition;
+import org.tizen.efluibuilder.renderer.Position;
+
+
+public class ComponentGraphicalData {
+    public Map<String, List<PlaceholderPosition>> placeholderPositionMap = null;
+    public Map<String, Position> componentPositionMap = null;
+    public ImageDescriptor imageDescriptor = null;
+
+    public ComponentGraphicalData(ImageDescriptor imageDescriptor, Map<String, Position> componentPositionMap,
+            Map<String, List<PlaceholderPosition>> placeholderPositionMap) {
+        this.imageDescriptor = imageDescriptor;
+        this.componentPositionMap = componentPositionMap;
+        this.placeholderPositionMap = placeholderPositionMap;
+    }
+
+    public ComponentGraphicalData() {
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/graphicalDataManager/GraphicalDataChangedEvent.java b/org.tizen.efluibuilder/src/graphicalDataManager/GraphicalDataChangedEvent.java
new file mode 100644 (file)
index 0000000..a9dae62
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package graphicalDataManager;
+
+public final class GraphicalDataChangedEvent {
+    public static final String TYPE_IMAGE_CHANGED = "image_changed";
+    public static final String TYPE_COMPONENT_POSITION_CHANGED = "component_position_changed";
+    public static final String TYPE_PALCEHOLDER_POSITION_CHANGED = "placeholder_position_changed";
+    public String type = "";
+    public String viewId = "";
+    public String deviceName = "";
+    public String orientation;
+    public String locale = "";
+    public ComponentGraphicalData graphicData = null;
+
+    public GraphicalDataChangedEvent(String type, String viewId, String deviceName, String orientation, String locale, ComponentGraphicalData graphicData) {
+        this.type = type;
+        this.viewId = viewId;
+        this.deviceName = deviceName;
+        this.orientation = orientation;
+        this.locale = locale;
+        this.graphicData = graphicData;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/graphicalDataManager/GraphicalDataInitializeFailedException.java b/org.tizen.efluibuilder/src/graphicalDataManager/GraphicalDataInitializeFailedException.java
new file mode 100644 (file)
index 0000000..cc65fd5
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package graphicalDataManager;
+
+public class GraphicalDataInitializeFailedException extends RuntimeException {
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 2513526304957313836L;
+
+    public GraphicalDataInitializeFailedException() {
+        super("Renderer initailize failed");
+    }
+}
diff --git a/org.tizen.efluibuilder/src/graphicalDataManager/GraphicalDataManager.java b/org.tizen.efluibuilder/src/graphicalDataManager/GraphicalDataManager.java
new file mode 100644 (file)
index 0000000..1ffbbb0
--- /dev/null
@@ -0,0 +1,404 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package graphicalDataManager;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
+import org.tizen.efluibuilder.core.configuration.device.Device;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.model.app.AppManager;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.IPartChangedListener;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartMutation;
+import org.tizen.efluibuilder.model.part.PartObserver;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.model.renderDataGenerator.RenderDataGenerator;
+import org.tizen.efluibuilder.mscreen.configurator.MscreenConstants;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.IRenderer;
+import org.tizen.efluibuilder.renderer.IRendererListener;
+import org.tizen.efluibuilder.renderer.PlaceholderPosition;
+import org.tizen.efluibuilder.renderer.Position;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.RendererFactory;
+import org.tizen.efluibuilder.renderer.event.RenderEvent;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleEDJManager;
+
+import edjResourceSyncManager.EdjResourceSyncManager;
+import edjResourceSyncManager.ResourceFileDuplicator;
+
+
+public class GraphicalDataManager implements IRendererListener, IPartChangedListener {
+
+    @Override
+    public void replyRender(RenderEvent event) {
+        rendererImageChangedHandler(event);
+    }
+
+    @Override
+    public void reply(IArguments message) {
+        handleReply(message);
+    }
+
+    private void handleReply(final IArguments message) {
+        Display.getDefault().syncExec(new Runnable() {
+            @Override
+            public void run() {
+                if (message.getId().equals(RendererConstants.EVENT_CREATE)) {
+                    rendererCreatedHander(message);
+                } else if (message.getId().equals(RendererConstants.EVENT_GET_ALL_WIDGET_POSITIONS)) {
+                    rendererComponentPositionChangedHandler(message);
+                } else if (message.getId().equals(RendererConstants.EVENT_GET_PLACEHOLDER_POSITIONS)) {
+                    rendererPlaceholderPositionChangedHandler(message);
+                }
+            }
+        });
+    }
+
+    private void fireEvent(final GraphicalDataChangedEvent event) {
+        final ArrayList<IGraphicalDataChangedListener> listeners = this.listeners;
+        int size = listeners.size();
+        IGraphicalDataChangedListener listener = null;
+        for (int i = 0; i < size; i++) {
+            listener = listeners.get(i);
+            if (event.type.equals(GraphicalDataChangedEvent.TYPE_IMAGE_CHANGED)) {
+                listener.componentImageDataChanged(event);
+            } else if (event.type.equals(GraphicalDataChangedEvent.TYPE_COMPONENT_POSITION_CHANGED)) {
+                listener.componentPositionDataChanged(event);
+            } else if (event.type.equals(GraphicalDataChangedEvent.TYPE_PALCEHOLDER_POSITION_CHANGED)) {
+                listener.placeholderPositionDataChanged(event);
+            }
+        }
+    }
+
+    private void rendererCreatedHander(IArguments message) {
+        // do nothing
+    }
+
+    private void rendererImageChangedHandler(RenderEvent renderEvent) {
+        String id = renderEvent.renderer.getName();
+        ScreenDataRealizer screenDataRealizer = this.getScreenDataRealizerById(id);
+        if (screenDataRealizer != null) {
+            screenDataRealizer.setImageDescriptor(renderEvent.imageDescriptor);
+            GraphicalDataChangedEvent event =
+                    new GraphicalDataChangedEvent(GraphicalDataChangedEvent.TYPE_IMAGE_CHANGED, screenDataRealizer.screenPart.getUniqueId(),
+                                                  screenDataRealizer.device.getName(), screenDataRealizer.orientation, screenDataRealizer.locale,
+                                                  screenDataRealizer.getGraphicalData());
+            this.fireEvent(event);
+        }
+    }
+
+    private void rendererComponentPositionChangedHandler(IArguments message) {
+        Map<String, Position> componentPositions = (Map<String, Position>) message.getArg(0);
+        IRenderer replyRenderer = (IRenderer) message.getArg(1);
+        String id = replyRenderer.getName();
+
+        ScreenDataRealizer screenDataRealizer = getScreenDataRealizerById(id);
+        if (screenDataRealizer != null) {
+            screenDataRealizer.setComponentPositionMap(componentPositions);
+            GraphicalDataChangedEvent event =
+                    new GraphicalDataChangedEvent(GraphicalDataChangedEvent.TYPE_COMPONENT_POSITION_CHANGED, screenDataRealizer.screenPart.getUniqueId(),
+                                                  screenDataRealizer.device.getName(), screenDataRealizer.orientation, screenDataRealizer.locale,
+                                                  screenDataRealizer.getGraphicalData());
+            this.fireEvent(event);
+        }
+    }
+
+    private void rendererPlaceholderPositionChangedHandler(IArguments message) {
+        Map<String, List<PlaceholderPosition>> placeholderPositions = (Map<String, List<PlaceholderPosition>>) message.getArg(0);
+        IRenderer replyRenderer = (IRenderer) message.getArg(1);
+        String id = replyRenderer.getName();
+        ScreenDataRealizer screenDataRealizer = getScreenDataRealizerById(id);
+        if (screenDataRealizer != null) {
+            screenDataRealizer.setPlaceholderPositionMap(placeholderPositions);
+            GraphicalDataChangedEvent event =
+                    new GraphicalDataChangedEvent(GraphicalDataChangedEvent.TYPE_PALCEHOLDER_POSITION_CHANGED, screenDataRealizer.screenPart.getUniqueId(),
+                                                  screenDataRealizer.device.getName(), screenDataRealizer.orientation, screenDataRealizer.locale,
+                                                  screenDataRealizer.getGraphicalData());
+            this.fireEvent(event);
+        }
+    }
+
+    private ArrayList<ScreenDataRealizer> screenGraphicDataList = new ArrayList<ScreenDataRealizer>();
+    private ArrayList<IGraphicalDataChangedListener> listeners = new ArrayList<IGraphicalDataChangedListener>();
+    private Part documentPart = null;
+    private ViewsPart viewsPart = null;
+    private PartObserver observer = null;
+    private AppManager appManager = null;
+    private StyleEDJManager styleEDJManager = null;
+    private RenderDataGenerator dataGenerator = null;
+
+    private void init(ResourceFileDuplicator resFileDuplicator, EdjResourceSyncManager edjResSyncMgr) {
+        screenGraphicDataList = new ArrayList<ScreenDataRealizer>();
+        listeners = new ArrayList<IGraphicalDataChangedListener>();
+        observer = new PartObserver(this);
+        dataGenerator = new RenderDataGenerator(appManager.getProject(), appManager.getProfile(), appManager.getVersion(), resFileDuplicator, edjResSyncMgr);
+        observer.observe(documentPart);
+    }
+
+    public GraphicalDataManager(IEditorInput editorInput, Part documentPart, ResourceFileDuplicator resFileDuplicator, EdjResourceSyncManager edjResSyncMgr,
+            StyleEDJManager styleEDJManager) {
+        this.documentPart = documentPart;
+        if (this.documentPart != null) {
+            for (Part part : this.documentPart.getChildren())
+                if (part instanceof ViewsPart) {
+                    this.viewsPart = (ViewsPart) part;
+                    break;
+                }
+        }
+
+        appManager = AppManager.getAppManager(editorInput);
+        this.styleEDJManager = styleEDJManager;
+
+        this.init(resFileDuplicator, edjResSyncMgr);
+    }
+
+    private String generateRendererId() {
+        String id = UUID.randomUUID().toString().replace("-", "");
+        return id;
+    }
+
+    private Part getViewPartByUniqueId(String viewPartUniqueId) {
+        if (viewsPart != null) {
+            for (Part part : viewsPart.getChildren()) {
+                if (part.getUniqueId().equals(viewPartUniqueId)) {
+                    return part;
+                }
+            }
+        }
+        return null;
+    }
+
+    private ScreenDataRealizer createScreenGraphicData(String viewPartUniqueId, Device device, String orientation, String locale) {
+        ScreenDataRealizer screenData = null;
+        int width = device.getWidth();
+        int height = device.getHeight();
+
+        Part viewPart = this.getViewPartByUniqueId(viewPartUniqueId);
+        if (viewPart != null) {
+            String id = this.generateRendererId();
+            RendererFactory factory = RendererFactory.getDefault();
+            IRenderer renderer = factory.create(appManager.getVersion(), appManager.getProfile(), appManager.getProject().getLocation().toString());
+            if (renderer != null) {
+                renderer.setName(id);
+                renderer.addRendererListener(this);
+                if (orientation.equals(MscreenConstants.ORIENTATION_PORTRAIT)) {
+                    renderer.create(width, height, styleEDJManager.getDefaultThemePathForEflRenderer(), styleEDJManager.getCustomThemePathForEflRenderer());
+                } else {
+                    renderer.create(height, width, styleEDJManager.getDefaultThemePathForEflRenderer(), styleEDJManager.getCustomThemePathForEflRenderer());
+                }
+                screenData = new ScreenDataRealizer(renderer, id, viewPart, device, orientation, locale);
+            }
+        }
+        return screenData;
+    }
+
+    private ScreenDataRealizer getScreenDataRealizer(String viewPartUniqueId, Device device, String orientation, String locale) {
+        int size = screenGraphicDataList.size();
+        ScreenDataRealizer dataRealizer = null;
+        for (int i = 0; i < size; i++) {
+            dataRealizer = screenGraphicDataList.get(i);
+            if (dataRealizer.screenPart.getUniqueId().equals(viewPartUniqueId) && dataRealizer.device.getName().equals(device.getName())
+                    && dataRealizer.orientation.equals(orientation) && dataRealizer.locale.equals(locale)) {
+                return dataRealizer;
+            }
+        }
+        return null;
+    }
+
+    public boolean addEventListener(IGraphicalDataChangedListener listener) {
+        if (this.listeners.contains(listener) == false) {
+            return this.listeners.add(listener);
+        }
+        return false;
+    }
+
+    public boolean removeEventListener(IGraphicalDataChangedListener listener) {
+        if (this.listeners.contains(listener) == true) {
+            return this.listeners.remove(listener);
+        }
+        return false;
+    }
+
+    public ComponentGraphicalData getGraphicalData(String viewId, Device device, String orientation, String locale, boolean bForce)
+            throws GraphicalDataInitializeFailedException {
+
+        ScreenDataRealizer screenData = this.getScreenDataRealizer(viewId, device, orientation, locale);
+        if (screenData == null) {
+            screenData = this.createScreenGraphicData(viewId, device, orientation, locale);
+            if (screenData != null) {
+                this.screenGraphicDataList.add(screenData);
+            }
+        }
+
+        if (screenData == null) {
+            throw new GraphicalDataInitializeFailedException();
+        }
+
+        if (screenData.isDirty() || bForce == true) {
+            screenData.cleanDirty();
+            if (screenData.renderer != null && screenData.renderer.isRenderable() == false) {
+                throw new GraphicalDataInitializeFailedException();
+            } else {
+                screenData.render(dataGenerator);
+            }
+        } else {
+            return screenData.getGraphicalData();
+        }
+        return null;
+    }
+
+    public ComponentGraphicalData getGraphicalData(String viewId, Device device, String orientation, String locale) {
+        return getGraphicalData(viewId, device, orientation, locale, false);
+    }
+
+    private ScreenDataRealizer getScreenDataRealizerById(String Id) {
+        ScreenDataRealizer graphicData = null;
+        int size = this.screenGraphicDataList.size();
+        for (int i = 0; i < size; i++) {
+            graphicData = this.screenGraphicDataList.get(i);
+            if (graphicData.getId().equals(Id)) {
+                return graphicData;
+            }
+        }
+        return null;
+    }
+
+    private ArrayList<ScreenDataRealizer> getScreenDataRealizerByViewId(String viewId) {
+        ArrayList<ScreenDataRealizer> dataList = new ArrayList<ScreenDataRealizer>();
+        ScreenDataRealizer graphicData = null;
+
+        int size = this.screenGraphicDataList.size();
+        for (int i = 0; i < size; i++) {
+            graphicData = this.screenGraphicDataList.get(i);
+            if (graphicData.screenPart.getUniqueId().equals(viewId)) {
+                dataList.add(graphicData);
+            }
+        }
+        return dataList;
+    }
+
+    private void removeScreenDataRealizerByViewId(String viewId) {
+        ArrayList<ScreenDataRealizer> removeTargets = getScreenDataRealizerByViewId(viewId);
+        for (ScreenDataRealizer screenDataRealizer : removeTargets) {
+            screenDataRealizer.destroy();
+        }
+        screenGraphicDataList.removeAll(removeTargets);
+    }
+
+    public void partsChanged(List<PartMutation> mutations, PartObserver observer, String sender) {
+        int size = mutations.size();
+        PartMutation mutation = null;
+
+        Map<String, Part> changedViewsMap = new HashMap<String, Part>();
+        Map<String, Part> removedViewsMap = new HashMap<String, Part>();
+        Map<String, Part> changedConfsMap = new HashMap<String, Part>();
+        Map<String, Part> removedConfsMap = new HashMap<String, Part>();
+
+        Part changedViewPart = null;
+
+        for (int i = 0; i < size; i++) {
+            changedViewPart = null;
+            mutation = mutations.get(i);
+            if (mutation.getType().equals(PartMutation.PARTS_ADDED) || mutation.getType().equals(PartMutation.PARTS_ORDER_CHANGED)) {
+                if (mutation.getTargetPart() instanceof ComponentPart) {
+                    changedViewPart = ((ComponentPart) mutation.getTargetPart()).getOwnerViewPart();
+                }
+            } else if (mutation.getType().equals(PartMutation.PARTS_REMOVED)) {
+                if (mutation.getTargetPart() instanceof ComponentPart) {
+                    changedViewPart = ((ComponentPart) mutation.getTargetPart()).getOwnerViewPart();
+                } else if (mutation.getTargetPart() instanceof ViewsPart) {
+                    for (Part removedView : mutation.getRemovedParts()) {
+                        removedViewsMap.put(removedView.getUniqueId(), removedView);
+                    }
+                }
+            } else if (mutation.getType().equals(PartMutation.PROPERTY_CHANGED) && mutation.getTargetPart() instanceof ComponentPart && DesignEditorUtil.isUIProperty(mutation.getPropertyName())) {
+                changedViewPart = ((ComponentPart) mutation.getTargetPart()).getOwnerViewPart();
+            } else if (mutation.getType().equals(PartMutation.CONFIGURES_ADDED)) {
+                // do nothing
+            } else if (mutation.getType().equals(PartMutation.CONFIGURES_REMOVED)) {
+                removedConfsMap.put(mutation.getTargetPart().getUniqueId(), mutation.getTargetPart());
+            } else if (mutation.getType().equals(PartMutation.CONFIGURE_PROPERTY_CHANGED)) {
+                changedConfsMap.put(mutation.getTargetPart().getUniqueId(), mutation.getTargetPart());
+            }
+            if (changedViewPart != null) {
+                changedViewsMap.put(changedViewPart.getUniqueId(), changedViewPart);
+            }
+        }
+        this.handleViewRemoved(removedViewsMap);
+        this.handleViewChanged(changedViewsMap);
+        this.handleConfigureRemoved(removedConfsMap);
+        this.handleConfigureChanged(changedConfsMap);
+
+    }
+
+    private void handleViewChanged(Map<String, Part> views) {
+        for (Part part : views.values()) {
+            this.setDirty(part.getUniqueId());
+        }
+    }
+
+    private void handleViewRemoved(Map<String, Part> views) {
+        for (Part part : views.values()) {
+            this.removeScreenDataRealizerByViewId(part.getUniqueId());
+        }
+    }
+
+    private void handleConfigureChanged(Map<String, Part> configures) {
+        // do nothing
+    }
+
+    private void handleConfigureRemoved(Map<String, Part> configures) {
+        // for (Part part : configures.values()) {
+        // this.removeScreenDataRealizerByConfigureId(part.getUniqueId());
+        // }
+    }
+
+    private void setDirty(String viewId) {
+        List<ScreenDataRealizer> dataRealizerList = this.getScreenDataRealizerByViewId(viewId);
+        for (ScreenDataRealizer dataRealizer : dataRealizerList) {
+            dataRealizer.setDirty();
+        }
+    }
+
+    public RenderDataGenerator getRenderDataGenerator() {
+        return this.dataGenerator;
+    }
+
+    public void destroy() {
+        for (ScreenDataRealizer screenDataRealizer : this.screenGraphicDataList) {
+            screenDataRealizer.destroy();
+        }
+        screenGraphicDataList.clear();
+        listeners.clear();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/graphicalDataManager/IGraphicalDataChangedListener.java b/org.tizen.efluibuilder/src/graphicalDataManager/IGraphicalDataChangedListener.java
new file mode 100644 (file)
index 0000000..101f05d
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package graphicalDataManager;
+
+public interface IGraphicalDataChangedListener {
+
+    public void componentImageDataChanged(GraphicalDataChangedEvent event);
+
+    public void componentPositionDataChanged(GraphicalDataChangedEvent event);
+
+    public void placeholderPositionDataChanged(GraphicalDataChangedEvent event);
+
+    public class GraphicalDataChangedListenerStub implements IGraphicalDataChangedListener {
+
+        @Override
+        public void componentImageDataChanged(GraphicalDataChangedEvent event) {
+        }
+
+        @Override
+        public void componentPositionDataChanged(GraphicalDataChangedEvent event) {
+        }
+
+        @Override
+        public void placeholderPositionDataChanged(GraphicalDataChangedEvent event) {
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/graphicalDataManager/ScreenDataRealizer.java b/org.tizen.efluibuilder/src/graphicalDataManager/ScreenDataRealizer.java
new file mode 100644 (file)
index 0000000..ba4a277
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package graphicalDataManager;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.tizen.efluibuilder.core.configuration.device.Device;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.renderDataGenerator.RenderDataGenerator;
+import org.tizen.efluibuilder.renderer.IRenderer;
+import org.tizen.efluibuilder.renderer.PlaceholderPosition;
+import org.tizen.efluibuilder.renderer.Position;
+
+
+public class ScreenDataRealizer {
+    public Part screenPart = null;
+    public Device device = null;
+    public String orientation = null;
+    public String locale = null;
+    private String id = null;
+    public IRenderer renderer = null;
+    private boolean isDirty = true;
+    private ComponentGraphicalData componentGraphicalData = null;
+
+    public ScreenDataRealizer(IRenderer renderer, String screenId, Part screenPart, Device device, String orientation, String locale) {
+        this.id = screenId;
+        this.screenPart = screenPart;
+        this.device = device;
+        this.orientation = orientation;
+        this.locale = locale;
+        this.componentGraphicalData = new ComponentGraphicalData();
+        this.renderer = renderer;
+        this.isDirty = true;
+    }
+
+    public void setImageDescriptor(ImageDescriptor imageDesc) {
+        this.componentGraphicalData.imageDescriptor = imageDesc;
+    }
+
+    public ImageDescriptor getImageDescriptor() {
+        return this.componentGraphicalData.imageDescriptor;
+    }
+
+    public void setComponentPositionMap(Map<String, Position> positionMap) {
+        this.componentGraphicalData.componentPositionMap = positionMap;
+    }
+
+    public Map<String, Position> getComponentPositionMap() {
+        return this.componentGraphicalData.componentPositionMap;
+    }
+
+    public void setPlaceholderPositionMap(Map<String, List<PlaceholderPosition>> positionMap) {
+        this.componentGraphicalData.placeholderPositionMap = positionMap;
+    }
+
+    public Map<String, List<PlaceholderPosition>> getPlaceholderPositionMap() {
+        return this.componentGraphicalData.placeholderPositionMap;
+    }
+
+    public void render(RenderDataGenerator dataGenerator) {
+        if (this.renderer != null) {
+            String genData = dataGenerator.getJsonDataFromPart(this.screenPart, this.locale, this.device, this.orientation);
+            if (genData != null) {
+                renderer.render(IRenderer.RENDER_TYPE_DESIGN, genData);
+            }
+        }
+    }
+
+    public void setDirty() {
+        this.isDirty = true;
+    }
+
+    public void cleanDirty() {
+        this.isDirty = false;
+    }
+
+    public boolean isDirty() {
+        return this.isDirty;
+    }
+
+    public final ComponentGraphicalData getGraphicalData() {
+        return this.componentGraphicalData;
+    }
+
+    public String getId() {
+        return this.id;
+    }
+    
+    public void destroy() {        
+        if (this.renderer != null) {
+            this.renderer.destroy();
+            this.renderer = null;
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/BuilderConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/BuilderConstants.java
new file mode 100644 (file)
index 0000000..9f9536b
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder;
+
+public final class BuilderConstants {
+    // Special character
+    public static final String EMPTY = ""; //$NON-NLS-1$
+    public static final String SPACE = " "; //$NON-NLS-1$
+    public static final String TAB = "\t"; //$NON-NLS-1$
+    public static final String SLASH = "/"; //$NON-NLS-1$
+    public static final String COMMENT = "//"; //$NON-NLS-1$
+    public static final String BSLASH = "\\"; //$NON-NLS-1$
+    public static final String NEW_LINE = "\n"; //$NON-NLS-1$
+    public static final String COMMA = ","; //$NON-NLS-1$
+    public static final String COLON = ":"; //$NON-NLS-1$
+    public static final String SEMICOLON = ";"; //$NON-NLS-1$
+    public static final String UNDERSCORE = "_"; //$NON-NLS-1$
+    public static final String OPEN_BRACKET = "("; //$NON-NLS-1$
+    public static final String CLOSE_BRACKET = ")"; //$NON-NLS-1$
+    public static final String OPEN_TRI_BRACKET = "<"; //$NON-NLS-1$
+    public static final String CLOSE_TRI_BRACKET = ">"; //$NON-NLS-1$
+    public static final String SHARP = "#"; //$NON-NLS-1$
+    public static final String AUTO = "auto"; //$NON-NLS-1$
+
+    // Path
+    public static final String ICON_DIR = "res/icons/"; //$NON-NLS-1$
+
+    // Designer and Preview
+    public static final String PROPERTY_DOCK_LOCATION = "org.tizen.efluibuilder.ui.editor.components.dock"; //$NON-NLS-1$
+    public static final String PROPERTY_STATE = "org.tizen.efluibuilder.ui.editor.components.state"; //$NON-NLS-1$
+    public static final String PROPERTY_PALETTE_WIDTH = "org.tizen.efluibuilder.ui.editor.components.paletteWidth"; //$NON-NLS-1$
+
+    // Project file attribute value
+    public static final String TRUE = "true"; //$NON-NLS-1$
+    public static final String FALSE = "false"; //$NON-NLS-1$
+
+    // Property
+    public static final String PROPERTY_ID = "id"; //$NON-NLS-1$
+    public static final String REGULAREXPRESSION = "^[a-zA-Z]+[a-zA-Z0-9_]*$"; //$NON-NLS-1$
+    public static final String INTEGERVALUE = "^[0-9-]?+[0-9]*$"; //$NON-NLS-1$
+    public static final String FLOATVALUE = "^[0-9-]?+[.?0-9]*$"; //$NON-NLS-1$
+
+    // HandlerCodeWriter
+    public static final String UNBINDEDFUNCNAME = "unbinded_function"; //$NON-NLS-1$
+
+    // mouse action count per pixel
+    public static final int countPerPx = 10;
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/BuilderPlugin.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/BuilderPlugin.java
new file mode 100644 (file)
index 0000000..6859a72
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class BuilderPlugin extends AbstractUIPlugin {
+
+    /**
+     * The plug-in id.
+     */
+    public static final String PLUGIN_ID = "org.tizen.efluibuilder"; //$NON-NLS-1$
+
+    /**
+     * The shared instance.
+     */
+    private static BuilderPlugin plugin;
+
+    /**
+     * The constructor.
+     */
+    public BuilderPlugin() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext )
+     */
+    @Override
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext )
+     */
+    @Override
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance.
+     * 
+     * @return the shared instance.
+     */
+    public static BuilderPlugin getDefault() {
+        return plugin;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AddEmptyViewAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AddEmptyViewAction.java
new file mode 100644 (file)
index 0000000..a8c83ba
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.tizen.efluibuilder.BuilderPlugin;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.views.outline.Messages;
+
+
+public class AddEmptyViewAction extends PartAction {
+
+    /**
+     * Creates a {@link AddEmptyViewAction} and associates it with the given workbench part.
+     * 
+     * @param part
+     *            the workbench part
+     * @param rootEditPart
+     *            a root {@link EditPart}
+     */
+    public AddEmptyViewAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart);
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        if (rootEditPart != null && rootEditPart.getChildren().isEmpty() == false) {
+            Part part = (Part) ((DesignEditPart) rootEditPart.getChildren().get(0)).getModel();
+            DocumentPart documentPart = part.getOwnerDocumentPart();
+            if (documentPart.isValidDocument()) {
+                return true;
+            } else {
+                return false;
+            }
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+
+        setText(Messages.ACTION_ADD_VIEW_EMPTY_TITLE);
+        setId(ActionConstants.ADD_VIEW_EMPTY);
+
+        ImageDescriptor imgDesc = null;
+
+        imgDesc = AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID, Messages.ACTION_ADD_VIEW_EMPTY_ICON_NOR);
+        setImageDescriptor(imgDesc);
+
+        // setDisabledImageDescriptor(imgDesc);
+        // imgDesc = AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID,
+        // Messages.ACTION_ADD_VIEW_EMPTY_ICON_MV);
+        // imgDesc = AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID,
+        // Messages.ACTION_ADD_VIEW_EMPTY_ICON_SEL);
+        // setHoverImageDescriptor(imgDesc);
+
+        setEnabled(true);
+    }
+
+    @Override
+    public void run() {
+        List<Part> partList = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        Part nextSibling = null;
+        Part selectedPart = null;
+        Part viewsPart = null;
+        if (partList.size() == 1) {
+            selectedPart = partList.get(0);
+            if (selectedPart instanceof ViewPart) {
+                nextSibling = selectedPart.getNextSibling();
+            }
+        }
+
+        if (this.rootEditPart.getViewer().getContents().getModel() instanceof ViewsPart) {
+            viewsPart = (Part) this.rootEditPart.getViewer().getContents().getModel();
+            Part newPart = PartUtil.createPartWithInitValue(viewsPart.getOwnerDocumentPart(), PartType.VIEW, viewsPart, LayoutSchemaConstants.VIEW);
+            if (newPart == null) {
+                return;
+            }
+            Point screenSzie = ((DesignViewer) rootEditPart.getViewer()).getMScreenQualifierManager().getScreenSize();
+            Point viewPosition = DesignEditorUtil.getNextViewPosition(viewsPart, screenSzie.x, screenSzie.y);
+            newPart.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_X, Integer.toString(viewPosition.x));
+            newPart.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_Y, Integer.toString(viewPosition.y));
+
+            Command command = PartUtil.createAddPartCommand(viewsPart, newPart, nextSibling);
+            if (command != null) {
+                CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+                cmdStack.execute(command);
+            }
+        }
+
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartAction.java
new file mode 100644 (file)
index 0000000..45c6ab5
--- /dev/null
@@ -0,0 +1,314 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class AlignPartAction extends PartAction {
+
+    private String type;
+
+    public final static String TYPE_LEFT = "align_left";
+    public final static String TYPE_TOP = "align_top";
+    public final static String TYPE_RIGHT = "action_align_right";
+    public final static String TYPE_BOTTOM = "action_align_bottom";
+    public final static String TYPE_VERTICAL_CENTER = "action_vertical_center";
+    public final static String TYPE_HORIZONTAL_CENTER = "action_horizontal_center";
+    public final static String TYPE_DISTRIBUTE_VERTICAL_SPACING = "action_same_vertical_spacing";
+    public final static String TYPE_DISTRIBUTE_HORIZONTAL_SPACING = "action_same_horizontal_spacing";
+    public final static String TYPE_LAYOUT_VERTICALLY = "action_layout_vertically";
+    public final static String TYPE_LAYOUT_HORIZONTALLY = "action_layout_horizontally";
+
+    public AlignPartAction(IWorkbenchPart part, EditPart rootEditPart, String type) {
+        super(part, rootEditPart);
+        this.type = type;
+    }
+
+    protected Command getCommand(List<Part> selectedParts) {
+        CompoundCommand compCmd = null;
+        List<PartBoundSet> alignedBoundSet = this.getAlignedBoundList(selectedParts, this.type);
+        if ((alignedBoundSet != null) && (alignedBoundSet.size() > 0)) {
+            PartBoundSet boundSet = null;
+            for (int i = 0; i < alignedBoundSet.size(); i++) {
+                boundSet = alignedBoundSet.get(i);
+                if (!(boundSet.part instanceof ComponentPart)) {
+                    continue;
+                }
+                ComponentPart part = (ComponentPart) boundSet.part;
+                Part parent = part.getParent();
+                if (compCmd == null) {
+                    compCmd = new CompoundCommand();
+                }
+                if (part instanceof ViewPart) {
+                    compCmd.add(PartUtil.createSetPropertyCommand(part, LayoutSchemaConstants.PAGE_LOCATION_X, Integer.toString(boundSet.bound.x)));
+                    compCmd.add(PartUtil.createSetPropertyCommand(part, LayoutSchemaConstants.PAGE_LOCATION_Y, Integer.toString(boundSet.bound.y)));
+                } else {
+                    compCmd.add(PartUtil.createPackCommandWithVariation(part, parent, getCurrentConfiguration(), boundSet.bound));
+                }
+                // compCmd.add(PartUtil.createPackCommand(boundSet.part, null, boundSet.bound));
+            }
+        }
+
+        return compCmd;
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        List<Part> orderedParts = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        if (orderedParts.size() > 1 && DesignEditorUtil.isSameParent(orderedParts)
+                && (orderedParts.get(0).getParent().getDescriptorId().equals(LayoutSchemaConstants.GRID)
+                        || orderedParts.get(0).getDescriptorId().equals(LayoutSchemaConstants.VIEW))
+                &&
+                hasEventPart(orderedParts) == false) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public void run() {
+        List<Part> orderedParts = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        Command command = getCommand(orderedParts);
+        CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+        if (command != null && command.canExecute() && (cmdStack != null)) {
+            cmdStack.execute(command);
+        }
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+        setId(ActionConstants.ALIGN);
+        setEnabled(false);
+    }
+
+    private Rectangle getOuterPackBound(List<Part> partList) {
+        Rectangle outerBound = new Rectangle();
+        Rectangle partBound;
+        int x1 = 0, y1 = 0, x2 = 0, y2 = 0;
+        if (partList.size() == 0) {
+            return null;
+        }
+
+        for (int i = 0; i < partList.size(); i++) {
+            Part part = partList.get(i);
+            if (!(part instanceof ComponentPart)) {
+                continue;
+            }
+            ComponentPart componentPart = (ComponentPart) part;
+            partBound = DesignEditorUtil.getPackBound(componentPart, getCurrentConfigurationID());
+            if (i == 0) {
+                x1 = partBound.x;
+                y1 = partBound.y;
+                x2 = x1 + partBound.width;
+                y2 = y1 + partBound.height;
+                continue;
+            }
+            if (x1 > partBound.x) {
+                x1 = partBound.x;
+            }
+            if (y1 > partBound.y) {
+                y1 = partBound.y;
+            }
+            if (x2 < (partBound.x + partBound.width)) {
+                x2 = partBound.x + partBound.width;
+            }
+            if (y2 < (partBound.y + partBound.height)) {
+                y2 = partBound.y + partBound.height;
+            }
+        }
+        outerBound.x = x1;
+        outerBound.y = y1;
+        outerBound.width = x2 - x1;
+        outerBound.height = y2 - y1;
+        return outerBound;
+    }
+
+    private List<PartBoundSet> getSortedBoundsetByEdge(List<PartBoundSet> partBoundSetList, String edge) {
+        List<PartBoundSet> sortedBoundSetList = new ArrayList<PartBoundSet>();
+        int val1, val2;
+        PartBoundSet temp;
+
+        for (int i = 0; i < partBoundSetList.size(); i++) {
+            sortedBoundSetList.add(partBoundSetList.get(i));
+        }
+
+        for (int i = 0; i < sortedBoundSetList.size(); i++) {
+            for (int j = sortedBoundSetList.size() - 1; j > i; j--) {
+                if (edge.equals("left")) {
+                    val1 = sortedBoundSetList.get(i).bound.x;
+                    val2 = sortedBoundSetList.get(j).bound.x;
+                } else if (edge.equals("top")) {
+                    val1 = sortedBoundSetList.get(i).bound.y;
+                    val2 = sortedBoundSetList.get(j).bound.y;
+                } else if (edge.equals("right")) {
+                    val1 = sortedBoundSetList.get(i).bound.x + sortedBoundSetList.get(i).bound.width;
+                    val2 = sortedBoundSetList.get(j).bound.x + sortedBoundSetList.get(j).bound.width;
+                } else if (edge.equals("bottom")) {
+                    val1 = sortedBoundSetList.get(i).bound.y + sortedBoundSetList.get(i).bound.height;
+                    val2 = sortedBoundSetList.get(j).bound.y + sortedBoundSetList.get(j).bound.height;
+                } else {
+                    break;
+                }
+                if (val1 > val2) {
+                    temp = sortedBoundSetList.get(i);
+                    sortedBoundSetList.set(i, sortedBoundSetList.get(j));
+                    sortedBoundSetList.set(j, temp);
+                }
+            }
+        }
+        return sortedBoundSetList;
+
+    }
+
+    protected List<PartBoundSet> getAlignedBoundList(List<Part> partList, String type) {
+
+        List<PartBoundSet> alignedBoundList = new ArrayList<PartBoundSet>();
+        List<PartBoundSet> sortedBoundList = null;
+        List<PartBoundSet> baseBoundList = new ArrayList<PartBoundSet>();
+        List<Rectangle> bounds = new ArrayList<Rectangle>();
+        DesignViewer viewer = (DesignViewer) this.rootEditPart.getViewer();
+
+        boolean boundChanged = true;
+
+        for (int i = 0; i < partList.size(); i++) {
+            Part part = partList.get(i);
+            if (!(part instanceof ComponentPart)) {
+                continue;
+            }
+
+            ComponentPart componentPart = (ComponentPart) part;
+            Rectangle bound;
+            if (part instanceof ViewPart) {
+                Point viewSize = viewer.getMScreenQualifierManager().getScreenSize();
+                Point viewPosition = DesignEditorUtil.getPageLocation(part);
+                bound = new Rectangle(viewPosition.x, viewPosition.y, viewSize.x, viewSize.y);
+            } else {
+                bound = DesignEditorUtil.getPackBound(componentPart, getCurrentConfigurationID());// part.getWidgetBounds();
+            }
+            baseBoundList.add(new PartBoundSet(part, bound));
+            bounds.add(bound);
+        }
+
+        
+        Rectangle outerBound = DesignEditorUtil.getOuterBound(bounds);
+        if (null == outerBound) {
+            return null;
+        }
+
+        PartBoundSet boundSet;
+
+        for (int i = 0; i < baseBoundList.size(); i++) {
+            boundSet = baseBoundList.get(i);
+            if (type.equals(AlignPartAction.TYPE_LEFT)) {
+                boundSet.bound.x = outerBound.x;
+            } else if (type.equals(AlignPartAction.TYPE_TOP)) {
+                boundSet.bound.y = outerBound.y;
+            } else if (type.equals(AlignPartAction.TYPE_RIGHT)) {
+                boundSet.bound.x = outerBound.x + outerBound.width - boundSet.bound.width;
+            } else if (type.equals(AlignPartAction.TYPE_BOTTOM)) {
+                boundSet.bound.y = outerBound.y + outerBound.height - boundSet.bound.height;
+            } else if (type.equals(AlignPartAction.TYPE_HORIZONTAL_CENTER)) {
+                boundSet.bound.x = ((outerBound.x * 2 + outerBound.width) - boundSet.bound.width) / 2;
+            } else if (type.equals(AlignPartAction.TYPE_VERTICAL_CENTER)) {
+                boundSet.bound.y = ((outerBound.y * 2 + outerBound.height) - boundSet.bound.height) / 2;
+            } else {
+                boundChanged = false;
+            }
+
+            if (boundChanged) {
+                alignedBoundList.add(boundSet);
+            }
+        }
+
+        if (type.equals(AlignPartAction.TYPE_DISTRIBUTE_HORIZONTAL_SPACING)) {
+            sortedBoundList = this.getSortedBoundsetByEdge(baseBoundList, "left");
+            int totDist = 0;
+            int margin = 0;
+            int prevPos = 0;
+            if (sortedBoundList.size() > 2) {
+                for (int i = 0; i < sortedBoundList.size(); i++) {
+                    totDist += sortedBoundList.get(i).bound.width;
+                }
+
+                margin = (outerBound.width - totDist) / (sortedBoundList.size() - 1);
+
+                for (int i = 0; i < sortedBoundList.size() - 1; i++) {
+                    if (i == 0) {
+                        prevPos = sortedBoundList.get(i).bound.x;
+                    } else {
+                        sortedBoundList.get(i).bound.x = prevPos;
+                    }
+                    prevPos += sortedBoundList.get(i).bound.width + margin;
+                }
+                alignedBoundList = sortedBoundList;
+            }
+        } else if (type.equals(AlignPartAction.TYPE_DISTRIBUTE_VERTICAL_SPACING)) {
+            sortedBoundList = this.getSortedBoundsetByEdge(baseBoundList, "top");
+            int totDist = 0;
+            int margin = 0;
+            int prevPos = 0;
+            if (sortedBoundList.size() > 2) {
+                totDist = 0;
+                for (int i = 0; i < sortedBoundList.size(); i++) {
+                    totDist += sortedBoundList.get(i).bound.height;
+                }
+                margin = (outerBound.height - totDist) / (sortedBoundList.size() - 1);
+
+                for (int i = 0; i < sortedBoundList.size() - 1; i++) {
+                    if (i == 0) {
+                        prevPos = sortedBoundList.get(i).bound.y;
+                    } else {
+                        sortedBoundList.get(i).bound.y = prevPos;
+                    }
+                    prevPos += sortedBoundList.get(i).bound.height + margin;
+                }
+                alignedBoundList = sortedBoundList;
+            }
+        }
+
+        return alignedBoundList;
+
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionBottom.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionBottom.java
new file mode 100644 (file)
index 0000000..64891b4
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+@SuppressWarnings("restriction")
+public class AlignPartActionBottom extends AlignPartAction {
+    public AlignPartActionBottom(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, AlignPartAction.TYPE_BOTTOM);
+    }
+
+    protected void init() {
+        super.init();
+        setId(ActionConstants.ALIGN_BOTTOM);
+        setText(GEFMessages.AlignBottomAction_Label);
+        setToolTipText(GEFMessages.AlignBottomAction_Tooltip);
+        // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM);
+        // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM_DIS);
+        setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_BOTTOM_NOR));
+        setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_BOTTOM_DIM));
+        setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_BOTTOM_MV));
+        setEnabled(false);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionHCenter.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionHCenter.java
new file mode 100644 (file)
index 0000000..710c59b
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+@SuppressWarnings("restriction")
+public class AlignPartActionHCenter extends AlignPartAction {
+    public AlignPartActionHCenter(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, AlignPartAction.TYPE_HORIZONTAL_CENTER);
+    }
+
+    protected void init() {
+        super.init();
+
+        setText(GEFMessages.AlignCenterAction_Label);
+        setToolTipText(GEFMessages.AlignCenterAction_Tooltip);
+        // setImageDescriptor(InternalImages.DESC_HORZ_ALIGN_CENTER);
+        // setDisabledImageDescriptor(InternalImages.DESC_HORZ_ALIGN_CENTER_DIS);
+        setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_CENTER_NOR));
+        setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_CENTER_DIM));
+        setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_CENTER_MV));
+        setId(ActionConstants.ALIGN_HORIZONTAL_CENTER);
+        setEnabled(false);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionHDistribute.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionHDistribute.java
new file mode 100644 (file)
index 0000000..6e5dfae
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class AlignPartActionHDistribute extends AlignPartAction {
+    public AlignPartActionHDistribute(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, AlignPartAction.TYPE_DISTRIBUTE_HORIZONTAL_SPACING);
+    }
+
+    protected boolean calculateEnabled() {
+        if (super.calculateEnabled()) {
+            List<Part> orderedParts = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+            if (orderedParts.size() > 2) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    protected void init() {
+        super.init();
+
+        ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        setText(Messages.ACTION_ALIGN_DISTRIBUTE_HORIZONTALLY);
+        setId(ActionConstants.ALIGN_DISTRIBUTE_HORIZONTAL_SPACING);
+        setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
+        setEnabled(false);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionLeft.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionLeft.java
new file mode 100644 (file)
index 0000000..500c245
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+@SuppressWarnings("restriction")
+public class AlignPartActionLeft extends AlignPartAction {
+    public AlignPartActionLeft(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, AlignPartAction.TYPE_LEFT);
+    }
+
+    protected void init() {
+        super.init();
+        setText(GEFMessages.AlignLeftAction_Label);
+        setToolTipText(GEFMessages.AlignLeftAction_Tooltip);
+
+        setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_LEFT_NOR));
+        setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_LEFT_DIM));
+        setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_LEFT_MV));
+        setId(ActionConstants.ALIGN_LEFT);
+        setEnabled(false);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionRight.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionRight.java
new file mode 100644 (file)
index 0000000..b811810
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+@SuppressWarnings("restriction")
+public class AlignPartActionRight extends AlignPartAction {
+    public AlignPartActionRight(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, AlignPartAction.TYPE_RIGHT);
+    }
+
+    protected void init() {
+        super.init();
+        setId(ActionConstants.ALIGN_RIGHT);
+        setText(GEFMessages.AlignRightAction_Label);
+        setToolTipText(GEFMessages.AlignRightAction_Tooltip);
+        // setImageDescriptor(InternalImages.DESC_HORZ_ALIGN_RIGHT);
+        // setDisabledImageDescriptor(InternalImages.DESC_HORZ_ALIGN_RIGHT_DIS);
+        setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_RIGHT_NOR));
+        setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_RIGHT_DIM));
+        setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_RIGHT_MV));
+        setEnabled(false);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionTop.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionTop.java
new file mode 100644 (file)
index 0000000..d72e51e
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+@SuppressWarnings("restriction")
+public class AlignPartActionTop extends AlignPartAction {
+    public AlignPartActionTop(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, AlignPartAction.TYPE_TOP);
+    }
+
+    protected void init() {
+        super.init();
+
+        setText(GEFMessages.AlignTopAction_Label);
+        setToolTipText(GEFMessages.AlignTopAction_Tooltip);
+        // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_TOP);
+        // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_TOP_DIS);
+        setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_TOP_NOR));
+        setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_TOP_DIM));
+        setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_TOP_MV));
+        setId(ActionConstants.ALIGN_TOP);
+        setEnabled(false);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionVCenter.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionVCenter.java
new file mode 100644 (file)
index 0000000..fe291a8
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+@SuppressWarnings("restriction")
+public class AlignPartActionVCenter extends AlignPartAction {
+    public AlignPartActionVCenter(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, AlignPartAction.TYPE_VERTICAL_CENTER);
+    }
+
+    protected void init() {
+        super.init();
+
+        setText(GEFMessages.AlignMiddleAction_Label);
+        setToolTipText(GEFMessages.AlignMiddleAction_Tooltip);
+        // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_MIDDLE);
+        // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_MIDDLE_DIS);
+        setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_MIDDLE_NOR));
+        setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_MIDDLE_DIM));
+        setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_MIDDLE_MV));
+        setId(ActionConstants.ALIGN_VERTICAL_CENTER);
+        setEnabled(false);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionVDistribute.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartActionVDistribute.java
new file mode 100644 (file)
index 0000000..7d17e73
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class AlignPartActionVDistribute extends AlignPartAction {
+    public AlignPartActionVDistribute(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, AlignPartAction.TYPE_DISTRIBUTE_VERTICAL_SPACING);
+    }
+
+    protected boolean calculateEnabled() {
+        if (super.calculateEnabled()) {
+            List<Part> orderedParts = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+            if (orderedParts.size() > 2) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    protected void init() {
+        super.init();
+
+        ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        setText(Messages.ACTION_ALIGN_DISTRIBUTE_VERTICALLY);
+        setId(ActionConstants.ALIGN_DISTRIBUTE_VERTICAL_SPACING);
+        setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
+        setEnabled(false);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartRetargetAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/AlignPartRetargetAction.java
new file mode 100644 (file)
index 0000000..b9869df
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.ui.actions.LabelRetargetAction;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+@SuppressWarnings("restriction")
+public class AlignPartRetargetAction extends LabelRetargetAction {
+    public AlignPartRetargetAction(String align) {
+        super(null, null);
+        if (align.equals(AlignPartAction.TYPE_LEFT)) {
+            setId(ActionConstants.ALIGN_LEFT);
+            setText(GEFMessages.AlignLeftAction_Label);
+            setToolTipText(GEFMessages.AlignLeftAction_Tooltip);
+            // setImageDescriptor(InternalImages.DESC_HORZ_ALIGN_LEFT);
+            // setDisabledImageDescriptor(InternalImages.DESC_HORZ_ALIGN_LEFT_DIS);
+            setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_LEFT_NOR));
+            setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_LEFT_DIM));
+            setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_LEFT_MV));
+        } else if (align.equals(AlignPartAction.TYPE_TOP)) {
+            setId(ActionConstants.ALIGN_TOP);
+            setText(GEFMessages.AlignTopAction_Label);
+            setToolTipText(GEFMessages.AlignTopAction_Tooltip);
+            // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_TOP);
+            // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_TOP_DIS);
+            setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_TOP_NOR));
+            setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_TOP_DIM));
+            setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_TOP_MV));
+        } else if (align.equals(AlignPartAction.TYPE_RIGHT)) {
+            setId(ActionConstants.ALIGN_RIGHT);
+            setText(GEFMessages.AlignRightAction_Label);
+            setToolTipText(GEFMessages.AlignRightAction_Tooltip);
+            // setImageDescriptor(InternalImages.DESC_HORZ_ALIGN_RIGHT);
+            // setDisabledImageDescriptor(InternalImages.DESC_HORZ_ALIGN_RIGHT_DIS);
+            setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_RIGHT_NOR));
+            setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_RIGHT_DIM));
+            setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_RIGHT_MV));
+        } else if (align.equals(AlignPartAction.TYPE_BOTTOM)) {
+            setId(ActionConstants.ALIGN_BOTTOM);
+            setText(GEFMessages.AlignBottomAction_Label);
+            setToolTipText(GEFMessages.AlignBottomAction_Tooltip);
+            // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM);
+            // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM_DIS);
+            setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_BOTTOM_NOR));
+            setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_BOTTOM_DIM));
+            setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_BOTTOM_MV));
+        } else if (align.equals(AlignPartAction.TYPE_HORIZONTAL_CENTER)) {
+            setId(ActionConstants.ALIGN_HORIZONTAL_CENTER);
+            setText(GEFMessages.AlignCenterAction_Label);
+            setToolTipText(GEFMessages.AlignCenterAction_Tooltip);
+            // setImageDescriptor(InternalImages.DESC_HORZ_ALIGN_CENTER);
+            // setDisabledImageDescriptor(InternalImages.DESC_HORZ_ALIGN_CENTER_DIS);
+            setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_CENTER_NOR));
+            setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_CENTER_DIM));
+            setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_CENTER_MV));
+        } else if (align.equals(AlignPartAction.TYPE_VERTICAL_CENTER)) {
+            setId(ActionConstants.ALIGN_VERTICAL_CENTER);
+            setText(GEFMessages.AlignMiddleAction_Label);
+            setToolTipText(GEFMessages.AlignMiddleAction_Tooltip);
+            // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_MIDDLE);
+            // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_MIDDLE_DIS);
+            setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_MIDDLE_NOR));
+            setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_MIDDLE_DIM));
+            setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_MIDDLE_MV));
+        } else if (align.equals(AlignPartAction.TYPE_DISTRIBUTE_HORIZONTAL_SPACING)) {
+            setId(ActionConstants.ALIGN_DISTRIBUTE_HORIZONTAL_SPACING);
+            // setText(GEFMessages.AlignMiddleAction_Label);
+            // setToolTipText(GEFMessages.AlignMiddleAction_Tooltip);
+            // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_MIDDLE);
+            // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_MIDDLE_DIS);
+        } else if (align.equals(AlignPartAction.TYPE_DISTRIBUTE_VERTICAL_SPACING)) {
+            setId(ActionConstants.ALIGN_DISTRIBUTE_VERTICAL_SPACING);
+            // setText(GEFMessages.AlignMiddleAction_Label);
+            // setToolTipText(GEFMessages.AlignMiddleAction_Tooltip);
+            // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_MIDDLE);
+            // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_MIDDLE_DIS);
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ChangePartSelectionAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ChangePartSelectionAction.java
new file mode 100644 (file)
index 0000000..afe88cc
--- /dev/null
@@ -0,0 +1,157 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.SelectionRequest;
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.actions.ActionFactory;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class ChangePartSelectionAction extends SelectionAction {
+
+    protected EditPart rootEditPart;
+    private String type;
+    Request req = null;
+
+    public final static String TYPE_PARENT = "parent";
+    public final static String TYPE_CHILD = "child";
+    public final static String TYPE_PREV_SIBLING = "prev_sibling";
+    public final static String TYPE_NEXT_SIBLING = "next_sibling";
+
+    public ChangePartSelectionAction(IWorkbenchPart part, EditPart rootEditPart, String type) {
+        super(part);
+        this.type = type;
+        this.rootEditPart = rootEditPart;
+        req = null;
+    }
+
+    protected boolean isSelectable(EditPart editpart) {
+        return true;
+    }
+
+    protected Request getRequest() {
+        if (this.req == null) {
+            this.req = new SelectionRequest();
+        }
+        return this.req;
+    }
+
+    protected EditPart getSelectTarget() {
+        List<EditPart> editparts = CommandUtil.getEditPartsFromSelectedObjects(getSelectedObjects());
+        List<EditPart> children;
+        List<EditPart> siblings;
+        Part part;
+        EditPart editpart, sibling, selectTarget = null, parentEditPart = null;
+
+        if (editparts.size() == 1) {
+            editpart = editparts.get(0);
+            part = (Part) editpart.getModel();
+            children = editpart.getChildren();
+            parentEditPart = editpart.getParent();
+            if (parentEditPart == null) {
+                return null;
+            }
+            siblings = editpart.getParent().getChildren();
+            if (type.equals(ChangePartSelectionAction.TYPE_PARENT)) {
+                if ((part.getParent() != null) && (part.getParent() instanceof ComponentPart)) {
+                    selectTarget = editpart.getParent();
+                }
+            } else if (type.equals(ChangePartSelectionAction.TYPE_CHILD)) {
+                if (children.size() > 0) {
+                    selectTarget = (EditPart) editpart.getChildren().get(0);
+                }
+            } else if (type.equals(ChangePartSelectionAction.TYPE_PREV_SIBLING)) {
+                if (siblings.size() > 1) {
+                    for (int i = 0; i < siblings.size(); i++) {
+                        sibling = siblings.get(i);
+                        if (sibling.equals(editpart)) {
+                            if (i == 0) {
+                                selectTarget = siblings.get(siblings.size() - 1);
+                            } else {
+                                selectTarget = siblings.get(i - 1);
+                            }
+                            break;
+                        }
+                    }
+                }
+            } else if (type.equals(ChangePartSelectionAction.TYPE_NEXT_SIBLING)) {
+                if (siblings.size() > 1) {
+                    for (int i = 0; i < siblings.size(); i++) {
+                        sibling = siblings.get(i);
+                        if (sibling.equals(editpart)) {
+                            if (i == (siblings.size() - 1)) {
+                                selectTarget = siblings.get(0);
+                            } else {
+                                selectTarget = siblings.get(i + 1);
+                            }
+                            break;
+                        }
+                    }
+                }
+            }
+            if (selectTarget != null) {
+                if (this.isSelectable(selectTarget)) {
+                    return selectTarget;
+                }
+            }
+
+        }
+
+        return null;
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        if (this.getSelectTarget() != null) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public void run() {
+        EditPart selectEditPart = this.getSelectTarget();
+        if (null != selectEditPart) {
+            rootEditPart.getViewer().select(selectEditPart);
+        }
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+        setId(ActionConstants.CHANGE_SELECTION);
+        setId(ActionFactory.COPY.getId());
+        setEnabled(false);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/CopyPartAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/CopyPartAction.java
new file mode 100644 (file)
index 0000000..b543845
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+/**
+ * An action to copy selected {@link Part}s.
+ */
+public class CopyPartAction extends CutPartAction {
+
+    /**
+     * Creates a {@link CopyPartAction} and associates it with the given workbench part.
+     * 
+     * @param part
+     *            the workbench part
+     * @param rootEditPart
+     *            a root {@link EditPart}
+     */
+    public CopyPartAction(IWorkbenchPart part, EditPart rootEditPart, PartAction updateTarget) {
+        super(part, rootEditPart, updateTarget);
+    }
+
+    /**
+     * Returns <code>true</code> if the selected objects can be copied.
+     * 
+     * @return <code>true</code> if the command should be enabled, and <code>false</code> otherwise
+     */
+    @Override
+    protected boolean calculateEnabled() {
+        return isCopyEnabled();
+    }
+
+    /**
+     * Initializes the copy action's text and images.
+     */
+    @Override
+    protected void init() {
+        super.init();
+
+        ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        setText(Messages.getCopyShortCut());
+        setId(ActionConstants.COPY_PART);
+
+        setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
+        setEnabled(false);
+    }
+
+    @Override
+    public void run() {
+        setCopyDataToClipboard();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/CutPartAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/CutPartAction.java
new file mode 100644 (file)
index 0000000..a3a0130
--- /dev/null
@@ -0,0 +1,448 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.ui.actions.Clipboard;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.gef.commands.ComponentCopyData;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.gef.viewer.DesignStoryboardRouter;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+/**
+ * An action to copy selected {@link Part}s.
+ */
+public class CutPartAction extends PartAction {
+
+    static class PartSet {
+        List<Part> viewParts;
+        List<Part> componentParts;
+        List<Part> eventParts;
+
+        public PartSet(List<Part> viewParts, List<Part> componentParts, List<Part> eventParts) {
+            this.viewParts = viewParts;
+            this.componentParts = componentParts;
+            this.eventParts = eventParts;
+        }
+    }
+
+    protected PartAction updateTarget = null;
+
+    /**
+     * Creates a {@link CutPartAction} and associates it with the given workbench part.
+     * 
+     * @param part
+     *            the workbench part
+     * @param rootEditPart
+     *            a root {@link EditPart}
+     */
+    private List<ComponentCopyData> copyData = null;
+
+    public CutPartAction(IWorkbenchPart part, EditPart rootEditPart, PartAction updateTarget) {
+        super(part, rootEditPart);
+        this.updateTarget = updateTarget;
+    }
+
+    private boolean isStartUpView(Part part) {
+        if (part instanceof ViewPart) {
+            String startupStr = part.getParent().getPropertyValue(LayoutSchemaConstants.STARTUP);
+            if ((startupStr != null) && startupStr.equals(part.getPropertyValue(LayoutSchemaConstants.ID))) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private Command getComponentsRemoveCommand(List<Part> selectedParts) {
+        CompoundCommand compCmd = new CompoundCommand();
+        for (int i = 0; i < selectedParts.size(); i++) {
+            compCmd.add(PartUtil.createRemovePartCommand(selectedParts.get(i).getParent(), selectedParts.get(i)));
+        }
+        return compCmd;
+    }
+
+    private HashMap<String, Part> getTargetConnectionMapFromViews(List<Part> selectedParts) {
+        HashMap<String, Part> eventMap = new HashMap<String, Part>();
+        DesignStoryboardRouter router = ((DesignViewer) this.rootEditPart.getViewer()).getStoryBoardRouter();
+        for (Part targetPart : selectedParts) {
+            List<Part> targetEvents = router.getTargetConnectionPartFromView(targetPart);
+            for (Part eventPart : targetEvents) {
+                eventMap.put(eventPart.getUniqueId(), eventPart);
+            }
+        }
+
+        return eventMap;
+    }
+
+    private Command getViewsRemoveCommnad(List<Part> selectedParts) {
+        CompoundCommand compCmd = new CompoundCommand();
+        Part targetPart;
+        // for (int i = 0; i < selectedParts.size(); i++) { //remove event
+        // targetPart = selectedParts.get(i);
+        // List<Part> targetEvents =
+        // ((DesignViewer)this.rootEditPart.getViewer()).getStoryBoardRouter().getTargetConnectionPartFromView(targetPart);
+        // for (Part eventPart : targetEvents) {
+        // compCmd.add(PartUtil.createRemovePartCommand(eventPart.getParent(), eventPart));
+        // }
+        // }
+
+        for (int i = 0; i < selectedParts.size(); i++) { // remove view
+            targetPart = selectedParts.get(i);
+            // List<Part> targetEvents =
+            // ((DesignViewer)this.rootEditPart.getViewer()).getStoryBoardRouter().getTargetConnectionPartFromView(targetPart);
+            // for (Part eventPart : targetEvents) {
+            // compCmd.add(PartUtil.createRemovePartCommand(eventPart.getParent(), eventPart));
+            // }
+            compCmd.add(PartUtil.createRemovePartCommand(targetPart.getParent(), targetPart));
+            if (isStartUpView(targetPart)) {
+                for (Part part : getUnselectedSiblings(selectedParts)) {
+                    if (part.getPropertyValue(LayoutSchemaConstants.TYPE).equals(LayoutSchemaConstants.VIEW)) {
+                        compCmd.add(PartUtil.createSetPropertyCommand(targetPart.getParent(), LayoutSchemaConstants.STARTUP,
+                                                                      part.getPropertyValue(LayoutSchemaConstants.ID)));
+                        break;
+                    }
+                }
+            }
+        }
+        return compCmd;
+    }
+
+    private boolean hasMainView(List<Part> parts) {
+        for (Part part : parts) {
+            if (part.getPropertyValue(LayoutSchemaConstants.TYPE) != null
+                    && part.getPropertyValue(LayoutSchemaConstants.TYPE).equals(LayoutSchemaConstants.VIEW)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private List<Part> getUnselectedSiblings(List<Part> siblings) {
+        List<Part> unselectedParts = new ArrayList<Part>();
+        for (Part part : siblings.get(0).getParent().getComponentChildren())
+            if (siblings.contains(part) == false) {
+                unselectedParts.add(part);
+            }
+        return unselectedParts;
+    }
+
+    protected List<Part> getViewPartsFromParts(List<Part> parts) {
+        List<Part> viewParts = new ArrayList<Part>();
+        for (Part part : parts) {
+            if (part instanceof ViewPart) {
+                viewParts.add(part);
+            }
+        }
+        return viewParts;
+    }
+
+    protected List<Part> getEventPartsFromParts(List<Part> parts) {
+        List<Part> eventParts = new ArrayList<Part>();
+        for (Part part : parts) {
+            if (part instanceof EventPart) {
+                eventParts.add(part);
+            }
+        }
+        return eventParts;
+    }
+
+    protected Command getDeleteCommand() {
+        PartSet deletePartSet = getDeleteTargetPartSet();
+
+        CompoundCommand compCmd = null;
+
+        if (deletePartSet.eventParts.isEmpty() == false) { // remove event
+            compCmd = (CompoundCommand) getComponentsRemoveCommand(deletePartSet.eventParts);
+        }
+
+        if (deletePartSet.componentParts.isEmpty() == false) { // remove component
+            if (compCmd == null) {
+                compCmd = (CompoundCommand) getComponentsRemoveCommand(deletePartSet.componentParts);
+            } else {
+                compCmd.add(getComponentsRemoveCommand(deletePartSet.componentParts));
+            }
+        }
+
+        if (deletePartSet.viewParts.isEmpty() == false) { // remove view
+            if (compCmd == null) {
+                compCmd = (CompoundCommand) getViewsRemoveCommnad(deletePartSet.viewParts);
+            } else {
+                compCmd.add(getViewsRemoveCommnad(deletePartSet.viewParts));
+            }
+        }
+
+        return compCmd;
+    }
+
+    protected boolean isCopyEnabled() {
+        List<Part> partList = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        if (partList == null || partList.isEmpty() || (isSameParent(partList) != true) || (hasEventPart(partList)) == true) {
+            return false;
+        }
+
+        this.copyData = getCopyData(partList);
+        if (this.copyData != null) {
+            return true;
+        }
+        return false;
+    }
+
+    private boolean isChildOfPart(Part parentPart, Part childPart) {
+        Part parent = childPart;
+        while (parent instanceof ComponentPart) {
+            if (parent == parentPart) {
+                return true;
+            }
+            parent = parent.getParent();
+        }
+        return false;
+    }
+
+    protected List<Part> getDeleteTargetPartsWithoutDependancy(ArrayList<Part> targets) {
+        List<Part> deleteTargets = new ArrayList<Part>();
+        return deleteTargets;
+
+    }
+
+    protected PartSet getDeleteTargetPartSet() {
+        List<Part> danglingParts = new ArrayList<Part>();
+        List<Part> selectedParts = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+
+        List<Part> viewParts = new ArrayList<Part>();
+        List<Part> componentParts = new ArrayList<Part>();
+        List<Part> eventParts = new ArrayList<Part>();
+
+        for (Part part : selectedParts) {
+            if (part instanceof ViewPart) {
+                viewParts.add(part);
+            } else if (part instanceof EventPart) {
+                eventParts.add(part);
+            } else {
+                componentParts.add(part);
+            }
+        }
+
+        HashMap<String, Part> targetConnectionMap = getTargetConnectionMapFromViews(viewParts);
+        for (Part event : eventParts) {
+            targetConnectionMap.put(event.getUniqueId(), event);
+        }
+        eventParts.clear();
+        for (Part event : targetConnectionMap.values()) {
+            eventParts.add(event);
+        }
+
+        for (Part view : viewParts) { // remove dangling component
+            for (Part component : componentParts) {
+                if (isChildOfPart(view, component)) {
+                    danglingParts.add(component);
+                }
+            }
+        }
+        componentParts.removeAll(danglingParts);
+
+        danglingParts.clear();
+        for (Part view : viewParts) { // remove dangling event
+            for (Part event : eventParts) {
+                if (isChildOfPart(view, event)) {
+                    danglingParts.add(event);
+                }
+            }
+        }
+
+        for (Part component : componentParts) { // remove dangling event
+            for (Part event : eventParts) {
+                if (isChildOfPart(component, event)) {
+                    danglingParts.add(event);
+                }
+            }
+        }
+        eventParts.removeAll(danglingParts);
+
+        return new PartSet(viewParts, componentParts, eventParts);
+    }
+
+    protected boolean isDeleteEnabled() {
+        PartSet deletePartSet = getDeleteTargetPartSet();
+        if (deletePartSet.viewParts.isEmpty() == false ||
+                deletePartSet.componentParts.isEmpty() == false ||
+                deletePartSet.eventParts.isEmpty() == false) {
+            if (deletePartSet.viewParts.isEmpty() == false) { // remove views
+                List<Part> unselectedParts = getUnselectedSiblings(deletePartSet.viewParts);
+                if (hasMainView(unselectedParts) == false) {
+                    return false;
+                }
+            }
+            return true;
+        }
+        return false;
+    }
+
+    protected List<ComponentCopyData> getCopyData(List<Part> partList) {
+        Part part, parentPart, clonedPart, ownerViewPart, clonedParentPart = null;
+        Rectangle partBound, parentBound;
+        ComponentCopyData copyData;
+        List<ComponentCopyData> copyDataList = new ArrayList<ComponentCopyData>();
+
+        EditPart parentEditPart = null;
+        EditPart editPart = null;
+        DesignEditPart viewEditPart = null;
+        Rectangle absoluteBound = null;
+        Rectangle relativeBound = null;
+        Rectangle viewBound = null;
+        String layoutType = null;
+
+        for (int i = 0; i < partList.size(); i++) {
+            part = partList.get(i);
+            parentPart = part.getParent();
+
+            if (part instanceof ViewPart) {
+                parentPart = null;
+                parentEditPart = null;
+                partBound = null;
+                parentBound = null;
+                absoluteBound = null;
+                relativeBound = null;
+                clonedParentPart = null;
+                layoutType = "";
+            } else
+            // if (part instanceof ComponentPart)
+            {
+                editPart = DesignEditorUtil.getEditPart(rootEditPart, part);
+                if (editPart == null) {
+                    continue;
+                }
+                ownerViewPart = ((ComponentPart) part).getOwnerViewPart();
+                parentEditPart = DesignEditorUtil.getEditPart(rootEditPart, part.getParent());
+                viewEditPart = (DesignEditPart) DesignEditorUtil.getEditPart(rootEditPart, ownerViewPart);
+                if (parentEditPart != null && viewEditPart != null) {
+                    viewBound = viewEditPart.getPosition().getBounds();
+                    partBound = ((DesignEditPart) editPart).getPosition().getBounds();
+                    parentBound = ((DesignEditPart) parentEditPart).getPosition().getBounds().getCopy();
+                    absoluteBound = new Rectangle();
+                    relativeBound = new Rectangle();
+                    absoluteBound.setBounds(partBound);
+                    relativeBound.setBounds(partBound);
+                    absoluteBound.x -= viewBound.x;
+                    absoluteBound.y -= (viewBound.y + DesignEditorUtil.VIEW_TITLEBAR_HEIGHT);
+                    relativeBound.x -= parentBound.x;
+                    relativeBound.y -= parentBound.y;
+                    if (parentPart instanceof ViewPart == false) {
+                        parentBound.x -= viewBound.x;
+                        parentBound.y -= (viewBound.y + DesignEditorUtil.VIEW_TITLEBAR_HEIGHT);
+                    }
+                    ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+                    layoutType = componentDescriptor.getLayoutType((ComponentPart) parentPart);
+                    clonedParentPart = PartUtil.clone(parentPart);
+                }
+
+            }
+            String configuration = null;
+            if (this.rootEditPart.getViewer() instanceof DesignViewer) {
+                DesignViewer designViewer = (DesignViewer) this.rootEditPart.getViewer();
+                if (designViewer.getMScreenQualifierManager().getCurrentConfigurePart() != null) {
+                    configuration = designViewer.getMScreenQualifierManager().getCurrentConfigurePart().getPropertyValue(LayoutSchemaConstants.ID);
+                }
+            }
+            clonedPart = PartUtil.clone(part, true, configuration, true);
+            copyData = new ComponentCopyData(clonedPart, absoluteBound, relativeBound, layoutType, clonedParentPart);
+            copyDataList.add(copyData);
+        }
+        return copyDataList;
+        // Sets a content of clip board.
+
+    }
+
+    /**
+     * Returns <code>true</code> if the selected objects can be copied.
+     * 
+     * @return <code>true</code> if the command should be enabled, and <code>false</code> otherwise
+     */
+    @Override
+    protected boolean calculateEnabled() {
+        if (isCopyEnabled() && isDeleteEnabled()) {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Initializes the copy action's text and images.
+     */
+    @Override
+    protected void init() {
+        ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        setText(Messages.getCutShortCut());
+        setId(ActionConstants.CUT_PART);
+        setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_CUT));
+        setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_CUT));
+        setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED));
+        setEnabled(false);
+    }
+
+    protected void setCopyDataToClipboard() {
+        if (copyData.size() > 0) {
+            Clipboard.getDefault().setContents(copyData);
+            if (updateTarget != null) {                
+                updateTarget.updateEnabled();
+            }
+        }
+    }
+
+    /**
+     * Performs the copy action on the selected objects.
+     */
+    @Override
+    public void run() {
+        setCopyDataToClipboard();
+        Command command = this.getDeleteCommand();
+        if (command != null) {
+            super.run();
+            CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+            cmdStack.execute(command);
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/DeletePartAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/DeletePartAction.java
new file mode 100644 (file)
index 0000000..b1af2bb
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+/**
+ * An action to delete selected {@link Part}s.
+ */
+public class DeletePartAction extends CutPartAction {
+
+    /**
+     * Creates a {@link DeletePartAction} and associates it with the given workbench part.
+     * 
+     * @param part
+     *            the workbench part
+     */
+    public DeletePartAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, null);
+        setLazyEnablementCalculation(false);
+    }
+
+    /**
+     * Returns <code>true</code> if the selected objects can be deleted.
+     * 
+     * @return <code>true</code> if the command should be enabled, and <code>false</code> otherwise
+     */
+    @Override
+    protected boolean calculateEnabled() {
+        return isDeleteEnabled();
+    }
+
+    /**
+     * Initializes the delete action's text and images.
+     */
+    @Override
+    protected void init() {
+        super.init();
+
+        ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        setText(Messages.ACTION_DELETE);
+        setId(ActionConstants.DELETE_PART);
+        setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
+        setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
+        setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
+        setEnabled(false);
+    }
+
+    /**
+     * Performs the delete action on the selected objects.
+     */
+    @Override
+    public void run() {
+        Command command = this.getDeleteCommand();
+        CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+        if (command != null && command.canExecute() && (cmdStack != null)) {
+            cmdStack.execute(command);
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/MatchSizeAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/MatchSizeAction.java
new file mode 100644 (file)
index 0000000..7bbe630
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+@SuppressWarnings("restriction")
+public class MatchSizeAction extends PartAction {
+
+    public final static String TYPE_WIDTH = "width";
+    public final static String TYPE_HEIGHT = "height";
+    String type = "";
+
+    public MatchSizeAction(IWorkbenchPart part, EditPart rootEditPart, String type) {
+        super(part, rootEditPart);
+        this.type = type;
+        this.initUi();
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        List<Part> orderedParts = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        if (orderedParts.size() > 1 && DesignEditorUtil.isSameParent(orderedParts)
+                && orderedParts.get(0).getParent().getDescriptorId().equals(LayoutSchemaConstants.GRID)) {
+            return true;
+        }
+        return false;
+    }
+
+    private void initUi() {
+        if (this.type.equals(MatchSizeAction.TYPE_WIDTH)) {
+            setId(ActionConstants.MATCH_WIDTH);
+            setText(GEFMessages.MatchWidthAction_Label);
+            // setImageDescriptor(InternalImages.DESC_MATCH_WIDTH);
+            // setDisabledImageDescriptor(InternalImages.DESC_MATCH_WIDTH_DIS);
+            setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_WIDTH_NOR));
+            setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_WIDTH_DIM));
+            setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_WIDTH_MV));
+            setToolTipText(Messages.ACTION_MATCH_WIDTH);
+        } else if (this.type.equals(MatchSizeAction.TYPE_HEIGHT)) {
+            // setText(Messages.ACTION_MATCH_HEIGHT);
+            setId(ActionConstants.MATCH_HEIGHT);
+            setText(GEFMessages.MatchHeightAction_Label);
+            // setImageDescriptor(InternalImages.DESC_MATCH_HEIGHT);
+            // setDisabledImageDescriptor(InternalImages.DESC_MATCH_HEIGHT_DIS);
+            setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_HEIGHT_NOR));
+            setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_HEIGHT_DIM));
+            setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_HEIGHT_MV));
+            setToolTipText(Messages.ACTION_MATCH_HEIGHT);
+        }
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+
+        setEnabled(false);
+    }
+
+    protected Command getCommand(List<Part> selectedParts) {
+        if (selectedParts == null) {
+            throw new IllegalArgumentException();
+        }
+        if (selectedParts.isEmpty()) {
+            return null;
+        }
+
+        CompoundCommand command = new CompoundCommand();
+        Part part = selectedParts.get(0);
+        if (!(part instanceof ComponentPart)) {
+            return command;
+        }
+
+        ComponentPart componentPart = (ComponentPart) part;
+        Rectangle primarySelectionBound = DesignEditorUtil.getPackBound(componentPart, getCurrentConfigurationID());
+        for (int i = 1; i < selectedParts.size(); i++) {
+            part = selectedParts.get(i);
+            if (!(part instanceof ComponentPart)) {
+                continue;
+            }
+            componentPart = (ComponentPart) part;
+            Rectangle partPackBound = DesignEditorUtil.getPackBound(componentPart, getCurrentConfigurationID());
+            if (type.equals(MatchSizeAction.TYPE_WIDTH)) {
+                partPackBound.width = primarySelectionBound.width;
+            } else if (this.type.equals(MatchSizeAction.TYPE_HEIGHT)) {
+                partPackBound.height = primarySelectionBound.height;
+            }
+            command.add(PartUtil.createPackCommand(part, null, partPackBound));
+        }
+        return command;
+    }
+
+    @Override
+    public void run() {
+        List<Part> orderedParts = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        Command command = getCommand(orderedParts);
+        CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+        if (command != null && command.canExecute() && (cmdStack != null)) {
+            cmdStack.execute(command);
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/Messages.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/Messages.java
new file mode 100644 (file)
index 0000000..31e1b7f
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.osgi.util.NLS;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+public class Messages extends NLS {
+
+    private static final String BUNDLE_NAME = Messages.class.getName();
+
+    public static String ACTION_COPY;
+    public static String ACTION_CUT;
+    public static String ACTION_PASTE;
+    public static String ACTION_DELETE;
+    public static String ACTION_MOVE_LEFT;
+    public static String ACTION_MOVE_RIGHT;
+    public static String ACTION_MOVE_UP;
+    public static String ACTION_MOVE_DOWN;
+    public static String ACTION_MOVE_LEFT_DETAIL;
+    public static String ACTION_MOVE_RIGHT_DETAIL;
+    public static String ACTION_MOVE_UP_DETAIL;
+    public static String ACTION_MOVE_DOWN_DETAIL;
+    public static String ACTION_INC_WIDTH;
+    public static String ACTION_DEC_WIDTH;
+    public static String ACTION_INC_HEIGHT;
+    public static String ACTION_DEC_HEIGHT;
+    public static String ACTION_INC_WIDTH_DETAIL;
+    public static String ACTION_DEC_WIDTH_DETAIL;
+    public static String ACTION_INC_HEIGHT_DETAIL;
+    public static String ACTION_DEC_HEIGHT_DETAIL;
+    public static String ACTION_SET_STARTUP_PAGE;
+    public static String ACTION_SHOW_INSPECTOR;
+    public static String ACTION_PASTE_COLOR;
+    public static String ACTION_COPY_MAC;
+    public static String ACTION_CUT_MAC;
+    public static String ACTION_PASTE_MAC;
+
+    public static String ACTION_ALIGN_LEFT;
+    public static String ACTION_ALIGN_TOP;
+    public static String ACTION_ALIGN_RIGHT;
+    public static String ACTION_ALIGN_BOTTOM;
+    public static String ACTION_ALIGN_HORIZONTAL_CENTER;
+    public static String ACTION_ALIGN_VERTICAL_CENTER;
+    public static String ACTION_ALIGN_DISTRIBUTE_HORIZONTALLY;
+    public static String ACTION_ALIGN_DISTRIBUTE_VERTICALLY;
+
+    public static String ACTION_SELECT_PARENT;
+    public static String ACTION_SELECT_CHILD;
+    public static String ACTION_SELECT_PREV_SIBLING;
+    public static String ACTION_SELECT_NEXT_SIBLING;
+
+    public static String ACTION_MATCH_WIDTH;
+    public static String ACTION_MATCH_HEIGHT;
+
+    public static String ACTION_ZORDER_FRONT;
+    public static String ACTION_ZORDER_BACK;
+    public static String ACTION_ZORDER_FRONTWARD;
+    public static String ACTION_ZORDER_BACKWARD;
+    
+    public static String ACTION_ALIGN_STORYBOARD;
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+
+    public static String getCopyShortCut() {
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_MACOSX)) {
+            return ACTION_COPY_MAC;
+        }
+        return ACTION_COPY;
+    }
+
+    public static String getCutShortCut() {
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_MACOSX)) {
+            return ACTION_CUT_MAC;
+        }
+        return ACTION_CUT;
+    }
+
+    public static String getPasteShortCut() {
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_MACOSX)) {
+            return ACTION_PASTE_MAC;
+        }
+        return ACTION_PASTE;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/Messages.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/Messages.properties
new file mode 100644 (file)
index 0000000..bdac135
--- /dev/null
@@ -0,0 +1,49 @@
+ACTION_COPY=&Copy\tCtrl+C
+ACTION_CUT=Cut\tCtrl+X
+ACTION_PASTE=&Paste\tCtrl+V
+ACTION_DELETE=&Delete\tDelete
+ACTION_ALIGN_LEFT=Left\tCtrl+Left
+ACTION_ALIGN_TOP=Top\tCtrl+Up
+ACTION_ALIGN_RIGHT=Right\tCtrl+Right
+ACTION_ALIGN_BOTTOM=Bottom\tCtrl+Down
+ACTION_ALIGN_HORIZONTAL_CENTER=Horizontal Center\tAlt+Shift+Left
+ACTION_ALIGN_VERTICAL_CENTER=Vertical Center\tAlt+Shift+Right
+ACTION_ALIGN_DISTRIBUTE_HORIZONTALLY=Distribute Horizontally\tAlt+Shift+Up
+ACTION_ALIGN_DISTRIBUTE_VERTICALLY=Distribute Vertically\tAlt+Shift+Down
+ACTION_MATCH_WIDTH=Match Width
+ACTION_MATCH_HEIGHT=Match Height
+ACTION_SELECT_PARENT=Parent\tShift+Up
+ACTION_SELECT_CHILD=Child\tShift+Down
+ACTION_SELECT_PREV_SIBLING=Previous Sibling\tShift+Left
+ACTION_SELECT_NEXT_SIBLING=Next Sibling\tShift+Right
+ACTION_MOVE_LEFT=MoveLeft\tLeft
+ACTION_MOVE_RIGHT=MoveRight\tRight
+ACTION_MOVE_UP=MoveUp\tUp
+ACTION_MOVE_DOWN=MoveDown\tDown
+ACTION_MOVE_LEFT_DETAIL=MoveLeftDetail\tCtrl+Left
+ACTION_MOVE_RIGHT_DETAIL=MoveRightDetail\tCtrl+Right
+ACTION_MOVE_UP_DETAIL=MoveUpDetail\tCtrl+Up
+ACTION_MOVE_DOWN_DETAIL=MoveDownDetail\tCtrl+Down
+ACTION_INC_WIDTH=IncWidth\tShift+Right
+ACTION_DEC_WIDTH=DecWidth\tShift+Left
+ACTION_INC_HEIGHT=IncHeight\tShift+Down
+ACTION_DEC_HEIGHT=DecHeight\tShift+Up
+ACTION_INC_WIDTH_DETAIL=IncWidthDetail\tCtrl+Shift+Right
+ACTION_DEC_WIDTH_DETAIL=DecWidthDetail\tCtrl+Shift+Left
+ACTION_INC_HEIGHT_DETAIL=IncHeightDetail\tCtrl+Shift+Down
+ACTION_DEC_HEIGHT_DETAIL=DecHeightDetail\tCtrl+Shift+Up
+ACTION_SET_STARTUP_PAGE=Set Startup View
+ACTION_SHOW_INSPECTOR=ShowInspector\tCtrl+Shift+Alt+I
+ACTION_PASTE_COLOR=PasteColor
+
+ACTION_COPY_MAC=&Copy\tCmd+C
+ACTION_CUT_MAC=Cut\tCmd+X
+ACTION_PASTE_MAC=&Paste\tCmd+V
+
+ACTION_ZORDER_FRONT=Bring to Front
+ACTION_ZORDER_BACK=Send to Back
+ACTION_ZORDER_FRONTWARD=Bring Forward\tCtrl+Shift+F
+ACTION_ZORDER_BACKWARD=Send Backward\tCtrl+Shift+B
+
+ACTION_ALIGN_STORYBOARD=Align Storyboard
+
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/MoveAbsolutePartAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/MoveAbsolutePartAction.java
new file mode 100644 (file)
index 0000000..508a457
--- /dev/null
@@ -0,0 +1,251 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.List;
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+
+
+public class MoveAbsolutePartAction extends PartAction {
+
+    public static int MOVE_DIST = 5;
+    public static int MOVE_DIST_DETAIL = 1;
+
+    private int direction = 0;
+    private int dist = 0;
+    private boolean overflow = false;
+    private boolean pixelBase = false;
+
+    public MoveAbsolutePartAction(IWorkbenchPart part, int direct, int dist, EditPart rootEditPart, boolean overflow, boolean pixelBase) {
+        super(part, rootEditPart);
+        this.direction = direct;
+        this.dist = dist;
+        this.overflow = overflow;
+        this.pixelBase = pixelBase;
+        setLazyEnablementCalculation(false);
+        initUi();
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        List<Part> partList = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        if ((partList.size() > 0) && DesignEditorUtil.isSameParent(partList) && (partList.get(0).getParent() != null)
+                && partList.get(0).getParent().getDescriptorId().equals(LayoutSchemaConstants.GRID)) {
+            return true;
+        }
+        return false;
+    }
+
+    private void initUi() {
+        switch (direction) {
+            case PositionConstants.LEFT:
+                if (dist == MOVE_DIST) {
+                    setId(Messages.ACTION_MOVE_LEFT);
+                } else if (dist == 1) {
+                    setId(Messages.ACTION_MOVE_LEFT_DETAIL);
+                }
+                break;
+            case PositionConstants.RIGHT:
+                if (dist == MOVE_DIST) {
+                    setId(Messages.ACTION_MOVE_RIGHT);
+                } else if (dist == 1) {
+                    setId(Messages.ACTION_MOVE_RIGHT_DETAIL);
+                }
+                break;
+            case PositionConstants.TOP:
+                if (dist == MOVE_DIST) {
+                    setId(Messages.ACTION_MOVE_UP);
+                } else if (dist == 1) {
+                    setId(Messages.ACTION_MOVE_UP_DETAIL);
+                }
+                break;
+            case PositionConstants.BOTTOM:
+                if (dist == MOVE_DIST) {
+                    setId(Messages.ACTION_MOVE_DOWN);
+                } else if (dist == 1) {
+                    setId(Messages.ACTION_MOVE_DOWN_DETAIL);
+                }
+                break;
+        }
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+
+        ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        switch (direction) {
+            case PositionConstants.LEFT:
+                setText(Messages.ACTION_MOVE_LEFT + " (" + dist + ")");
+                break;
+            case PositionConstants.RIGHT:
+                setText(Messages.ACTION_MOVE_RIGHT + " (" + dist + ")");
+                break;
+            case PositionConstants.TOP:
+                setText(Messages.ACTION_MOVE_UP + " (" + dist + ")");
+                break;
+            case PositionConstants.BOTTOM:
+                setText(Messages.ACTION_MOVE_DOWN + " (" + dist + ")");
+                break;
+        }
+        setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
+        setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
+        setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
+        setEnabled(false);
+    }
+
+    protected Command getCommand() {
+        List<Part> partList = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        Part parent = partList.get(0).getParent();
+        EditPart parentEditPart = DesignEditorUtil.getEditPart(rootEditPart, parent);
+
+        Rectangle newOuterBound = new Rectangle();
+        Rectangle parentBound = null;
+
+        if (this.pixelBase == true) {
+            parentBound = DesignEditorUtil.getPartRelatvieBound(parentEditPart);
+            parentBound.x = parentBound.y = 0;
+        } else {
+            parentBound = new Rectangle(0, 0, Integer.parseInt(parent.getPropertyValue(ModelConstants.PROPERTY_VSIZE_W)),
+                                        Integer.parseInt(parent.getPropertyValue(ModelConstants.PROPERTY_VSIZE_H)));
+        }
+
+        // FIXME : this logic is temporary
+        Rectangle outerBound = null;
+        for (int i = 0; i < partList.size(); i++) {
+            Part part = partList.get(i);
+            if (!(part instanceof ComponentPart)) {
+                continue;
+            }
+            ComponentPart componentPart = (ComponentPart) part;
+            EditPart editPart = parentEditPart != null ? DesignEditorUtil.getEditPart(parentEditPart, part) : null;
+            Rectangle bound = null;
+            if (this.pixelBase) {
+                bound = DesignEditorUtil.getPartRelatvieBound(editPart);
+            } else {
+                bound = DesignEditorUtil.getPackBound(componentPart, getCurrentConfigurationID());
+            }
+
+            if (i == 0) {
+                outerBound = bound;
+            } else {
+                if (outerBound == null) {
+                    break;
+                }
+                outerBound = outerBound.union(bound);
+            }
+        }
+
+        // TODO : temporary implementation
+        if (outerBound == null) {
+            return null;
+        }
+
+        newOuterBound.setBounds(outerBound);
+        if (this.overflow == false) {
+            if (parentBound.contains(outerBound) == false) {
+                return null;
+            }
+        }
+
+        switch (direction) {
+            case PositionConstants.LEFT:
+                newOuterBound.x -= dist;
+                if ((this.overflow == false) && (newOuterBound.x < 0)) {
+                    newOuterBound.x = 0;
+                }
+                break;
+            case PositionConstants.RIGHT:
+                newOuterBound.x += dist;
+                if ((this.overflow == false) && ((newOuterBound.x + newOuterBound.width) > parentBound.width)) {
+                    newOuterBound.x = parentBound.width - newOuterBound.width;
+                }
+                break;
+            case PositionConstants.TOP:
+                newOuterBound.y -= dist;
+                if ((this.overflow == false) && (newOuterBound.y < 0)) {
+                    newOuterBound.y = 0;
+                }
+                break;
+            case PositionConstants.BOTTOM:
+                newOuterBound.y += dist;
+                if ((this.overflow == false) && ((newOuterBound.y + newOuterBound.height) > parentBound.height)) {
+                    newOuterBound.y = parentBound.height - newOuterBound.height;
+                }
+                break;
+        }
+
+        CompoundCommand compCmd = new CompoundCommand();
+        for (int i = 0; i < partList.size(); i++) {
+            Part part = partList.get(i);
+            if (!(part instanceof ComponentPart)) {
+                continue;
+            }
+            ComponentPart componentPart = (ComponentPart) part;
+            EditPart editPart = parentEditPart != null ? DesignEditorUtil.getEditPart(parentEditPart, part) : null;
+            Rectangle bound = null;
+            if (this.pixelBase) {
+                bound = DesignEditorUtil.getPartRelatvieBound(editPart);
+            } else {
+                bound = DesignEditorUtil.getPackBound(componentPart, getCurrentConfigurationID());
+            }
+
+            bound.x += (newOuterBound.x - outerBound.x);
+            bound.y += (newOuterBound.y - outerBound.y);
+
+            if (this.pixelBase) {
+                bound = DesignEditorUtil.pixelBoundToGridBound(parentEditPart, bound);
+            }
+
+            compCmd.add(PartUtil.createPackCommand(part, null, bound));
+        }
+
+        return compCmd;
+    }
+
+    @Override
+    public void run() {
+        Command command = getCommand();
+        CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+        if (command != null && command.canExecute() && (cmdStack != null)) {
+            cmdStack.execute(command);
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PartAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PartAction.java
new file mode 100644 (file)
index 0000000..5a567a3
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+
+
+public abstract class PartAction extends SelectionAction {
+
+    protected EditPart rootEditPart;
+
+    public PartAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part);
+        this.rootEditPart = rootEditPart;
+    }
+
+    protected boolean isSameParent(List<Part> partList) {
+        if (partList.size() > 1) {
+            Part previousParent = partList.get(0).getParent();
+            for (int i = 1; i < partList.size(); i++) {
+                if (previousParent != partList.get(i).getParent()) {
+                    return false;
+                }
+            }
+
+        }
+        return true;
+    }
+    
+    protected boolean hasEventPart(List<Part> partList) {
+        for(Part part : partList) {
+            if (part instanceof EventPart) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    protected ConfigurationPart getCurrentConfiguration() {
+        DesignViewer viewer = (DesignViewer) rootEditPart.getViewer();
+        if (viewer == null) {
+            return null;
+        }
+        return viewer.getMScreenQualifierManager().getCurrentConfigurePart();
+    }
+
+    protected MScreenQualifierManager getMScreenQualifierManager() {
+        DesignViewer viewer = (DesignViewer) rootEditPart.getViewer();
+        if (viewer == null) {
+            return null;
+        }
+        return viewer.getMScreenQualifierManager();
+    }
+
+    protected String getCurrentConfigurationID() {
+        ConfigurationPart configPart = getCurrentConfiguration();
+        if (configPart == null) {
+            return null;
+        }
+        return configPart.getPropertyValue(LayoutSchemaConstants.ID);
+    }
+    
+    public void updateEnabled() {
+        setEnabled(calculateEnabled());
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PartBoundSet.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PartBoundSet.java
new file mode 100644 (file)
index 0000000..d6c1ac2
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+public class PartBoundSet implements Cloneable {
+    public Part part;
+    public Rectangle bound;
+
+    public PartBoundSet(Part part, Rectangle bound) {
+        this.part = part;
+        this.bound = bound;
+    }
+
+    public Object clone() throws CloneNotSupportedException {        
+        PartBoundSet obj = (PartBoundSet) super.clone();
+        obj.part = part;
+        obj.bound = new Rectangle(this.bound);
+        return obj;        
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PastePartAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PastePartAction.java
new file mode 100644 (file)
index 0000000..6789af3
--- /dev/null
@@ -0,0 +1,409 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.ui.actions.Clipboard;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.gef.commands.ComponentCopyData;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+/**
+ * An action to paste {@link Part}s.
+ */
+public class PastePartAction extends PartAction {
+
+    /**
+     * A root {@link EditPart}.
+     */
+    static final int BASE_PASTE_MARGIN = 30;
+    static final int BASE_PASTE_POX_X = 0;
+    static final int BASE_PASTE_POX_Y = 0;
+    Part pasteTarget = null;
+
+    /**
+     * Creates a {@link PastePartAction} and associates it with the given workbench part.
+     * 
+     * @param part
+     *            the workbench part
+     * @param rootEditPart
+     *            a root {@link EditPart}
+     */
+    public PastePartAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart);
+        setLazyEnablementCalculation(true);
+    }
+
+    /**
+     * Returns <code>true</code> if the selected objects can be pasted.
+     * 
+     * @return <code>true</code> if the command should be enabled, and <code>false</code> otherwise
+     */
+    @Override
+    protected boolean calculateEnabled() {
+        pasteTarget = getPasteTarget();
+        if (pasteTarget != null) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+
+        ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        setText(Messages.getPasteShortCut());
+        setId(ActionConstants.PASTE_PART);
+        setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
+        setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
+        setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
+        setEnabled(false);
+    }
+
+    /**
+     * Performs the paste action.
+     */
+    @Override
+    public void run() {
+        Command command = getCommand();
+        if (command != null) {
+            CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+            cmdStack.execute(command);
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    private List<ComponentCopyData> getCopiedDataList() {
+        Object clipboardContents = Clipboard.getDefault().getContents();
+        if (clipboardContents == null) {
+            return null;
+        }
+
+        List<?> componentCopiedData = null;
+        if (clipboardContents instanceof List<?>) {
+            componentCopiedData = (List<?>) clipboardContents;
+            if (componentCopiedData.get(0) instanceof ComponentCopyData) {
+                return (List<ComponentCopyData>) componentCopiedData;
+            }
+        }
+        return null;
+    }
+
+    private Rectangle adjustedGridPasteBound(Rectangle parentBound, Rectangle pasteBound) {
+        Rectangle adjustedBound = new Rectangle().setBounds(pasteBound);
+        adjustedBound.x = BASE_PASTE_POX_X;
+        adjustedBound.y = BASE_PASTE_POX_Y;
+
+        if (parentBound.width < pasteBound.width) {
+            adjustedBound.width = parentBound.width;
+        }
+        if (parentBound.height < pasteBound.height) {
+            adjustedBound.height = parentBound.height;
+        }
+
+        double ratioW = adjustedBound.width / (double) pasteBound.width;
+        double ratioH = adjustedBound.height / (double) pasteBound.height;
+
+        double minRatio = Math.min(ratioW, ratioH);
+
+        adjustedBound.width = (int) (pasteBound.width * minRatio);
+        adjustedBound.height = (int) (pasteBound.height * minRatio);
+
+        return adjustedBound;
+    }
+
+    private List<Rectangle> getPastableBounds(Rectangle parentBound, Rectangle baseBound) {
+        List<Rectangle> boundList = new ArrayList<Rectangle>();
+        if (((baseBound.x + baseBound.width <= parentBound.width) && (baseBound.y + baseBound.height <= parentBound.height)) == false) {
+            baseBound = adjustedGridPasteBound(parentBound, baseBound);
+        }
+        boolean boundChanged = false;
+        boundList.add(new Rectangle(baseBound));
+
+        Rectangle pasteBound = new Rectangle(baseBound);
+        boolean initBaseBound = false;
+        while (true) {
+
+            boundChanged = false;
+            if ((pasteBound.x + pasteBound.width + BASE_PASTE_MARGIN) <= parentBound.width) {
+                pasteBound.x += BASE_PASTE_MARGIN;
+                boundChanged = true;
+            }
+            if ((pasteBound.y + pasteBound.height + BASE_PASTE_MARGIN) <= parentBound.height) {
+                pasteBound.y += BASE_PASTE_MARGIN;
+                boundChanged = true;
+            }
+
+            if (pasteBound.equals(baseBound.x, baseBound.y, baseBound.width, baseBound.height)) {
+                break;
+            }
+
+            if (boundChanged) {
+                boundList.add(new Rectangle(pasteBound));
+            } else {
+                if (initBaseBound == false) {
+                    initBaseBound = true;
+                    pasteBound.setBounds(BASE_PASTE_POX_X, BASE_PASTE_POX_Y, baseBound.width, baseBound.height);
+                } else {
+                    break;
+                }
+            }
+        }
+
+        return boundList;
+    }
+
+    // this method for grid container
+    private Rectangle getPastePackBound(Part targetParent, ComponentPart newPart, Rectangle absoluteBound) {
+
+        Rectangle parentBound = new Rectangle(0, 0, Integer.parseInt(targetParent.getPropertyValue(LayoutSchemaConstants.GRID_VSIZE_W)),
+                                              Integer.parseInt(targetParent.getPropertyValue(LayoutSchemaConstants.GRID_VSIZE_H)));
+        List<Part> siblings = targetParent.getComponentChildren();
+        List<Rectangle> pasteBoundList =
+                getPastableBounds(parentBound,
+                                  DesignEditorUtil
+                                          .pixelBoundToGridBound((EditPart) this.rootEditPart.getViewer().getEditPartRegistry().get(targetParent.getUniqueId()),
+                                                                 absoluteBound));
+        // pasteBoundList = getPastableBounds(parentBound,
+        // DesignEditorUtil.getPackBound(LayoutSchemaConstants.GRID, newPart,
+        // getCurrentConfigurationID()));
+
+        if (pasteBoundList.size() > 0) {
+            Rectangle siblingPackBound = null;
+            Rectangle pastePackBound = null;
+            boolean found = false;
+            boolean exist = false;
+            for (int i = 0; i < pasteBoundList.size(); i++) {
+                pastePackBound = pasteBoundList.get(i);
+
+                exist = false;
+                for (int j = 0; j < siblings.size(); j++) {
+                    Part part = siblings.get(j);
+                    if (!(part instanceof ComponentPart)) {
+                        continue;
+                    }
+                    siblingPackBound = DesignEditorUtil.getPackBound((ComponentPart) part, getCurrentConfigurationID());
+                    if ((siblings.get(j).getDescriptorId().equals(newPart.getDescriptorId())) && siblingPackBound.equals(pastePackBound)) {
+                        exist = true;
+                        break;
+                    }
+                }
+                if (exist == false) {
+                    found = true;
+                    break;
+                }
+            }
+            if (found) {
+                return pastePackBound;
+            } else {
+                EditPart editPart = DesignEditorUtil.getEditPart(rootEditPart, targetParent);
+                if (editPart != null) {
+                    return DesignEditorUtil.pixelBoundToGridBound(editPart.getParent(), pasteBoundList.get(0));
+                } else {
+                    return null;
+                }
+            }
+        } else {
+            return null;
+        }
+
+    }
+
+    private Part getPasteTarget() {
+        List<ComponentCopyData> copiedDataList = this.getCopiedDataList();
+        List<Part> selection = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        Part parent = null;
+        Part baseSourcePart = null;
+        Part baseSourceParentPart = null;
+        Part baseTargetPart = null;
+        // String containerType = "";
+
+        if ((selection.size() == 0) || (isSameParent(selection) == false) || (copiedDataList == null) || (copiedDataList.size() < 1)) {
+            return null;
+        }
+
+        baseTargetPart = selection.get(0);
+        baseSourcePart = copiedDataList.get(0).clonedPart;
+        baseSourceParentPart = copiedDataList.get(0).clonedParentPart;
+
+        if (baseTargetPart.getOwnerDocumentPart() == null) { // check removed
+            return null;
+        }
+
+        ComponentDescriptor componentDescriptor = baseTargetPart.getOwnerDocumentPart().getComponentDescriptor();
+        if (baseSourcePart instanceof ViewPart) {
+            if (baseTargetPart instanceof ViewPart) {
+                parent = baseTargetPart.getParent();
+            } else {
+                return null;
+            }
+        } else if (baseTargetPart instanceof ComponentPart) {
+            if ((copiedDataList.size() == 1) && (baseSourcePart.getUniqueId() == baseTargetPart.getUniqueId())) {
+                parent = baseTargetPart.getParent();
+            } else if (DesignEditorUtil.isItemPart(baseSourcePart)) {
+                // item component
+                if (selection.size() == 1 && DesignEditorUtil.isItemContainerPart(baseTargetPart)
+                        && baseSourceParentPart.getDescriptorId().equals(baseTargetPart.getDescriptorId())) {
+                    parent = baseTargetPart;
+                } else if (DesignEditorUtil.isItemPart(baseTargetPart)
+                        && baseSourcePart.getDescriptorId().equals(baseTargetPart.getDescriptorId())) {
+                    parent = baseTargetPart.getParent();
+                }
+            } else {
+                // component
+                if (baseTargetPart instanceof ViewPart) {
+                    if (baseTargetPart.getComponentChildren().isEmpty() && componentDescriptor.isContainer((ComponentPart) baseSourcePart) == true) {
+
+                    }
+                } else if (selection.size() == 1 && componentDescriptor.isContainer((ComponentPart) baseTargetPart)) {
+                    parent = baseTargetPart;
+                }
+            }
+        }
+
+        if ((parent != null) && (parent.getDescriptorId() != null)) {
+            return parent;
+        }
+
+        return null;
+    }
+
+    protected Command getCommand() {
+        List<ComponentCopyData> copiedDataList = this.getCopiedDataList();
+        List<Part> selection = CommandUtil.getPartsFromSelectedObjects(getSelectedObjects());
+        Part parent = pasteTarget;
+        Part nextSibling = null;
+        Part baseTargetPart = null;
+        ComponentPart newPart = null;
+        String containerType = "";
+        CompoundCommand compCmd = null;
+        boolean bUseNextSibling = false;
+        baseTargetPart = selection.get(0);
+
+        if (null == parent || null == copiedDataList) {
+            return null;
+        }
+        DocumentPart documentPart = parent.getOwnerDocumentPart();
+        List<Point> emptyCellPosList = null;
+        containerType = parent.getDescriptorId();
+
+        if (DesignEditorUtil.isItemContainerPart(parent)) {
+            if (selection.size() == 1 && DesignEditorUtil.isItemPart(baseTargetPart)) {
+                bUseNextSibling = true;
+            }
+        } else if (containerType != null) {
+            if (containerType.equals(LayoutSchemaConstants.BOX) && ((selection.size() == 1) && (selection.get(0) != parent))) {
+                bUseNextSibling = true;
+            } else if (containerType.equals(LayoutSchemaConstants.BOX) && (selection.size() == 1) && (selection.get(0) != parent)) {
+                bUseNextSibling = true;
+            } else if (containerType.equals(LayoutSchemaConstants.VIEWS)) {
+                bUseNextSibling = true;
+            }
+        } else {
+            return null;
+        }
+
+        if (bUseNextSibling == true) {
+            nextSibling = baseTargetPart.getNextSibling();
+        }
+
+        for (int i = 0; i < copiedDataList.size(); i++) {
+            ComponentCopyData copiedData = copiedDataList.get(i);
+            Part clonedPart = copiedData.clonedPart;
+            if (!(clonedPart instanceof ComponentPart)) {
+                continue;
+            }
+            newPart = (ComponentPart) PartUtil.clone(copiedData.clonedPart);
+            copiedData.clonedPart = newPart;
+            // set position
+            boolean appendable = true;
+            if (containerType != null) {
+                if (containerType.equals(LayoutSchemaConstants.GRID)) {
+                    Rectangle pasteBound = this.getPastePackBound(parent, newPart, copiedData.absoluteBound);
+                    if (pasteBound == null) {
+                        return null;
+                    }
+                    DesignEditorUtil.setGridPackBound(newPart, pasteBound);
+                } else if (containerType.equals(LayoutSchemaConstants.BOX)) {
+
+                } else if (containerType.equals(LayoutSchemaConstants.TABLE)) {
+                    if (emptyCellPosList == null) {
+                        emptyCellPosList = DesignEditorUtil.getEmptyTableCellPosList(parent, getCurrentConfigurationID());
+                    }
+                    Rectangle packBound = new Rectangle(0, 0, 1, 1);
+                    if (emptyCellPosList.size() > 0) {
+                        packBound.x = emptyCellPosList.get(0).x;
+                        packBound.y = emptyCellPosList.get(0).y;
+                        emptyCellPosList.remove(0);
+                    } else {
+                        packBound.x = 0;
+                        packBound.y = 0;
+                    }
+                    DesignEditorUtil.setTablePackBound(newPart, packBound);
+                } else if (containerType.equals(LayoutSchemaConstants.PANES)) {
+                    if (emptyCellPosList == null) {
+                        emptyCellPosList = DesignEditorUtil.getEmptyPaneCellPosList(parent, getCurrentConfigurationID());
+                    }
+                    Rectangle packBound = new Rectangle(0, 0, 0, 0);
+                    if (emptyCellPosList.size() > 0) {
+                        packBound.x = emptyCellPosList.get(0).x;
+                        emptyCellPosList.remove(0);
+                    } else {
+                        appendable = false;
+                    }
+                    DesignEditorUtil.setPanesPackBound(newPart, packBound);
+                }
+            }
+            if (appendable) {
+                if (compCmd == null) {
+                    compCmd = new CompoundCommand();
+                }
+                documentPart.setPartPropertyIdRecursive(newPart);
+                compCmd.add(PartUtil.createAddPartCommand(parent, newPart, nextSibling));
+            }
+        }
+        return compCmd;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PastePartColorAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/PastePartColorAction.java
new file mode 100644 (file)
index 0000000..df948d7
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.ui.actions.Clipboard;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.gef.commands.ComponentCopyData;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+/**
+ * An action to paste {@link Part}s.
+ */
+public class PastePartColorAction extends PartAction {
+
+    /**
+     * Creates a {@link PastePartColorAction} and associates it with the given workbench part.
+     * 
+     * @param part
+     *            the workbench part
+     * @param rootEditPart
+     *            a root {@link EditPart}
+     */
+    public PastePartColorAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart);
+        setLazyEnablementCalculation(true);
+    }
+
+    /**
+     * Returns <code>true</code> if the selected objects can be pasted.
+     * 
+     * @return <code>true</code> if the command should be enabled, and <code>false</code> otherwise
+     */
+    @Override
+    protected boolean calculateEnabled() {
+        Part srcPart = this.getSourcePart();
+        List<Part> targetParts = this.getTargetParts();
+        if (srcPart != null && targetParts != null && !targetParts.isEmpty()) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+
+        // ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        setText(Messages.ACTION_PASTE_COLOR);
+        setId(ActionConstants.PASTE_PART_COLOR);
+        // setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
+        // setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
+        // setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
+        setEnabled(false);
+    }
+
+    /**
+     * Performs the paste action.
+     */
+    @Override
+    public void run() {
+        Command command = getCommand();
+        if (command != null) {
+            CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+            cmdStack.execute(command);
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    private List<ComponentCopyData> getCopiedDataList() {
+        Object clipboardContents = Clipboard.getDefault().getContents();
+        if (clipboardContents == null) {
+            return null;
+        }
+
+        List<?> componentCopiedData = null;
+        if (clipboardContents instanceof List<?>) {
+            componentCopiedData = (List<?>) clipboardContents;
+            if (componentCopiedData.get(0) instanceof ComponentCopyData) {
+                return (List<ComponentCopyData>) componentCopiedData;
+            }
+        }
+        return null;
+    }
+
+    private Part getSourcePart() {
+        List<ComponentCopyData> copiedDataList = getCopiedDataList();
+        if ((copiedDataList != null) && (copiedDataList.size() == 1)) {
+            return copiedDataList.get(0).clonedPart;
+        }
+        return null;
+    }
+
+    private List<Part> getTargetParts() {
+        List<Part> selection = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        if (selection.size() >= 1 && getSourcePart() != null &&
+                getSourcePart().getDescriptorId().equals(selection.get(0).getDescriptorId())) {
+            for (int i = 1; i < selection.size(); i++) {
+                if (!selection.get(i).getDescriptorId().equals(selection.get(i - 1).getDescriptorId())) {
+                    return null;
+                }
+            }
+            return selection;
+        }
+        return null;
+    }
+
+    private Command getColorCopyCommand(Part srcPart, Part targetPart) {
+        if (srcPart.hasProperty(LayoutSchemaConstants.COLORS) == true) {
+            return PartUtil.createSetPropertyCommand(targetPart, LayoutSchemaConstants.COLORS, srcPart.getPropertyValue(LayoutSchemaConstants.COLORS));
+        } else {
+            // FIX ME : use remove propery command
+            return PartUtil.createSetPropertyCommand(targetPart, LayoutSchemaConstants.COLORS, "");
+        }
+    }
+
+    protected Command getCommand() {
+        Part srcPart = getSourcePart();
+        List<Part> targetParts = getTargetParts();
+        CompoundCommand cmd = new CompoundCommand();
+        if (srcPart != null) {
+            for (int i = 0; i < targetParts.size(); i++) {
+                cmd.add(getColorCopyCommand(srcPart, targetParts.get(i)));
+            }
+        }
+        return cmd;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectChildPartAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectChildPartAction.java
new file mode 100644 (file)
index 0000000..87ed9fc
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class SelectChildPartAction extends ChangePartSelectionAction {
+
+    public SelectChildPartAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, ChangePartSelectionAction.TYPE_CHILD);
+    }
+
+    protected void init() {
+        super.init();
+        setText(Messages.ACTION_SELECT_CHILD);
+        setId(ActionConstants.SELECT_CHILD);
+        // ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        // setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        // setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        // setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
+        setEnabled(false);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectNextSiblingPartAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectNextSiblingPartAction.java
new file mode 100644 (file)
index 0000000..250ec12
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class SelectNextSiblingPartAction extends ChangePartSelectionAction {
+
+    public SelectNextSiblingPartAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, ChangePartSelectionAction.TYPE_PREV_SIBLING);
+    }
+
+    protected void init() {
+        super.init();
+        setText(Messages.ACTION_SELECT_PREV_SIBLING);
+        setId(ActionConstants.SELECT_PREV_SIBLING);
+        // ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        // setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        // setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        // setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
+        setEnabled(false);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectParentPartAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectParentPartAction.java
new file mode 100644 (file)
index 0000000..853f6b7
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class SelectParentPartAction extends ChangePartSelectionAction {
+
+    public SelectParentPartAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, ChangePartSelectionAction.TYPE_PARENT);
+    }
+
+    protected void init() {
+        super.init();
+
+        setText(Messages.ACTION_SELECT_PARENT);
+        setId(ActionConstants.SELECT_PARENT);
+        // ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        // setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        // setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        // setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
+        setEnabled(false);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectPreviousSiblingPartAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SelectPreviousSiblingPartAction.java
new file mode 100644 (file)
index 0000000..05c73fb
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class SelectPreviousSiblingPartAction extends ChangePartSelectionAction {
+
+    public SelectPreviousSiblingPartAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart, ChangePartSelectionAction.TYPE_NEXT_SIBLING);
+    }
+
+    protected void init() {
+        super.init();
+        setText(Messages.ACTION_SELECT_NEXT_SIBLING);
+        setId(ActionConstants.SELECT_NEXT_SIBLING);
+        // ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        // setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        // setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+        // setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
+        setEnabled(false);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SetStartupViewAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/SetStartupViewAction.java
new file mode 100644 (file)
index 0000000..b4692bb
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.views.outline.Messages;
+
+
+/**
+ * An action to paste {@link Part}s.
+ */
+public class SetStartupViewAction extends PartAction {
+
+    /**
+     * A root {@link EditPart}.
+     */
+    static final int BASE_PASTE_MARGIN = 10;
+    static final int BASE_PASTE_POX_X = 0;
+    static final int BASE_PASTE_POX_Y = 0;
+
+    /**
+     * Creates a {@link SetStartupViewAction} and associates it with the given workbench part.
+     * 
+     * @param part
+     *            the workbench part
+     * @param rootEditPart
+     *            a root {@link EditPart}
+     */
+    public SetStartupViewAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart);
+        setLazyEnablementCalculation(true);
+    }
+
+    /**
+     * Returns <code>true</code> if the selected objects can be pasted.
+     * 
+     * @return <code>true</code> if the command should be enabled, and <code>false</code> otherwise
+     */
+    @Override
+    protected boolean calculateEnabled() {
+        List<Part> selection = CommandUtil.getPartsFromSelectedObjects(getSelectedObjects());
+        Part parent = null;
+        Part part = null;
+        if (selection.size() == 1 && selection.get(0) instanceof ViewPart
+                && LayoutSchemaConstants.VIEW.equals(selection.get(0).getPropertyValue(LayoutSchemaConstants.TYPE))) {
+            part = selection.get(0);
+            parent = part.getParent();
+            if (parent != null && !parent.getPropertyValue(LayoutSchemaConstants.STARTUP).equals(part.getPropertyValue(LayoutSchemaConstants.ID))) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+
+        ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+        setText(Messages.ACTION_SET_MAIN_VIEW_TITLE);
+        setId(ActionConstants.SET_STARTUP_VIEW);
+        setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
+        setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
+        setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
+    }
+
+    /**
+     * Performs the paste action.
+     */
+    @Override
+    public void run() {
+        Command command = getCommand();
+        if (command != null) {
+            CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+            cmdStack.execute(command);
+        }
+    }
+
+    protected Command getCommand() {
+        List<Part> selection = CommandUtil.getPartsFromSelectedObjects(getSelectedObjects());
+        Part part = selection.get(0);
+        Part parent = part.getParent();
+        return PartUtil.createSetPropertyCommand(parent, LayoutSchemaConstants.STARTUP, part.getPropertyValue(LayoutSchemaConstants.ID));
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/StoryboardAutoLayoutAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/StoryboardAutoLayoutAction.java
new file mode 100644 (file)
index 0000000..a0942c6
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.gef.editparts.DesignRootEditPart;
+import org.tizen.efluibuilder.gef.viewer.DesignStoryboardUtil;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class StoryboardAutoLayoutAction extends PartAction {
+
+    /**
+     * Creates a {@link StoryboardAutoLayoutAction} and associates it with the given workbench part.
+     * 
+     * @param part
+     *            the workbench part
+     * @param rootEditPart
+     *            a root {@link EditPart}
+     */
+    public StoryboardAutoLayoutAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart);
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        if (((DesignRootEditPart) rootEditPart).getContents().getChildren().size() > 0) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+
+        setText(Messages.ACTION_ALIGN_STORYBOARD);
+        setId(ActionConstants.ALIGN_STORYBOARD);
+
+        setEnabled(true);
+    }
+
+    @Override
+    public void run() {
+        if (((DesignRootEditPart) rootEditPart).getContents().getChildren().size() > 0) {
+            MScreenQualifierManager mscreenManager = getMScreenQualifierManager();
+            if (mscreenManager == null) {
+                return;
+            }
+            Command cmd =
+                    DesignStoryboardUtil.getStoryboardReconstructCommand((Part) ((DesignRootEditPart) rootEditPart).getContents().getModel(),
+                                                                         mscreenManager.getScreenSize());
+            if (cmd != null) {
+                CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+                cmdStack.execute(cmd);
+            }
+            if (rootEditPart.getViewer() instanceof DesignViewer) {
+                ((DesignViewer) rootEditPart.getViewer()).setFitMode(true);
+            }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderAction.java
new file mode 100644 (file)
index 0000000..7f54182
--- /dev/null
@@ -0,0 +1,226 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.gef.commands.CommandUtil;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+
+
+public abstract class ZorderAction extends PartAction {
+
+    protected PriorityAction actionType;
+
+    public enum PriorityAction {
+        BACK, BACKWARD, FRONT, FRONTWARD
+    }
+
+    static class OrderAscCompare implements Comparator<Part>, Serializable {
+        private static final long serialVersionUID = 8629981561917621767L;
+
+        @Override
+        public int compare(Part arg0, Part arg1) {
+            Part parentPart = arg0.getParent();
+            int arg0Idx = parentPart.getChildren().indexOf(arg0);
+            int arg1Idx = parentPart.getChildren().indexOf(arg1);
+            if (arg0Idx < arg1Idx) {
+                return -1;
+            } else if (arg0Idx == arg1Idx) {
+                return 0;
+            }
+            return 1;
+        }
+
+    }
+
+    static class OrderDescCompare implements Comparator<Part>, Serializable {
+        private static final long serialVersionUID = 4820256546568763383L;
+
+        @Override
+        public int compare(Part arg0, Part arg1) {
+            Part parentPart = arg0.getParent();
+            int arg0Idx = parentPart.getChildren().indexOf(arg0);
+            int arg1Idx = parentPart.getChildren().indexOf(arg1);
+            if (arg0Idx > arg1Idx) {
+                return -1;
+            } else if (arg0Idx == arg1Idx) {
+                return 0;
+            }
+            return 1;
+        }
+
+    }
+
+    public ZorderAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart);
+    }
+
+    protected void setPriorityType(PriorityAction action) {
+        this.actionType = action;
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        List<Part> orderedParts = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        if ((orderedParts.size() <= 0) || (orderedParts.get(0).getParent() == null) || (DesignEditorUtil.isSameParent(orderedParts) == false)
+                || !(orderedParts.get(0).getParent().getDescriptorId().equals(LayoutSchemaConstants.GRID) 
+//                        || orderedParts.get(0).getDescriptorId().equals(LayoutSchemaConstants.VIEW)
+                        || orderedParts.get(0).getDescriptorId().equals(LayoutSchemaConstants.TABLE) || orderedParts.get(0).getDescriptorId().equals(LayoutSchemaConstants.BOX))) {
+            return false;
+        }
+
+        for (Part sibling : orderedParts.get(0).getParent().getComponentChildren()) {
+            for (Part target : orderedParts) {
+                if (orderedParts.contains(sibling)) {
+                    continue;
+                }
+                if (actionType == PriorityAction.BACK || actionType == PriorityAction.BACKWARD) {
+                    if (sibling.getIndex() < target.getIndex()) {
+                        return true;
+                    }
+                } else if (actionType == PriorityAction.FRONT || actionType == PriorityAction.FRONTWARD) {
+                    if (sibling.getIndex() > target.getIndex()) {
+                        return true;
+                    }
+                }
+
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public void run() {
+        List<Part> orderedParts = CommandUtil.getWidgetPartsFromSelectedObjects(getSelectedObjects());
+        Collections.sort(orderedParts, new OrderAscCompare());
+
+        CompoundCommand cmdCompound = new CompoundCommand();
+        List<Part> unselectedParts = orderedParts.get(0).getParent().getChildren();
+        for (Part part : orderedParts) {
+            unselectedParts.remove(part);
+        }
+
+        Part target = null;
+        Part nextSibling = null;
+        int lastMovedIndex = 0;
+        Part parent = orderedParts.get(0).getParent();
+        Part remainsPart = null;
+        ArrayList<Part> remainsUnselectedParts = new ArrayList<Part>();
+        int targetIndex = 0;
+        List<Part> reOrderedChildren = parent.getChildren();
+
+        if (actionType == PriorityAction.BACK) {
+            nextSibling = unselectedParts.get(0);
+            for (int i = 0; i < orderedParts.size(); i++) {
+                target = orderedParts.get(i);
+                cmdCompound.add(PartUtil.createChangePartOrderCommand(target, nextSibling));
+            }
+        } else if (actionType == PriorityAction.BACKWARD) {
+            remainsUnselectedParts.clear();
+            remainsUnselectedParts.addAll(unselectedParts);
+            lastMovedIndex = parent.getChildren().size();
+            Part temp = null;
+
+            for (int i = orderedParts.size() - 1; i >= 0; i--) {
+                target = orderedParts.get(i);
+                if (target.getIndex() >= lastMovedIndex) {
+                    continue;
+                }
+                for (int j = remainsUnselectedParts.size() - 1; j >= 0; j--) {
+                    remainsPart = remainsUnselectedParts.get(j);
+                    if (remainsPart.getIndex() < target.getIndex()) {
+                        temp = reOrderedChildren.get(remainsPart.getIndex());
+                        if (target.getIndex() < reOrderedChildren.size() - 1) {
+                            nextSibling = reOrderedChildren.get(target.getIndex() + 1);
+                        } else {
+                            nextSibling = null;
+                        }
+
+                        targetIndex = target.getIndex();
+                        reOrderedChildren.remove(temp);
+                        reOrderedChildren.add(targetIndex, temp);
+                        cmdCompound.add(PartUtil.createChangePartOrderCommand(remainsPart, nextSibling));
+                        lastMovedIndex = remainsPart.getIndex();
+                        remainsUnselectedParts.remove(remainsPart);
+                        break;
+                    }
+                }
+            }
+        } else if (actionType == PriorityAction.FRONT) {
+            nextSibling = null;
+            for (int i = 0; i < orderedParts.size(); i++) {
+                target = orderedParts.get(i);
+                cmdCompound.add(PartUtil.createChangePartOrderCommand(target, nextSibling));
+            }
+        } else if (actionType == PriorityAction.FRONTWARD) {
+            remainsUnselectedParts.clear();
+            remainsUnselectedParts.addAll(unselectedParts);
+            lastMovedIndex = -1;
+            Part temp;
+            for (int i = 0; i < orderedParts.size(); i++) {
+                target = orderedParts.get(i);
+                if (target.getIndex() <= lastMovedIndex) {
+                    continue;
+                }
+                for (int j = 0; j < remainsUnselectedParts.size(); j++) {
+                    remainsPart = remainsUnselectedParts.get(j);
+                    if (remainsPart.getIndex() > target.getIndex()) {
+                        temp = reOrderedChildren.get(remainsPart.getIndex());
+                        if (target.getIndex() < reOrderedChildren.size() - 1) {
+                            nextSibling = reOrderedChildren.get(target.getIndex());
+                        } else {
+                            nextSibling = null;
+                        }
+
+                        targetIndex = target.getIndex();
+                        reOrderedChildren.remove(temp);
+                        reOrderedChildren.add(targetIndex, temp);
+
+                        cmdCompound.add(PartUtil.createChangePartOrderCommand(remainsPart, target));
+                        lastMovedIndex = remainsPart.getIndex();
+                        remainsUnselectedParts.remove(remainsPart);
+                        break;
+                    }
+                }
+            }
+        }
+
+        CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+        if (cmdCompound != null && cmdCompound.size() > 0 && cmdCompound.canExecute() && (cmdStack != null)) {
+            cmdStack.execute(cmdCompound);
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderBackAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderBackAction.java
new file mode 100644 (file)
index 0000000..18dc94f
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class ZorderBackAction extends ZorderAction {
+    public ZorderBackAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart);
+    }
+
+    protected void init() {
+        super.init();
+        setId(ActionConstants.ZORDER_BACK);
+        setText(Messages.ACTION_ZORDER_BACK);
+        // setToolTipText();
+        // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM);
+        // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM_DIS);
+        setEnabled(false);
+        setPriorityType(PriorityAction.BACK);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderBackwardAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderBackwardAction.java
new file mode 100644 (file)
index 0000000..6055706
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class ZorderBackwardAction extends ZorderAction {
+    public ZorderBackwardAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart);
+    }
+
+    protected void init() {
+        super.init();
+        setId(ActionConstants.ZORDER_BACKWARD);
+        setText(Messages.ACTION_ZORDER_BACKWARD);
+        // setToolTipText();
+        // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM);
+        // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM_DIS);
+        setEnabled(false);
+        setPriorityType(PriorityAction.BACKWARD);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderFrontAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderFrontAction.java
new file mode 100644 (file)
index 0000000..dd92fde
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class ZorderFrontAction extends ZorderAction {
+    public ZorderFrontAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart);
+    }
+
+    protected void init() {
+        super.init();
+        setId(ActionConstants.ZORDER_FRONT);
+        setText(Messages.ACTION_ZORDER_FRONT);
+        // setToolTipText();
+        // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM);
+        // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM_DIS);
+        setEnabled(false);
+        setPriorityType(PriorityAction.FRONT);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderFrontwardAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/actions/ZorderFrontwardAction.java
new file mode 100644 (file)
index 0000000..3c6ce3b
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class ZorderFrontwardAction extends ZorderAction {
+    public ZorderFrontwardAction(IWorkbenchPart part, EditPart rootEditPart) {
+        super(part, rootEditPart);
+    }
+
+    protected void init() {
+        super.init();
+        setId(ActionConstants.ZORDER_FRONTWARD);
+        setText(Messages.ACTION_ZORDER_FRONTWARD);
+        // setToolTipText();
+        // setImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM);
+        // setDisabledImageDescriptor(InternalImages.DESC_VERT_ALIGN_BOTTOM_DIS);
+        setEnabled(false);
+        setPriorityType(PriorityAction.FRONTWARD);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/CommandUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/CommandUtil.java
new file mode 100644 (file)
index 0000000..c704e94
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+/**
+ * An utility class of commands.
+ */
+public class CommandUtil {
+
+    /**
+     * Constructor.
+     */
+    public CommandUtil() {
+    }
+
+    /**
+     * Gets the last located {@link Part} of selected {@link Part}.
+     * 
+     * @param rootEditPart
+     *            a root edit part
+     * @param selectedObjects
+     *            a List containing selected object
+     * @return the last located {@link Part} if it is exist, and <code>null</code> otherwise
+     */
+    public static Part getLastPart(EditPart rootEditPart, List<?> selectedObjects) {
+        List<Part> orderedParts = getOrderedParts(rootEditPart, selectedObjects);
+
+        if (orderedParts.size() > 0) {
+            return orderedParts.get(orderedParts.size() - 1);
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * Gets a List containing ordered selected {@link Part}.
+     * 
+     * @param rootEditPart
+     *            a root edit part
+     * @param selectedObjects
+     *            a List containing selected object
+     * @return List containing ordered selected {@link Part}
+     */
+    public static List<Part> getOrderedParts(EditPart rootEditPart, List<?> selectedObjects) {
+        List<Part> selectedParts = new ArrayList<Part>();
+        for (Object obj : selectedObjects) {
+            if (obj instanceof EditPart && ((EditPart) obj).getModel() instanceof Part) {
+                Part part = (Part) (((EditPart) obj).getModel());
+                selectedParts.add(part);
+            }
+        }
+
+        List<Part> orderedParts = new ArrayList<Part>();
+
+        sortPart(rootEditPart, selectedParts, orderedParts);
+
+        return orderedParts;
+    }
+
+    public static List<Part> getPartsFromSelectedObjects(List<?> selectedObjects) {
+        List<Part> selectedParts = new ArrayList<Part>();
+        for (Object obj : selectedObjects) {
+            if (obj instanceof EditPart && ((EditPart) obj).getModel() instanceof Part) {
+                EditPart editpart = (EditPart) obj;
+                Part part = (Part) (((EditPart) obj).getModel());
+                if (editpart.getSelected() == EditPart.SELECTED_PRIMARY) {
+                    selectedParts.add(0, part);
+                } else {
+                    selectedParts.add(part);
+                }
+            }
+        }
+        return selectedParts;
+    }
+
+    public static List<Part> getWidgetPartsFromSelectedObjects(List<?> selectedObjects) {
+        List<Part> selectedParts = new ArrayList<Part>();
+        for (Object obj : selectedObjects) {
+            if (obj instanceof EditPart && ((EditPart) obj).getModel() instanceof Part) {
+                Part part = (Part) (((EditPart) obj).getModel());
+                EditPart editpart = (EditPart) obj;
+                // TODO : FIXME part.getParent() != null
+                if ((part instanceof ComponentPart || part instanceof EventPart) && (part.getParent() != null) && part.getOwnerDocumentPart() != null) {
+                    if (editpart.getSelected() == EditPart.SELECTED_PRIMARY) {
+                        selectedParts.add(0, part);
+                    } else {
+                        selectedParts.add(part);
+                    }
+                }
+            }
+        }
+        return selectedParts;
+    }
+
+    public static List<EditPart> getEditPartsFromSelectedObjects(List<?> selectedObjects) {
+        List<EditPart> editParts = new ArrayList<EditPart>();
+        for (Object obj : selectedObjects) {
+            if (obj instanceof EditPart && ((EditPart) obj).getModel() instanceof Part) {
+                editParts.add((EditPart) obj);
+            }
+        }
+        return editParts;
+    }
+
+    /**
+     * Sorts selected {@link Part} into location order.
+     * 
+     * @param parentEditPart
+     *            a parent edit part
+     * @param selectedParts
+     *            a List containing selected {@link Part}
+     * @param orderedParts
+     *            a List containing ordered {@link Part}
+     */
+    private static void sortPart(EditPart parentEditPart, List<Part> selectedParts, List<Part> orderedParts) {
+        if (parentEditPart == null || selectedParts == null || orderedParts == null) {
+            return;
+        }
+
+        List<?> editParts = parentEditPart.getChildren();
+        int size = editParts.size();
+        for (int i = 0; i < size; i++) {
+            EditPart editPart = (EditPart) editParts.get(i);
+            if (editPart.getModel() instanceof Part) {
+                int selectedPartsSize = selectedParts.size();
+                for (int j = 0; j < selectedPartsSize; j++) {
+                    Part selectedPart = selectedParts.get(j);
+                    if (((Part) editPart.getModel()).equals(selectedPart)) {
+                        orderedParts.add(selectedPart);
+                    }
+                }
+            }
+
+            sortPart(editPart, selectedParts, orderedParts);
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/ComponentCopyData.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/ComponentCopyData.java
new file mode 100644 (file)
index 0000000..aa03a1b
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.commands;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+public class ComponentCopyData {
+    public Rectangle absoluteBound;
+    public Part clonedPart;
+    public Part clonedParentPart;
+
+    public ComponentCopyData(Part clonedPart, Rectangle absoluteBound, Rectangle relativeBound, String layoutType, Part clonedParentPart) {
+        this.clonedPart = clonedPart;
+        if (absoluteBound != null) {
+            this.absoluteBound = absoluteBound;
+        } else {
+            this.absoluteBound = null;
+        }
+
+        if (clonedParentPart != null) {
+            this.clonedParentPart = clonedParentPart;
+        } else {
+            this.clonedParentPart = null;
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/CopyPartCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/CopyPartCommand.java
new file mode 100644 (file)
index 0000000..6f999e5
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.commands;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.ui.actions.Clipboard;
+
+
+public class CopyPartCommand extends Command {
+    Object clipboardData = null;
+
+    public CopyPartCommand(Object clipboardData) {
+        this.clipboardData = clipboardData;
+    }
+
+    public boolean canExecute() {
+        return true;
+    }
+
+    public boolean canUndo() {
+        return true;
+    }
+
+    public void undo() {
+        Clipboard.getDefault().setContents("");
+    }
+
+    public void execute() {
+        Clipboard.getDefault().setContents(this.clipboardData);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/WidgetRelation.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/commands/WidgetRelation.java
new file mode 100644 (file)
index 0000000..75fa709
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.commands;
+
+import org.tizen.efluibuilder.model.part.Part;
+
+
+/**
+ * A widget relation class.
+ */
+public class WidgetRelation {
+
+    /**
+     * A horizontal cursor option.
+     */
+    public static final int HORIZONTAL_CURSOR = 0;
+
+    /**
+     * A vertical cursor option.
+     */
+    public static final int VERTICAL_CURSOR = 1;
+
+    /**
+     * A widget relation.
+     */
+    public enum Relation {
+        NONE, FREE, PREV_SIBLING, // A is prev_sibling of B <=> A comes before B
+        NEXT_SIBLING, // A is next_sibling of B <=> A comes after B
+        CHILD, // A is the last child of B
+        // CHILD_FIRST, // A is the first child of B
+        // CHILD_LAST, // A is the last child of B
+        DENY, // deny
+    }
+
+    /**
+     * A target {@link Part} to be related.
+     */
+    private Object target;
+
+    /**
+     * A {@link Relation}.
+     */
+    private Relation relation;
+
+    /**
+     * A cursor option.
+     */
+    private int option;
+
+    /**
+     * Constructor.
+     * 
+     * @param target
+     *            a target {@link Part} to be related
+     * @param rel
+     *            a {@link Relation}
+     * @param cursorOption
+     *            a cursor option. {@link #HORIZONTAL_CURSOR} or {@link #VERTICAL_CURSOR}
+     */
+    public WidgetRelation(Object target, Relation rel, int cursorOption) {
+        this.target = target;
+        this.relation = rel;
+        this.option = cursorOption;
+    }
+
+    /**
+     * Gets a target {@link Part} to be related.
+     * 
+     * @return target {@link Part} to be related
+     */
+    public Object getTarget() {
+        return this.target;
+    }
+
+    public void setTarget(Object target) {
+        this.target = target;
+    }
+
+    /**
+     * Gets a {@link Relation}.
+     * 
+     * @return {@link Relation}
+     */
+    public Relation getRelation() {
+        return relation;
+    }
+
+    public void setRelation(Relation relation) {
+        this.relation = relation;
+    }
+
+    /**
+     * Gets a cursor option.
+     * 
+     * @return cursor option
+     */
+    public int getOption() {
+        return option;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/AbstractTemplate.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/AbstractTemplate.java
new file mode 100644 (file)
index 0000000..2ba98a2
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.dnd.model;
+
+import org.eclipse.gef.requests.CreationFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public abstract class AbstractTemplate implements ITemplate {
+    protected static Logger logger = LoggerFactory.getLogger(AbstractTemplate.class);
+    private Object type = null;
+    private CreationFactory factory = null;
+
+    @Override
+    public Object getType() {
+        return type;
+    }
+
+    protected void setType(Object type) {
+        this.type = type;
+    }
+
+    @Override
+    public CreationFactory getFactory() {
+        return factory;
+    }
+
+    protected void setFactory(CreationFactory factory) {
+        this.factory = factory;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/ComponentTemplate.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/ComponentTemplate.java
new file mode 100644 (file)
index 0000000..7ca7b6a
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.dnd.model;
+
+import org.eclipse.gef.requests.CreationFactory;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.PartUtil;
+
+
+public final class ComponentTemplate extends AbstractTemplate {
+    private String descriptorId = null;
+    private DocumentPart documentPart = null;
+
+    public ComponentTemplate(DocumentPart documentPart, String descriptorId) {
+        this.documentPart = documentPart;
+        this.descriptorId = descriptorId;
+
+        setType(COMPONENT);
+        PartCreationFactory factory = new PartCreationFactory();
+        setFactory(factory);
+    }
+
+    public class PartCreationFactory implements CreationFactory {
+        @Override
+        public Object getNewObject() {
+            Part part = PartUtil.createPartWithInitValue(documentPart, PartType.COMPONENT, documentPart, descriptorId);
+            if (part != null) {
+                part.setParent(documentPart);
+            }
+            return part;
+        }
+
+        @Override
+        public Object getObjectType() {
+            return getType();
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/DataBindingTemplate.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/DataBindingTemplate.java
new file mode 100644 (file)
index 0000000..3a36cf7
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.gef.dnd.model;
+
+import org.eclipse.gef.requests.CreationFactory;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.view.databinding.model.DataBindingPartProperty;
+
+public class DataBindingTemplate extends AbstractTemplate {
+       private String modelName;
+       private String viewName;
+       private Part targetWidget;
+       private String dataType;
+       private String allowedBindingType;
+       private String sourceType;
+
+       public DataBindingTemplate(String modelName, String viewName, String dataType, String allowedBindingType, String sourceType) {
+               this.modelName = modelName;
+               this.viewName = viewName;
+               this.dataType = dataType;
+               this.allowedBindingType = allowedBindingType;
+               this.sourceType = sourceType;
+               setType(DATABINDING);
+               DataBindingPropertyCreationFactory factory = new DataBindingPropertyCreationFactory();
+               setFactory(factory);
+       }
+
+       public DataBindingTemplate(String modelName, String value, String dataType, Part targetWidget, String allowedBindingType, String sourceType) {
+               this.modelName = modelName;
+               this.viewName = value;
+               this.targetWidget = targetWidget;
+               this.dataType = dataType;
+               this.allowedBindingType = allowedBindingType;
+               this.sourceType = sourceType;
+               setType(DATABINDING);
+               DataBindingPropertyCreationFactory factory = new DataBindingPropertyCreationFactory();
+               setFactory(factory);
+       }
+
+       public Part getTargetWidget() {
+               return targetWidget;
+       }
+
+       public String getDataType() {
+               return dataType;
+       }
+
+       private class DataBindingPropertyCreationFactory implements CreationFactory {
+
+        /*
+                * (non-Javadoc)
+                * 
+                * @see org.eclipse.gef.requests.CreationFactory#getNewObject()
+                */
+               @Override
+               public Object getNewObject() {
+                       return new DataBindingPartProperty(modelName, viewName, dataType, allowedBindingType, sourceType);
+               }
+
+               /*
+                * (non-Javadoc)
+                * 
+                * @see org.eclipse.gef.requests.CreationFactory#getObjectType()
+                */
+               @Override
+               public Object getObjectType() {
+                       return getType();
+               }
+       }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/ITemplate.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/ITemplate.java
new file mode 100644 (file)
index 0000000..5fad76f
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.dnd.model;
+
+import org.eclipse.gef.requests.CreationFactory;
+
+
+public interface ITemplate {
+    public static int DUMMY = 0;
+    public static int COMPONENT = 1;
+    public static int SNIPPET = 2;
+    public static int PROPERTY = 3;
+    public static int DATABINDING = 4;
+    /**
+     * Returns type of this template.
+     * 
+     * @return a type of this template.
+     */
+    public Object getType();
+
+    /**
+     * Returns CreationFactory of this template.
+     * 
+     * @return a creation factory of this template.
+     * 
+     * @see org.eclipse.gef.requests.CreationFactory
+     * @see org.eclipse.gef.requests.CreateRequest
+     */
+    public CreationFactory getFactory();
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/RMResource.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/RMResource.java
new file mode 100644 (file)
index 0000000..f59bce5
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.dnd.model;
+
+import org.tizen.efluibuilder.mscreen.configurator.MscreenConstants;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+public class RMResource {
+
+    // == for test == start
+    public static final int INVALID = 0;
+    public static final int FOLDER = 1;
+    public static final int IMAGE = 2;
+    public static final int SOUND = 3;
+    public static final int MOVIE = 4;
+    public static final int LAYOUT = 5;
+    public static final int TXT = 6; // for elm.entry.widget & TextResourceMethod
+
+    private int type = INVALID;
+    private String resKey = null;
+    private String resPath = null;
+    private String projectPath = null;
+
+    public static final String[] audioFileExtention = { ".mp3", ".mp2", ".wma", ".aac", ".wav", ".wave", ".ogg", ".flac" };
+    public static final String[] videoFileExtention = { ".wmv", ".avi", ".mp4", };
+    public static final String[] imageFileExtention = { ".png", ".jpg", ".jpeg", ".bmp", ".gif", ".mjpeg" };
+    public static final String[] layoutFileExtention = { ".edj" };
+    public static final String[] textFileExtention = { ".txt" };
+
+    public RMResource() {
+        this.resPath = "";
+        this.projectPath = "";
+        this.resKey = "";
+        this.type = INVALID;
+    }
+
+    public void setPath(String path, String projectPath) {
+        this.resPath = path;
+        this.projectPath = projectPath;
+        parsePath();
+    }
+
+    public void setResKey(String resKey) {
+        this.resKey = resKey;
+        parseResKey();
+    }
+
+    public boolean isCurrentProjectResource() {
+        return resPath.startsWith(projectPath + PlatformUtil.getCorrectedPath(MscreenConstants.RESOURCE_DIRECTORY));
+    }
+
+    private boolean isEmptyString(String src) {
+        if ((src == null) || (src.trim().length() < 1)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public void createResKey() {
+        if (resPath.length() > 0) {
+            resKey = resPath.substring(projectPath.length() + MscreenConstants.RESOURCE_DIRECTORY.length());
+        } else {
+            resKey = MscreenConstants.RESOURCE_KEY + resKey;
+        }
+
+    }
+
+    private void parsePath() {
+        if (isEmptyString(resPath)) {
+
+        } else {
+            if (resPath.startsWith(projectPath)) {
+                createResKey();
+                parseMediaType();
+            }
+        }
+    }
+
+    private void parseResKey() {
+        if (isEmptyString(resKey)) {
+
+        } else {
+            createResKey();
+            parseMediaType();
+        }
+    }
+
+    public int getType() {
+        return type;
+    }
+
+    public String getResKey() {
+        return resKey;
+    }
+
+    public void parseMediaType() {
+        if (isMediaType(imageFileExtention)) {
+            type = IMAGE;
+        } else if (isMediaType(audioFileExtention)) {
+            type = SOUND;
+        } else if (isMediaType(videoFileExtention)) {
+            type = MOVIE;
+        } else if (isMediaType(layoutFileExtention)) {
+            type = LAYOUT;
+        } else if (isMediaType(textFileExtention)) { // for RM - efl.entry.widget
+            type = TXT;
+        } else {
+            type = INVALID;
+        }
+    }
+
+    // for RM
+    public static String[] getResourceFileExtentionsByType(int resourceType) {
+        switch (resourceType) {
+            case IMAGE:
+                return imageFileExtention;
+            case SOUND:
+                return audioFileExtention;
+            case MOVIE:
+                return videoFileExtention;
+            case LAYOUT:
+                return layoutFileExtention;
+            case TXT: // for RM - efl.entry.widget
+                return textFileExtention;
+            default:
+                return null;
+        }
+    }
+
+    private boolean isMediaType(String[] fileExtentions) {
+        for (int i = 0; i < fileExtentions.length; i++) {
+            if (resKey.toLowerCase().endsWith(fileExtentions[i])) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/RMResourceTemplate.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/RMResourceTemplate.java
new file mode 100644 (file)
index 0000000..ffce159
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.dnd.model;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.gef.requests.CreationFactory;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.mscreen.configurator.MscreenConstants;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+
+
+public class RMResourceTemplate extends AbstractTemplate {
+    private static final String PROPERTY_NAME_RES_SRC = "src"; //$NON-NLS-1$
+
+    private static final String PROPERTY_TYPE_IMAGE = "image"; //$NON-NLS-1$
+    private static final String PROPERTY_TYPE_LAYOUT = "layout-resource"; //$NON-NLS-1$
+    private static final String PROPERTY_TYPE_ENTRY = "text-resource"; //$NON-NLS-1$
+
+    private RMResource rmResource = null;
+
+    public RMResourceTemplate() {
+        setType(PROPERTY);
+        ResourceCreationFactory factory = new ResourceCreationFactory();
+        setFactory(factory);
+    }
+
+    public RMResourceTemplate(String transferData, boolean isResKey) {
+        rmResource = new RMResource();
+
+        if (isResKey) { // Data of DnD is resource Key.
+            rmResource.setResKey(transferData);
+        } else { // Data of DnD is resource file_full_path.
+            CombineEditorPart combineEditorPart = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+            IProject project = combineEditorPart.getProject();
+            rmResource.setPath(transferData, project.getLocation().toOSString());
+        }
+        setType(PROPERTY);
+        ResourceCreationFactory factory = new ResourceCreationFactory();
+        setFactory(factory);
+    }
+
+    public boolean isValidRMResource() {
+        return (rmResource.getResKey().length() > MscreenConstants.RESOURCE_KEY.length()) ? true : false;
+    }
+
+    public boolean isCurrentProjectResource() {
+        return rmResource.isCurrentProjectResource();
+    }
+
+    private class ResourceCreationFactory implements CreationFactory {
+        private String getPropertyName(int type) {
+            switch (type) {
+                case RMResource.IMAGE:
+                case RMResource.LAYOUT:
+                case RMResource.TXT: // for RM - text file resource of efl.entry.widget
+                    return PROPERTY_NAME_RES_SRC;
+
+                case RMResource.SOUND:
+                    return null;
+                case RMResource.MOVIE:
+                    return null;
+                default:
+                    return null;
+            }
+        }
+
+        @Override
+        public Object getNewObject() {
+
+            String propertyName = getPropertyName(rmResource.getType());
+            if (propertyName == null) {
+                return null;
+            }
+
+            switch (rmResource.getType()) { // for RM - updated text-resource of efl.entry.widget
+                case RMResource.IMAGE:
+                    if (propertyName.equals(PROPERTY_NAME_RES_SRC)) {
+                        return new ResourceTemplateProperty(propertyName, PROPERTY_TYPE_IMAGE, rmResource.getResKey());
+                    }
+                    break;
+                case RMResource.LAYOUT:
+                    if (propertyName.equals(PROPERTY_NAME_RES_SRC)) {
+                        return new ResourceTemplateProperty(propertyName, PROPERTY_TYPE_LAYOUT, rmResource.getResKey());
+                    }
+                    break;
+                case RMResource.TXT:
+                    if (propertyName.equals(PROPERTY_NAME_RES_SRC)) {
+                        return new ResourceTemplateProperty(propertyName, PROPERTY_TYPE_ENTRY, rmResource.getResKey());
+                    }
+                    break;
+                default:
+                    break;
+            }
+            return null;
+        }
+
+        @Override
+        public Object getObjectType() {
+            return getType();
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/ResourceTemplateProperty.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/ResourceTemplateProperty.java
new file mode 100644 (file)
index 0000000..2c72276
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.dnd.model;
+
+public final class ResourceTemplateProperty {
+
+    private String name;
+    private String type;
+    private String value;
+
+    ResourceTemplateProperty(String name, String type, String value) {
+        this.name = name;
+        this.type = type;
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/SnippetTemplate.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/dnd/model/SnippetTemplate.java
new file mode 100644 (file)
index 0000000..77bf9a0
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.dnd.model;
+
+import org.eclipse.gef.requests.CreationFactory;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.snippet.ISnippet;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUnmarshaller;
+import org.w3c.dom.Document;
+
+
+public final class SnippetTemplate extends AbstractTemplate {
+
+    private ISnippet snippet = null;
+    private DocumentPart documentPart = null;
+
+    public SnippetTemplate(ISnippet snippet, DocumentPart documentPart) {
+        this.snippet = snippet;
+        this.documentPart = documentPart;
+        setType(SNIPPET);
+        SnippetCreationFactory factory = new SnippetCreationFactory();
+        setFactory(factory);
+    }
+
+    public ISnippet getSnippet() {
+        return snippet;
+    }
+
+    private class SnippetCreationFactory implements CreationFactory {
+        @Override
+        public Object getNewObject() {
+            Document document = snippet.getModel();
+            PartUnmarshaller unmarshaller = new PartUnmarshaller();
+            Part part = unmarshaller.unmarshall(documentPart, document, false);
+            resetID(part);
+            return part;
+        }
+
+        @Override
+        public Object getObjectType() {
+            return getType();
+        }
+
+        private void resetID(Part part) {
+            part.removeProperty(LayoutSchemaConstants.ID);
+            for (Part child : part.getChildren()) {
+                child.removeProperty(LayoutSchemaConstants.ID);
+                resetID(child);
+            }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/ComponentEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/ComponentEditPart.java
new file mode 100644 (file)
index 0000000..9ed27cc
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.editparts;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.tizen.efluibuilder.gef.editparts.utility.directedit.ComponentCellEditorLocator;
+import org.tizen.efluibuilder.gef.editparts.utility.directedit.ComponentDirectEditManager;
+import org.tizen.efluibuilder.gef.editparts.utility.directedit.ComponentNameCellEditorValidator;
+import org.tizen.efluibuilder.gef.figure.ComponentFigure;
+import org.tizen.efluibuilder.gef.policies.ComponentDataBindingEditPolicy;
+import org.tizen.efluibuilder.gef.policies.ComponentDirectEditPolicy;
+import org.tizen.efluibuilder.gef.policies.ContentContainerOutlineFeedbackPolicy;
+import org.tizen.efluibuilder.gef.policies.CustomSnapFeedbackPolicy;
+import org.tizen.efluibuilder.gef.policies.DesignSelectionEditPolicy;
+import org.tizen.efluibuilder.gef.policies.ItemOutlineFeedbackPolicy;
+import org.tizen.efluibuilder.gef.policies.OpenEdcEditorPolicy;
+import org.tizen.efluibuilder.gef.policies.OutlineFeedbackPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.CommonChildResizablePolicy;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.gef.policies.containers.EditPolicyConstants;
+import org.tizen.efluibuilder.gef.tools.DesignDragEditPartsTracker;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.storyboard.gef.policies.NodeGraphicalNodeEditPolicy;
+
+
+public class ComponentEditPart extends DesignEditPart {
+
+    private ComponentDirectEditManager manager;
+
+    @Override
+    public DragTracker getDragTracker(Request request) {
+        return new DesignDragEditPartsTracker(this);
+    }
+
+    @Override
+    protected void createEditPolicies() {
+        installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new DesignSelectionEditPolicy());
+        installEditPolicy(EditPolicyConstants.ROLE_SNAP_FEEDBACK, new CustomSnapFeedbackPolicy());
+        installEditPolicy(EditPolicy.COMPONENT_ROLE, new ComponentDataBindingEditPolicy());
+        installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new ComponentDirectEditPolicy());
+        installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new CommonChildResizablePolicy());
+        installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new NodeGraphicalNodeEditPolicy());
+//        installEditPolicy(EditPolicy.COMPONENT_ROLE, new NodeComponentEditPolicy());
+        if (this.getModel() instanceof Part) {
+            Part part = (Part) (this.getModel());
+            if (LayoutSchemaConstants.LAYOUT.equals(part.getDescriptorId())) {
+                installEditPolicy(EditPolicyConstants.ROLE_OPEN_EDITOR, new OpenEdcEditorPolicy());
+            }
+            if (DesignEditorUtil.isContentContainerPart(part)) {
+                installEditPolicy(EditPolicyConstants.ROLE_CONTAINER_OUTLINE_FEEDBACK, new ContentContainerOutlineFeedbackPolicy());
+            } else if (DesignEditorUtil.isItemContainerPart(part)) {
+                installEditPolicy(EditPolicyConstants.ROLE_CONTAINER_OUTLINE_FEEDBACK, new OutlineFeedbackPolicy());
+            } else if (DesignEditorUtil.isItemPart(part)) {
+                installEditPolicy(EditPolicyConstants.ROLE_CONTAINER_OUTLINE_FEEDBACK, new ItemOutlineFeedbackPolicy());
+            }
+
+        }
+        // installEditPolicy("Double Click", new ComponentDoubleClickEditPolicy());
+        // installEditPolicy("Outline Editpolicy", new OutlineFeedbackPolicy());
+    }
+
+    @Override
+    protected IFigure precreateFigure() {
+        ComponentFigure figure = null;
+        figure = new ComponentFigure();
+        Part model = ((Part) getModel());
+
+        // This code must have to modify to be used by model's descriptor!!!!
+        if (model.getDescriptorId().equals(LayoutSchemaConstants.ICON) || model.getDescriptorId().equals(LayoutSchemaConstants.LIST)
+                || model.getDescriptorId().equals(LayoutSchemaConstants.LISTITEM) || model.getDescriptorId().equals(LayoutSchemaConstants.MULTIBUTTONENTRY)
+                || model.getDescriptorId().equals(LayoutSchemaConstants.MULTIBUTTONENTRYITEM) || model.getDescriptorId().equals(LayoutSchemaConstants.GENLIST)
+                || model.getDescriptorId().equals(LayoutSchemaConstants.GENLISTITEM) || model.getDescriptorId().equals(LayoutSchemaConstants.GENGRID)
+                || model.getDescriptorId().equals(LayoutSchemaConstants.GENGRIDITEM) || model.getDescriptorId().equals(LayoutSchemaConstants.LABEL)
+                || model.getDescriptorId().equals(LayoutSchemaConstants.INDEX) || model.getDescriptorId().equals(LayoutSchemaConstants.LAYOUT)
+                || model.getDescriptorId().equals(LayoutSchemaConstants.ENTRY) || model.getDescriptorId().equals(LayoutSchemaConstants.IMAGE)) {
+            figure.setEnableOutline(true);
+        }
+        figure.setSelectionColor(ColorConstants.blue);
+        return figure;
+    }
+
+    @Override
+    public void performRequest(Request request) {
+        if (request.getType() == RequestConstants.REQ_DIRECT_EDIT) {
+            if (request instanceof DirectEditRequest && !directEditHitTest(((DirectEditRequest) request).getLocation().getCopy()))
+                return;
+            performDirectEdit();
+        } else if (request.getType() == RequestConstants.REQ_OPEN) {
+            CommandStack stack = getViewer().getEditDomain().getCommandStack();
+            stack.execute(getCommand(request));
+        }
+    }
+
+    private boolean directEditHitTest(Point requestLoc) {
+        if (!(getFigure() instanceof ComponentFigure))
+            return false;
+
+        IFigure figure = getFigure();
+        figure.translateToRelative(requestLoc);
+        if (figure.containsPoint(requestLoc))
+            return true;
+        return false;
+    }
+
+    private void setupDirectEdit() {
+        if (manager == null) {
+            Part model = (Part) getModel();
+            String targetProperty = null;
+            if (model.getPropertyValue(LayoutSchemaConstants.TEXT) != null) {
+                targetProperty = LayoutSchemaConstants.TEXT;
+            } else if (model.getPropertyValue(LayoutSchemaConstants.LABEL) != null) {
+                targetProperty = LayoutSchemaConstants.LABEL;
+            } else if (model.getPropertyValue(LayoutSchemaConstants.SUB_LABEL) != null) {
+                targetProperty = LayoutSchemaConstants.SUB_LABEL;
+            }
+
+            if (targetProperty != null) {
+                ComponentFigure figure = (ComponentFigure) getFigure();
+                ComponentNameCellEditorValidator validator = new ComponentNameCellEditorValidator();
+                manager = new ComponentDirectEditManager(this, TextCellEditor.class, new ComponentCellEditorLocator(figure), model, targetProperty, validator);
+            }
+        }
+    }
+
+    private void performDirectEdit() {
+        setupDirectEdit();
+        if (manager != null) {
+            manager.show();
+        }
+    }
+
+    public String getPropertyNameDirectEdit() {
+        if (manager == null)
+            return null;
+
+        return manager.getPropertyName();
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/ContainerEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/ContainerEditPart.java
new file mode 100644 (file)
index 0000000..a37d2b0
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.editparts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.tizen.efluibuilder.gef.editparts.utility.CellManager;
+import org.tizen.efluibuilder.gef.figure.ContainerFigure;
+import org.tizen.efluibuilder.gef.policies.CustomSnapFeedbackPolicy;
+import org.tizen.efluibuilder.gef.policies.DesignSelectionEditPolicy;
+import org.tizen.efluibuilder.gef.policies.OutlineFeedbackPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.BoxLayoutPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.CommonLayoutPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.ContentLayoutPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.EditPolicyConstants;
+import org.tizen.efluibuilder.gef.policies.containers.GridLayoutPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.PanePlaceholderOutlineFeedbackPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.PanesLayoutPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.TableLayoutPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.TablePlaceholderOutlineFeedbackPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.ViewLayoutPolicy;
+import org.tizen.efluibuilder.gef.tools.DesignDragEditPartsTracker;
+import org.tizen.efluibuilder.gef.tools.DesignMarqueeDragTracker;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.storyboard.gef.policies.NodeComponentEditPolicy;
+import org.tizen.efluibuilder.storyboard.gef.policies.NodeGraphicalNodeEditPolicy;
+
+
+public class ContainerEditPart extends DesignEditPart {
+
+    private CellManager cellManager = null;
+
+    @Override
+    public DragTracker getDragTracker(Request request) {
+        if (getSelected() == 0) {
+            return new DesignMarqueeDragTracker(this);
+        }
+
+        return new DesignDragEditPartsTracker(this);
+    }
+
+    @Override
+    protected void createEditPolicies() {
+        Part part = (Part) getModel();
+        if (part instanceof ComponentPart) {
+
+            installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new NodeGraphicalNodeEditPolicy());
+            installEditPolicy(EditPolicy.COMPONENT_ROLE, new NodeComponentEditPolicy());
+            /* common policy */
+            installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new DesignSelectionEditPolicy());
+            installEditPolicy(EditPolicyConstants.ROLE_SNAP_FEEDBACK, new CustomSnapFeedbackPolicy());
+            /* layout policy */
+            EditPolicy targetLayoutPolicy = null;
+            EditPolicy outlineEditPolicy = null;
+
+            if (part.getDescriptorId().equals(LayoutSchemaConstants.GRID)) {
+                targetLayoutPolicy = new GridLayoutPolicy();
+                outlineEditPolicy = new OutlineFeedbackPolicy();
+            } else if (part.getDescriptorId().equals(LayoutSchemaConstants.BOX)) {
+                targetLayoutPolicy = new BoxLayoutPolicy();
+                outlineEditPolicy = new OutlineFeedbackPolicy();
+            } else if (part.getDescriptorId().equals(LayoutSchemaConstants.TABLE)) {
+                targetLayoutPolicy = new TableLayoutPolicy();
+                outlineEditPolicy = new OutlineFeedbackPolicy();
+                installEditPolicy(EditPolicyConstants.ROLE_PLACEHOLDER_FEEDBACK, new TablePlaceholderOutlineFeedbackPolicy());
+            } else if (part.getDescriptorId().equals(LayoutSchemaConstants.PANES)) {
+                targetLayoutPolicy = new PanesLayoutPolicy();
+                installEditPolicy(EditPolicyConstants.ROLE_PLACEHOLDER_FEEDBACK, new PanePlaceholderOutlineFeedbackPolicy());
+            } else if (part.getDescriptorId().equals(LayoutSchemaConstants.SCROLLER)) {
+                outlineEditPolicy = new OutlineFeedbackPolicy();
+                targetLayoutPolicy = new ContentLayoutPolicy();
+            } else if (part.getDescriptorId().equals(LayoutSchemaConstants.PANEL)) {
+                targetLayoutPolicy = new ContentLayoutPolicy();
+            } else if (part.getDescriptorId().equals(LayoutSchemaConstants.VIEW)) {
+                // targetLayoutPolicy = new ViewLayoutPolicy();
+            } else if (part.getDescriptorId().equals(LayoutSchemaConstants.POPUP)) {
+                targetLayoutPolicy = new ViewLayoutPolicy();
+            } else {
+                targetLayoutPolicy = new CommonLayoutPolicy();
+            }
+
+            if (null != targetLayoutPolicy) {
+                installEditPolicy(EditPolicy.LAYOUT_ROLE, targetLayoutPolicy);
+            }
+
+            if (null != outlineEditPolicy) {
+                installEditPolicy(EditPolicyConstants.ROLE_CONTAINER_OUTLINE_FEEDBACK, outlineEditPolicy);
+            }
+        }
+    }
+
+    @Override
+    protected IFigure precreateFigure() {
+        Part model = (Part) getModel();
+        ContainerFigure figure = null;
+        if (model instanceof ComponentPart) {
+            if (null == cellManager) {
+                cellManager = new CellManager();
+            } else {
+                cellManager.clean();
+            }
+
+            figure = new ContainerFigure(cellManager);
+            // figure.setSelectionColor(ColorConstants.blue);
+        }
+        return figure;
+    }
+
+    public CellManager getCellManager() {
+        return cellManager;
+    }
+
+    public int findIndexOfCellByPT(final int x, final int y) {
+        return cellManager.findIndexOfCellByPT(x, y);
+    }
+
+    public int findIndexOfCellByPTwithoutWID(final int x, final int y) {
+        return cellManager.findIndexOfCellByPTwithoutWID(x, y);
+    }
+
+    public Rectangle getCellByIdx(final int idx) {
+        return cellManager.getCellByIdx(idx).getBounds();
+    }
+
+    public Rectangle getPackByIdx(int i, int colCount) {
+        int listCnt = cellManager.getCellCount();
+        if (i > listCnt) {
+            return null;
+        }
+        // PlaceHolder ph = placeholders.get(i);
+        int left = i % colCount;
+        int top = i / colCount;
+        int width = 1;
+        int height = 1;
+
+        Rectangle relativePosition = new Rectangle(left, top, width, height);
+        return relativePosition;
+    }
+
+    public void refreshCells() {
+
+        if (null != cellManager) {
+            ((ContainerFigure) (figure)).repaint();
+        }
+
+        return;
+    }
+
+    public int getCellColumCount() {
+        Part part = (Part) getModel();
+        String colcountStr = part.getPropertyValue(LayoutSchemaConstants.TABLE_COLS);
+        if (null != colcountStr) {
+            return Integer.parseInt(colcountStr);
+        }
+        return 1;
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignConnectionEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignConnectionEditPart.java
new file mode 100644 (file)
index 0000000..77ec059
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.editparts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.editparts.AbstractConnectionEditPart;
+import org.tizen.efluibuilder.gef.policies.DesignConnectionEndpointEditPolicy;
+import org.tizen.efluibuilder.gef.viewer.DesignStoryboardRouter;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class DesignConnectionEditPart extends AbstractConnectionEditPart {
+
+    private DesignStoryboardPolylineConnection polyline;
+    private DesignStoryboardRouter router;
+
+    public DesignConnectionEditPart() {
+        super();
+    }
+
+    public String getId() {
+        Part part = ((Part) getModel());
+        if (part != null) {
+            return part.getUniqueId();
+        } else {
+            return null;
+        }
+    }
+
+    protected IFigure createFigure() {
+        // polyline = new
+        // StoryBoardPolylineConnection(1.0((DesignViewer)this.getViewer()).getZoomScale());
+        polyline = new DesignStoryboardPolylineConnection(this, 1.0);
+        router = ((DesignViewer) this.getViewer()).getStoryBoardRouter();
+        polyline.setConnectionRouter(router);
+        return polyline;
+    }
+
+    @Override
+    protected void createEditPolicies() {
+        installEditPolicy(EditPolicy.CONNECTION_ENDPOINTS_ROLE, new DesignConnectionEndpointEditPolicy());
+    }
+
+    @SuppressWarnings("unchecked")
+    protected void registerModel() {
+        getViewer().getEditPartRegistry().put(getId(), this);
+    }
+
+    @Override
+    public void setSelected(int selected) {
+        super.setSelected(selected);
+        this.refreshFigure();
+    }
+    
+    public void refreshFigure() {               
+        if (this.getSelected() > 0) {
+            polyline.setForegroundColor(ColorResources.DESIGN_EDITOR_CONNECTION_SELECTED_COLOR);    
+        } else {
+            polyline.setForegroundColor(ColorResources.DESIGN_EDITOR_CONNECTION_UNSELECTED_COLOR);
+        }        
+        this.polyline.layout();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignEditPart.java
new file mode 100644 (file)
index 0000000..0a28490
--- /dev/null
@@ -0,0 +1,353 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.editparts;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.ChopboxAnchor;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.IClippingStrategy;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Disposable;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.NodeEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.SnapToHelper;
+import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
+import org.eclipse.swt.graphics.Color;
+import org.tizen.efluibuilder.gef.figure.CommonFigure;
+import org.tizen.efluibuilder.gef.figure.DocFigure;
+import org.tizen.efluibuilder.gef.policies.CustomSnapFeedbackPolicy;
+import org.tizen.efluibuilder.gef.policies.DesignSelectionEditPolicy;
+import org.tizen.efluibuilder.gef.policies.OpenEdcEditorPolicy;
+import org.tizen.efluibuilder.gef.policies.OutlineFeedbackPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.EditPolicyConstants;
+import org.tizen.efluibuilder.gef.policies.containers.PlaceholderOutlineFeedbackPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.ViewLayoutPolicy;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.renderer.Position;
+import org.tizen.efluibuilder.ui.editor.ruler.DesignerGuide;
+
+
+public class DesignEditPart extends AbstractGraphicalEditPart implements NodeEditPart {
+
+    public static final String VIRTUAL_SCREEN_LAYER = DesignRootEditPart.VIRTUAL_SCREEN_LAYER;
+
+    private DesignerGuide verticalGuide, horizontalGuide;
+    protected Color selectionColor = ColorConstants.blue;
+    private Position position = new Position();
+    private boolean binded = false;
+    private boolean flagReveal = false;
+
+    public String getId() {
+        Part part = ((Part) getModel());
+        if (part != null) {
+            return part.getUniqueId();
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    protected List<Part> getModelChildren() {
+        if (getModel() instanceof Part) {
+            return ((Part) getModel()).getComponentChildren();
+        }
+        return new ArrayList<Part>();
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    protected void registerModel() {
+        getViewer().getEditPartRegistry().put(getId(), this);
+    }
+
+    @Override
+    public void activate() {
+        super.activate();
+    }
+
+    @Override
+    public void deactivate() {
+        IFigure iFigure = getFigure();
+        if (iFigure instanceof Disposable) {
+            ((Disposable) iFigure).dispose();
+        }
+
+        super.deactivate();
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    public Object getAdapter(Class key) {
+        if (key == SnapToHelper.class) {
+            return null;
+        }
+
+        return super.getAdapter(key);
+    }
+
+    public DesignerGuide getVerticalGuide() {
+        return verticalGuide;
+    }
+
+    public void setVerticalGuide(DesignerGuide verticalGuide) {
+        this.verticalGuide = verticalGuide;
+    }
+
+    public DesignerGuide getHorizontalGuide() {
+        return horizontalGuide;
+    }
+
+    public void setHorizontalGuide(DesignerGuide horizontalGuide) {
+        this.horizontalGuide = horizontalGuide;
+    }
+
+    public Color getSelectionColor() {
+        return selectionColor;
+    }
+
+    public void setSelectionColor(Color color) {
+        this.selectionColor = color;
+    }
+
+    public Position getPosition() {
+        return position;
+    }
+
+    public boolean setPosition(Position position) {
+        if (position.equals(this.position)) {
+            return false;
+        }
+        this.position = position;
+        return true;
+    }
+
+    protected IFigure precreateFigure() {
+        Part model = (Part) getModel();
+        IFigure figure = null;
+        if (model instanceof ViewsPart) {
+            figure = new DocFigure();
+        }
+        return figure;
+    }
+
+    @Override
+    protected IFigure createFigure() {
+        IFigure figure = null;
+        figure = precreateFigure();
+
+        // Clipping own area
+        {
+            figure.setClippingStrategy(new IClippingStrategy() {
+                @Override
+                public Rectangle[] getClip(IFigure childFigure) {
+                    return new Rectangle[] { getChildrenBound(childFigure) };
+                }
+
+                private Rectangle getChildrenBound(IFigure f) {
+                    @SuppressWarnings("rawtypes")
+                    List figures = f.getChildren();
+                    Rectangle rc = f.getBounds().getCopy();
+                    if (figures != null) {
+                        for (int i = 0; i < figures.size(); i++) {
+                            IFigure child = (IFigure) figures.get(i);
+                            rc.union(getChildrenBound(child));
+                        }
+                    }
+                    return rc;
+                }
+            });
+        }
+
+        return figure;
+    }
+
+    @Override
+    protected void refreshVisuals() {
+        Part model = ((Part) getModel());
+        if (!(model instanceof ViewsPart)) {
+            CommonFigure figure = (CommonFigure) getFigure();
+            Position position = getPosition();
+            if (position != null) {
+                if (this.getEditPolicy(EditPolicyConstants.ROLE_CONTAINER_OUTLINE_FEEDBACK) instanceof OutlineFeedbackPolicy) {
+                    OutlineFeedbackPolicy policy = (OutlineFeedbackPolicy) this.getEditPolicy(EditPolicyConstants.ROLE_CONTAINER_OUTLINE_FEEDBACK);
+                    policy.setBound(position.getBounds());
+                    policy.refresh();
+                }
+                if (this.getEditPolicy(EditPolicyConstants.ROLE_PLACEHOLDER_FEEDBACK) instanceof PlaceholderOutlineFeedbackPolicy) {
+                    PlaceholderOutlineFeedbackPolicy policy =
+                            (PlaceholderOutlineFeedbackPolicy) this.getEditPolicy(EditPolicyConstants.ROLE_PLACEHOLDER_FEEDBACK);
+                    policy.refresh();
+                }
+
+                if (this.getEditPolicy(EditPolicyConstants.ROLE_OPEN_EDITOR) instanceof OpenEdcEditorPolicy) {
+                    OpenEdcEditorPolicy policy =
+                            (OpenEdcEditorPolicy) this.getEditPolicy(EditPolicyConstants.ROLE_OPEN_EDITOR);
+                    policy.refresh();
+                }
+
+                figure.setLayout(position.getBounds());
+            } else {
+                figure.setLayout(new Rectangle(0, 0, 0, 0));
+            }
+            DocumentPart documentPart = model.getOwnerDocumentPart();
+            if (documentPart == null) { // check is removed;
+                return;
+            }
+            ComponentDescriptor componentDescriptor = documentPart.getComponentDescriptor();
+            if (model instanceof ComponentPart) {
+                figure.setBorder(componentDescriptor.canBeVisibleBorder((ComponentPart) model));
+            }
+        }
+    }
+
+    public void refreshUI() {
+        this.refreshVisuals();
+    }
+
+    public void reorderChildren() {
+        List<Part> modelChildren = this.getModelChildren();
+        List<DesignEditPart> children = this.getChildren();
+        int childIndex;
+        for (int j = modelChildren.size() - 1; j >= 0; j--) {
+            childIndex = children.indexOf(modelChildren.get(j));
+            if (childIndex >= 0 && childIndex != j) {
+                this.reorderChild(children.get(childIndex), j);
+            }
+        }
+    }
+
+    public void refreshChildren2() {
+        List<DesignEditPart> children = this.getChildren();
+        List<Part> modelChildren = this.getModelChildren();
+        List<EditPart> removedList = new ArrayList<EditPart>();
+        boolean isExist = false;
+        for (int i = 0; i < children.size(); i++) {
+            isExist = false;
+            for (int j = 0; j < modelChildren.size(); j++) {
+                if (children.get(i).getModel() == modelChildren.get(j)) {
+                    isExist = true;
+                    break;
+                }
+                if (isExist == false) {
+                    removedList.add(children.get(i));
+                }
+            }
+        }
+        for (EditPart editpart : removedList) {
+            if (editpart.getParent() != null && (editpart.getParent() instanceof DesignEditPart)) {
+                DesignEditPart parent = (DesignEditPart) editpart.getParent();
+                // parent.removeChildVisual(editpart);
+                parent.removeChild(editpart);
+            }
+        }
+        super.refreshChildren();
+    }
+
+    @Override
+    protected void createEditPolicies() {
+        Part part = (Part) getModel();
+        if (part instanceof ViewPart) {
+            installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new DesignSelectionEditPolicy());
+            installEditPolicy(EditPolicyConstants.ROLE_SNAP_FEEDBACK, new CustomSnapFeedbackPolicy());
+            installEditPolicy(EditPolicy.LAYOUT_ROLE, new ViewLayoutPolicy());
+        }
+    }
+
+    @Override
+    public void setSelected(int value) {
+        super.setSelected(value);
+        if (this.getEditPolicy(EditPolicyConstants.ROLE_CONTAINER_OUTLINE_FEEDBACK) instanceof OutlineFeedbackPolicy) {
+            OutlineFeedbackPolicy policy = (OutlineFeedbackPolicy) this.getEditPolicy(EditPolicyConstants.ROLE_CONTAINER_OUTLINE_FEEDBACK);
+            policy.refresh();
+        }
+
+        if (this.getEditPolicy(EditPolicyConstants.ROLE_OPEN_EDITOR) instanceof OpenEdcEditorPolicy) {
+            OpenEdcEditorPolicy policy = (OpenEdcEditorPolicy) this.getEditPolicy(EditPolicyConstants.ROLE_OPEN_EDITOR);
+            policy.refresh();
+        }
+    }
+
+    @Override
+    public boolean isSelectable() {
+        return true;
+    }
+
+    public boolean isBinded() {
+        return binded;
+    }
+
+    public void setBinded(boolean binded) {
+        this.binded = binded;
+    }
+
+    @Override
+    public ChopboxAnchor getSourceConnectionAnchor(ConnectionEditPart arg0) {
+        IFigure ifigure = getFigure();
+        return new ChopboxAnchor(ifigure);
+    }
+
+    @Override
+    public ChopboxAnchor getSourceConnectionAnchor(Request arg0) {
+        IFigure ifigure = getFigure();
+        return new ChopboxAnchor(ifigure);
+    }
+
+    @Override
+    public ChopboxAnchor getTargetConnectionAnchor(ConnectionEditPart arg0) {
+        return null;
+    }
+
+    @Override
+    public ChopboxAnchor getTargetConnectionAnchor(Request arg0) {
+        IFigure ifigure = getFigure();
+        return new ChopboxAnchor(ifigure);
+    }
+
+    public EditPart getTargetEditPart(Request request) {
+        if (request.getType().equals(RequestConstants.REQ_CONNECTION_END)) {
+            return getParent().getTargetEditPart(request);
+        }
+        return super.getTargetEditPart(request);
+    }
+
+    public boolean getFlagReveal() {
+        return flagReveal;
+    }
+
+    public void setFlagReveal(boolean bReveal) {
+        flagReveal = bReveal;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignEditPartFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignEditPartFactory.java
new file mode 100644 (file)
index 0000000..67ad1ad
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.editparts;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+
+
+public class DesignEditPartFactory implements EditPartFactory {
+
+    @Override
+    public EditPart createEditPart(EditPart context, Object model) {
+        EditPart retValue = null;
+        if (model instanceof Part) {
+            Part partModel = (Part) model;
+
+            if (partModel.getType() == PartType.VIEWS) {
+                retValue = new DesignEditPart();
+                retValue.setModel(model);
+            } else if (partModel.getType() == PartType.VIEW) {
+                retValue = new ViewEditPart();
+                retValue.setModel(model);
+            } else if (partModel.getType() == PartType.COMPONENT) {
+                ComponentDescriptor componentDescriptor = partModel.getOwnerDocumentPart().getComponentDescriptor();
+                if (componentDescriptor.isContainer((ComponentPart) partModel)) {
+                    retValue = new ContainerEditPart();
+                } else {
+                    retValue = new ComponentEditPart();
+                }
+                retValue.setModel(model);
+            } else if (partModel.getType() == PartType.EVENT && partModel.hasProperty(LayoutSchemaConstants.EVENT_CONNECTION)) {
+                retValue = new DesignConnectionEditPart();
+                retValue.setModel(model);
+            }
+
+        }
+
+        return retValue;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignRootEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignRootEditPart.java
new file mode 100644 (file)
index 0000000..3e4a835
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.editparts;
+
+import org.eclipse.draw2d.ConnectionLayer;
+import org.eclipse.draw2d.DelegatingLayout;
+import org.eclipse.draw2d.FreeformLayer;
+import org.eclipse.draw2d.Layer;
+import org.eclipse.draw2d.LayeredPane;
+import org.eclipse.draw2d.ScalableFreeformLayeredPane;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editparts.GuideLayer;
+import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
+import org.tizen.efluibuilder.gef.editparts.utility.VirtualLayer;
+import org.tizen.efluibuilder.gef.layers.BlockLayer;
+import org.tizen.efluibuilder.gef.layers.CustomLayerConstants;
+import org.tizen.efluibuilder.gef.layers.OutlineLayer;
+import org.tizen.efluibuilder.gef.policies.containers.ViewTemplateLayoutPolicy;
+import org.tizen.efluibuilder.gef.tools.DesignRootMarqueeDragTracker;
+import org.tizen.efluibuilder.ui.editor.ZoomUtil;
+
+
+public class DesignRootEditPart extends ScalableFreeformRootEditPart {
+
+    public static final String VIRTUAL_SCREEN_LAYER = "virtual";
+
+    public DesignRootEditPart() {
+        super();
+        getZoomManager().setZoomLevels(ZoomUtil.zoomLevels);
+        ((BlockLayer) getLayer(CustomLayerConstants.BLOCK_LAYER)).setViewPort(getZoomManager().getViewport());
+        createEditPolicies();
+    }
+
+    @Override
+    protected void createLayers(LayeredPane layeredPane) {
+        layeredPane.add(new ConnectionLayer(), CONNECTION_LAYER);
+        layeredPane.add(getScaledLayers(), SCALABLE_LAYERS);
+        layeredPane.add(new OutlineLayer(), CustomLayerConstants.OUTLINE_LAYER);        
+        layeredPane.add(new OutlineLayer(), FEEDBACK_LAYER);
+        layeredPane.add(new GuideLayer(), GUIDE_LAYER);                
+        layeredPane.add(new FreeformLayer(), HANDLE_LAYER);
+        Layer layer = (Layer) getLayer(HANDLE_LAYER);
+//        layeredPane.add(new ConnectionLayer(), EditPartConstants.SECOND_CONNECTION_LAYER);
+        BlockLayer blockLayer = new BlockLayer();
+        blockLayer.setVisible(false);
+        layeredPane.add(blockLayer, CustomLayerConstants.BLOCK_LAYER);
+        layer.setLayoutManager(new DelegatingLayout());        
+    }      
+    
+    @Override
+    protected ScalableFreeformLayeredPane createScaledLayers() {
+        ScalableFreeformLayeredPane layers = super.createScaledLayers();
+
+        VirtualLayer layer = new VirtualLayer();
+        layer.setZoomManager(getZoomManager());
+        layers.add(layer, VIRTUAL_SCREEN_LAYER);
+
+        return layers;
+    }    
+    
+    public Rectangle getVirtualLayerSize() {
+        VirtualLayer virtualLayer = (VirtualLayer) getLayer(VIRTUAL_SCREEN_LAYER);
+        return virtualLayer.getVirtualSize();
+    }
+   
+    public void setVirtualLayerSize(Rectangle bound, float scale) {                
+        VirtualLayer virtualLayer = (VirtualLayer) getLayer(VIRTUAL_SCREEN_LAYER);        
+        virtualLayer.setVirtualSize(bound);        
+        virtualLayer.invalidate();
+    }            
+
+    @Override
+    protected void createEditPolicies() {        
+         installEditPolicy(EditPolicy.LAYOUT_ROLE, new ViewTemplateLayoutPolicy());                 
+    }   
+
+    @Override
+    public DragTracker getDragTracker(Request request) {
+        return new DesignRootMarqueeDragTracker(this);        
+    }              
+    
+    @Override
+    public Command getCommand(Request request) {
+        Command command = null;
+        EditPolicyIterator i = getEditPolicyIterator();
+        while (i.hasNext()) {
+            if (command != null)
+                command = command.chain(i.next().getCommand(request));
+            else
+                command = i.next().getCommand(request);
+        }
+        return command;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignStoryboardPolylineConnection.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/DesignStoryboardPolylineConnection.java
new file mode 100644 (file)
index 0000000..01b4aa2
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.editparts;
+
+import org.eclipse.draw2d.ImageFigure;
+import org.eclipse.draw2d.PolylineConnection;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class DesignStoryboardPolylineConnection extends PolylineConnection {
+
+    EditPart editPart = null;
+    Part part = null;
+    private ImageFigure endPointIcon;
+    private final static int EndPointIconSize = 18;
+
+    public DesignStoryboardPolylineConnection(EditPart editpart, double scale) {
+        this.editPart = editpart;
+        this.part = (Part) editpart.getModel();
+        updateLineWidth(scale);
+        setAntialias(SWT.ON);
+        setLineWidth(3);
+        endPointIcon = new ImageFigure(ImageResources.getImage(ImageResources.EDITOR_CONNECTION_END_POINT_NOR_H));
+        endPointIcon.setSize(EndPointIconSize, EndPointIconSize);
+        setForegroundColor(ColorResources.DESIGN_EDITOR_CONNECTION_UNSELECTED_COLOR);
+        add(endPointIcon);
+    }
+
+    public void updateLineWidth(double scale) {
+        if (scale <= 0.5) {
+            setLineWidth(2);
+        } else {
+            setLineWidth(3);
+        }
+    }
+
+    public Part getOwnerPart() {
+        return this.part;
+    }
+
+    public void decorate(boolean isVertical, boolean isCtxPopupTarget, double zoomScale) {
+        Point pos;
+        if (isVertical) {
+            pos = new Point(getPoints().getLastPoint().x - EndPointIconSize / 2, getPoints().getLastPoint().y - EndPointIconSize);
+        } else {
+            pos = new Point(getPoints().getLastPoint().x - EndPointIconSize, getPoints().getLastPoint().y - EndPointIconSize / 2);
+        }
+
+        endPointIcon.setLocation(pos);
+
+        Image img = null;
+        if (editPart.getSelected() > 0) {
+            if (isVertical) {
+                img = ImageResources.getImage(ImageResources.EDITOR_CONNECTION_END_POINT_SEL_V);
+            } else {
+                img = ImageResources.getImage(ImageResources.EDITOR_CONNECTION_END_POINT_SEL_H);
+            }
+        } else {
+            if (isVertical) {
+                img = ImageResources.getImage(ImageResources.EDITOR_CONNECTION_END_POINT_NOR_V);
+            } else {
+                img = ImageResources.getImage(ImageResources.EDITOR_CONNECTION_END_POINT_NOR_H);
+            }
+        }
+
+        if (img != endPointIcon.getImage()) {
+            endPointIcon.setImage(img);
+        }
+
+        if (isCtxPopupTarget) {
+            this.setLineStyle(SWT.LINE_DASH);
+        }
+        
+        updateLineWidth(zoomScale);
+
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/ViewEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/ViewEditPart.java
new file mode 100644 (file)
index 0000000..34959fb
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.editparts;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.ChopboxAnchor;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.requests.CreateConnectionRequest;
+import org.tizen.efluibuilder.gef.figure.CommonFigure;
+import org.tizen.efluibuilder.gef.figure.ViewFigure;
+import org.tizen.efluibuilder.gef.policies.FitSingleViewPolicy;
+import org.tizen.efluibuilder.gef.policies.containers.EditPolicyConstants;
+import org.tizen.efluibuilder.gef.policies.containers.ViewMovePolicy;
+import org.tizen.efluibuilder.gef.tools.DesignDragViewEditPartTracker;
+import org.tizen.efluibuilder.gef.viewer.DesignStoryboardUtil;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.renderer.Position;
+import org.tizen.efluibuilder.storyboard.gef.policies.NodeComponentEditPolicy;
+import org.tizen.efluibuilder.storyboard.gef.policies.NodeGraphicalNodeEditPolicy;
+
+
+public class ViewEditPart extends DesignEditPart {
+    @Override
+    public DragTracker getDragTracker(Request request) {
+        return new DesignDragViewEditPartTracker(this);
+    }
+
+    protected void createEditPolicies() {
+        super.createEditPolicies();
+        installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ViewMovePolicy());
+        installEditPolicy(EditPolicyConstants.ROLE_OPEN_EDITOR, new FitSingleViewPolicy());
+        installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new NodeGraphicalNodeEditPolicy());
+        installEditPolicy(EditPolicy.COMPONENT_ROLE, new NodeComponentEditPolicy());
+        // installEditPolicy(EditPolicyConstants.ROLE_CONTAINER_OUTLINE_FEEDBACK, new
+        // OutlineFeedbackPolicy());
+    }
+
+    public void update() {
+        refreshSourceConnections();
+        refreshTargetConnections();
+        refreshVisuals();
+    }
+
+    @Override
+    public ChopboxAnchor getSourceConnectionAnchor(ConnectionEditPart arg0) {
+        IFigure ifigure = getFigure();
+        return new ChopboxAnchor(ifigure);
+    }
+
+    @Override
+    public ChopboxAnchor getSourceConnectionAnchor(Request arg0) {
+        IFigure ifigure = getFigure();
+        return new ChopboxAnchor(ifigure);
+    }
+
+    @Override
+    public ChopboxAnchor getTargetConnectionAnchor(ConnectionEditPart arg0) {
+        IFigure ifigure = getFigure();
+        if (ifigure instanceof ViewFigure) {
+            return new ChopboxAnchor(ifigure);
+        }
+        return null;
+    }
+
+    @Override
+    public ChopboxAnchor getTargetConnectionAnchor(Request arg0) {
+        IFigure ifigure = getFigure();
+        if (ifigure instanceof ViewFigure) {
+            return new ChopboxAnchor(ifigure);
+        }
+        return null;
+    }
+
+    protected List<Part> getModelSourceConnections() {
+        return DesignStoryboardUtil.getConnectionPart((Part) this.getModel());
+    }
+
+    protected List<Part> getModelTargetConnections() {
+        return new ArrayList<Part>();
+        // return ((ComponentPart) getModel()).getTargetConnections();
+    }
+
+    protected void refreshVisuals() {
+        refreshSourceConnections();
+        refreshTargetConnections();
+        ViewFigure figure = (ViewFigure) getFigure();
+        Position position = getPosition();
+        if (position != null) {            
+            figure.setLayout(position.getBounds());
+        } else {
+            figure.setLayout(new Rectangle(0, 0, 0, 0));
+        }        
+        figure.repaintTitle();
+    }
+
+    @Override
+    public void setSelected(int value) {
+        super.setSelected(value);
+        ViewFigure figure = (ViewFigure) getFigure();
+        figure.repaintTitle();        
+    }
+    
+    public void moveFigure(Point delta) {                
+        CommonFigure figure = (CommonFigure) getFigure();
+        Position position = getPosition();
+        if (position != null) {
+            Rectangle deltaRect = new Rectangle(position.getBounds());
+            deltaRect.x += delta.x;
+            deltaRect.y += delta.y;
+            figure.setLayout(deltaRect);
+        }
+    }
+
+    public EditPart getTargetEditPart(Request request) {
+        if (request.getType().equals(RequestConstants.REQ_CONNECTION_END)) {
+            CreateConnectionRequest req = (CreateConnectionRequest) request;
+            EditPart sourceEditpart = req.getSourceEditPart();
+            while (sourceEditpart != null && sourceEditpart instanceof ViewEditPart == false) {
+                sourceEditpart = sourceEditpart.getParent();
+            }
+
+            if (this == sourceEditpart) {
+                return null;
+            }
+
+            return this;
+        }
+        return super.getTargetEditPart(request);
+    }
+
+    protected IFigure precreateFigure() {
+        IFigure figure = null;
+        figure = new ViewFigure(getViewer().getControl().getDisplay().getSystemFont(), this,
+                                ((DesignRootEditPart) getViewer().getRootEditPart()).getZoomManager());
+        ((ViewFigure) figure).setProfile(((DesignViewer) getViewer()).getProfile());
+        ((ViewFigure) figure).setSelectionColor(selectionColor);
+
+        return figure;
+    }
+    
+    public void performRequest(Request request) {
+        if (request.getType() == RequestConstants.REQ_OPEN) {
+            getCommand(request);
+        }
+    }
+        
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/CellManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/CellManager.java
new file mode 100644 (file)
index 0000000..0102eb7
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.editparts.utility;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.tizen.efluibuilder.renderer.PlaceholderPosition;
+
+
+public class CellManager {
+
+    private List<PlaceholderPosition> cellList = new LinkedList<PlaceholderPosition>();
+
+    public void clean() {
+        cellList.clear();
+    }
+
+    public void addCell(final int wid, final int x, final int y, final int w, final int h) {
+        PlaceholderPosition position = new PlaceholderPosition();
+        position.wid = wid;
+        position.x = x;
+        position.y = y;
+        position.width = w;
+        position.height = h;
+        cellList.add(position);
+    }
+
+    public int getCellCount() {
+        return cellList.size();
+    }
+
+    public List<PlaceholderPosition> getCells() {
+        return cellList;
+    }
+
+    public PlaceholderPosition getCellByIdx(final int _index) {
+        return cellList.get(_index);
+    }
+
+    public int findIndexOfCellByPT(final int x, final int y) {
+
+        if (null != cellList) {
+
+            int reval = 0;
+
+            for (PlaceholderPosition cell : cellList) {
+                if (cell.getBounds().contains(x, y) && cell.wid == -1) {
+                    return reval;
+                }
+                reval++;
+
+            }
+        }
+
+        return -1;
+    }
+
+    public int findIndexOfCellByPTwithoutWID(final int x, final int y) {
+
+        if (null != cellList) {
+
+            int reval = 0;
+
+            for (PlaceholderPosition cell : cellList) {
+                if (cell.getBounds().contains(x, y)) {
+                    return reval;
+                }
+                reval++;
+
+            }
+        }
+
+        return -1;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/VirtualLayer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/VirtualLayer.java
new file mode 100644 (file)
index 0000000..530442c
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.editparts.utility;
+
+import org.eclipse.draw2d.Layer;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.editparts.ZoomManager;
+
+
+public class VirtualLayer extends Layer {
+
+    private Rectangle virtualSize;
+    private ZoomManager zoomManager = null;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.draw2d.Figure#getBounds()
+     */
+    @Override
+    public Rectangle getBounds() {
+        if (virtualSize != null) {
+            Rectangle r = virtualSize.getCopy();
+            if (zoomManager != null) {
+                double zoom = zoomManager.getZoom();
+                r.scale(zoom, zoom);
+            }
+            return r;
+        }
+        return Rectangle.SINGLETON;
+    }
+
+    public void setZoomManager(ZoomManager zoomManager) {
+        this.zoomManager = zoomManager;
+    }
+
+    public Rectangle getVirtualSize() {
+        return virtualSize;
+    }
+
+    public void setVirtualSize(Rectangle virtualSize) {
+        this.virtualSize = virtualSize;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/directedit/ComponentCellEditorLocator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/directedit/ComponentCellEditorLocator.java
new file mode 100644 (file)
index 0000000..2539c4a
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.gef.editparts.utility.directedit;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.tools.CellEditorLocator;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.efluibuilder.gef.figure.ComponentFigure;
+
+
+/**
+ * A CellEditorLocator for a specified label
+ * 
+ * @author Phil Zoio
+ */
+public class ComponentCellEditorLocator implements CellEditorLocator {
+
+    private ComponentFigure widgetFigure;
+
+    public ComponentCellEditorLocator(ComponentFigure widgetFigure) {
+        this.widgetFigure = widgetFigure;
+    }
+
+    public void relocate(CellEditor celleditor) {
+        Text textCtrl = (Text) celleditor.getControl();
+        Point pref = textCtrl.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+        Rectangle rect = widgetFigure.getBounds().getCopy();
+        widgetFigure.translateToAbsolute(rect);
+        textCtrl.setBounds(rect.x - 1, rect.y - 1, pref.x + 1, pref.y + 1);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/directedit/ComponentDirectEditManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/directedit/ComponentDirectEditManager.java
new file mode 100644 (file)
index 0000000..1fabe43
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.editparts.utility.directedit;
+
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.tools.CellEditorLocator;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+public class ComponentDirectEditManager extends DirectEditManager {
+
+    private VerifyListener verifyListener;
+    private Part model;
+    private String originalValue;
+    private String propertyName;
+
+    public ComponentDirectEditManager(GraphicalEditPart source, Class editorType, CellEditorLocator locator, Part model, String propertyName,
+            ICellEditorValidator validator) {
+        super(source, editorType, locator);
+        this.model = model;
+        this.originalValue = "";
+        this.propertyName = propertyName;
+    }
+
+    protected void initCellEditor() {
+        verifyListener = new VerifyListener() {
+            public void verifyText(VerifyEvent event) {
+                // Text text = (Text) getCellEditor().getControl();
+                // String oldText = text.getText();
+            }
+
+        };
+
+        Text textCtrl = (Text) getCellEditor().getControl();
+        textCtrl.addVerifyListener(verifyListener);
+
+        // set the initial value of the
+        originalValue = model.getPropertyValue(propertyName);
+        if (null != originalValue) {
+            getCellEditor().setValue(originalValue);
+        }
+        textCtrl.selectAll();
+    }
+
+    protected void unhookListeners() {
+        super.unhookListeners();
+
+        if (verifyListener != null) {
+            Text textCtrl = (Text) getCellEditor().getControl();
+            textCtrl.removeVerifyListener(verifyListener);
+            verifyListener = null;
+        }
+    }
+
+    public String getPropertyName() {
+        return this.propertyName;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/directedit/ComponentNameCellEditorValidator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/editparts/utility/directedit/ComponentNameCellEditorValidator.java
new file mode 100644 (file)
index 0000000..6c2d4e7
--- /dev/null
@@ -0,0 +1,41 @@
+/*\r
+ * UI Builder\r
+ *\r
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+\r
+\r
+package org.tizen.efluibuilder.gef.editparts.utility.directedit;\r
+\r
+import org.eclipse.jface.viewers.ICellEditorValidator;\r
+\r
+\r
+public class ComponentNameCellEditorValidator implements ICellEditorValidator {\r
+\r
+    public ComponentNameCellEditorValidator() {\r
+    }\r
+\r
+    public String isValid(Object value) {\r
+        String text = (String) value;\r
+        // if (text.isEmpty()) {\r
+        // N/A\r
+        // }\r
+        return text;\r
+    }\r
+}\r
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ActionRunnableLable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ActionRunnableLable.java
new file mode 100644 (file)
index 0000000..c9a9101
--- /dev/null
@@ -0,0 +1,26 @@
+
+
+package org.tizen.efluibuilder.gef.figure;
+
+import org.eclipse.draw2d.Label;
+
+
+public class ActionRunnableLable extends Label implements IActionTriggerable {
+
+    private String triggerString = "";
+
+    public ActionRunnableLable(String triggerString) {
+        super();
+        this.triggerString = triggerString;
+    }
+
+    @Override
+    public String getTriggerString() {
+        return triggerString;
+    }
+
+    public void setTriggerString(String triggerString) {
+        this.triggerString = triggerString;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/CommonFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/CommonFigure.java
new file mode 100644 (file)
index 0000000..e8b140e
--- /dev/null
@@ -0,0 +1,186 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.figure;
+
+import java.util.List;
+
+import org.eclipse.draw2d.AbstractBackground;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.LineBorder;
+import org.eclipse.draw2d.XYLayout;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.graphics.Color;
+
+
+public class CommonFigure extends Figure {
+
+    private static final int LINEWIDTH = 1;
+    private static final int BORDER_ALPHA = 60;
+
+    private XYLayout layout;
+    private boolean borderVisible = false;
+    private Color selectionColor = ColorConstants.blue;
+    private PointList polygonPoints;
+
+    @SuppressWarnings("unchecked")
+    protected boolean containtsInChidren(IFigure f, int x, int y) {
+        List<IFigure> children = f.getChildren();
+        if (children != null) {
+            for (int i = 0; i < children.size(); i++) {
+                if (containtsInChidren(children.get(i), x, y)) {
+                    return true;
+                }
+                if (children.get(i).containsPoint(x, y))
+                    return true;
+            }
+        }
+        return false;
+    }
+
+    @SuppressWarnings("rawtypes")
+    protected Rectangle getChildrenBound(IFigure f) {
+        List figures = f.getChildren();
+        Rectangle bounds = f.getBounds().getCopy();
+        if (figures != null) {
+            for (int i = 0; i < figures.size(); i++) {
+                IFigure child = (IFigure) figures.get(i);
+                bounds.union(getChildrenBound(child));
+            }
+        }
+        return bounds;
+    }
+
+    protected void drawRectangle(Graphics graphics, int lineWidth, int style, Rectangle bounds) {
+        graphics.setLineWidth(lineWidth);
+        graphics.setLineStyle(style);
+        graphics.drawRectangle(bounds);
+    }
+
+    public CommonFigure() {
+        layout = new XYLayout();
+        setLayoutManager(layout);
+
+        setForegroundColor(ColorConstants.blue);
+        setBorder(new LineBorder(2));
+    }
+
+    @Override
+    public boolean containsPoint(int x, int y) {
+        if (containtsInChidren(this, x, y)) {
+            return true;
+        } else {
+            if (polygonPoints != null) {
+                return polygonPoints.polygonContainsPoint(x, y);
+            } else {
+                return super.containsPoint(x, y);
+            }
+        }
+    }
+
+    @Override
+    public Rectangle getClientArea(Rectangle rect) {
+        rect.setBounds(getChildrenBound(this));
+        if (useLocalCoordinates())
+            rect.setLocation(0, 0);
+        return rect;
+    }
+
+    @Override
+    protected void paintFigure(Graphics graphics) {
+        if (isOpaque()) {
+            if (polygonPoints != null) {
+                graphics.drawPolygon(polygonPoints);
+            } else {
+                graphics.fillRectangle(getBounds());
+            }
+        }
+
+        if (getBorder() instanceof AbstractBackground) {
+            ((AbstractBackground) getBorder()).paintBackground(this, graphics, NO_INSETS);
+        }
+    }
+
+    @Override
+    protected void paintBorder(Graphics graphics) {
+
+        boolean isBoarderOutsider = false;
+        Rectangle edgeBounds = bounds.getShrinked(new Insets(0, 0, 1, 1));
+
+        if (getParent() != null) {
+            if (!getParent().getBounds().intersects(edgeBounds)) {
+                isBoarderOutsider = true;
+            }
+        }
+
+        if (isBoarderOutsider) {
+            graphics.pushState();
+            graphics.setAlpha(BORDER_ALPHA);
+            graphics.setForegroundColor(ColorConstants.black);
+            drawRectangle(graphics, LINEWIDTH, Graphics.LINE_DOT, edgeBounds);
+            graphics.drawLine(edgeBounds.getBottomLeft(), edgeBounds.getTopRight());
+            graphics.drawLine(edgeBounds.getBottomRight(), edgeBounds.getTopLeft());
+            graphics.popState();
+        } else {
+            if (borderVisible) {
+                graphics.pushState();
+                graphics.setAlpha(BORDER_ALPHA);
+                graphics.setForegroundColor(ColorConstants.blue);
+                drawRectangle(graphics, LINEWIDTH, Graphics.LINE_SOLID, edgeBounds);
+                graphics.popState();
+            }
+        }
+    }
+
+    public void setLayout(Rectangle bounds) {
+        if (bounds == null) {
+            return;
+        }
+        this.polygonPoints = null;
+        setBounds(bounds);
+    }
+
+    public void setLayout(PointList polygonPoints) {
+        if (polygonPoints != null) {
+            this.polygonPoints = polygonPoints;
+            setBounds(polygonPoints.getBounds());
+        }
+    }
+
+    public void setBorder(boolean visible) {
+        this.borderVisible = visible;
+    }
+
+    public void setSelectionColor(Color color) {
+        selectionColor = color;
+    }
+
+    public Color getSelectionColor() {
+        return selectionColor;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/CommonRectangleFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/CommonRectangleFigure.java
new file mode 100644 (file)
index 0000000..b3ffc17
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.gef.figure;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.swt.graphics.Color;
+
+
+public class CommonRectangleFigure extends RectangleFigure {
+    private int alphaBgColor = -1;
+    private int alphaFgColor = -1;
+
+    @Override
+    protected void fillShape(Graphics graphics) {
+        if (this.alphaBgColor >= 0) {
+            graphics.setAlpha(this.alphaBgColor);
+        }
+        super.fillShape(graphics);
+    }
+
+    @Override
+    protected void outlineShape(Graphics graphics) {
+        if (this.alphaFgColor >= 0) {
+            graphics.setAlpha(this.alphaFgColor);
+        }
+        super.outlineShape(graphics);
+    }
+
+    public void setForegroundColor(Color color, int alpha) {
+        this.alphaFgColor = alpha;
+        super.setForegroundColor(color);
+    }
+
+    public void setBackgroundColor(Color color, int alpha) {
+        this.alphaBgColor = alpha;
+        super.setForegroundColor(color);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ComponentFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ComponentFigure.java
new file mode 100644 (file)
index 0000000..628710b
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.figure;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.graphics.Image;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+
+public class ComponentFigure extends CommonFigure {
+
+    private static final int LINEWIDTH = 1;
+
+    private boolean bOutline = false;
+
+    private boolean isBinded = false;
+
+    public ComponentFigure() {
+        super();
+        setBackgroundColor(ColorConstants.lightGreen);
+        setOpaque(false);
+    }
+
+    @Override
+    protected void paintFigure(Graphics graphics) {
+        if (bOutline) {
+            // graphics.pushState();
+            // Rectangle drawBounds = getBounds().getCopy();
+            // drawBounds.width -= LINEWIDTH;
+            // drawBounds.height -= LINEWIDTH;
+            // graphics.setForegroundColor(ColorConstants.gray);
+            // drawRectangle(graphics, LINEWIDTH, Graphics.LINE_DASH, drawBounds);
+            // graphics.popState();
+        }
+        // data binding icon check
+        if (isBinded) {
+            Image img =
+                    ResourceManager.getImage(BuilderConstants.ICON_DIR,
+                                             BuilderConstants.DATABINDING_BINDING_IMAGE);
+            if (null == img) {
+                Rectangle r = new Rectangle(getBounds().x + 5, getBounds().y + 5, 10, 15);
+                graphics.setAlpha(90);
+                graphics.setForegroundColor(ColorConstants.blue);
+                graphics.setBackgroundColor(ColorConstants.red);
+                graphics.fillRectangle(r);
+                graphics.drawText("B", getBounds().x + 5, getBounds().y + 5);
+            } else {
+                graphics.drawImage(img, getBounds().x + 5, getBounds().y + 5);
+            }
+        }
+    }
+
+    public void setBinded(boolean isBinded) {
+        this.isBinded = isBinded;
+    }
+
+    public void setEnableOutline(boolean value) {
+        this.bOutline = value;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ContainerFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ContainerFigure.java
new file mode 100644 (file)
index 0000000..db7da23
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.figure;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Graphics;
+import org.tizen.efluibuilder.gef.editparts.utility.CellManager;
+
+
+public class ContainerFigure extends CommonFigure {
+
+    public ContainerFigure(CellManager cellManagerHandle) {
+        super();
+        setBackgroundColor(ColorConstants.blue);
+        setOpaque(false);
+    }
+
+    @Override
+    protected void paintFigure(Graphics graphics) {
+        // graphics.pushState();
+        //
+        // // draw edge-line
+        // {
+        // Rectangle edgeBounds = getBounds().getCopy();
+        // // edgeBounds.width -= LINEWIDTH;
+        // // edgeBounds.height -= LINEWIDTH;
+        //
+        // graphics.setLineWidth(LINEWIDTH);
+        // graphics.setLineStyle(Graphics.LINE_DASH);
+        // graphics.setForegroundColor(ColorResources.DESIGN_EDITOR_PLACEHOLDER_LINE_COLOR);
+        // graphics.setForegroundColor(ColorResources.DESIGN_EDITOR_CHANGE_BOUND_FEEDBACK_LINE_COLOR);
+        // graphics.setLineDash(dashStyle);
+        // graphics.drawRectangle(edgeBounds);
+        // }
+        // // draw figure
+        // if (null != cellManagerHandle) {
+        // // graphics.setAlpha(HOVER_ALPHA);
+        //
+        // int listCnt = cellManagerHandle.getCellCount();
+        // for (int i = 0; i < listCnt; i++) {
+        //
+        // PlaceholderPosition cell = cellManagerHandle.getCellByIdx(i);
+        //
+        // if (null != cell) {
+        // Rectangle areaRect = new Rectangle(cell.getBounds());
+        // // areaRect.x += LINEWIDTH;
+        // // areaRect.y += LINEWIDTH;
+        // // areaRect.width -= LINEWIDTH * PADDING;
+        // // areaRect.height -= LINEWIDTH * PADDING;
+        //
+        // graphics.setLineWidth(LINEWIDTH);
+        // graphics.setLineStyle(Graphics.LINE_CUSTOM);
+        // graphics.setLineDash(dashStyle);
+        // graphics.setForegroundColor(ColorResources.DESIGN_EDITOR_PLACEHOLDER_LINE_COLOR);
+        // graphics.drawRectangle(areaRect);
+        // }
+        // }
+        // }
+        //
+        // graphics.popState();
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/DocFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/DocFigure.java
new file mode 100644 (file)
index 0000000..1ae3d5c
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.figure;
+
+import org.eclipse.draw2d.FreeformLayer;
+
+
+public class DocFigure extends FreeformLayer {
+
+    public DocFigure() {
+        super();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/IActionTriggerable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/IActionTriggerable.java
new file mode 100644 (file)
index 0000000..e1f2a81
--- /dev/null
@@ -0,0 +1,5 @@
+package org.tizen.efluibuilder.gef.figure;
+
+public interface IActionTriggerable {
+    public String getTriggerString();
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/PolygonFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/PolygonFigure.java
new file mode 100644 (file)
index 0000000..09fda58
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.figure;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+
+/**
+ * The Class PolygonFigure.
+ */
+public class PolygonFigure extends RectangleFigure {
+
+    private PointList polygonPoints = null;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.draw2d.Figure#getBounds()
+     */
+    @Override
+    public Rectangle getBounds() {
+        if (polygonPoints != null) {
+            return polygonPoints.getBounds();
+        }
+        return super.getBounds();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.draw2d.RectangleFigure#fillShape(org.eclipse.draw2d.Graphics)
+     */
+    @Override
+    protected void fillShape(Graphics graphics) {
+        if (polygonPoints != null) {
+            graphics.fillPolygon(polygonPoints);
+        }
+        super.fillShape(graphics);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.draw2d.RectangleFigure#outlineShape(org.eclipse.draw2d.Graphics)
+     */
+    @Override
+    protected void outlineShape(Graphics graphics) {
+        if (polygonPoints != null) {
+            graphics.fillPolygon(polygonPoints);
+        }
+        super.outlineShape(graphics);
+    }
+
+    /**
+     * Gets the polygon points.
+     * 
+     * @return the polygon points
+     */
+    public PointList getPolygonPoints() {
+        return polygonPoints;
+    }
+
+    /**
+     * Sets the polygon points.
+     * 
+     * @param polygonPoints
+     *            the new polygon points
+     */
+    public void setPolygonPoints(PointList polygonPoints) {
+        this.polygonPoints = polygonPoints;
+    }
+
+    @Override
+    public void paintFigure(Graphics graphics) {
+        // super.paintFigure(graphics);
+
+        if (getPolygonPoints() != null) {
+            graphics.pushState();
+            graphics.setAlpha(this.getAlpha());
+            graphics.fillPolygon(getPolygonPoints());
+            graphics.popState();
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ViewFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ViewFigure.java
new file mode 100644 (file)
index 0000000..65cb3c4
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.figure;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.Disposable;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.editparts.ZoomManager;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Path;
+import org.eclipse.swt.widgets.Display;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.core.configurator.ConfiguratorConstants;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.utility.CachedImage;
+import org.tizen.efluibuilder.utility.ImageUtil;
+
+
+/**
+ * It MUST be disposed explicitly by deactivate method of EditPart.
+ */
+public class ViewFigure extends CommonFigure implements Disposable {
+
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    private ImageDescriptor imageDescriptor = null;
+    private String profile = null;
+
+    private final CachedImage cache = new CachedImage();
+
+    Part ownerPart = null;
+    EditPart ownerEditpart = null;
+    private ViewTitleFigure titleFigure = null;
+
+    private boolean isSelected() {
+        if (ownerEditpart != null && ownerEditpart.getSelected() > 0) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public boolean containsPoint(int x, int y) {
+        if (containtsInChidren(this, x, y)) {
+            return true;
+        } else {
+            return super.containsPoint(x, y);
+        }
+    }
+
+    public ViewFigure() {
+        super();
+    }
+
+    public ViewFigure(Font font, EditPart editpart, ZoomManager zoomManager) {
+        super();
+        ownerEditpart = editpart;
+        ownerPart = (Part) editpart.getModel();
+        titleFigure = new ViewTitleFigure(font, editpart);
+        add(titleFigure);
+    }
+
+    @Override
+    public void setBounds(Rectangle rect) {
+        super.setBounds(rect);
+        if (titleFigure != null) {
+            titleFigure.setBounds(new Rectangle(rect.x, rect.y, rect.width, 36));
+            titleFigure.setChildConstraint(new Rectangle(0, 0, rect.width, 36));
+        }
+    }
+
+    public ImageDescriptor getImageDescriptor() {
+        return imageDescriptor;
+    }
+
+    public void setImageDescriptor(ImageDescriptor imageDescriptor) {
+        ImageDescriptor prevImageDescriptor = this.imageDescriptor;
+        this.imageDescriptor = imageDescriptor;
+        if ((prevImageDescriptor == null) || (imageDescriptor == null) || prevImageDescriptor.hashCode() != imageDescriptor.hashCode()) {
+            Display.getDefault().asyncExec(new Runnable() {
+                @Override
+                public void run() {
+                    repaint();
+                }
+            });
+        }
+    }
+
+    public void setProfile(String profile) {
+        this.profile = profile;
+    }
+
+    private String getProfile() {
+        return profile;
+    }
+
+    @Override
+    protected void paintFigure(Graphics graphics) {        
+        if (imageDescriptor == null) {
+            return;
+        }
+
+        // FIXED: Image creation is heavy. use a cache.
+        Image image = this.cache.get(this.imageDescriptor);
+        if (image == null) {
+            logger.error(this.getClass().getName() + " image is not created.");
+            return;
+        }
+
+        graphics.setAntialias(SWT.ON);        
+        Rectangle imgDstBound = DesignEditorUtil.getPageImageBoundFromPageBound(getBounds());
+        
+        if (getProfile().equals(ConfiguratorConstants.PROFILE_WEARABLE_CIRCLE)) {
+            Path circlePath = ImageUtil.createCirclePath(imgDstBound.x, imgDstBound.y, imgDstBound.width(), imgDstBound.height());            
+            graphics.clipPath(circlePath);
+        } else {
+            if (isSelected() == true) {
+                graphics.setBackgroundColor(ColorResources.DESIGN_EDITOR_VIEW_FIGURE_BG_SELECTED_COLOR);
+            } else {
+                graphics.setBackgroundColor(ColorResources.DESIGN_EDITOR_VIEW_FIGURE_BG_NORMAL_COLOR);
+            }
+            graphics.fillRectangle(getBounds());
+        }
+        
+        graphics.drawImage(image, image.getBounds().x, image.getBounds().y, image.getBounds().width, image.getBounds().height, imgDstBound.x, imgDstBound.y,
+                           imgDstBound.width, imgDstBound.height);
+
+    }
+
+    public void repaintTitle() {
+        if (titleFigure != null) {
+          titleFigure.repaint();
+      }
+    }
+    
+    public void repaint() {        
+        super.repaint();
+        if (titleFigure != null) {
+//            titleFigure.repaint();
+        }
+
+        /*
+         * Note : This logic is about repainting a object out of its parent.
+         */
+        {
+            Rectangle dirtyBounds = getChildrenBound(this);
+            this.translateToAbsolute(dirtyBounds);
+             this.getUpdateManager().performUpdate(dirtyBounds);
+        }
+    }
+
+    @Override
+    public void dispose() {
+        this.cache.dispose();
+    }
+
+    public boolean containsPointInTitle(Point pt) {
+        return titleFigure.containsPoint(pt);
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ViewTitleFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/ViewTitleFigure.java
new file mode 100644 (file)
index 0000000..b903d35
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * UI Builder - StoryBoard
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.figure;
+
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.XYLayout;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.Disposable;
+import org.eclipse.gef.EditPart;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class ViewTitleFigure extends Figure implements Disposable {
+
+    private ActionRunnableLable viewNameLabel = null;
+    private String labelText;
+    private Image iconW = null;
+    private EditPart ownerEditpart = null;
+    private Part ownerPart = null;
+
+    private boolean isSelected() {
+        if (ownerEditpart != null && ownerEditpart.getSelected() > 0) {
+            return true;
+        }
+        return false;
+    }
+
+    private boolean isStartup() {
+        if (ownerPart != null && ownerPart.getPropertyValue(LayoutSchemaConstants.ID) != null
+                && ownerPart.getParent() != null
+                && ownerPart.getPropertyValue(LayoutSchemaConstants.ID).equals(ownerPart.getParent().getPropertyValue(LayoutSchemaConstants.STARTUP))) {
+            return true;
+        }
+
+        return false;
+    }
+
+    public ViewTitleFigure(Font font, EditPart editPart) {
+        setLayoutManager(new XYLayout());
+        this.ownerEditpart = editPart;
+        this.ownerPart = (Part) ownerEditpart.getModel();
+
+        viewNameLabel = new ActionRunnableLable(ActionConstants.FIT_TO_SINGLE_VIEW);
+        viewNameLabel.setLabelAlignment(PositionConstants.BOTTOM);
+        iconW = ImageResources.getImage(ImageResources.EDITOR_STARTUP_VIEW_HOME_W);
+
+        FontData[] fontData = font.getFontData();
+        fontData[0].setHeight(24);
+        fontData[0].setStyle(SWT.BOLD);
+        viewNameLabel.setFont(new Font(null, fontData[0]));
+        add(viewNameLabel);
+    }
+
+    public void setChildConstraint(Rectangle constraint) {
+        setConstraint(viewNameLabel, constraint);
+    }
+
+    public void refreshIcon(boolean isStartup) {
+        viewNameLabel.setText(labelText);
+        if (isStartup) {
+            viewNameLabel.setIcon(iconW);
+        } else {
+            viewNameLabel.setIcon(null);
+        }
+    }
+
+    public void refreshText(String pageName, boolean isStartup) {
+        this.labelText = pageName;
+        refreshIcon(isStartup);
+    }
+
+    private String getTitleString() {
+        String title = null;
+        if (viewNameLabel != null && ownerPart != null) {
+            title = ownerPart.getPropertyValue(LayoutSchemaConstants.ID);
+            if (ownerPart != null && ownerPart.getChildren().size() > 0) {
+                if (ownerPart.getChildren().get(0).getDescriptorId().equals(LayoutSchemaConstants.POPUP)) {
+                    return title + BuilderMessages.POPUP_VIEW_TITLE;
+                } else if (ownerPart.getChildren().get(0).getDescriptorId().equals(LayoutSchemaConstants.CTXPOPUP)) {
+                    return title + BuilderMessages.CTX_POPUP_VIEW_TITLE;
+                }
+            }
+        }
+        return title;
+    }
+
+    @Override
+    public void repaint() {
+        if (viewNameLabel == null || ownerPart == null) {
+            return;
+        }
+        viewNameLabel.setText(getTitleString());
+        if (isSelected()) {
+            viewNameLabel.setForegroundColor(ColorResources.DESIGN_EDITOR_VIEW_FIGURE_FONT_SELECTED_COLOR);
+        } else {
+            viewNameLabel.setForegroundColor(ColorResources.DESIGN_EDITOR_VIEW_FIGURE_FONT_NORMAL_COLOR);
+        }
+
+        Image curIcon = iconW;
+
+        if (isStartup() && viewNameLabel.getIcon() != curIcon) {
+            viewNameLabel.setIcon(curIcon);
+        } else if (isStartup() == false && viewNameLabel.getIcon() != null) {
+            viewNameLabel.setIcon(null);
+        }
+        super.repaint();
+    }
+
+    @Override
+    public void dispose() {
+        if (iconW != null) {
+            iconW.dispose();
+            iconW = null;
+        }
+
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/border/ContainerSelectionBorder.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/border/ContainerSelectionBorder.java
new file mode 100644 (file)
index 0000000..b4efee0
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.figure.border;
+
+import org.eclipse.draw2d.AbstractBorder;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.graphics.Color;
+
+
+public class ContainerSelectionBorder extends AbstractBorder {
+
+    private Color borderColor;
+
+    public ContainerSelectionBorder(Color borderColor) {
+        this.borderColor = borderColor;
+    }
+
+    @Override
+    public boolean isOpaque() {
+        return true;
+    }
+
+    @Override
+    public Insets getInsets(IFigure figure) {
+        return new Insets(0);
+    }
+
+    @Override
+    public void paint(IFigure figure, Graphics graphics, Insets insets) {
+
+        int width = 1;
+        int edgeSize = 7;
+        
+        Rectangle tempRect = new Rectangle(getPaintRectangle(figure, insets));
+        Rectangle clipRect = graphics.getClip(new Rectangle(0, 0, 9999, 9999));
+        clipRect.expand(edgeSize, edgeSize);
+        tempRect = clipRect.getIntersection(tempRect);
+        if (width % 2 == 1) {
+            tempRect.width--;
+            tempRect.height--;
+        }
+
+        graphics.setLineWidth(width);
+        graphics.setLineStyle(Graphics.LINE_DASH);
+        graphics.setForegroundColor(borderColor);
+
+        // It's disable until fixed scroll issue
+        // graphics.setFont(labelFont);
+        // graphics.drawText(((Part) part.getModel()).getWidgetDescriptor().getDisplayName(),
+        // tempRect.x + labelPadding, tempRect.y + labelPadding);
+        graphics.drawRectangle(tempRect);
+
+        return;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/border/WidgetSelectionBorder.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/figure/border/WidgetSelectionBorder.java
new file mode 100644 (file)
index 0000000..1ea3510
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.figure.border;
+
+import org.eclipse.draw2d.AbstractBorder;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
+import org.eclipse.swt.graphics.Color;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+
+
+public class WidgetSelectionBorder extends AbstractBorder {
+
+    private Color borderColor;
+    private DesignEditPart host;
+
+    public WidgetSelectionBorder(Color borderColor) {
+        this(borderColor, null);
+    }
+
+    public WidgetSelectionBorder(Color borderColor, DesignEditPart host) {
+        this.borderColor = borderColor;
+        this.host = host;
+    }
+
+    @Override
+    public boolean isOpaque() {
+        return true;
+    }
+
+    @Override
+    public Insets getInsets(IFigure figure) {
+        return new Insets(0);
+    }
+
+    @Override
+    public void paint(IFigure figure, Graphics graphics, Insets insets) {
+        graphics.pushState();
+        int width = 2;
+
+        if (host != null) {
+            ScalableFreeformRootEditPart rootEditPart = (ScalableFreeformRootEditPart) host.getViewer().getRootEditPart();
+            double scale = rootEditPart.getZoomManager().getZoom();
+            Rectangle bounds = host.getPosition().getBounds().getCopy();
+            bounds.performScale(scale);
+            tempRect.setBounds(bounds);
+        } else {
+            tempRect.setBounds(getPaintRectangle(figure, insets));
+        }
+
+        graphics.setLineWidth(width);
+        graphics.setLineStyle(Graphics.LINE_SOLID);
+        graphics.setForegroundColor(borderColor);
+        graphics.drawRectangle(tempRect);
+        graphics.popState();
+
+        return;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/handles/CustomResizeHandle.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/handles/CustomResizeHandle.java
new file mode 100644 (file)
index 0000000..6c449aa
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.gef.handles;
+
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.handles.ResizeHandle;
+import org.eclipse.swt.graphics.Color;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class CustomResizeHandle extends ResizeHandle {
+
+    public CustomResizeHandle(GraphicalEditPart owner, int direction) {
+        super(owner, direction);
+    }
+
+    /**
+     * Returns the color for the outside of the handle.
+     *
+     * @return the color for the border
+     */
+    protected Color getBorderColor() {
+        return ColorResources.DESIGN_EDITOR_REISIZE_HANDLE_LINE_COLOR;
+    }
+
+    /**
+     * Returns the color for the inside of the handle.
+     *
+     * @return the color of the handle
+     */
+    protected Color getFillColor() {
+        return ColorResources.DESIGN_EDITOR_REISIZE_HANDLE_FILL_COLOR;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/BlockLayer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/BlockLayer.java
new file mode 100644 (file)
index 0000000..f3c3817
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.layers;
+
+import org.eclipse.draw2d.FreeformLayer;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.Viewport;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.FontResources;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class BlockLayer extends FreeformLayer {
+    private Viewport viewPort;
+
+    @Override
+    public void paintFigure(Graphics graphics) {
+        Rectangle rect = this.getBounds();
+        graphics.setAlpha(30);
+        graphics.setBackgroundColor(ColorResources.EDITOR_INVALID_XML_BG);
+        graphics.fillRectangle(rect);
+
+        if (viewPort != null) {
+            Rectangle viewPortArea = viewPort.getClientArea();
+
+            Image errorImage = ImageResources.getImage(ImageResources.INVALID_XML_ERROR);
+            if (errorImage == null) {
+                return;
+            }
+            int imageWidth = errorImage.getBounds().width;
+
+            GC gc = new GC(Display.getDefault());
+            int dialogWidth = 40 + imageWidth + 14 + gc.textExtent(BuilderMessages.ERROR_INVALID_XML_DESCRIPTION_02).x + 40;
+            int dialogHeight = 104;
+            int dialogX = (viewPortArea.x + viewPortArea.x + viewPortArea.width) / 2 - (dialogWidth / 2);
+            int dialogY = (viewPortArea.y + viewPortArea.y + viewPortArea.height) / 2 - (dialogHeight / 2);
+
+            graphics.setBackgroundColor(ColorResources.DIALOG_INVALID_XML_BG);
+            graphics.setAlpha(120);
+            graphics.setAntialias(255);
+            graphics.fillRoundRectangle(new Rectangle(dialogX, dialogY, dialogWidth, dialogHeight), 12, 12);
+
+            graphics.setAlpha(255);
+            int imageX = dialogX + 40;
+            int imageY = dialogY + (dialogHeight / 2) - 14;
+            graphics.drawImage(ImageResources.getImage(ImageResources.INVALID_XML_ERROR), imageX, imageY);
+
+            int textX = imageX + imageWidth + 14;
+            int textY = dialogY + 26;
+            graphics.setForegroundColor(ColorResources.DIALOG_INVALID_XML_LABEL);
+            graphics.setFont(FontResources.WYSIWYG_INVALID_XML_TITLE);
+            graphics.drawText(BuilderMessages.ERROR_INVALID_XML_TITLE, textX, textY);
+
+            textY = textY + 26;
+            graphics.setFont(FontResources.WYSIWYG_INVALID_XML_TITLE_DESCRIPTION);
+            graphics.drawText(BuilderMessages.ERROR_INVALID_XML_DESCRIPTION_01, textX, textY);
+            graphics.drawText(BuilderMessages.ERROR_INVALID_XML_DESCRIPTION_02, textX, textY + 16);
+
+            gc.dispose();
+        }
+    }
+
+    public void setViewPort(Viewport viewPort) {
+        this.viewPort = viewPort;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/CustomLayerConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/CustomLayerConstants.java
new file mode 100644 (file)
index 0000000..2235350
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.layers;
+
+public class CustomLayerConstants {
+    public static final String OUTLINE_LAYER = "outline_layer";
+    public static final String BLOCK_LAYER = "block_layer"; 
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/FeedbackLayer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/FeedbackLayer.java
new file mode 100644 (file)
index 0000000..309dd5c
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.layers;
+
+import org.eclipse.draw2d.FreeformLayer;
+
+
+public class FeedbackLayer extends FreeformLayer {
+    public FeedbackLayer() {
+        setEnabled(false);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/OutlineLayer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/layers/OutlineLayer.java
new file mode 100644 (file)
index 0000000..c2932cb
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.layers;
+
+import org.eclipse.draw2d.FreeformLayer;
+
+
+public class OutlineLayer extends FreeformLayer {
+    public OutlineLayer() {
+        setEnabled(false);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ComponentDataBindingEditPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ComponentDataBindingEditPolicy.java
new file mode 100644 (file)
index 0000000..90fa6ca
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.ComponentEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.swt.widgets.Display;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.ui.view.databinding.model.DataBindingPartProperty;
+import org.tizen.efluibuilder.ui.view.databinding.model.command.DataBindingCommandFactory;
+
+public class ComponentDataBindingEditPolicy extends ComponentEditPolicy {
+
+    Request lastHandledRequest = null;
+    Command cmd = null;
+
+    @Override
+    public EditPart getTargetEditPart(Request request) {
+        if (REQ_CREATE.equals(request.getType()))
+            return getHost();
+        return null;
+    }
+
+    @Override
+    public Command getCommand(Request request) {
+        if (REQ_CREATE.equals(request.getType()) && request instanceof CreateRequest)
+            return getCreateCommand((CreateRequest) request);
+        return null;
+    }
+
+    private Command getCreateCommand(CreateRequest request) {
+        Object object = request.getNewObjectType();
+        int objtype = (Integer) object;
+        if (ITemplate.DATABINDING == objtype && lastHandledRequest != request) {
+            lastHandledRequest = request;
+            Object ob = request.getNewObject();
+            if (ob == null) {
+                return null;
+            }
+            if (!(ob instanceof DataBindingPartProperty))
+                return null;
+
+            DataBindingPartProperty property = (DataBindingPartProperty) ob;
+            // Point dropPoint = new Point(getDropLocation().x,
+            // getDropLocation().y);
+            EditPart targetEditPart = getTargetEditPart(request);
+            if (targetEditPart == null) {
+                return null;
+            }
+            Object targetModel = targetEditPart.getModel();
+            if (!(targetModel instanceof ComponentPart)) {
+                return null;
+            }
+            ComponentPart part = (ComponentPart) targetModel;
+            cmd = DataBindingCommandFactory.createDropCommand(part, property, Display.getDefault().getActiveShell(), null);
+        }
+        return cmd;
+    }
+
+    @Override
+    public boolean understandsRequest(Request request) {
+        if (RequestConstants.REQ_CREATE.equals(request.getType()))
+            return true;
+        return super.understandsRequest(request);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ComponentDirectEditPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ComponentDirectEditPolicy.java
new file mode 100644 (file)
index 0000000..533664c
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.gef.policies;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.DirectEditPolicy;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.jface.viewers.CellEditor;
+import org.tizen.efluibuilder.gef.editparts.ComponentEditPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.PartUtil;
+
+
+/**
+ * EditPolicy for the direct editing of Column names
+ * 
+ * @author Phil Zoio
+ */
+public class ComponentDirectEditPolicy extends DirectEditPolicy {
+
+    public ComponentDirectEditPolicy() {
+        super();
+    }
+
+    protected Command getDirectEditCommand(DirectEditRequest request) {
+
+        EditPart editPart = getHost();
+        Command command = null;
+        if (editPart instanceof ComponentEditPart) {
+            Part model = (Part) editPart.getModel();
+            CellEditor cellEditor = request.getCellEditor();
+            String propertyName = ((ComponentEditPart) editPart).getPropertyNameDirectEdit();
+            command = PartUtil.createSetPropertyCommand(model, propertyName, (String) cellEditor.getValue());
+        }
+        return command;
+    }
+
+    @Override
+    protected void showCurrentEditValue(DirectEditRequest request) {
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ComponentDoubleClickEditPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ComponentDoubleClickEditPolicy.java
new file mode 100644 (file)
index 0000000..a82126f
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.gef.policies;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+import org.tizen.efluibuilder.gef.editparts.ComponentEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+
+
+public class ComponentDoubleClickEditPolicy extends GraphicalEditPolicy {
+
+    public Command getCommand(Request request) {
+        if (RequestConstants.REQ_OPEN == request.getType()) {
+            EditPart editPart = getHost();
+            if (editPart instanceof ComponentEditPart) {
+                DesignEditPart parentEditPart = (DesignEditPart) editPart.getParent();
+                Part model = (Part) editPart.getModel();
+                if (model != null) {
+                    Part parentModel = model.getParent();
+
+                    if (parentModel != null && parentModel.getDescriptorId().equals(LayoutSchemaConstants.GRID)) {
+                        Rectangle parentBounds = new Rectangle(0, 0, parentEditPart.getPosition().width, parentEditPart.getPosition().height);
+                        parentBounds = DesignEditorUtil.pixelBoundToGridBound(parentEditPart, parentBounds);
+                        Command newCommand = PartUtil.createPackCommand(model, parentModel, parentBounds);
+                        return newCommand;
+                    }
+                }
+
+            }
+        }
+
+        return null;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ContentContainerOutlineFeedbackPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ContentContainerOutlineFeedbackPolicy.java
new file mode 100644 (file)
index 0000000..5901a35
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies;
+
+import org.eclipse.gef.EditPart;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+public class ContentContainerOutlineFeedbackPolicy extends OutlineFeedbackPolicy {
+    protected boolean needToShow() {
+        if ((this.getHost().getSelected() != EditPart.SELECTED_NONE)
+                || (this.getHost().getModel() instanceof Part && DesignEditorUtil.hasContent((Part) (getHost().getModel())) == true)) {
+            return false;
+        }
+        return true;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/CustomSnapFeedbackPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/CustomSnapFeedbackPolicy.java
new file mode 100644 (file)
index 0000000..ce35ed2
--- /dev/null
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - change feedback line color
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.gef.policies;
+
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.FigureUtilities;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.SnapToGeometry;
+import org.eclipse.gef.SnapToGuides;
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.PaletteData;
+import org.eclipse.swt.widgets.Display;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class CustomSnapFeedbackPolicy extends GraphicalEditPolicy {
+
+    IFigure guide[] = new IFigure[6];
+    Integer location[] = new Integer[6];
+
+    /**
+     * @see org.eclipse.gef.EditPolicy#eraseTargetFeedback(org.eclipse.gef.Request)
+     */
+    public void eraseTargetFeedback(Request request) {
+        for (int i = 0; i < guide.length; i++) {
+            if (guide[i] != null)
+                removeFeedback(guide[i]);
+            guide[i] = null;
+            location[i] = null;
+        }
+    }
+
+    static class FadeIn extends Figure {
+        int opacity = 0;
+        static final int FRAMES = 6;
+        Image image;
+        static int count;
+
+        FadeIn(Color bg) {
+            setBackgroundColor(bg);
+            super.setOpaque(true);
+        }
+
+        private Color createMixedColor() {
+            return FigureUtilities
+                    .mixColors(getLocalBackgroundColor(), getParent()
+                            .getBackgroundColor(), (double) opacity / FRAMES);
+        }
+
+        /**
+         * @see org.eclipse.draw2d.Figure#paintFigure(org.eclipse.draw2d.Graphics)
+         */
+        protected void paintFigure(Graphics graphics) {
+            if (opacity != FRAMES) {
+                if (image != null) {
+                    image.dispose();
+                    count--;
+                    image = null;
+                }
+                if (opacity != FRAMES - 1) {
+                    Display display = Display.getCurrent();
+                    PaletteData pData = new PaletteData(0xFF, 0xFF00, 0xFF0000);
+                    Color localBackgroundColor = createMixedColor();
+                    int fillColor = pData.getPixel(localBackgroundColor
+                            .getRGB());
+                    localBackgroundColor.dispose();
+                    ImageData iData = new ImageData(1, 1, 24, pData);
+                    iData.setPixel(0, 0, fillColor);
+                    iData.setAlpha(0, 0, 255 * opacity / FRAMES);
+                    image = new Image(display, iData);
+                    count++;
+                }
+                Display.getCurrent().timerExec(100, new Runnable() {
+                    public void run() {
+                        opacity = Math.min(FRAMES, opacity + 1);
+                        repaint();
+                    }
+                });
+            }
+            Rectangle r = getBounds();
+            if (image != null)
+                graphics.drawImage(image, 0, 0, 1, 1, r.x, r.y, r.width,
+                                   r.height);
+            else
+                super.paintFigure(graphics);
+        }
+
+        /**
+         * @see org.eclipse.draw2d.Figure#removeNotify()
+         */
+        public void removeNotify() {
+            if (image != null) {
+                image.dispose();
+                count--;
+                image = null;
+            }
+        }
+    }
+
+    // Even offset indicates a vertical feedback line; odd, horizontal.
+    void highlightGuide(Integer pos, Color color, int offset) {
+        if (pos == null) {
+            if (guide[offset] != null) {
+                removeFeedback(guide[offset]);
+                guide[offset] = null;
+            }
+            location[offset] = pos;
+            return;
+        }
+
+        // pos is an integer relative to target's client area.
+        // translate pos to absolute, and then make it relative to fig.
+        int position = pos.intValue();
+        PrecisionPoint loc = new PrecisionPoint(position, position);
+        IFigure contentPane = ((GraphicalEditPart) getHost()).getContentPane();
+        contentPane.translateToParent(loc);
+        contentPane.translateToAbsolute(loc);
+
+        if (location[offset] == null || !location[offset].equals(pos)) {
+            location[offset] = pos;
+            if (guide[offset] != null) {
+                removeFeedback(guide[offset]);
+                guide[offset] = null;
+            }
+
+            IFigure fig = new FadeIn(color);
+            guide[offset] = fig;
+            addFeedback(fig);
+            fig.translateToRelative(loc);
+            position = offset % 2 == 0 ? (int) Math.round(loc.preciseX())
+                    : (int) Math.round(loc.preciseY());
+            Rectangle figBounds = getFeedbackLayer().getBounds().getCopy();
+            if ((offset % 2) == 1) {
+                figBounds.height = 1;
+                figBounds.y = position;
+            } else {
+                figBounds.x = position;
+                figBounds.width = 1;
+            }
+            fig.setBounds(figBounds);
+        } else {
+            // The feedback layer could have grown (if auto-scrolling), so
+            // resize the fade-in
+            // line.
+            IFigure fig = guide[offset];
+            Rectangle figBounds = fig.getBounds().getCopy();
+            Rectangle feedbackBounds = getFeedbackLayer().getBounds();
+            if ((offset % 2) == 1) {
+                figBounds.x = feedbackBounds.x;
+                figBounds.width = feedbackBounds.width;
+            } else {
+                figBounds.y = feedbackBounds.y;
+                figBounds.height = feedbackBounds.height;
+            }
+            fig.setBounds(figBounds);
+        }
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPolicy#showTargetFeedback(org.eclipse.gef.Request)
+     */
+    public void showTargetFeedback(Request req) {
+        if (req.getType().equals(REQ_MOVE) || req.getType().equals(REQ_RESIZE)
+                || req.getType().equals(REQ_CLONE)
+                || req.getType().equals(REQ_ADD)
+                || req.getType().equals(REQ_CREATE)) {
+
+            // modified by Tizen SDK [start]
+            Integer value;
+            value = (Integer) req.getExtendedData().get(
+                                                        SnapToGeometry.KEY_WEST_ANCHOR);
+            highlightGuide(value, ColorResources.DESIGN_EDITOR_SNAP_FEEDBACK_LINE_COLOR, 0);
+
+            value = (Integer) req.getExtendedData().get(
+                                                        SnapToGeometry.KEY_NORTH_ANCHOR);
+            highlightGuide(value, ColorResources.DESIGN_EDITOR_SNAP_FEEDBACK_LINE_COLOR, 1);
+
+            value = (Integer) req.getExtendedData().get(
+                                                        SnapToGeometry.KEY_EAST_ANCHOR);
+            highlightGuide(value, ColorResources.DESIGN_EDITOR_SNAP_FEEDBACK_LINE_COLOR, 2);
+
+            value = (Integer) req.getExtendedData().get(
+                                                        SnapToGeometry.KEY_SOUTH_ANCHOR);
+            highlightGuide(value, ColorResources.DESIGN_EDITOR_SNAP_FEEDBACK_LINE_COLOR, 3);
+
+            value = (Integer) req.getExtendedData().get(
+                                                        SnapToGuides.KEY_VERTICAL_GUIDE);
+            highlightGuide(value, ColorResources.DESIGN_EDITOR_SNAP_FEEDBACK_LINE_COLOR, 4);
+
+            value = (Integer) req.getExtendedData().get(
+                                                        SnapToGuides.KEY_HORIZONTAL_GUIDE);
+            highlightGuide(value, ColorResources.DESIGN_EDITOR_SNAP_FEEDBACK_LINE_COLOR, 5);
+            // modified by Tizen SDK [end]
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/DesignConnectionEndpointEditPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/DesignConnectionEndpointEditPolicy.java
new file mode 100644 (file)
index 0000000..03debaa
--- /dev/null
@@ -0,0 +1,17 @@
+package org.tizen.efluibuilder.gef.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.editpolicies.ConnectionEndpointEditPolicy;
+
+public class DesignConnectionEndpointEditPolicy extends ConnectionEndpointEditPolicy{
+    protected List createSelectionHandles() {
+        List list = new ArrayList();
+//        list.add(new ConnectionEndpointHandle((ConnectionEditPart) getHost(),
+//                ConnectionLocator.SOURCE));
+//        list.add(new ConnectionEndpointHandle((ConnectionEditPart) getHost(),
+//                ConnectionLocator.TARGET));
+        return list;        
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/DesignSelectionEditPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/DesignSelectionEditPolicy.java
new file mode 100644 (file)
index 0000000..ccb7998
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies;
+
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.SelectionEditPolicy;
+
+
+public class DesignSelectionEditPolicy extends SelectionEditPolicy {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.SelectionEditPolicy#activate()
+     */
+    @Override
+    public void activate() {
+        super.activate();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.SelectionEditPolicy#deactivate()
+     */
+    @Override
+    public void deactivate() {
+        super.deactivate();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#getCommand(org.eclipse .gef.Request)
+     */
+    @Override
+    public Command getCommand(Request request) {
+        return null;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.SelectionEditPolicy#hideSelection()
+     */
+    @Override
+    protected void hideSelection() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.SelectionEditPolicy#showSelection()
+     */
+    @Override
+    protected void showSelection() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#showTargetFeedback(org
+     * .eclipse.gef.Request)
+     */
+    @Override
+    public void showTargetFeedback(Request request) {
+        if (request == null) {
+            return;
+        }
+        super.showTargetFeedback(request);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/DesignerSelectionEditPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/DesignerSelectionEditPolicy.java
new file mode 100644 (file)
index 0000000..693ea35
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies;
+
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.SelectionEditPolicy;
+
+
+public class DesignerSelectionEditPolicy extends SelectionEditPolicy {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.SelectionEditPolicy#activate()
+     */
+    @Override
+    public void activate() {
+        super.activate();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.SelectionEditPolicy#deactivate()
+     */
+    @Override
+    public void deactivate() {
+        super.deactivate();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#getCommand(org.eclipse .gef.Request)
+     */
+    @Override
+    public Command getCommand(Request request) {
+        return null;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.SelectionEditPolicy#hideSelection()
+     */
+    @Override
+    protected void hideSelection() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.SelectionEditPolicy#showSelection()
+     */
+    @Override
+    protected void showSelection() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#showTargetFeedback(org
+     * .eclipse.gef.Request)
+     */
+    @Override
+    public void showTargetFeedback(Request request) {
+        if (request == null) {
+            return;
+        }
+        super.showTargetFeedback(request);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/FitSingleViewPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/FitSingleViewPolicy.java
new file mode 100644 (file)
index 0000000..0986393
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editparts.ZoomManager;
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+import org.eclipse.gef.requests.SelectionRequest;
+import org.tizen.efluibuilder.gef.figure.IActionTriggerable;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+
+public class FitSingleViewPolicy extends GraphicalEditPolicy {    
+   
+    protected ZoomManager zoomMgr = null;
+
+    public FitSingleViewPolicy() {
+        super();
+    }
+
+    @Override
+    public void deactivate() {
+        super.activate();  
+    }
+
+    @Override
+    public void activate() {
+        super.activate();       
+    }
+
+    @Override
+    public boolean understandsRequest(Request req) {
+        if (req.getType().equals(RequestConstants.REQ_OPEN)) {
+            return true;
+        }
+        return false;
+    }   
+    
+    public Command getCommand(Request request) {        
+        if (RequestConstants.REQ_OPEN == request.getType()) {
+            if (this.getHost().getViewer() instanceof DesignViewer) {
+                DesignViewer viewer = (DesignViewer) (this.getHost().getViewer());                                    
+                
+                if (viewer.getSelectedEditParts().size() != 1) {
+                    return null;
+                }
+                SelectionRequest selReq = (SelectionRequest)request;                
+                IFigure figure = viewer.findFigureAt(selReq.getLocation());
+                if (figure instanceof IActionTriggerable &&
+                        ActionConstants.FIT_TO_SINGLE_VIEW.equals(((IActionTriggerable)figure).getTriggerString())) {
+                    viewer.fitToSingleView((Part) this.getHost().getModel());
+                }                                                                       
+     
+            }
+        }
+        return null;
+    }
+   
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ItemOutlineFeedbackPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/ItemOutlineFeedbackPolicy.java
new file mode 100644 (file)
index 0000000..1c90797
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class ItemOutlineFeedbackPolicy extends OutlineFeedbackPolicy {
+    @Override
+    protected boolean needToShow() {      
+        return true;
+    }
+
+    @Override
+    protected void decorateFeedback() {
+        if (outlineFeedback != null) {
+            outlineFeedback.setBackgroundColor(ColorResources.DESIGN_EDITOR_CHANGE_BOUND_FEEDBACK_FILL_COLOR, 0);
+            outlineFeedback.setOutline(true);
+            outlineFeedback.setLineStyle(Graphics.LINE_SOLID);
+            outlineFeedback.setForegroundColor(ColorResources.DESIGN_EDITOR_PLACEHOLDER_LINE_COLOR, 255);
+            outlineFeedback.setBounds(new Rectangle(0, 0, 0, 0));
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/OpenEdcEditorPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/OpenEdcEditorPolicy.java
new file mode 100644 (file)
index 0000000..5968e20
--- /dev/null
@@ -0,0 +1,232 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.draw2d.ImageFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
+import org.eclipse.gef.editparts.ZoomListener;
+import org.eclipse.gef.editparts.ZoomManager;
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.renderer.Position;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.wizard.newfile.EdcFileWizard;
+import org.tizen.nativecore.enventor.executer.EDCEditorExecuter;
+
+
+public class OpenEdcEditorPolicy extends GraphicalEditPolicy implements ZoomListener {
+
+    public final static String PATH_RES = "res";
+    public final static String EXTENSTION_EDJ = "edj";
+    public final static String EXTENSTION_EDC = "edc";
+    private final static int figureSize = 26;
+    private final static int rightTopMargin = 6;
+
+    private ImageFigure figure = null;
+    protected ZoomManager zoomMgr = null;
+
+    public OpenEdcEditorPolicy() {
+        super();
+    }
+
+    @Override
+    public void deactivate() {
+        super.activate();
+        if (figure != null) {
+            getFeedbackLayer().remove(figure);
+            figure = null;
+        }
+    }
+
+    @Override
+    public void activate() {
+        super.activate();
+
+        if (figure == null) {
+            Image img = ImageResources.getImage(ImageResources.EDITOR_OPEN_EDC_EDITOR);
+            figure = new ImageFigure(img);
+            figure.setSize(figureSize, figureSize);
+            figure.setLocation(new Point(0, 0));
+            figure.setVisible(false);
+            getFeedbackLayer().add(figure);
+        }
+
+        if (getHost().getViewer().getRootEditPart() instanceof ScalableFreeformRootEditPart) {
+            ScalableFreeformRootEditPart rootEditPart = (ScalableFreeformRootEditPart) getHost().getViewer().getRootEditPart();
+            this.zoomMgr = rootEditPart.getZoomManager();
+            zoomMgr.addZoomListener(this);
+        }
+    }
+
+    @Override
+    public boolean understandsRequest(Request req) {
+        if (req.getType().equals(RequestConstants.REQ_OPEN)) {
+            return true;
+        }
+        return false;
+    }
+
+    private Point getIconLocation() {
+        Point location = new Point();
+        if (this.getHost() instanceof DesignEditPart) {
+            DesignEditPart editpart = (DesignEditPart) getHost();
+            Position position = editpart.getPosition();
+            boolean hasContent = DesignEditorUtil.hasContent((Part) (this.getHost().getModel()));
+            double zoom = zoomMgr.getZoom();
+
+            if (position.width > 0 && position.height > 0) {
+                if (hasContent == false) {
+                    location.x = (int) ((position.x + position.width / 2) * zoom + 0.5 - figureSize / 2);
+                    location.y = (int) ((position.y + position.height / 2) * zoom + 0.5 - figureSize / 2);
+                } else {
+                    location.x = (int) ((position.x + position.width) * zoom + 0.5 - (figureSize + rightTopMargin));
+                    location.y = (int) (position.y * zoom + 0.5) + rightTopMargin;
+                }
+            }
+        }
+        return location;
+    }
+
+    public void refresh() {
+        if (zoomMgr == null || figure == null) {
+            return;
+        }
+
+        if (this.getHost() instanceof DesignEditPart) {
+            DesignEditPart editpart = (DesignEditPart) getHost();
+            Position position = editpart.getPosition();
+            boolean hasContent = DesignEditorUtil.hasContent((Part) (this.getHost().getModel()));
+            if (position.width > 0 && position.height > 0) {
+                figure.setLocation(getIconLocation());
+                if (hasContent && editpart.getSelected() == EditPart.SELECTED_NONE || editpart.getViewer().getSelectedEditParts().size() > 1) {
+                    figure.setVisible(false);
+                } else {
+                    figure.setVisible(true);
+                }
+            }
+        }
+    }
+
+    private String getRealPath() {
+        DesignViewer viewer = (DesignViewer) (this.getHost().getViewer());
+        Part part = (Part) (this.getHost().getModel());
+        String realPath = viewer.getGraphicalDataMgr().getRenderDataGenerator().getRealPathFromResourceProperty(part, LayoutSchemaConstants.SRC,
+                                                                                                                viewer.getMScreenQualifierManager()
+                                                                                                                        .getCurrentDevice(),
+                                                                                                                viewer.getMScreenQualifierManager()
+                                                                                                                        .getCurrentLocale());
+        return realPath;
+    }
+
+    public Command getCommand(Request request) {
+        Command cmd = null;
+        if (RequestConstants.REQ_OPEN == request.getType()) {
+            if (this.getHost().getViewer() instanceof DesignViewer) {
+                DesignViewer viewer = (DesignViewer) (this.getHost().getViewer());
+                String realPath = getRealPath();
+                IProject project = viewer.getProject();
+                IFolder resFolder = project.getFolder(PATH_RES);
+                String edcFilePath = null;
+                boolean bOpenWithTemplate = false;
+
+                if (viewer.getSelectedEditParts().size() != 1 || resFolder == null || !resFolder.exists()) {
+                    return null;
+                }
+
+                // LocationRequest req = (LocationRequest) request;
+                // Point location = req.getLocation();
+                // Point iconLocation = this.getIconLocation();
+                //
+                // if (location.x < iconLocation.x || location.x > iconLocation.x + figureSize ||
+                // location.y < iconLocation.y || location.y > iconLocation.y + figureSize) {
+                // return null;
+                // }
+
+                if (realPath == null || realPath.isEmpty()) {
+                    Object[] projectsToSelect = new Object[] { resFolder };
+                    EdcFileWizard wizard = new EdcFileWizard();
+                    try {
+                        wizard.setSelection(new StructuredSelection(projectsToSelect));
+                        WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
+                        wd.setTitle(wizard.getWindowTitle());
+                        if (wd.open() == Dialog.OK) {
+                            IFile createdFile = wizard.getCreatedFile();
+                            IPath filePath = createdFile.getFullPath();
+                            IPath relPath = filePath.makeRelativeTo(resFolder.getFullPath());
+                            relPath = relPath.removeFileExtension();
+                            relPath = relPath.addFileExtension(EXTENSTION_EDJ);
+                            if (relPath != null) {
+                                cmd = PartUtil.createSetPropertyCommand((Part) (this.getHost().getModel()), LayoutSchemaConstants.SRC, relPath.toString());
+                                edcFilePath = relPath.toString();
+                                bOpenWithTemplate = true;
+                            }
+                        }
+
+                    } finally {
+                        wizard.dispose();
+                    }
+                } else {
+                    edcFilePath = realPath;
+                }
+                if (edcFilePath != null && !edcFilePath.isEmpty()) {
+                    if (EDCEditorExecuter.checkTool().isEmpty()) {
+                        IPath path = project.getLocation().append(PATH_RES).append(edcFilePath);
+                        path = path.removeFileExtension().addFileExtension(EXTENSTION_EDC);
+                        File file = path.toFile();
+                        if (file.exists() == true) {
+                            EDCEditorExecuter.executeTool(path, bOpenWithTemplate);
+                        }
+                    }
+                }
+            }
+        }
+        return cmd;
+    }
+
+    @Override
+    public void zoomChanged(double zoom) {
+        this.refresh();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/OutlineFeedbackPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/OutlineFeedbackPolicy.java
new file mode 100644 (file)
index 0000000..5830f36
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
+import org.eclipse.gef.editparts.ZoomListener;
+import org.eclipse.gef.editparts.ZoomManager;
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.LineAttributes;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.figure.CommonRectangleFigure;
+import org.tizen.efluibuilder.gef.layers.CustomLayerConstants;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class OutlineFeedbackPolicy extends GraphicalEditPolicy implements ZoomListener {
+    protected CommonRectangleFigure outlineFeedback;
+    protected ZoomManager zoomMgr = null;
+    protected Rectangle bounds = null;
+
+    protected boolean needToShow() {
+        if (this.getHost().getModel() instanceof ComponentPart && this.getHost().getViewer() instanceof DesignViewer) {
+            ComponentPart model = (ComponentPart) this.getHost().getModel();            
+            DesignViewer viewer = (DesignViewer) this.getHost().getViewer();
+
+            if ((viewer.getMScreenQualifierManager().getCurrentConfigurePart() != null) &&
+                    DesignEditorUtil.isHided(model, viewer.getMScreenQualifierManager().getCurrentConfigurePart().getPropertyValue(LayoutSchemaConstants.ID))) {
+                return false;
+            }
+        }
+        if (this.getHost().getSelected() == EditPart.SELECTED_NONE) {
+            return true;
+        }
+        return false;
+    }
+
+    protected void decorateFeedback() {
+        if (outlineFeedback != null) {
+            outlineFeedback.setBackgroundColor(ColorResources.DESIGN_EDITOR_CHANGE_BOUND_FEEDBACK_FILL_COLOR, 0);
+            outlineFeedback.setOutline(true);
+            outlineFeedback.setLineStyle(Graphics.LINE_DASH);
+            outlineFeedback.setLineAttributes(new LineAttributes(1, SWT.CAP_ROUND, SWT.JOIN_ROUND, SWT.LINE_CUSTOM, new float[] { 5 }, 3, 0));
+            outlineFeedback.setForegroundColor(ColorResources.DESIGN_EDITOR_PLACEHOLDER_LINE_COLOR, 255);
+            outlineFeedback.setBounds(new Rectangle(0, 0, 0, 0));
+        }
+    }
+
+    public void refresh() {
+        if (zoomMgr != null && outlineFeedback != null && bounds != null) {
+            outlineFeedback.setVisible(needToShow());
+            double zoom = zoomMgr.getZoom();
+            Rectangle rect = ((DesignEditPart) this.getHost()).getPosition().getBounds().getCopy();
+            DesignEditorUtil.scaleRect(rect, zoom);            
+            outlineFeedback.setBounds(rect);
+        }
+    }
+
+    @Override
+    public void activate() {
+        super.activate();
+
+        if (outlineFeedback == null) {
+            outlineFeedback = new CommonRectangleFigure();
+            // outlineFeedback.setVisible(true);
+            getFeedbackLayer().add(outlineFeedback);
+            decorateFeedback();
+        }
+
+        if (getHost().getViewer().getRootEditPart() instanceof ScalableFreeformRootEditPart) {
+            ScalableFreeformRootEditPart rootEditPart = (ScalableFreeformRootEditPart) getHost().getViewer().getRootEditPart();
+            this.zoomMgr = rootEditPart.getZoomManager();
+            zoomMgr.addZoomListener(this);
+        }
+    }
+
+    public void setBound(Rectangle r) {
+        this.bounds = r;
+        this.refresh();
+    }
+
+    public void setVisible(boolean bVisible) {
+        if (outlineFeedback != null) {
+            outlineFeedback.setVisible(bVisible);
+        }
+    }
+
+    @Override
+    public void deactivate() {
+        if (outlineFeedback != null) {
+            getFeedbackLayer().remove(outlineFeedback);
+            outlineFeedback = null;
+        }
+
+        if (zoomMgr != null) {
+            zoomMgr.removeZoomListener(this);
+            zoomMgr = null;
+        }
+
+        super.deactivate();
+    }
+
+    @Override
+    protected IFigure getFeedbackLayer() {
+        return getLayer(CustomLayerConstants.OUTLINE_LAYER);
+    }
+
+    @Override
+    public void zoomChanged(double zoom) {
+        this.refresh();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/BoxChildResizablePolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/BoxChildResizablePolicy.java
new file mode 100644 (file)
index 0000000..3f60fc4
--- /dev/null
@@ -0,0 +1,445 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Handle;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.CreateRequest;
+import org.tizen.efluibuilder.gef.commands.WidgetRelation;
+import org.tizen.efluibuilder.gef.commands.WidgetRelation.Relation;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.gef.editparts.ContainerEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.figure.PolygonFigure;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class BoxChildResizablePolicy extends CommonChildResizablePolicy {
+    private static final String EXTENSION_FLAG = "relation"; //$NON-NLS-1$
+
+    private enum PAD {
+        NONE, LEFT, TOP, RIGHT, BOTTOM;
+    }
+
+    private PolygonFigure siblingHoverFeedback;
+
+    public BoxChildResizablePolicy() {
+        super();
+        setDragAllowed(true);
+    }
+
+    @Override
+    public void activate() {
+        super.activate();
+
+        if (null == siblingHoverFeedback) {
+            siblingHoverFeedback = new PolygonFigure();
+            siblingHoverFeedback.setAlpha(127);
+            siblingHoverFeedback.setFill(true);
+            siblingHoverFeedback.setOutline(false);
+            siblingHoverFeedback.setBackgroundColor(ColorResources.DESIGN_EDITOR_CREATION_BOUND_FEEDBACK_COLOR);
+            siblingHoverFeedback.setVisible(false);
+            getFeedbackLayer().add(siblingHoverFeedback);
+        }
+    }
+
+    @Override
+    public void deactivate() {
+        if (siblingHoverFeedback != null) {
+            getFeedbackLayer().remove(siblingHoverFeedback);
+            siblingHoverFeedback = null;
+        }
+
+        super.deactivate();
+    }
+
+    @Override
+    protected Command getCreateCommand(Request request) {
+        if (!(request instanceof CreateRequest)) {
+            return null;
+        }
+
+        CreateRequest createRequest = (CreateRequest) request;
+        Object object = createRequest.getNewObjectType();
+        int type = (Integer) object;
+        if (ITemplate.COMPONENT == type || ITemplate.SNIPPET == type) {
+
+            WidgetRelation relation = this.getWidgetRelation(request);
+
+            if (null != relation) {
+
+                Part parentModel = (Part) getHost().getParent().getModel();
+                Part selfModel = (Part) createRequest.getNewObject();
+                Part hostModel = (Part) getHost().getModel();
+                if (relation.getRelation() == Relation.NEXT_SIBLING) {
+                    hostModel = hostModel.getNextSibling();
+                }
+
+                if (ITemplate.COMPONENT == type) {
+                    initProperties(selfModel);
+                }
+
+                return PartUtil.createAddPartCommand(parentModel, selfModel, hostModel);
+            } else {
+                return null;
+            }
+        }
+
+        return super.getCreateCommand(request);
+    }
+
+    // workaround code for initproperties
+    protected void initProperties(Part part) {
+        Part parentModel = (Part) getHost().getModel();
+        ComponentDescriptor componentDescriptor = parentModel.getOwnerDocumentPart().getComponentDescriptor();
+        Map<String, String> initValues = componentDescriptor.getInitValues((ComponentPart) parentModel, (ComponentPart) part);
+        // FIXME need to clear widget properties?
+        part.getProperties().clear();
+        PartUtil.setInitValues(part, initValues);
+    }
+
+    @Override
+    protected Command getMoveCommand(Request request) {
+
+        WidgetRelation relation = (WidgetRelation) request.getExtendedData().get(EXTENSION_FLAG);
+        if (null != relation) {
+
+            DesignEditPart targetEditpart = (DesignEditPart) relation.getTarget();
+            Part parent = ((Part) getHost().getModel()).getParent();
+
+            Part newParent = parent;
+            Part part = (Part) getHost().getModel();
+            Part nextSibling = null;
+
+            WidgetRelation.Relation relationType = relation.getRelation();
+            if (relationType == WidgetRelation.Relation.PREV_SIBLING) {
+                nextSibling = (Part) targetEditpart.getModel();
+            } else if (relationType == WidgetRelation.Relation.NEXT_SIBLING) {
+                nextSibling = ((Part) targetEditpart.getModel()).getNextSibling();
+            } else {
+                return null;
+            }
+
+            if ((nextSibling == part) || (nextSibling == part.getNextSibling())) {
+                return null;
+            }
+
+            return PartUtil.createMovePartCommand(part, parent, newParent, nextSibling);
+        }
+
+        return null;
+    }
+
+    @Override
+    protected Command getAlignCommand(Request request) {
+        return null;
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    protected List createSelectionHandles() {
+
+        List<Handle> list = new ArrayList<Handle>();
+        createMoveHandle(list);
+
+        setBorderSelectionHandles(list);
+
+        return list;
+    }
+
+    @Override
+    public void showTargetFeedback(Request request) {
+
+        boolean bSiblingHover = true;
+
+        if ((getHost() instanceof ContainerEditPart) || REQ_SELECTION.equals(request.getType()) || REQ_SELECTION_HOVER.equals(request.getType())) {
+            bSiblingHover = false;
+        } else {
+            if (REQ_CREATE.equals(request.getType()) && request instanceof CreateRequest) {
+                int nType = (Integer) ((CreateRequest) request).getNewObjectType();
+                if (ITemplate.PROPERTY == nType) {
+                    bSiblingHover = false;
+                }
+            }
+        }
+
+        if (bSiblingHover) {
+            showTargetSiblingFeedback(request);
+
+        } else {
+            super.showTargetFeedback(request);
+        }
+    }
+
+    @Override
+    public void eraseTargetFeedback(Request request) {
+        super.eraseTargetFeedback(request);
+
+        if (null == siblingHoverFeedback)
+            return;
+
+        siblingHoverFeedback.setVisible(false);
+
+    }
+
+    @Override
+    public void showSourceFeedback(Request request) {
+
+        super.showSourceFeedback(request);
+
+        return;
+    }
+
+    @Override
+    public void eraseSourceFeedback(Request request) {
+
+        super.eraseSourceFeedback(request);
+
+        return;
+    }
+
+    private boolean isHorizontalBoxType(Part boxPart) {
+        String direction = boxPart.getPropertyValue(LayoutSchemaConstants.DIRECTION);
+        if (direction != null && !direction.isEmpty()) {
+            if (direction.equals(LayoutSchemaConstants.BOX_DIRECTION_HORIZONTAL))
+                return true;
+        }
+        return false;
+    }
+
+    private PointList makePolygonHoverArea(Rectangle srcR, PAD pad) {
+        PointList polygonHover = new PointList();
+        final int boundIncre = this.getHostFigure().getParent().getBounds().width / 10;
+        int boundSlope = (int) (((float) srcR.width / (float) srcR.height) * boundIncre);
+
+        switch (pad) {
+            case LEFT: {
+                polygonHover.addPoint(srcR.x, srcR.y);
+                polygonHover.addPoint(srcR.x + boundSlope, srcR.y + boundIncre);
+                polygonHover.addPoint(srcR.x + boundSlope, srcR.y + srcR.height - boundIncre);
+                polygonHover.addPoint(srcR.x, srcR.y + srcR.height);
+            }
+                break;
+            case TOP: {
+                polygonHover.addPoint(srcR.x, srcR.y);
+                polygonHover.addPoint(srcR.x + srcR.width, srcR.y);
+                polygonHover.addPoint(srcR.x + srcR.width - boundSlope, srcR.y + boundIncre);
+                polygonHover.addPoint(srcR.x + boundSlope, srcR.y + boundIncre);
+            }
+                break;
+            case RIGHT: {
+                polygonHover.addPoint(srcR.x + srcR.width - boundSlope, srcR.y + boundIncre);
+                polygonHover.addPoint(srcR.x + srcR.width, srcR.y);
+                polygonHover.addPoint(srcR.x + srcR.width, srcR.y + srcR.height);
+                polygonHover.addPoint(srcR.x + srcR.width - boundSlope, srcR.y + srcR.height - boundIncre);
+            }
+                break;
+            case BOTTOM: {
+                polygonHover.addPoint(srcR.x, srcR.y + srcR.height);
+                polygonHover.addPoint(srcR.x + srcR.width, srcR.y + srcR.height);
+                polygonHover.addPoint(srcR.x + srcR.width - boundSlope, srcR.y + srcR.height - boundIncre);
+                polygonHover.addPoint(srcR.x + boundSlope, srcR.y + srcR.height - boundIncre);
+
+            }
+                break;
+            default:
+                break;
+        }
+
+        return polygonHover;
+    }
+
+    private PAD getHoverPadByPoint(final Rectangle targetArea, final Point sourcePt, final boolean bhorizontal) {
+
+        PAD revalPad = PAD.NONE;
+        PointList polygonHover = null;
+
+        do {
+            if (bhorizontal) {
+
+                polygonHover = makePolygonHoverArea(targetArea, PAD.LEFT);
+
+                if (polygonHover.polygonContainsPoint(sourcePt.x, sourcePt.y)) {
+                    revalPad = PAD.LEFT;
+                    break;
+                } else {
+
+                    polygonHover = makePolygonHoverArea(targetArea, PAD.RIGHT);
+                    if (polygonHover.polygonContainsPoint(sourcePt.x, sourcePt.y)) {
+                        revalPad = PAD.RIGHT;
+                        break;
+                    }
+                }
+
+            } else {
+
+                polygonHover = makePolygonHoverArea(targetArea, PAD.TOP);
+
+                if (polygonHover.polygonContainsPoint(sourcePt.x, sourcePt.y)) {
+                    revalPad = PAD.TOP;
+                    break;
+                } else {
+
+                    polygonHover = makePolygonHoverArea(targetArea, PAD.BOTTOM);
+                    if (polygonHover.polygonContainsPoint(sourcePt.x, sourcePt.y)) {
+                        revalPad = PAD.BOTTOM;
+                        break;
+                    }
+                }
+            }
+
+        } while (false);
+
+        return revalPad;
+    }
+
+    private WidgetRelation getWidgetRelation(Request request) {
+        if (null != getHost()) {
+            Part part = (Part) getHost().getModel();
+            if (null == part) {
+                return null;
+            }
+            Rectangle area = ((DesignEditPart) getHost()).getFigure().getBounds();
+            if (null == area) {
+                return null;
+            }
+            Point mousePt = DesignEditorUtil.getLocationByRequest(request).getCopy();
+            if (null == mousePt) {
+                return null;
+            }
+
+            translateToCustom(mousePt);
+
+            boolean bHorizontal = isHorizontalBoxType(part.getParent());
+            PAD pad = getHoverPadByPoint(area, mousePt, bHorizontal);
+
+            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+            // WORKAROUND !!!!!!!!
+            // It's not feedback's logic
+            if ((null != request)) {
+
+                WidgetRelation.Relation relationType = WidgetRelation.Relation.DENY;
+                if ((PAD.TOP == pad) || (PAD.LEFT == pad)) {
+                    relationType = WidgetRelation.Relation.PREV_SIBLING;
+                } else if ((PAD.RIGHT == pad) || (PAD.BOTTOM == pad)) {
+                    relationType = WidgetRelation.Relation.NEXT_SIBLING;
+                }
+
+                WidgetRelation relation = new WidgetRelation(getHost(), relationType, 0);
+                return relation;
+            }
+
+        }
+        return null;
+
+    }
+
+    @SuppressWarnings("unchecked")
+    public void showTargetSiblingFeedback(Request request) {
+        if (request == null) {
+            throw new NullPointerException();
+        }
+
+        PointList polygonHover = null;
+        do {
+            if (null == siblingHoverFeedback) {
+                break;
+            }
+
+            if (REQ_MOVE.equals(request.getType()) || REQ_RESIZE.equals(request.getType())) {
+                DesignEditPart targetEditPart = (DesignEditPart) getHost().getParent();
+
+                if (request instanceof ChangeBoundsRequest) {
+
+                    List<EditPart> childParts = ((ChangeBoundsRequest) request).getEditParts();
+                    for (EditPart part : childParts) {
+                        DesignEditPart parentPart = (DesignEditPart) part.getParent();
+                        if (parentPart != targetEditPart) {
+                            return;
+                        }
+                    }
+                }
+            }
+
+            Part part = (Part) getHost().getModel();
+            if (null == part) {
+                break;
+            }
+            Rectangle area = ((DesignEditPart) getHost()).getFigure().getBounds();
+            if (null == area) {
+                break;
+            }
+            Point mousePt = DesignEditorUtil.getLocationByRequest(request).getCopy();
+            if (null == mousePt) {
+                break;
+            }
+
+            translateToCustom(mousePt);
+
+            boolean bHorizontal = isHorizontalBoxType(part.getParent());
+            PAD pad = getHoverPadByPoint(area, mousePt, bHorizontal);
+            if (PAD.NONE != pad) {
+                polygonHover = makePolygonHoverArea(area, pad);
+            }
+
+            {
+                // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+                // WORKAROUND !!!!!!!!
+                // It's not feedback's logic
+                WidgetRelation relation = getWidgetRelation(request);
+                request.getExtendedData().put(EXTENSION_FLAG, relation);
+
+            }
+
+        } while (false);
+
+        if (siblingHoverFeedback == null) {
+            return;
+        }
+
+        if (null != polygonHover) {
+            siblingHoverFeedback.setPolygonPoints(polygonHover);
+            siblingHoverFeedback.setVisible(true);
+        } else {
+            siblingHoverFeedback.setVisible(false);
+        }
+
+        return;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/BoxLayoutPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/BoxLayoutPolicy.java
new file mode 100644 (file)
index 0000000..d2fc950
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+
+
+public class BoxLayoutPolicy extends CommonLayoutPolicy {
+
+    @Override
+    protected EditPolicy createChildEditPolicy(EditPart child) {
+        if (child instanceof DesignEditPart) {
+            return new BoxChildResizablePolicy();
+        }
+        return null;
+    }
+
+    @Override
+    protected Rectangle getComponentPack(int objtype, Point srcLoc, Point srcSize, ComponentPart srcModel) {
+        switch (objtype) {
+
+            case ITemplate.COMPONENT:
+            case ITemplate.SNIPPET: {
+                /*
+                 * Create a child widget on a box if there's no child. otherwise,
+                 * BoxChildResizablePolicy
+                 */
+                if (getHost().getChildren().size() == 0) {
+
+                    return new Rectangle(0, 0, 1, 1);
+                }
+            }
+                break;
+            default:
+                break;
+        }
+
+        return null;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/CommonChildResizablePolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/CommonChildResizablePolicy.java
new file mode 100644 (file)
index 0000000..ab9a3d2
--- /dev/null
@@ -0,0 +1,423 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.AbstractBorder;
+import org.eclipse.draw2d.Cursors;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Handle;
+import org.eclipse.gef.LayerConstants;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.SharedCursors;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.editpolicies.ResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.handles.ResizableHandleKit;
+import org.eclipse.gef.handles.ResizeHandle;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gef.requests.SelectionRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.gef.dnd.model.ResourceTemplateProperty;
+import org.tizen.efluibuilder.gef.editparts.DesignRootEditPart;
+import org.tizen.efluibuilder.gef.figure.border.WidgetSelectionBorder;
+import org.tizen.efluibuilder.gef.handles.CustomResizeHandle;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+import edjResourceSyncManager.EdjResourceSyncManager;
+
+
+public class CommonChildResizablePolicy extends ResizableEditPolicy {
+    private static Logger logger = LoggerFactory.getLogger(CommonChildResizablePolicy.class);
+
+    final protected String REQ_KEY_CHANGETARGET = "change-target";
+
+    private RectangleFigure hoverFeedback;
+
+    @Override
+    public void activate() {
+        super.activate();
+
+        if (hoverFeedback == null) {
+            hoverFeedback = new RectangleFigure();
+            hoverFeedback.setAlpha(75);
+            hoverFeedback.setFill(true);
+            hoverFeedback.setOutline(true);
+            hoverFeedback.setLineWidth(1);
+            hoverFeedback.setBackgroundColor(ColorResources.DESIGN_EDITOR_COMPONENT_HOVER_COLOR);
+            hoverFeedback.setForegroundColor(ColorResources.DESIGN_EDITOR_COMPONENT_HOVER_COLOR);
+            // hoverFeedback.setLineStyle(Graphics.LINE_DOT);
+            hoverFeedback.setBounds(new Rectangle(0, 0, 0, 0));
+            hoverFeedback.setVisible(true);
+            getFeedbackLayer().add(hoverFeedback);
+        }
+    }
+
+    @Override
+    public void deactivate() {
+        if (hoverFeedback != null) {
+            getFeedbackLayer().remove(hoverFeedback);
+            hoverFeedback = null;
+        }
+        super.deactivate();
+    }
+
+    @Override
+    protected void createResizeHandle(List handles, int direction) {
+        ResizeHandle handle = new CustomResizeHandle((GraphicalEditPart) this.getHost(), direction);
+        handle.setDragTracker(getResizeTracker(direction));
+        handle.setCursor(Cursors.getDirectionalCursor(direction, getHostFigure().isMirrored()));
+        handles.add(handle);
+    }
+
+    private Command getCreateCommand(CreateRequest request, int type) {
+        Command command = null;
+        switch (type) {
+            case ITemplate.COMPONENT:
+            case ITemplate.SNIPPET: {
+                break;
+            }
+            case ITemplate.PROPERTY:
+                EditPart hostPart = getHost();
+                if (hostPart == null) {
+                    return null;
+                }
+
+                Part model = (Part) hostPart.getModel();
+                ResourceTemplateProperty property = (ResourceTemplateProperty) request.getNewObject();
+
+                if (property == null) {
+                    return null;
+                }
+
+                if (!model.hasProperty(property.getName())) {
+                    return null;
+                }
+
+                ComponentDescriptor componentDescriptor = model.getOwnerDocumentPart().getComponentDescriptor();
+                PropertyDescriptor propertyDescriptor = componentDescriptor.getPropertyDescriptor(model.getParent(), (ComponentPart) model, property.getName());
+                if (!(propertyDescriptor.getPropertyType()).equals(property.getType())) {
+                    return null;
+                }
+
+                String propertyName = property.getName();
+                String propertyValue = property.getValue();
+                command = PartUtil.createSetPropertyCommand(model, propertyName, propertyValue);
+                /*
+                 * In case of "layout" component, When "src" attribute is changed, "group" attribute
+                 * also should be changed.
+                 */
+                if (LayoutSchemaConstants.LAYOUT.equals(model.getDescriptorId()) && LayoutSchemaConstants.SRC.equals(propertyName)) {
+                    if (propertyValue != null) {
+                        if (getHost() != null && getHost().getViewer() instanceof DesignViewer) {
+                            EdjResourceSyncManager edjResSyncMgr = ((DesignViewer) (this.getHost().getViewer())).getEdjResourceSyncManager();
+                            ArrayList<String> groupNames = edjResSyncMgr.getGroupNames(propertyValue);
+                            if (groupNames != null && groupNames.size() > 0) {
+                                CompoundCommand compCmd = new CompoundCommand();
+                                compCmd.add(command);
+                                compCmd.add(PartUtil.createSetPropertyCommand(model, LayoutSchemaConstants.GROUP, groupNames.get(0)));
+                                return compCmd;
+                            }
+                        }
+                    }
+                }
+                break;
+            default:
+                break;
+        }
+        return command;
+    }
+
+    protected Command getCreateCommand(Request request) {
+        if (!(request instanceof CreateRequest)) {
+            logger.error("request type does not matched");
+            return null;
+        }
+        CreateRequest createRequest = (CreateRequest) request;
+        Object object = createRequest.getNewObjectType();
+        int type = (Integer) object;
+        return getCreateCommand(createRequest, type);
+    }
+
+    protected Command getCommand(Rectangle packBound) {
+        CompoundCommand command = new CompoundCommand();
+        if (packBound == null) {
+            return command;
+        }
+
+        ComponentPart part = (ComponentPart) getHost().getModel();
+        Part parent = part.getParent();
+
+        return PartUtil.createPackCommandWithVariation(part, parent, getCurrentConfiguration(), packBound);
+    }
+
+    protected Command getMoveCommand(Request request) {
+        return null;
+    }
+
+    protected Command getAlignCommand(Request request) {
+        return null;
+    }
+
+    protected Rectangle getMoveComponentBound(Request request) {
+        return null;
+    }
+
+    protected Rectangle getResizeComponentBound(Request request) {
+        return null;
+    }
+
+    @Override
+    public Command getCommand(Request request) {
+        if (REQ_CREATE.equals(request.getType())) {
+            return getCreateCommand(request);
+        } else if (REQ_RESIZE.equals(request.getType())) {
+            return getCommand(getResizeComponentBound(request));
+        } else if (REQ_MOVE.equals(request.getType())) {
+            if (this instanceof BoxChildResizablePolicy) {
+                return getMoveCommand(request);
+            } else {
+                return getCommand(getMoveComponentBound(request));
+            }
+        } else if (REQ_ALIGN.equals(request.getType())) {
+            return getAlignCommand(request);
+        }
+
+        return null;
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    protected List createSelectionHandles() {
+
+        List<Handle> list = new ArrayList<Handle>();
+        createMoveHandle(list);
+
+        setBorderSelectionHandles(list);
+
+        return list;
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    protected void createMoveHandle(List handles) {
+        if (isDragAllowed()) {
+            // display 'move' handle to allow dragging
+            ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles, getDragTracker(), SharedCursors.CURSOR_TREE_MOVE);
+        } else {
+            // display 'move' handle only to indicate selection
+            ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles, getSelectTracker(), SharedCursors.ARROW);
+        }
+    }
+
+    @Override
+    protected IFigure getFeedbackLayer() {
+        return getLayer(LayerConstants.SCALED_FEEDBACK_LAYER);
+    }
+
+    protected IFigure getNoneScalableFeedbackLayer() {
+        return getLayer(LayerConstants.FEEDBACK_LAYER);
+    }
+
+    @Override
+    public EditPart getTargetEditPart(Request request) {
+        return this.getHost();
+    }
+
+    @Override
+    public void showTargetFeedback(Request request) {
+
+        if (REQ_CREATE.equals(request.getType())) {
+            // N/A
+        } else {
+            showDefaultRequestFeedback(request);
+        }
+
+        return;
+    }
+
+    @Override
+    public void eraseTargetFeedback(Request request) {
+
+        if (null == hoverFeedback)
+            return;
+
+        hoverFeedback.setVisible(false);
+    }
+
+    private void showDefaultRequestFeedback(Request request) {
+
+        if (null == hoverFeedback)
+            return;
+
+        if (!(request instanceof SelectionRequest))
+            return;
+
+        if (REQ_MOVE.equals(request.getType()) || REQ_RESIZE.equals(request.getType())) {
+            return;
+        }
+
+        IFigure figure = ((GraphicalEditPart) getHost()).getFigure();
+        if (figure == null) {
+            return;
+        }
+
+        boolean isPrintBorder = false;
+        Rectangle bounds = figure.getBounds().getCopy();
+        Object extendData = request.getExtendedData().get(REQ_KEY_CHANGETARGET);
+        if (null != extendData) {
+            isPrintBorder = (Boolean) extendData;
+        }
+
+        if (isPrintBorder) {
+            // hoverFeedback.setAlpha(150);
+            hoverFeedback.setFill(false);
+            hoverFeedback.setOutline(true);
+            hoverFeedback.setLineWidth(10);
+            hoverFeedback.setLineStyle(Graphics.LINE_SOLID);
+        } else {
+            // hoverFeedback.setAlpha(30);
+            hoverFeedback.setFill(true);
+            hoverFeedback.setOutline(false);
+            hoverFeedback.setLineWidth(0);
+            // hoverFeedback.setLineStyle(Graphics.LINE_DOT);
+        }
+
+        hoverFeedback.setBounds(bounds);
+        hoverFeedback.setVisible(true);
+    }
+
+    protected void translateToZoom(Point srcPt) {
+        if (null == srcPt)
+            return;
+
+        double zoomSize = ((DesignRootEditPart) getHost().getRoot()).getZoomManager().getZoom();
+        srcPt.x /= zoomSize;
+        srcPt.y /= zoomSize;
+    }
+
+    protected void translateToCustom(Point srcPt) {
+
+        if (null == srcPt)
+            return;
+
+        if (getHost().getParent() instanceof GraphicalEditPart) {
+            IFigure parentFigure = ((GraphicalEditPart) getHost().getParent()).getFigure();
+            parentFigure.translateToRelative(srcPt);
+        }
+
+        return;
+    }
+
+    protected Point getMoveDeltaByRequest(Request request) {
+
+        if (!(request instanceof ChangeBoundsRequest)) {
+            return null;
+        }
+
+        ChangeBoundsRequest moveReq = (ChangeBoundsRequest) request;
+
+        Point realDelta = moveReq.getMoveDelta();
+        Point sizeDelta = new Point();
+        sizeDelta.x = realDelta.x;
+        sizeDelta.y = realDelta.y;
+
+        translateToZoom(sizeDelta);
+
+        return sizeDelta;
+    }
+
+    protected Point getResizeDeltaByRequest(Request request) {
+
+        if (!(request instanceof ChangeBoundsRequest)) {
+            return null;
+        }
+
+        ChangeBoundsRequest resizeReq = (ChangeBoundsRequest) request;
+
+        Dimension realDelta = resizeReq.getSizeDelta();
+        Point sizeDelta = new Point();
+        sizeDelta.x = realDelta.width;
+        sizeDelta.y = realDelta.height;
+
+        translateToZoom(sizeDelta);
+
+        return sizeDelta;
+    }
+
+    protected void setBorderSelectionHandles(List<Handle> list) {
+
+        AbstractBorder selectionBorder = null;
+        selectionBorder = new WidgetSelectionBorder(ColorResources.DESIGN_EDITOR_SELECTION_LINE_COLOR);
+
+        for (Handle handle : list) {
+            if (handle instanceof MoveHandle) {
+                ((MoveHandle) handle).setBorder(selectionBorder);
+            }
+        }
+
+        return;
+    }
+
+    public boolean isChangeTargetForParent() {
+        return false;
+    }
+
+    protected ConfigurationPart getCurrentConfiguration() {
+        DesignViewer viewer = (DesignViewer) getHost().getViewer();
+        if (viewer == null) {
+            return null;
+        }
+        return viewer.getMScreenQualifierManager().getCurrentConfigurePart();
+    }
+
+    protected String getCurrentConfigurationID() {
+        ConfigurationPart configPart = getCurrentConfiguration();
+        if (configPart == null) {
+            return null;
+        }
+        return configPart.getPropertyValue(LayoutSchemaConstants.ID);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/CommonLayoutPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/CommonLayoutPolicy.java
new file mode 100644 (file)
index 0000000..b73ad2b
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.Map;
+
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.editpolicies.XYLayoutEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignRootEditPart;
+import org.tizen.efluibuilder.gef.figure.CommonRectangleFigure;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class CommonLayoutPolicy extends XYLayoutEditPolicy {
+
+    protected RectangleFigure hoverFeedback;
+    protected CommonRectangleFigure outlineFeedback;
+
+    private static int OUTLINE_WIDTH = 2;
+
+    public CommonLayoutPolicy() {
+        super();
+    }
+
+    protected CommonRectangleFigure createHoverFeedback() {
+        CommonRectangleFigure rectangle = new CommonRectangleFigure();
+        rectangle.setBackgroundColor(ColorResources.DESIGN_EDITOR_COMPONENT_HOVER_COLOR, 75);
+        rectangle.setForegroundColor(ColorResources.DESIGN_EDITOR_COMPONENT_HOVER_COLOR);
+        rectangle.setOutline(false);
+        rectangle.setFill(true);
+        rectangle.setVisible(false);
+        getFeedbackLayer().add(rectangle);
+        return rectangle;
+    }
+
+    protected CommonRectangleFigure createOutlineFeedback() {
+        CommonRectangleFigure rectangle = new CommonRectangleFigure();
+        rectangle.setForegroundColor(ColorResources.DESIGN_EDITOR_CONTAINER_LINE_COLOR);
+        rectangle.setOutline(true);
+        rectangle.setFill(false);
+        rectangle.setLineWidth(OUTLINE_WIDTH);
+        rectangle.setVisible(false);
+        getFeedbackLayer().add(rectangle);
+        return rectangle;
+    }
+
+    @Override
+    public void activate() {
+        super.activate();
+
+        if (outlineFeedback == null) {
+            outlineFeedback = createOutlineFeedback();
+        }
+
+        if (hoverFeedback == null) {
+            hoverFeedback = createHoverFeedback();
+        }
+
+    }
+
+    @Override
+    public void deactivate() {
+        if (hoverFeedback != null) {
+            getFeedbackLayer().remove(hoverFeedback);
+            hoverFeedback = null;
+        }
+
+        if (outlineFeedback != null) {
+            getFeedbackLayer().remove(outlineFeedback);
+            outlineFeedback = null;
+        }
+
+        super.deactivate();
+    }
+
+    @Override
+    protected Command getCreateCommand(CreateRequest request) {
+        Command cmd = null;
+        Object object = request.getNewObjectType();
+        int objtype = (Integer) object;
+        if ((ITemplate.COMPONENT == objtype || ITemplate.SNIPPET == objtype) && request.getNewObject() instanceof ComponentPart) {
+            ComponentPart part = (ComponentPart) request.getNewObject();
+            // NOTE : snippet does not need this process
+            if (isViewTemplate(part)) {
+                return null;
+            }
+            if (objtype == ITemplate.COMPONENT) {
+                initProperties(part);
+            }
+            Point srcLoc = request.getLocation();
+            Point srcSize = null;
+            if (null != request.getSize()) {
+                srcSize = new Point(request.getSize().width, request.getSize().height);
+            }
+
+            Rectangle bounds = getComponentPack(objtype, srcLoc, srcSize, part);
+            if (null != bounds) {
+                cmd = getCommand(part, bounds);
+            }
+        }
+        return cmd;
+    }
+
+    // workaround code for initproperties
+    protected void initProperties(Part part) {
+        Part parentModel = (Part) getHost().getModel();
+        ComponentDescriptor componentDescriptor = parentModel.getOwnerDocumentPart().getComponentDescriptor();
+        Map<String, String> initValues = componentDescriptor.getInitValues((ComponentPart) parentModel, (ComponentPart) part);
+        // FIXME need to clear widget properties?
+        part.getProperties().clear();
+        PartUtil.setInitValues(part, initValues);
+    }
+
+    @Override
+    protected EditPolicy createChildEditPolicy(EditPart child) {
+        if (child instanceof DesignEditPart) {
+            return new CommonChildResizablePolicy();
+        }
+        return null;
+    }
+
+    protected Command getCommand(Part part, Rectangle bounds) {
+        if (!(part instanceof ComponentPart)) {
+            return null;
+        }
+
+        Part parentPart = (Part) getHost().getModel();
+
+        // create part pack command
+        CompoundCommand compCmd = new CompoundCommand();
+        compCmd.add(PartUtil.createAddPartCommand(parentPart, part, null));
+
+        compCmd.add(PartUtil.createPackCommand(part, parentPart, bounds));
+
+        ConfigurationPart configPart = getCurrentConfiguration();
+        if (configPart != null) {
+            String type = configPart.getPropertyValue(LayoutSchemaConstants.TYPE);
+
+            if (!type.equals(LayoutSchemaConstants.CONFIGURATION_TYPE_COMMON)) {
+                DocumentPart documentPart = parentPart.getOwnerDocumentPart();
+                Part variationPart = PartUtil.createPartWithInitValue(documentPart,
+                                                                      PartType.VARIATION, part, null);
+                compCmd.add(PartUtil.createVariationPartCommand(part, variationPart,
+                                                                configPart.getPropertyValue(LayoutSchemaConstants.ID),
+                                                                LayoutSchemaConstants.TRUE));
+                compCmd.add(PartUtil.createPackCommand(variationPart, parentPart, bounds));
+
+                // set visible = false to part
+                compCmd.add(PartUtil.createSetPropertyCommand(part, LayoutSchemaConstants.VISIBLE,
+                                                              LayoutSchemaConstants.FALSE));
+            }
+        }
+
+        return compCmd;
+    }
+
+    protected Rectangle getComponentPack(int objtype, Point srcLoc, Point srcSize, ComponentPart srcModel) {
+        return null;
+    }
+
+    @Override
+    public void showTargetFeedback(Request request) {
+        super.showTargetFeedback(request);
+
+        if (REQ_CREATE.equals(request.getType())) {
+            DesignEditPart targetEditPart = (DesignEditPart) getHost();
+            if (targetEditPart == null) {
+                return;
+            }
+
+            double zoomSize = ((DesignRootEditPart) getHost().getRoot()).getZoomManager().getZoom();
+            Rectangle bounds = targetEditPart.getPosition().getBounds().getCopy();
+            bounds.performScale(zoomSize);
+
+            hoverFeedback.setBounds(bounds);
+            hoverFeedback.setVisible(true);
+
+            outlineFeedback.setBounds(bounds);
+            outlineFeedback.setVisible(true);
+
+        }
+    }
+
+    @Override
+    public void eraseTargetFeedback(Request request) {
+        super.eraseTargetFeedback(request);
+
+        hoverFeedback.setVisible(false);
+        outlineFeedback.setVisible(false);
+    }
+
+    protected ConfigurationPart getCurrentConfiguration() {
+        DesignViewer viewer = (DesignViewer) getHost().getViewer();
+        if (viewer == null) {
+            return null;
+        }
+        return viewer.getMScreenQualifierManager().getCurrentConfigurePart();
+    }
+
+    protected String getCurrentConfigurationID() {
+        ConfigurationPart configPart = getCurrentConfiguration();
+        if (configPart == null) {
+            return null;
+        }
+        return configPart.getPropertyValue(LayoutSchemaConstants.ID);
+    }
+
+    protected boolean isViewTemplate(Part part) {
+        if (LayoutSchemaConstants.VIEW.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.POPUP.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.CTXPOPUP.equals(part.getDescriptorId())) {
+            return true;
+        }
+        return false;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ContentLayoutPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ContentLayoutPolicy.java
new file mode 100644 (file)
index 0000000..6de622f
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+
+
+public class ContentLayoutPolicy extends CommonLayoutPolicy {
+
+    @Override
+    protected EditPolicy createChildEditPolicy(EditPart child) {
+//        if (child instanceof DesignEditPart) {
+//            return new BoxChildResizablePolicy();
+//        }
+        return null;
+    }
+
+    @Override
+    protected Rectangle getComponentPack(int objtype, Point srcLoc, Point srcSize, ComponentPart srcModel) {
+        switch (objtype) {
+
+            case ITemplate.COMPONENT:
+            case ITemplate.SNIPPET: {
+                /*
+                 * Create a child widget on a box if there's no child. otherwise,
+                 * BoxChildResizablePolicy
+                 */
+                if (getHost().getChildren().size() == 0) {
+
+                    return new Rectangle(0, 0, 1, 1);
+                }
+            }
+                break;
+            default:
+                break;
+        }
+
+        return null;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/DesignEditorUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/DesignEditorUtil.java
new file mode 100644 (file)
index 0000000..ac3bef0
--- /dev/null
@@ -0,0 +1,508 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gef.requests.LocationRequest;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.renderer.Position;
+
+
+public class DesignEditorUtil {
+    public static int VIEW_OUTLINE_WIDTH = 2; 
+    public static int VIEW_TITLEBAR_HEIGHT = 42;
+
+    public static Rectangle pixelBoundToGridBound(EditPart editPart, Rectangle pixelBound) {
+        if (editPart == null) {
+            return new Rectangle();
+        }
+        Rectangle gridBound = new Rectangle();
+        Part part = (Part) editPart.getModel();
+        int gridPropWidth = Integer.parseInt(part.getPropertyValue(LayoutSchemaConstants.GRID_VSIZE_W));
+        int gridPropHeight = Integer.parseInt(part.getPropertyValue(LayoutSchemaConstants.GRID_VSIZE_H));
+        Rectangle gridPixelBound = DesignEditorUtil.getPartRelatvieBound(editPart);
+        // if ((pixelBound.width > 0) (pixelBound.height > 0)) {
+        gridBound.width = (pixelBound.width > 0) ? Math.round((float) (pixelBound.width * gridPropWidth) / (float) gridPixelBound.width) : 0;
+        gridBound.height = (pixelBound.height > 0) ? Math.round((float) (pixelBound.height * gridPropHeight) / (float) gridPixelBound.height) : 0;
+        gridBound.x = (pixelBound.x > 0) ? Math.round((float) (pixelBound.x * gridPropWidth) / (float) gridPixelBound.width) : 0;
+        gridBound.y = (pixelBound.y > 0) ? Math.round((float) (pixelBound.y * gridPropHeight) / (float) gridPixelBound.height) : 0;
+        // }
+        return gridBound;
+    }
+
+    public static boolean isSameParent(List<Part> partList) {
+        for (int i = 1; i < partList.size(); i++) {
+            if (partList.get(i).getParent() != partList.get(0).getParent()) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public static Rectangle getPartRelatvieBound(EditPart editpart) {
+        if (editpart == null) {
+            return new Rectangle(-1, -1, -1, -1);
+        }
+        Position partposition = ((DesignEditPart) editpart).getPosition();
+        if (partposition == null) {
+            return new Rectangle(-1, -1, -1, -1);
+        }
+        if (editpart.getParent() == null) {
+            return partposition.getBounds();
+        }
+        Position parentPosition = ((DesignEditPart) editpart.getParent()).getPosition();
+        if (parentPosition == null) {
+            return partposition.getBounds();
+        }
+        Rectangle bound = partposition.getBounds();
+        Rectangle parentBound = parentPosition.getBounds();
+        bound.x -= parentBound.x;
+        bound.y -= parentBound.y;
+
+        return bound;
+    }
+
+    public static void setGridPackBound(Part part, Rectangle bound) {
+        if (bound.x >= 0) {
+            part.setPropertyValue(LayoutSchemaConstants.GRID_PACK_X, Integer.toString(bound.x));
+        }
+        if (bound.y >= 0) {
+            part.setPropertyValue(LayoutSchemaConstants.GRID_PACK_Y, Integer.toString(bound.y));
+        }
+        if (bound.width > 0) {
+            part.setPropertyValue(LayoutSchemaConstants.GRID_PACK_W, Integer.toString(bound.width));
+        }
+        if (bound.height > 0) {
+            part.setPropertyValue(LayoutSchemaConstants.GRID_PACK_H, Integer.toString(bound.height));
+        }
+    }
+
+    public static void setTablePackBound(Part part, Rectangle bound) {
+        if (bound.x >= 0) {
+            part.setPropertyValue(LayoutSchemaConstants.TABLE_PACK_COL, Integer.toString(bound.x));
+        }
+        if (bound.y >= 0) {
+            part.setPropertyValue(LayoutSchemaConstants.TABLE_PACK_ROW, Integer.toString(bound.y));
+        }
+        if (bound.width > 0) {
+            part.setPropertyValue(LayoutSchemaConstants.TABLE_COL_SPAN, Integer.toString(bound.width));
+        }
+        if (bound.height > 0) {
+            part.setPropertyValue(LayoutSchemaConstants.TABLE_ROW_SPAN, Integer.toString(bound.height));
+        }
+    }
+
+    public static void setPanesPackBound(Part part, Rectangle bound) {
+        if (bound.x == 0) {
+            part.setPropertyValue(LayoutSchemaConstants.PANES_PACK, LayoutSchemaConstants.PANES_PACK_LEFT);
+        } else if (bound.x == 1) {
+            part.setPropertyValue(LayoutSchemaConstants.PANES_PACK, LayoutSchemaConstants.PANES_PACK_RIGHT);
+        }
+    }
+
+    public static Rectangle getPackBound(ComponentPart part, String configID) {
+        Part parent = part.getParent();
+        if (parent == null) {
+            return new Rectangle(-1, -1, -1, -1);
+        }
+
+        return getPackBound(parent.getDescriptorId(), part, configID);
+    }
+
+    public static Rectangle getPackBound(String parent, ComponentPart part, String configID) {
+        if (parent == null) {
+            return new Rectangle(-1, -1, -1, -1);
+        }
+        Rectangle results = null;
+        if (parent.equals(LayoutSchemaConstants.GRID)) {
+            results = getGridPackBound(part, configID);
+        } else if (parent.equals(LayoutSchemaConstants.TABLE)) {
+            results = getTablePackBound(part, configID);
+        } else if (parent.equals(LayoutSchemaConstants.PANES)) {
+            results = getPanesPackBound(part, configID);
+        } else {
+            results = new Rectangle(-1, -1, -1, -1);
+        }
+
+        return results;
+    }
+
+    private static Rectangle getGridPackBound(ComponentPart part, String configurationID) {
+        Rectangle packBound = new Rectangle(-1, -1, -1, -1);
+
+        String value = part.getPropertyValue(configurationID, LayoutSchemaConstants.GRID_PACK_X);
+        if (value != null && !value.isEmpty()) {
+            packBound.x = Integer.parseInt(value);
+        }
+        value = part.getPropertyValue(configurationID, LayoutSchemaConstants.GRID_PACK_Y);
+        if (value != null && !value.isEmpty()) {
+            packBound.y = Integer.parseInt(value);
+        }
+        value = part.getPropertyValue(configurationID, LayoutSchemaConstants.GRID_PACK_W);
+        if (value != null && !value.isEmpty()) {
+            packBound.width = Integer.parseInt(value);
+        }
+        value = part.getPropertyValue(configurationID, LayoutSchemaConstants.GRID_PACK_H);
+        if (value != null && !value.isEmpty()) {
+            packBound.height = Integer.parseInt(value);
+        }
+        return packBound;
+    }
+
+    private static Rectangle getTablePackBound(ComponentPart part, String configurationID) {
+        Rectangle packBound = new Rectangle(-1, -1, -1, -1);
+        String value = part.getPropertyValue(configurationID, LayoutSchemaConstants.TABLE_PACK_COL);
+        if (value != null && !value.isEmpty()) {
+            packBound.x = Integer.parseInt(value);
+        }
+        value = part.getPropertyValue(configurationID, LayoutSchemaConstants.TABLE_PACK_ROW);
+        if (value != null && !value.isEmpty()) {
+            packBound.y = Integer.parseInt(value);
+        }
+        value = part.getPropertyValue(configurationID, LayoutSchemaConstants.TABLE_COL_SPAN);
+        if (value != null && !value.isEmpty()) {
+            packBound.width = Integer.parseInt(value);
+        }
+        value = part.getPropertyValue(configurationID, LayoutSchemaConstants.TABLE_ROW_SPAN);
+        if (value != null && !value.isEmpty()) {
+            packBound.height = Integer.parseInt(value);
+        }
+        return packBound;
+    }
+
+    private static Rectangle getPanesPackBound(ComponentPart part, String configurationID) {
+        Rectangle packBound = new Rectangle(-1, -1, -1, -1);
+        String value = part.getPropertyValue(configurationID, LayoutSchemaConstants.PANES_PACK);
+        if (value != null && !value.isEmpty()) {
+            if (value.equals(LayoutSchemaConstants.PANES_PACK_LEFT)) {
+                packBound.x = 0;
+            } else {
+                packBound.x = 1;
+            }
+        }
+        return packBound;
+    }
+
+    public static List<Point> getEmptyTableCellPosList(Part tablePart, String configurationID) {
+        List<Part> children = tablePart.getComponentChildren();
+        int rowCnt = Integer.parseInt(tablePart.getPropertyValue(LayoutSchemaConstants.TABLE_ROWS));
+        int colCnt = Integer.parseInt(tablePart.getPropertyValue(LayoutSchemaConstants.TABLE_COLS));
+        List<Point> emptyCellList = new ArrayList<Point>();
+
+        boolean[] cellStatusMap = new boolean[rowCnt * colCnt];
+        Rectangle bound;
+        int stPos, edPos;
+        int occupiedWidth, occupiedHeight;
+        for (int i = 0; i < children.size(); i++) {
+            if (children.get(i) instanceof ComponentPart) {
+                bound = DesignEditorUtil.getTablePackBound((ComponentPart) children.get(i), configurationID);
+                occupiedWidth = Math.min(colCnt, bound.x + bound.width) - bound.x;
+                occupiedHeight = Math.min(rowCnt, bound.y + bound.height) - bound.y;
+                if (occupiedWidth <= 0 || occupiedHeight <= 0) {
+                    continue;
+                }
+                for (int j = 0; j < occupiedHeight; j++) {
+                    stPos = ((bound.y + j) * colCnt) + bound.x;
+                    edPos = stPos + occupiedWidth;
+                    for (int k = stPos; k < edPos; k++) {
+                        cellStatusMap[k] = true;
+                    }
+                }
+            }
+        }
+
+        for (int i = 0; i < rowCnt; i++) {
+            for (int j = 0; j < colCnt; j++) {
+                if (cellStatusMap[i * colCnt + j] == false) {
+                    emptyCellList.add(new Point(j, i));
+                }
+            }
+        }
+        return emptyCellList;
+    }
+
+    public static List<Point> getEmptyPaneCellPosList(Part panePart, String configurationID) {
+        List<Part> children = panePart.getComponentChildren();
+        List<Point> emptyCellList = new ArrayList<Point>();
+        boolean[] cellStatusMap = new boolean[2];
+
+        Rectangle bound;
+        for (int i = 0; i < children.size(); i++) {
+            if (children.get(i) instanceof ComponentPart) {
+                bound = DesignEditorUtil.getPanesPackBound((ComponentPart) children.get(i), configurationID);
+                if (bound.x >= 0 && bound.x <= 1) {
+                    cellStatusMap[bound.x] = true;
+                }
+            }
+        }
+
+        for (int i = 0; i < cellStatusMap.length; i++) {
+            if (cellStatusMap[i] != true) {
+                emptyCellList.add(new Point(i, 0));
+            }
+        }
+        return emptyCellList;
+    }
+
+    public static Point getLocationByRequest(Request request) {
+        Point mousePt = null;
+        if (request instanceof LocationRequest) {
+            mousePt = ((LocationRequest) request).getLocation();
+        } else if (request instanceof ChangeBoundsRequest) {
+            mousePt = ((ChangeBoundsRequest) request).getLocation();
+        } else if (request instanceof CreateRequest) {
+            mousePt = ((CreateRequest) request).getLocation();
+        }
+
+        return mousePt;
+    }
+
+    // TODO Consider about location of this method and name
+    public static EditPart getEditPart(EditPart editPart, Part part) {
+        List<?> children = editPart.getChildren();
+        for (int i = 0; i < children.size(); i++) {
+            EditPart childEditPart = (EditPart) children.get(i);
+            Part childPart = (Part) childEditPart.getModel();
+            if (childPart.getUniqueId().equals(part.getUniqueId())) {
+                return childEditPart;
+            }
+            EditPart results = getEditPart(childEditPart, part);
+            if (results != null) {
+                return results;
+            }
+        }
+        return null;
+    }
+
+    public static boolean isContentContainerPart(Part part) {
+        if (LayoutSchemaConstants.IMAGE.equals(part.getDescriptorId()) || LayoutSchemaConstants.LAYOUT.equals(part.getDescriptorId())) {
+            return true;
+        }
+        return false;
+    }
+
+    public static boolean isItemContainerPart(Part part) {
+        if (LayoutSchemaConstants.GENGRID.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.GENLIST.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.MULTIBUTTONENTRY.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.FLIPSELECTOR.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.INDEX.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.LIST.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.TOOLBAR.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.HOVERSEL.equals(part.getDescriptorId())) {
+            return true;
+        }
+        return false;
+    }
+
+    public static boolean isItemPart(Part part) {
+        if (LayoutSchemaConstants.GENGRIDITEM.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.GENLISTITEM.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.MULTIBUTTONENTRYITEM.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.FLIPSELECTORITEM.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.INDEXITEM.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.LISTITEM.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.TOOLBARITEM.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.HOVERSELITEM.equals(part.getDescriptorId())) {
+            return true;
+        }
+        return false;
+    }
+
+    public static boolean hasContent(Part part) {
+        if (LayoutSchemaConstants.IMAGE.equals(part.getDescriptorId()) &&
+                !part.getPropertyValue(LayoutSchemaConstants.SRC).isEmpty()) {
+            return true;
+        } else if (LayoutSchemaConstants.LAYOUT.equals(part.getDescriptorId()) &&
+                !part.getPropertyValue(LayoutSchemaConstants.SRC).isEmpty()) {
+            return true;
+        }
+        return false;
+    }
+
+    public static boolean hasPlaceholder(Part part) {
+        if (LayoutSchemaConstants.TABLE.equals(part.getDescriptorId()) ||
+                LayoutSchemaConstants.PANES.equals(part.getDescriptorId())) {
+            return true;
+        }
+        return false;
+    }
+
+    public static boolean isHided(Part part, String configurationID) {
+        if (part instanceof ComponentPart) {
+            ComponentPart parent = (ComponentPart) part;
+            while (parent != null && (parent.getParent() instanceof ComponentPart)) {
+                if (parent.getPropertyValue(configurationID, LayoutSchemaConstants.VISIBLE).equals(LayoutSchemaConstants.FALSE)) {
+                    return true;
+                }
+                parent = (ComponentPart) parent.getParent();
+            }
+        }
+        return false;
+    }
+
+    public static String getPropertyId(Part part) {
+        String value = part.getPropertyValue(LayoutSchemaConstants.ID);
+        if (value != null) {
+            return value;
+        }
+        return "";
+    }
+
+    public static String getPropertyId(EditPart editpart) {
+        if (editpart.getModel() instanceof Part) {
+            return getPropertyId((Part) editpart.getModel());
+        }
+        return "";
+    }
+    
+    public static Rectangle getOuterBound(List<Rectangle> bounds) {
+        Rectangle outerBound;
+        Point p1 = new Point(0, 0);
+        Point p2 = new Point(1, 1);
+        Rectangle rect;
+        for (int i = 0; i < bounds.size(); i++) {
+            rect = bounds.get(i);
+            if (i == 0) {
+                p1.x = rect.x;
+                p1.y = rect.y;
+                p2.x = rect.x + rect.width;
+                p2.y = rect.y + rect.height;
+                continue;
+            }
+            p1.x = Math.min(p1.x, rect.x);
+            p1.y = Math.min(p1.y, rect.y);
+            p2.x = Math.max(p2.x, rect.x + rect.width);
+            p2.y = Math.max(p2.y, rect.y + rect.height);
+        }
+        outerBound = new Rectangle(p1.x, p1.y, p2.x - p1.x, p2.y - p1.y);
+        return outerBound;
+    }
+
+    public static Point getNextViewPosition(Part viewsPart, int pageWidth, int pageHeight) {
+        Rectangle outerBound = getPagesOuterBound(viewsPart, pageWidth, pageHeight);
+        return new Point(outerBound.x + outerBound.width + pageWidth/2, outerBound.y + VIEW_TITLEBAR_HEIGHT);
+    }
+
+    public static Rectangle getPagesOuterBound(Part viewsPart, int pageWidth, int pageHeight) {
+        Rectangle outerBound = new Rectangle(0, 0, 1, 1);
+        Rectangle pageBound = null;
+        List<Rectangle> boundSet = new ArrayList<Rectangle>();
+        for (int i = 0; i < viewsPart.getChildren().size(); i++) {
+            pageBound = DesignEditorUtil.getPageBound(viewsPart.getChildren().get(i), pageWidth, pageHeight);
+            boundSet.add(pageBound);
+            if (i == 0) {
+                outerBound = pageBound;
+                outerBound.width += outerBound.x;
+                outerBound.height += outerBound.y;
+            } else {
+                outerBound.x = Math.min(outerBound.x, pageBound.x);
+                outerBound.width = Math.max(outerBound.width, pageBound.x + pageBound.width);
+                outerBound.y = Math.min(outerBound.y, pageBound.y);
+                outerBound.height = Math.max(outerBound.height, pageBound.y + pageBound.height);        
+            }
+        }
+        outerBound.width -= outerBound.x;
+        outerBound.height -= outerBound.y;
+        return outerBound;
+    }
+    
+    public static Point getPageLocation(Part viewPart) {
+        Point location = new Point(0, 0);
+        try {
+            location.x = Integer.parseInt(viewPart.getPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_X));
+            location.y = Integer.parseInt(viewPart.getPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_Y));
+        } catch (NumberFormatException e) {
+            location.x = location.y = 0;
+        }
+        return location;
+    }
+    
+    public static Rectangle getPageBound(Part viewPart, int imgWidth, int imgHeight) {
+        Point location = getPageLocation(viewPart);
+        Rectangle bound = new Rectangle(location.x, location.y, imgWidth, imgHeight);
+        bound.expand(VIEW_OUTLINE_WIDTH, VIEW_OUTLINE_WIDTH);
+        bound.y -= VIEW_TITLEBAR_HEIGHT;
+        bound.height += VIEW_TITLEBAR_HEIGHT;
+        return bound;
+    }
+    
+    public static Rectangle getPageImageBoundFromPageBound(Rectangle pageBound) {
+        Rectangle imageBound = pageBound.getCopy().expand(-VIEW_OUTLINE_WIDTH, -VIEW_OUTLINE_WIDTH);
+        imageBound.y += VIEW_TITLEBAR_HEIGHT;        
+        imageBound.height -= VIEW_TITLEBAR_HEIGHT;
+        return imageBound;
+    }
+    
+    public static Rectangle getTitleBoundFromPageBound(Rectangle pageBound) {
+        Rectangle imageBound = pageBound.getCopy().expand(-VIEW_OUTLINE_WIDTH, -VIEW_OUTLINE_WIDTH);               
+        imageBound.height = VIEW_TITLEBAR_HEIGHT;
+        return imageBound;
+    }
+    
+    public static Rectangle getPageBoundFromImageBound(Rectangle imgBound) {
+        Rectangle pageBound = imgBound.getCopy().expand(VIEW_OUTLINE_WIDTH, VIEW_OUTLINE_WIDTH);
+        pageBound.y -= VIEW_TITLEBAR_HEIGHT;
+        pageBound.height += VIEW_TITLEBAR_HEIGHT;        
+        return pageBound;
+    } 
+    
+    public static Position getPagePositionFromComponentPosition(Position pagePosition) {
+        return new Position(pagePosition.x - VIEW_OUTLINE_WIDTH, pagePosition.y - VIEW_OUTLINE_WIDTH - VIEW_TITLEBAR_HEIGHT, 
+                            pagePosition.width + VIEW_OUTLINE_WIDTH * 2, pagePosition.height + VIEW_OUTLINE_WIDTH * 2 + VIEW_TITLEBAR_HEIGHT);
+    }
+    
+    public static void scaleRect(Rectangle rect, double scale) {
+        rect.x = (int) (Math.floor((rect.x * scale)));
+        rect.y = (int) (Math.floor((rect.y * scale)));
+        rect.width = (int) (Math.floor((rect.width * scale)));
+        rect.height = (int) (Math.floor((rect.height * scale)));
+    }
+    
+    public static boolean isCtxpopupView(Part viewPart) {
+        if (viewPart != null && viewPart.getChildren().size() == 1 && viewPart.getChildren().get(0).getDescriptorId().equals(LayoutSchemaConstants.CTXPOPUP)) {
+            return true;
+        }
+        return false;
+    }
+
+    public static boolean isUIProperty(String name) {
+        if (LayoutSchemaConstants.ID.equals(name) || LayoutSchemaConstants.PAGE_LOCATION_X.equals(name) || LayoutSchemaConstants.PAGE_LOCATION_Y.equals(name)) {
+            return false;
+        }
+        return true;
+    }
+  
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/EditPolicyConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/EditPolicyConstants.java
new file mode 100644 (file)
index 0000000..d46f6e9
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.swt.graphics.Color;
+
+
+public final class EditPolicyConstants {
+    public static final Color HoverGoodColor = ColorConstants.blue;
+    public static final Color HoverBadColor = ColorConstants.red;
+    public static final Color HoverSpecialColor = ColorConstants.green;
+    public static final Color ContainerSelectionBorderColor = ColorConstants.red;
+    public static final Color WidgetSelectionBorderColor = ContainerSelectionBorderColor;
+    public static String ROLE_SNAP_FEEDBACK = "Snap Feedback";
+    public static String ROLE_CONTAINER_OUTLINE_FEEDBACK = "Container Outline Feedback";
+    public static String ROLE_PLACEHOLDER_FEEDBACK = "Placeholder Feedback";
+    public static String ROLE_OPEN_EDITOR = "Open Editor";
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/GridChildResizablePolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/GridChildResizablePolicy.java
new file mode 100644 (file)
index 0000000..320acea
--- /dev/null
@@ -0,0 +1,362 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Handle;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
+import org.eclipse.gef.handles.ResizeHandle;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.LineAttributes;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignRootEditPart;
+import org.tizen.efluibuilder.gef.figure.CommonRectangleFigure;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.renderer.Position;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class GridChildResizablePolicy extends CommonChildResizablePolicy {
+
+    private Label infoFeedback;
+    private static int INFO_FONT_SIZE = 8;
+    private static int INFO_AREA_W = 100;
+    private static int INFO_AREA_H = 12;
+
+    public GridChildResizablePolicy() {
+        super();
+        setDragAllowed(true);
+    }
+
+    @Override
+    public void activate() {
+        super.activate();
+
+        if (infoFeedback == null) {
+            infoFeedback = new Label();
+            infoFeedback.setBounds(new Rectangle(0, 0, 0, 0));
+            infoFeedback.setText("");
+            infoFeedback.setLabelAlignment(PositionConstants.RIGHT);
+            infoFeedback.setFont(new Font(null, "default", INFO_FONT_SIZE, SWT.BOLD));
+            infoFeedback.setForegroundColor(ColorResources.POLICY_INFO_FEEDBACK);
+            infoFeedback.setVisible(false);
+            getNoneScalableFeedbackLayer().add(infoFeedback);
+        }
+    }
+
+    @Override
+    public void deactivate() {
+        if (infoFeedback != null) {
+            getNoneScalableFeedbackLayer().remove(infoFeedback);
+            infoFeedback = null;
+        }
+        super.deactivate();
+    }
+
+    @Override
+    protected Rectangle getResizeComponentBound(Request request) {
+        DesignEditPart editPart = (DesignEditPart) getHost();
+        Part part = (Part) editPart.getModel();
+        if (!(part instanceof ComponentPart)) {
+            return new Rectangle(-1, -1, -1, -1);
+        }
+        ComponentPart componentPart = (ComponentPart) part;
+        Dimension realDelta = ((ChangeBoundsRequest) request).getSizeDelta().getCopy();
+        int resizeDirection = ((ChangeBoundsRequest) request).getResizeDirection();
+        boolean isCentered = ((ChangeBoundsRequest) request).isCenteredResize();
+        double zoomValue = 0;
+        if (editPart.getRoot() != null && editPart.getRoot() instanceof DesignRootEditPart) {
+            zoomValue = ((DesignRootEditPart) editPart.getRoot()).getZoomManager().getZoom();
+            realDelta.width /= zoomValue;
+            realDelta.height /= zoomValue;
+        }
+        if (isCentered == true) {
+            // realDelta.width /= 2;
+            // realDelta.height /= 2;
+        }
+        Position position = editPart.getPosition();
+
+        // check min size
+        {
+            ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+            String minWidthStr = componentDescriptor.getMinWidth(componentPart);
+            String minHeightStr = componentDescriptor.getMinHeight(componentPart);
+            int minWidth = 1;
+            int minHeight = 1;
+
+            if ((null != minWidthStr) && (null != minHeightStr)) {
+                minWidth = Integer.valueOf(minWidthStr);
+                minHeight = Integer.valueOf(minHeightStr);
+            }
+
+            if (position.width + realDelta.width < minWidth) {
+                realDelta.width = minWidth - position.width;
+            }
+            if (position.height + realDelta.height < minHeight) {
+                realDelta.height = minHeight - position.height;
+            }
+        }
+
+        Rectangle deltea = new Rectangle(0, 0, Math.abs(realDelta.width), Math.abs(realDelta.height));
+        Rectangle packDelta = DesignEditorUtil.pixelBoundToGridBound(editPart.getParent(), deltea);
+        Rectangle packBound = DesignEditorUtil.getPackBound(componentPart, getCurrentConfigurationID());
+        if (realDelta.width < 0) {
+            packBound.width -= packDelta.width;
+            if ((resizeDirection & PositionConstants.WEST) != 0) {
+                if (isCentered == true) {
+                    packBound.x += packDelta.width / 2;
+                } else {
+                    packBound.x += packDelta.width;
+                }
+            } else if ((resizeDirection & PositionConstants.EAST) != 0) {
+                if (isCentered == true) {
+                    packBound.x += packDelta.width / 2;
+                }
+            }
+        } else {
+            packBound.width += packDelta.width;
+            if ((resizeDirection & PositionConstants.WEST) != 0) {
+                if (isCentered == true) {
+                    packBound.x -= packDelta.width / 2;
+                } else {
+                    packBound.x -= packDelta.width;
+                }
+            } else if ((resizeDirection & PositionConstants.EAST) != 0) {
+                if (isCentered == true) {
+                    packBound.x -= packDelta.width / 2;
+                }
+            }
+
+        }
+        if (realDelta.height < 0) {
+            packBound.height -= packDelta.height;
+            if ((resizeDirection & PositionConstants.NORTH) != 0) {
+                if (isCentered == true) {
+                    packBound.y += packDelta.height / 2;
+                } else {
+                    packBound.y += packDelta.height;
+                }
+            } else if ((resizeDirection & PositionConstants.SOUTH) != 0) {
+                if (isCentered == true) {
+                    packBound.y += packDelta.height / 2;
+                }
+            }
+        } else {
+            packBound.height += packDelta.height;
+            if ((resizeDirection & PositionConstants.NORTH) != 0) {
+                if (isCentered == true) {
+                    packBound.y -= packDelta.height / 2;
+                } else {
+                    packBound.y -= packDelta.height;
+                }
+            } else if ((resizeDirection & PositionConstants.SOUTH) != 0) {
+                if (isCentered == true) {
+                    packBound.y -= packDelta.height / 2;
+                }
+            }
+        }
+        return packBound;
+    }
+
+    @Override
+    protected Rectangle getMoveComponentBound(Request request) {
+
+        EditPart editPart = getHost();
+        Part part = (Part) editPart.getModel();
+        if (!(part instanceof ComponentPart)) {
+            return new Rectangle(-1, -1, -1, -1);
+        }
+        ComponentPart componentPart = (ComponentPart) part;
+
+        Point moveDelta = ((ChangeBoundsRequest) request).getMoveDelta().getCopy();
+
+        double zoomValue = ((DesignRootEditPart) editPart.getRoot()).getZoomManager().getZoom();
+        moveDelta.x /= zoomValue;
+        moveDelta.y /= zoomValue;
+
+        Rectangle deltea = new Rectangle(0, 0, Math.abs(moveDelta.x), Math.abs(moveDelta.y));
+        Rectangle packDelta = DesignEditorUtil.pixelBoundToGridBound(editPart.getParent(), deltea);
+        Rectangle packBound = DesignEditorUtil.getPackBound(componentPart, getCurrentConfigurationID());
+        if (moveDelta.x < 0) {
+            packBound.x -= packDelta.width;
+        } else {
+            packBound.x += packDelta.width;
+        }
+        if (moveDelta.y < 0) {
+            packBound.y -= packDelta.height;
+        } else {
+            packBound.y += packDelta.height;
+        }
+        return packBound;
+    }
+
+    @Override
+    protected Command getAlignCommand(Request request) {
+        return null;
+    }
+
+    protected void decoreateResizeHandles(List<Handle> handles) {
+        ResizeHandle resizeHandle = null;
+
+        for (Handle handle : handles) {
+            if (handle instanceof ResizeHandle) {
+                resizeHandle = (ResizeHandle) handle;
+                resizeHandle.setBackgroundColor(EditPolicyConstants.WidgetSelectionBorderColor);
+                resizeHandle.setForegroundColor(EditPolicyConstants.HoverBadColor);
+            }
+        }
+    }
+
+    @SuppressWarnings({ "rawtypes" })
+    @Override
+    protected List createSelectionHandles() {
+
+        List<Handle> list = new ArrayList<Handle>();
+        createMoveHandle(list);
+        decoreateResizeHandles(list);
+        createResizeHandle(list, PositionConstants.NORTH);
+        createResizeHandle(list, PositionConstants.EAST);
+        createResizeHandle(list, PositionConstants.SOUTH);
+        createResizeHandle(list, PositionConstants.WEST);
+        createResizeHandle(list, PositionConstants.NORTH_EAST);
+        createResizeHandle(list, PositionConstants.NORTH_WEST);
+        createResizeHandle(list, PositionConstants.SOUTH_EAST);
+        createResizeHandle(list, PositionConstants.SOUTH_WEST);
+        decoreateResizeHandles(list);
+
+        setBorderSelectionHandles(list);
+
+        return list;
+    }
+
+    private void showInfomationFeedback(final int deltaX, final int deltaY, final int deltaW, final int deltaH) {
+        DesignEditPart editPart = (DesignEditPart) getHost();
+        Position pos = editPart.getPosition();
+
+        do {
+            if (null == infoFeedback)
+                break;
+
+            int moveX = pos.x + deltaX;
+            int moveY = pos.y + deltaY;
+
+            double viewerZoomScale = getViewerZoomScale();
+            if (viewerZoomScale != 0) {
+                moveX *= viewerZoomScale;
+                moveY *= viewerZoomScale;
+            }
+            String infoText = "(" + moveX + "," + moveY + ")";
+            infoFeedback.setBounds(new Rectangle(moveX - INFO_AREA_W, moveY - INFO_AREA_H, INFO_AREA_W, INFO_AREA_H));
+            infoFeedback.setText(infoText);
+            infoFeedback.setVisible(true);
+        } while (false);
+
+        return;
+    }
+
+    private void showMoveRequestFeedback(Request request) {
+
+        Point sizeDelta = getMoveDeltaByRequest(request);
+        if (null != sizeDelta) {
+            showInfomationFeedback(sizeDelta.x, sizeDelta.y, 0, 0);
+        }
+
+        return;
+    }
+
+    private void showResizeRequestFeedback(Request request) {
+
+        Point sizeDelta = getResizeDeltaByRequest(request);
+        if (null != sizeDelta) {
+            showInfomationFeedback(0, 0, sizeDelta.x, sizeDelta.y);
+        }
+        return;
+    }
+
+    @Override
+    public void showSourceFeedback(Request request) {
+
+        if (REQ_MOVE.equals(request.getType())) {
+            showMoveRequestFeedback(request);
+        } else if (REQ_RESIZE.equals(request.getType())) {
+            showResizeRequestFeedback(request);
+        }
+
+        super.showSourceFeedback(request);
+
+        return;
+    }
+
+    @Override
+    protected IFigure createDragSourceFeedbackFigure() {
+        CommonRectangleFigure r = new CommonRectangleFigure();
+        r.setBackgroundColor(ColorResources.DESIGN_EDITOR_CHANGE_BOUND_FEEDBACK_FILL_COLOR, 83);
+        r.setOutline(true);
+        r.setLineStyle(Graphics.LINE_DASH);
+        r.setLineAttributes(new LineAttributes(2, SWT.CAP_ROUND, SWT.JOIN_ROUND, SWT.LINE_CUSTOM, new float[] { 5 }, 10, 20));
+        r.setForegroundColor(ColorResources.DESIGN_EDITOR_CHANGE_BOUND_FEEDBACK_LINE_COLOR, 255);
+        r.setBounds(getInitialFeedbackBounds());
+        addFeedback(r);
+        return r;
+    }
+
+    @Override
+    public void eraseSourceFeedback(Request request) {
+        super.eraseSourceFeedback(request);
+
+        if (null == infoFeedback)
+            return;
+
+        infoFeedback.setVisible(false);
+    }
+
+    @Override
+    public boolean isChangeTargetForParent() {
+        return true;
+    }
+
+    private double getViewerZoomScale() {
+        if (getHost().getViewer().getRootEditPart() instanceof ScalableFreeformRootEditPart) {
+            ScalableFreeformRootEditPart rootEditPart = (ScalableFreeformRootEditPart) getHost().getViewer().getRootEditPart();
+            return rootEditPart.getZoomManager().getZoom();
+        }
+        return 0;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/GridLayoutPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/GridLayoutPolicy.java
new file mode 100644 (file)
index 0000000..b83d7de
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignRootEditPart;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+
+
+public class GridLayoutPolicy extends CommonLayoutPolicy {
+
+    @Override
+    protected EditPolicy createChildEditPolicy(EditPart child) {
+        if (child instanceof DesignEditPart) {
+            return new GridChildResizablePolicy();
+        }
+        return null;
+    }
+
+    @Override
+    protected Rectangle getComponentPack(int objtype, Point srcLoc, Point srcSize, ComponentPart srcModel) {
+        if ((null == srcLoc) || (null == srcModel)) {
+            return null;
+        }
+
+        switch (objtype) {
+            case ITemplate.COMPONENT:
+            case ITemplate.SNIPPET: {
+                double zoomSize = ((DesignRootEditPart) getHost().getRoot()).getZoomManager().getZoom();
+                Rectangle pixelPack = getDefaultPixelPack(srcLoc, srcSize, srcModel, zoomSize);
+
+                if (getHost() instanceof GraphicalEditPart) {
+                    IFigure parentFigure = ((GraphicalEditPart) getHost()).getFigure();
+                    parentFigure.translateToRelative(pixelPack);
+                }
+
+                // if a widget make to a sub grid
+                {
+                    pixelPack.x -= ((GraphicalEditPart) getHost()).getFigure().getBounds().x;
+                    pixelPack.y -= ((GraphicalEditPart) getHost()).getFigure().getBounds().y;
+                }
+                Rectangle pixelBoundToGridBound = DesignEditorUtil.pixelBoundToGridBound(getHost(), pixelPack);
+                if (srcSize != null) {
+                    return pixelBoundToGridBound;
+                } else {
+                    return applySnippetPack(objtype, pixelBoundToGridBound, srcModel, zoomSize);
+                }
+            }
+            default:
+                break;
+        }
+
+        return null;
+    }
+
+    private Rectangle getDefaultPixelPack(Point srcLoc, Point srcSize, Part srcModel, double zoomSize) {
+        Rectangle pixelPack = new Rectangle(srcLoc.x, srcLoc.y, 100, 100);
+
+        if (null != srcSize) {
+            pixelPack.width = srcSize.x;
+            pixelPack.height = srcSize.y;
+        } else {
+            Part parent = (Part) getHost().getModel();
+            ComponentDescriptor componentDescriptor = parent.getOwnerDocumentPart().getComponentDescriptor();
+            String feedbackWidth = componentDescriptor.getFeedbackWidth((ComponentPart) srcModel);
+            String feedbackHeight = componentDescriptor.getFeedbackHeight((ComponentPart) srcModel);
+            if ((null != feedbackWidth) && (null != feedbackHeight)) {
+                pixelPack.width = Integer.valueOf(feedbackWidth);
+                pixelPack.height = Integer.valueOf(feedbackHeight);
+            }
+
+            pixelPack.width *= zoomSize;
+            pixelPack.height *= zoomSize;
+        }
+
+        // check min size
+        {
+            Rectangle minPixelSize = getMinPackSize(srcModel, zoomSize);
+            int minWidth = minPixelSize.width;
+            int minHeight = minPixelSize.height;
+
+            if (pixelPack.width < minWidth) {
+                pixelPack.width = minWidth;
+            }
+            if (pixelPack.height < minHeight) {
+                pixelPack.height = minHeight;
+            }
+        }
+
+        return pixelPack;
+    }
+
+    private Rectangle getMinPackSize(Part srcModel, double zoomSize) {
+        Part parent = (Part) getHost().getModel();
+        ComponentDescriptor componentDescriptor = parent.getOwnerDocumentPart().getComponentDescriptor();
+        String minWidthStr = componentDescriptor.getMinWidth((ComponentPart) srcModel);
+        String minHeightStr = componentDescriptor.getMinHeight((ComponentPart) srcModel);
+        int minWidth = 1;
+        int minHeight = 1;
+
+        if ((null != minWidthStr) && (null != minHeightStr)) {
+            minWidth = Integer.valueOf(minWidthStr);
+            minHeight = Integer.valueOf(minHeightStr);
+        }
+        minWidth *= zoomSize;
+        minHeight *= zoomSize;
+
+        return new Rectangle(-1, -1, minWidth, minHeight);
+    }
+
+    private Rectangle applySnippetPack(int objtype, Rectangle gridPack, ComponentPart srcModel, double zoomSize) {
+        if (ITemplate.SNIPPET == objtype) {
+            Part parent = (Part) getHost().getModel();
+            Rectangle packBound = DesignEditorUtil.getPackBound(LayoutSchemaConstants.GRID, srcModel, getCurrentConfigurationID());
+            Rectangle minPackSize = DesignEditorUtil.pixelBoundToGridBound(getHost(), getMinPackSize(srcModel, zoomSize));
+            ComponentDescriptor componentDescriptor = parent.getOwnerDocumentPart().getComponentDescriptor();
+            if (!componentDescriptor.isContainer(srcModel)) {
+                if (packBound.height < minPackSize.height) {
+                    gridPack.height = minPackSize.height;
+                } else {
+                    gridPack.height = packBound.height;
+                }
+
+                if (packBound.width < minPackSize.width) {
+                    gridPack.width = minPackSize.width;
+                } else {
+                    gridPack.width = packBound.width;
+                }
+            } else {
+                gridPack.width = packBound.width;
+                gridPack.height = packBound.height;
+            }
+        }
+
+        return gridPack;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PanePlaceholderOutlineFeedbackPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PanePlaceholderOutlineFeedbackPolicy.java
new file mode 100644 (file)
index 0000000..c1b8614
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.tizen.efluibuilder.gef.editparts.ContainerEditPart;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+
+
+public class PanePlaceholderOutlineFeedbackPolicy extends PlaceholderOutlineFeedbackPolicy {
+
+    public static Rectangle getPlaceholderFeedbackBound(EditPart panesEditPart, int index) {
+        int MARGIN = 2;
+        DesignViewer viewer;
+        Part configPart;
+        ContainerEditPart editPart;
+        double zoom;
+
+        if ((panesEditPart instanceof ContainerEditPart == false) ||
+                (panesEditPart.getViewer() instanceof DesignViewer == false)) {
+            return null;
+        }
+        viewer = (DesignViewer) panesEditPart.getViewer();
+        configPart = viewer.getMScreenQualifierManager().getCurrentConfigurePart();
+        if (configPart == null) {
+            return null;
+        }
+
+        editPart = (ContainerEditPart) panesEditPart;
+        zoom = viewer.getZoomScale();
+
+        int cellCnt = editPart.getCellManager().getCellCount();
+
+        if (cellCnt > index) {
+            Rectangle cell = editPart.getCellByIdx(index);
+            Rectangle bound = new Rectangle((int) (zoom * cell.x + MARGIN),
+                                            (int) (zoom * cell.y + MARGIN),
+                                            (int) (zoom * cell.width - MARGIN * 2),
+                                            (int) (zoom * cell.height - MARGIN * 2));
+            return bound;
+        }
+
+        return null;
+    }
+
+    public void refresh() {
+        if (zoomMgr == null) {
+            return;
+        }
+
+        if (this.getHost() instanceof ContainerEditPart && this.getHost().getViewer() instanceof DesignViewer) {
+            ContainerEditPart editPart = (ContainerEditPart) this.getHost();
+            Part part = (Part) editPart.getModel();
+            DesignViewer viewer = (DesignViewer) editPart.getViewer();
+            Part configPart = viewer.getMScreenQualifierManager().getCurrentConfigurePart();
+            if (configPart == null) {
+                return;
+            }
+
+            String configurationID = configPart.getPropertyValue(LayoutSchemaConstants.ID);
+            List<Point> emptyCells = DesignEditorUtil.getEmptyPaneCellPosList(part, configurationID);
+
+            setPlaceholder(emptyCells.size());
+
+            for (int idx = 0; idx < emptyCells.size(); idx++) {
+                Rectangle bounds = getPlaceholderFeedbackBound(editPart, emptyCells.get(idx).x);
+                if (bounds != null) {
+                    getPlaceholder(idx).setBounds(bounds);
+                    getPlaceholder(idx).setVisible(this.needToShow());
+                }
+
+            }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PanesChildResizablePolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PanesChildResizablePolicy.java
new file mode 100644 (file)
index 0000000..144613c
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.Handle;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.tizen.efluibuilder.gef.editparts.ContainerEditPart;
+
+
+public class PanesChildResizablePolicy extends CommonChildResizablePolicy {
+
+    public PanesChildResizablePolicy() {
+        super();
+        setDragAllowed(true);
+    }
+
+    @Override
+    public void activate() {
+        super.activate();
+    }
+
+    @Override
+    public void deactivate() {
+        super.deactivate();
+    }
+
+    @Override
+    protected Rectangle getMoveComponentBound(Request request) {
+        ContainerEditPart targetEditPart = (ContainerEditPart) getHost().getParent();
+        if (null == targetEditPart) {
+            return null;
+        }
+
+        Point location = DesignEditorUtil.getLocationByRequest(request).getCopy();
+        if (null == location) {
+            return null;
+        }
+
+        translateToCustom(location);
+        int cursorIdx = targetEditPart.findIndexOfCellByPT(location.x, location.y);
+        if (cursorIdx >= 0) {
+            Rectangle newPackInfo = targetEditPart.getPackByIdx(cursorIdx, PanesLayoutPolicy.MaxCellCount);
+
+            return newPackInfo;
+        }
+
+        return null;
+    }
+
+    protected Command getAlignCommand(Request request) {
+        return null;
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    protected List createSelectionHandles() {
+
+        List<Handle> list = new ArrayList<Handle>();
+        createMoveHandle(list);
+
+        setBorderSelectionHandles(list);
+        return list;
+    }
+
+    @Override
+    public void showTargetFeedback(Request request) {
+        super.showTargetFeedback(request);
+    }
+
+    @Override
+    public void eraseTargetFeedback(Request request) {
+        super.eraseTargetFeedback(request);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PanesLayoutPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PanesLayoutPolicy.java
new file mode 100644 (file)
index 0000000..ee2f82e
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.List;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.gef.editparts.ContainerEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class PanesLayoutPolicy extends CommonLayoutPolicy {
+
+    public static final int MaxCellCount = 2;
+    private RectangleFigure hoverFeedback;
+
+    @Override
+    public void activate() {
+        super.activate();
+        if (hoverFeedback == null) {
+            hoverFeedback = new RectangleFigure();
+            hoverFeedback.setAlpha(127);
+            hoverFeedback.setFill(true);
+            hoverFeedback.setOutline(false);
+            hoverFeedback.setLineWidth(2);
+            hoverFeedback.setBackgroundColor(ColorResources.DESIGN_EDITOR_CREATION_BOUND_FEEDBACK_COLOR);
+            hoverFeedback.setLineStyle(Graphics.LINE_SOLID);
+            hoverFeedback.setBounds(new Rectangle(0, 0, 0, 0));
+            hoverFeedback.setVisible(false);
+            getFeedbackLayer().add(hoverFeedback);
+        }
+    }
+
+    @Override
+    public void showTargetFeedback(Request request) {
+        super.showTargetFeedback(request);
+
+        Object type = request.getType();
+
+        if (type.equals(REQ_CREATE) || type.equals(REQ_MOVE)) {
+            ContainerEditPart targetEditPart = (ContainerEditPart) getHost();
+
+            if (type.equals(REQ_RESIZE) || type.equals(REQ_MOVE)) {
+                if (request instanceof ChangeBoundsRequest) {
+
+                    @SuppressWarnings("unchecked")
+                    List<EditPart> childParts = ((ChangeBoundsRequest) request).getEditParts();
+                    for (EditPart part : childParts) {
+                        DesignEditPart parentPart = (DesignEditPart) part.getParent();
+                        if (parentPart != targetEditPart) {
+                            return;
+                        }
+                    }
+                }
+            }
+
+            Point location = DesignEditorUtil.getLocationByRequest(request).getCopy();
+            if (null == location) {
+                return;
+            }
+
+            if (getHost().getParent() instanceof GraphicalEditPart) {
+                IFigure parentFigure = ((GraphicalEditPart) getHost().getParent()).getFigure();
+                parentFigure.translateToRelative(location);
+            }
+
+            int cursorIdx = targetEditPart.findIndexOfCellByPT(location.x, location.y);
+            if (cursorIdx >= 0) {
+                Rectangle cursorArea = PanePlaceholderOutlineFeedbackPolicy.getPlaceholderFeedbackBound(targetEditPart, cursorIdx);
+                if (null != cursorArea) {
+                    hoverFeedback.setBounds(cursorArea);
+                    hoverFeedback.setVisible(true);
+                }
+            }
+        }
+
+        return;
+    }
+
+    @Override
+    public void eraseTargetFeedback(Request request) {
+        super.eraseTargetFeedback(request);
+
+        if (null == hoverFeedback)
+            return;
+
+        hoverFeedback.setVisible(false);
+    }
+
+    @Override
+    protected EditPolicy createChildEditPolicy(EditPart child) {
+        if (child instanceof DesignEditPart) {
+            return new PanesChildResizablePolicy();
+        }
+        return null;
+    }
+
+    @Override
+    protected Rectangle getComponentPack(int objtype, Point srcLoc, Point srcSize, ComponentPart srcModel) {
+        switch (objtype) {
+
+            case ITemplate.COMPONENT:
+            case ITemplate.SNIPPET: {
+
+                ContainerEditPart hostEditPart = (ContainerEditPart) getHost();
+                Point cursorPt = new Point(srcLoc);
+
+                if (getHost().getParent() instanceof GraphicalEditPart) {
+                    IFigure parentFigure = ((GraphicalEditPart) getHost().getParent()).getFigure();
+                    parentFigure.translateToRelative(cursorPt);
+                }
+
+                int placeHolderIdx = hostEditPart.findIndexOfCellByPT(cursorPt.x, cursorPt.y);
+                int childCntOfHost = ((Part) hostEditPart.getModel()).getComponentChildren().size();
+                if ((0 <= placeHolderIdx) && (childCntOfHost < MaxCellCount)) {
+                    return hostEditPart.getPackByIdx(placeHolderIdx, MaxCellCount);
+                }
+
+            }
+                break;
+            default:
+                break;
+        }
+
+        return null;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PlaceholderOutlineFeedbackPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/PlaceholderOutlineFeedbackPolicy.java
new file mode 100644 (file)
index 0000000..8f66b5f
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.ArrayList;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.tizen.efluibuilder.gef.figure.CommonRectangleFigure;
+import org.tizen.efluibuilder.gef.policies.OutlineFeedbackPolicy;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class PlaceholderOutlineFeedbackPolicy extends OutlineFeedbackPolicy {
+
+    protected ArrayList<CommonRectangleFigure> placeholders = new ArrayList<CommonRectangleFigure>();
+    protected static int MARGIN = 2;
+
+    @Override
+    protected boolean needToShow() {
+        if (this.getHost().getModel() instanceof ComponentPart && this.getHost().getViewer() instanceof DesignViewer) {
+            ComponentPart model = (ComponentPart) this.getHost().getModel();            
+            DesignViewer viewer = (DesignViewer) this.getHost().getViewer();
+
+            if ((viewer.getMScreenQualifierManager().getCurrentConfigurePart() != null) &&
+                    DesignEditorUtil.isHided(model, viewer.getMScreenQualifierManager().getCurrentConfigurePart().getPropertyValue(LayoutSchemaConstants.ID))) {
+                return false;
+            }           
+        }
+        return true;
+    }
+
+    protected void removePlaceholders() {
+        for (CommonRectangleFigure placeholder : placeholders) {
+            getFeedbackLayer().remove(placeholder);
+        }
+    }
+
+    @Override
+    public void deactivate() {
+        removePlaceholders();
+        super.deactivate();
+    }
+
+    protected void setPlaceholder(int cnt) {
+        if (placeholders.size() == cnt) {
+            return;
+        } else if (placeholders.size() > cnt) {
+            while (true) {
+                placeholders.get(placeholders.size() - 1).erase();
+                getFeedbackLayer().remove(placeholders.get(placeholders.size() - 1));
+                placeholders.remove(placeholders.size() - 1);
+                if (placeholders.size() == cnt) {
+                    break;
+                }
+            }
+        } else if (placeholders.size() < cnt) {
+            while (true) {
+                CommonRectangleFigure placeholder = new CommonRectangleFigure();
+                decoreatePlaceholder(placeholder);
+                placeholders.add(placeholder);
+                if (placeholders.size() == cnt) {
+                    break;
+                }
+            }
+        }
+    }
+
+    protected void decoreatePlaceholder(CommonRectangleFigure figure) {
+        figure.setBackgroundColor(ColorResources.DESIGN_EDITOR_CHANGE_BOUND_FEEDBACK_FILL_COLOR, 0);
+        figure.setOutline(true);
+
+        figure.setLineStyle(Graphics.LINE_SOLID);
+        figure.setForegroundColor(ColorResources.DESIGN_EDITOR_PLACEHOLDER_LINE_COLOR, 255);
+        figure.setBounds(new Rectangle(0, 0, 0, 0));
+        figure.setVisible(true);
+        getFeedbackLayer().add(figure);
+    }
+
+    public CommonRectangleFigure getPlaceholder(int index) {
+        return placeholders.get(index);
+    }
+
+    public void refresh() {
+        // do nothing
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/TableChildResizablePolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/TableChildResizablePolicy.java
new file mode 100644 (file)
index 0000000..795d481
--- /dev/null
@@ -0,0 +1,260 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.Handle;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.tizen.efluibuilder.gef.editparts.ContainerEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignRootEditPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.renderer.Position;
+
+
+public class TableChildResizablePolicy extends CommonChildResizablePolicy {
+
+    public TableChildResizablePolicy() {
+        super();
+        setDragAllowed(true);
+    }
+
+    @Override
+    public void activate() {
+        super.activate();
+    }
+
+    @Override
+    public void deactivate() {
+        super.deactivate();
+    }
+
+    @Override
+    protected Rectangle getResizeComponentBound(Request request) {
+        DesignEditPart editPart = (DesignEditPart) getHost();
+        Part part = (Part) editPart.getModel();
+        Dimension realDelta = ((ChangeBoundsRequest) request).getSizeDelta();
+        int resizeDirection = ((ChangeBoundsRequest) request).getResizeDirection();
+        Rectangle newPackInfo = new Rectangle(0, 0, 0, 0);
+        Rectangle currPackInfo = new Rectangle(0, 0, 0, 0);
+
+        // adjust zoom
+        {
+            double zoomSize = ((DesignRootEditPart) getHost().getRoot()).getZoomManager().getZoom();
+
+            realDelta.width /= zoomSize;
+            realDelta.height /= zoomSize;
+        }
+
+        // get current pack info
+        {
+            currPackInfo.x = Integer.valueOf(part.getPropertyValue(LayoutSchemaConstants.TABLE_PACK_COL));
+            currPackInfo.y = Integer.valueOf(part.getPropertyValue(LayoutSchemaConstants.TABLE_PACK_ROW));
+            currPackInfo.width = Integer.valueOf(part.getPropertyValue(LayoutSchemaConstants.TABLE_COL_SPAN));
+            currPackInfo.height = Integer.valueOf(part.getPropertyValue(LayoutSchemaConstants.TABLE_ROW_SPAN));
+        }
+
+        // calculate virtual-delta-value
+        {
+            ContainerEditPart parentEditPart = (ContainerEditPart) editPart.getParent();
+            if (null == parentEditPart) {
+                return null;
+            }
+
+            Position widgetPos = editPart.getPosition();
+            Position parentWidgetPos = parentEditPart.getPosition();
+
+            Point visualDelta = new Point(realDelta.width, realDelta.height);
+            Point handlePos = new Point(widgetPos.x, widgetPos.y);
+
+            int paddingValue = 10;
+
+            switch (resizeDirection) {
+                case PositionConstants.NORTH:
+                    visualDelta.y = widgetPos.y - visualDelta.y;
+                    visualDelta.x = widgetPos.x;
+                    break;
+                case PositionConstants.WEST:
+                    visualDelta.x = widgetPos.x - visualDelta.x;
+                    visualDelta.y = widgetPos.y;
+                    break;
+                case PositionConstants.SOUTH:
+                    visualDelta.y = widgetPos.y + widgetPos.height + visualDelta.y;
+                    visualDelta.x = widgetPos.x;
+                    handlePos.y += widgetPos.height - paddingValue;
+                    break;
+                case PositionConstants.EAST:
+                    visualDelta.x = widgetPos.x + widgetPos.width + visualDelta.x;
+                    visualDelta.y = widgetPos.y;
+                    handlePos.x += widgetPos.width - paddingValue;
+                    break;
+                default:
+                    return null;
+            }
+
+            // threshold
+            {
+                int minX, maxX;
+                minX = parentWidgetPos.x;
+                maxX = parentWidgetPos.x + parentWidgetPos.width;
+                if (minX > visualDelta.x) {
+                    visualDelta.x = minX + paddingValue;
+                } else if (maxX < visualDelta.x) {
+                    visualDelta.x = maxX - paddingValue;
+                }
+
+                int minY, maxY;
+                minY = parentWidgetPos.y;
+                maxY = parentWidgetPos.y + parentWidgetPos.height;
+                if (minY > visualDelta.y) {
+                    visualDelta.y = minY + paddingValue;
+                } else if (maxY < visualDelta.y) {
+                    visualDelta.y = maxY - paddingValue;
+                }
+            }
+
+            int deltaIdx = parentEditPart.findIndexOfCellByPTwithoutWID(visualDelta.x, visualDelta.y);
+            int currIdx = parentEditPart.findIndexOfCellByPTwithoutWID(handlePos.x, handlePos.y);
+
+            if ((deltaIdx == currIdx) || (deltaIdx < 0) || (currIdx < 0))
+                return null;
+
+            int tableColCount = parentEditPart.getCellColumCount();
+
+            int subdeltaIdx = (currIdx > deltaIdx) ? currIdx - deltaIdx : deltaIdx - currIdx;
+
+            switch (resizeDirection) {
+                case PositionConstants.NORTH:
+                case PositionConstants.WEST:
+                    if (currIdx < deltaIdx)
+                        subdeltaIdx *= -1;
+                    break;
+                case PositionConstants.SOUTH:
+                case PositionConstants.EAST:
+                    if (currIdx > deltaIdx)
+                        subdeltaIdx *= -1;
+                    break;
+            }
+
+            deltaIdx = subdeltaIdx / tableColCount;
+            if (deltaIdx == 0)
+                deltaIdx = subdeltaIdx % tableColCount;
+
+            switch (resizeDirection) {
+
+                case PositionConstants.NORTH:
+                    newPackInfo.y = -deltaIdx;
+                    newPackInfo.height += deltaIdx;
+                    break;
+                case PositionConstants.WEST:
+                    newPackInfo.x = -deltaIdx;
+                    newPackInfo.width += deltaIdx;
+                    break;
+                case PositionConstants.SOUTH:
+                    newPackInfo.height += deltaIdx;
+                    break;
+                case PositionConstants.EAST:
+                    newPackInfo.width += deltaIdx;
+                    break;
+            }
+
+        }
+
+        // make new pack info
+        {
+            newPackInfo.x += currPackInfo.x;
+            newPackInfo.y += currPackInfo.y;
+            newPackInfo.width += currPackInfo.width;
+            newPackInfo.height += currPackInfo.height;
+        }
+
+        return newPackInfo;
+    }
+
+    @Override
+    protected Rectangle getMoveComponentBound(Request request) {
+
+        ContainerEditPart targetEditPart = (ContainerEditPart) getHost().getParent();
+        if (null == targetEditPart) {
+            return null;
+        }
+
+        Point location = DesignEditorUtil.getLocationByRequest(request).getCopy();
+        if (null == location) {
+            return null;
+        }
+
+        translateToCustom(location);
+        int cursorIdx = targetEditPart.findIndexOfCellByPT(location.x, location.y);
+        if (cursorIdx >= 0) {
+            int tableColCount = targetEditPart.getCellColumCount();
+
+            Rectangle newPackInfo = targetEditPart.getPackByIdx(cursorIdx, tableColCount);
+
+            return newPackInfo;
+        }
+
+        return null;
+    }
+
+    @Override
+    protected Command getAlignCommand(Request request) {
+        return null;
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    protected List createSelectionHandles() {
+
+        List<Handle> list = new ArrayList<Handle>();
+        createMoveHandle(list);
+        createResizeHandle(list, PositionConstants.NORTH);
+        createResizeHandle(list, PositionConstants.EAST);
+        createResizeHandle(list, PositionConstants.SOUTH);
+        createResizeHandle(list, PositionConstants.WEST);
+
+        setBorderSelectionHandles(list);
+
+        return list;
+    }
+
+    @Override
+    public void showTargetFeedback(Request request) {
+        super.showTargetFeedback(request);
+    }
+
+    @Override
+    public void eraseTargetFeedback(Request request) {
+        super.eraseTargetFeedback(request);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/TableLayoutPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/TableLayoutPolicy.java
new file mode 100644 (file)
index 0000000..43132da
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.List;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.gef.editparts.ContainerEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class TableLayoutPolicy extends CommonLayoutPolicy {
+
+    private RectangleFigure hoverFeedback;
+
+    @Override
+    public void activate() {
+        super.activate();
+
+        if (hoverFeedback == null) {
+            hoverFeedback = new RectangleFigure();
+            hoverFeedback.setAlpha(127);
+            hoverFeedback.setFill(true);
+            hoverFeedback.setOutline(false);
+            hoverFeedback.setLineWidth(2);
+            hoverFeedback.setBackgroundColor(ColorResources.DESIGN_EDITOR_CREATION_BOUND_FEEDBACK_COLOR);
+            hoverFeedback.setLineStyle(Graphics.LINE_SOLID);
+            hoverFeedback.setBounds(new Rectangle(0, 0, 0, 0));
+            hoverFeedback.setVisible(false);
+            getFeedbackLayer().add(hoverFeedback);
+        }
+    }
+
+    @Override
+    public void showTargetFeedback(Request request) {
+        super.showTargetFeedback(request);
+
+        Object type = request.getType();
+        if (type.equals(REQ_CREATE) || type.equals(REQ_RESIZE) || type.equals(REQ_MOVE)) {
+            ContainerEditPart targetEditPart = (ContainerEditPart) getHost();
+
+            if (type.equals(REQ_RESIZE) || type.equals(REQ_MOVE)) {
+                if (request instanceof ChangeBoundsRequest) {
+
+                    @SuppressWarnings("unchecked")
+                    List<EditPart> childParts = ((ChangeBoundsRequest) request).getEditParts();
+                    for (EditPart part : childParts) {
+                        DesignEditPart parentPart = (DesignEditPart) part.getParent();
+                        if (parentPart != targetEditPart) {
+                            return;
+                        }
+                    }
+                }
+            }
+
+            Point location = DesignEditorUtil.getLocationByRequest(request).getCopy();
+            if (null == location) {
+                return;
+            }
+
+            if (getHost().getParent() instanceof GraphicalEditPart) {
+                IFigure parentFigure = ((GraphicalEditPart) getHost().getParent()).getFigure();
+                parentFigure.translateToRelative(location);
+            }
+
+            int cursorIdx = targetEditPart.findIndexOfCellByPT(location.x, location.y);
+            if (cursorIdx >= 0) {
+                Rectangle placeholderRect = TablePlaceholderOutlineFeedbackPolicy.getPlaceholderFeedbackBound(targetEditPart, cursorIdx);
+                if (null != placeholderRect) {
+                    hoverFeedback.setBounds(placeholderRect);
+                    hoverFeedback.setVisible(true);
+                }
+            }
+        }
+
+        return;
+    }
+
+    @Override
+    public void eraseTargetFeedback(Request request) {
+        super.eraseTargetFeedback(request);
+
+        if (null == hoverFeedback)
+            return;
+
+        hoverFeedback.setVisible(false);
+    }
+
+    @Override
+    protected EditPolicy createChildEditPolicy(EditPart child) {
+        if (child instanceof DesignEditPart) {
+            return new TableChildResizablePolicy();
+        }
+        return null;
+    }
+
+    @Override
+    protected Rectangle getComponentPack(int objtype, Point srcLoc, Point srcSize, ComponentPart srcModel) {
+
+        switch (objtype) {
+
+            case ITemplate.COMPONENT:
+            case ITemplate.SNIPPET: {
+
+                ContainerEditPart hostEditPart = (ContainerEditPart) getHost();
+                Point cursorPt = new Point(srcLoc);
+
+                if (getHost().getParent() instanceof GraphicalEditPart) {
+                    IFigure parentFigure = ((GraphicalEditPart) getHost().getParent()).getFigure();
+                    parentFigure.translateToRelative(cursorPt);
+                }
+
+                int placeHolderIdx = hostEditPart.findIndexOfCellByPT(cursorPt.x, cursorPt.y);
+                if (placeHolderIdx >= 0) {
+                    return hostEditPart.getPackByIdx(placeHolderIdx, hostEditPart.getCellColumCount());
+                }
+
+            }
+                break;
+            default:
+                break;
+        }
+
+        return null;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/TablePlaceholderOutlineFeedbackPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/TablePlaceholderOutlineFeedbackPolicy.java
new file mode 100644 (file)
index 0000000..add9caf
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.tizen.efluibuilder.gef.editparts.ContainerEditPart;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+
+
+public class TablePlaceholderOutlineFeedbackPolicy extends PlaceholderOutlineFeedbackPolicy {
+
+    public static Rectangle getPlaceholderFeedbackBound(EditPart tableEditPart, int index) {
+        int margin = MARGIN;
+        DesignViewer viewer;
+        Part configPart;
+        ContainerEditPart editPart;
+        double zoom;
+
+        if ((tableEditPart instanceof ContainerEditPart == false) ||
+                (tableEditPart.getViewer() instanceof DesignViewer == false)) {
+            return null;
+        }
+        viewer = (DesignViewer) tableEditPart.getViewer();
+        configPart = viewer.getMScreenQualifierManager().getCurrentConfigurePart();
+        if (configPart == null) {
+            return null;
+        }
+
+        editPart = (ContainerEditPart) tableEditPart;
+        zoom = viewer.getZoomScale();
+
+        int cellCnt = editPart.getCellManager().getCellCount();
+
+        if (cellCnt > index) {
+            Rectangle cell = editPart.getCellByIdx(index);
+            Rectangle bound = new Rectangle((int) (zoom * cell.x + margin),
+                                            (int) (zoom * cell.y + margin),
+                                            (int) (zoom * cell.width - margin * 2),
+                                            (int) (zoom * cell.height - margin * 2));
+
+            return bound;
+        }
+
+        return null;
+    }
+
+    @Override
+    public void refresh() {
+        if (zoomMgr == null) {
+            return;
+        }
+
+        if (this.getHost() instanceof ContainerEditPart && this.getHost().getViewer() instanceof DesignViewer) {
+            ContainerEditPart editPart = (ContainerEditPart) this.getHost();
+            Part part = (Part) editPart.getModel();
+            DesignViewer viewer = (DesignViewer) editPart.getViewer();
+            Part configPart = viewer.getMScreenQualifierManager().getCurrentConfigurePart();
+            if (configPart == null) {
+                return;
+            }
+
+            int colCnt = Integer.parseInt(part.getPropertyValue(LayoutSchemaConstants.TABLE_COLS));
+            int cellCnt = editPart.getCellManager().getCellCount();
+            String configurationID = configPart.getPropertyValue(LayoutSchemaConstants.ID);
+            List<Point> emptyCells = DesignEditorUtil.getEmptyTableCellPosList(part, configurationID);
+            setPlaceholder(emptyCells.size());
+
+            int cellIndex;
+            for (int idx = 0; idx < emptyCells.size(); idx++) {
+                cellIndex = emptyCells.get(idx).x + emptyCells.get(idx).y * colCnt;
+                if (cellCnt > cellIndex) {
+                    Rectangle bound = getPlaceholderFeedbackBound(editPart, cellIndex);
+                    if (bound != null) {
+                        getPlaceholder(idx).setBounds(bound);
+                        getPlaceholder(idx).setVisible(this.needToShow());
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewChildResizablePolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewChildResizablePolicy.java
new file mode 100644 (file)
index 0000000..96a37b8
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.Handle;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+
+
+public class ViewChildResizablePolicy extends CommonChildResizablePolicy {
+
+    public ViewChildResizablePolicy() {
+        super();
+        setDragAllowed(false);
+    }
+
+    @Override
+    public void activate() {
+        super.activate();
+    }
+
+    @Override
+    public void deactivate() {
+        super.deactivate();
+    }
+
+    @Override
+    protected Command getAlignCommand(Request request) {
+        return null;
+    }
+
+    @SuppressWarnings({ "rawtypes" })
+    @Override
+    protected List createSelectionHandles() {
+
+        List<Handle> list = new ArrayList<Handle>();
+        createMoveHandle(list);
+
+        setBorderSelectionHandles(list);
+
+        return list;
+    }
+
+    @Override
+    public void showTargetFeedback(Request request) {
+        Object extendData = request.getExtendedData().get(REQ_KEY_CHANGETARGET);
+        if (null != extendData) {
+            boolean isShowFeedback = ((Boolean) extendData).booleanValue();
+            if (isShowFeedback) {
+                super.showTargetFeedback(request);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewLayoutPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewLayoutPolicy.java
new file mode 100644 (file)
index 0000000..4c91daa
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignRootEditPart;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.renderer.Position;
+
+
+public class ViewLayoutPolicy extends CommonLayoutPolicy {
+
+    @Override
+    public void deactivate() {
+        if (hoverFeedback != null) {
+            getFeedbackLayer().remove(hoverFeedback);
+            hoverFeedback = null;
+        }
+
+        super.deactivate();
+    }
+
+    @Override
+    protected EditPolicy createChildEditPolicy(EditPart child) {
+        if (child instanceof DesignEditPart) {
+            return new ViewChildResizablePolicy();
+        }
+        return null;
+    }
+
+    @Override
+    public void showTargetFeedback(Request request) {
+
+        Command cmd = getCommand(request);
+        if ((null == cmd) || (cmd.canExecute() == false)) {
+            return;
+        }
+
+        DesignEditPart targetEditPart = (DesignEditPart) getHost();
+        Position pos = targetEditPart.getPosition();
+        Rectangle area = new Rectangle(pos.x, pos.y, pos.width, pos.height);
+
+        double zoomSize = ((DesignRootEditPart) getHost().getRoot()).getZoomManager().getZoom();
+        
+        DesignEditorUtil.scaleRect(area, zoomSize);        
+        hoverFeedback.setBounds(area);
+        hoverFeedback.setVisible(true);
+        return;
+    }
+
+    @Override
+    public void eraseTargetFeedback(Request request) {
+        hoverFeedback.setVisible(false);
+        return;
+    }
+
+    @Override
+    protected Rectangle getComponentPack(int objtype, Point srcLoc, Point srcSize, ComponentPart srcModel) {
+
+        if ((null == srcLoc) || (null == srcModel)) {
+            return null;
+        }
+
+        switch (objtype) {
+
+            case ITemplate.COMPONENT:
+            case ITemplate.SNIPPET: {
+                if (getHost().getChildren().size() == 0) {
+
+                    DesignViewer viewer = (DesignViewer) this.getHost().getViewer();
+                    if (null != viewer) {
+                        Point windowSize = viewer.getMScreenQualifierManager().getScreenSize();
+                        if (null != windowSize) {
+
+                            return new Rectangle(0, 0, windowSize.x, windowSize.y);
+                        }
+                    }
+                    break;
+                }
+            }
+            default:
+                break;
+        }
+
+        return null;
+    }
+
+    @Override
+    public Command getCommand(Request request) {
+        if (REQ_ADD.equals(request.getType()))
+            return null;
+        return super.getCommand(request);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewMovePolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewMovePolicy.java
new file mode 100644 (file)
index 0000000..80e4206
--- /dev/null
@@ -0,0 +1,194 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.AbstractBorder;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Handle;
+import org.eclipse.gef.LayerConstants;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.SharedCursors;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.editpolicies.ResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.handles.ResizableHandleKit;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.tizen.efluibuilder.gef.editparts.DesignRootEditPart;
+import org.tizen.efluibuilder.gef.figure.border.WidgetSelectionBorder;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class ViewMovePolicy extends ResizableEditPolicy {
+
+    final protected String REQ_KEY_CHANGETARGET = "change-target";
+
+    @Override
+    public void activate() {
+        super.activate();
+    }
+
+    @Override
+    public void deactivate() {
+        super.deactivate();
+    }
+
+    @Override
+    protected void createResizeHandle(List handles, int direction) {
+        // do nothing
+    }
+
+    @Override
+    public Command getCommand(Request request) {
+        if (REQ_MOVE.equals(request.getType())) {
+            Point delta = getMoveDeltaByRequest(request);
+            EditPart editPart = this.getHost();
+            Part viewPart = (Part) editPart.getModel();
+            CompoundCommand cmd = new CompoundCommand();
+            Point viewPos = DesignEditorUtil.getPageLocation(viewPart);
+            if (delta != null && delta.x != 0) {
+                cmd.add(PartUtil.createSetPropertyCommand(viewPart, LayoutSchemaConstants.PAGE_LOCATION_X, Integer.toString(delta.x + viewPos.x)));
+            }
+            if (delta != null && delta.y != 0) {
+                cmd.add(PartUtil.createSetPropertyCommand(viewPart, LayoutSchemaConstants.PAGE_LOCATION_Y, Integer.toString(delta.y + viewPos.y)));
+            }
+
+            if (cmd.size() > 0) {
+                return cmd;
+            }
+        }
+
+        return null;
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    protected List createSelectionHandles() {
+
+        List<Handle> list = new ArrayList<Handle>();
+        createMoveHandle(list);
+
+        setBorderSelectionHandles(list);
+
+        return list;
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    protected void createMoveHandle(List handles) {
+        if (isDragAllowed()) {
+            // display 'move' handle to allow dragging
+            ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles, getDragTracker(), SharedCursors.CURSOR_TREE_MOVE);
+        } else {
+            // display 'move' handle only to indicate selection
+            ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles, getSelectTracker(), SharedCursors.ARROW);
+        }
+    }
+
+    @Override
+    protected IFigure getFeedbackLayer() {
+        return getLayer(LayerConstants.SCALED_FEEDBACK_LAYER);
+    }
+
+    protected IFigure getNoneScalableFeedbackLayer() {
+        return getLayer(LayerConstants.FEEDBACK_LAYER);
+    }
+
+    @Override
+    public EditPart getTargetEditPart(Request request) {
+        return this.getHost();
+    }
+
+    protected void translateToZoom(Point srcPt) {
+        if (null == srcPt)
+            return;
+
+        double zoomSize = ((DesignRootEditPart) getHost().getRoot()).getZoomManager().getZoom();
+        srcPt.x /= zoomSize;
+        srcPt.y /= zoomSize;
+    }
+
+    protected Point getMoveDeltaByRequest(Request request) {
+
+        if (!(request instanceof ChangeBoundsRequest)) {
+            return null;
+        }
+
+        ChangeBoundsRequest moveReq = (ChangeBoundsRequest) request;
+
+        Point realDelta = moveReq.getMoveDelta();
+        Point sizeDelta = new Point();
+        sizeDelta.x = realDelta.x;
+        sizeDelta.y = realDelta.y;
+
+        translateToZoom(sizeDelta);
+
+        return sizeDelta;
+    }
+
+    protected void setBorderSelectionHandles(List<Handle> list) {
+
+        AbstractBorder selectionBorder = null;
+        selectionBorder = new WidgetSelectionBorder(ColorResources.DESIGN_EDITOR_SELECTION_LINE_COLOR);
+
+        for (Handle handle : list) {
+            if (handle instanceof MoveHandle) {
+                ((MoveHandle) handle).setBorder(selectionBorder);
+            }
+        }
+
+        return;
+    }
+
+    public boolean IsChangeTargetForParent() {
+        return false;
+    }
+
+    protected ConfigurationPart getCurrentConfiguration() {
+        DesignViewer viewer = (DesignViewer) getHost().getViewer();
+        if (viewer == null) {
+            return null;
+        }
+        return viewer.getMScreenQualifierManager().getCurrentConfigurePart();
+    }
+
+    protected String getCurrentConfigurationID() {
+        ConfigurationPart configPart = getCurrentConfiguration();
+        if (configPart == null) {
+            return null;
+        }
+        return configPart.getPropertyValue(LayoutSchemaConstants.ID);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewTemplateLayoutPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/policies/containers/ViewTemplateLayoutPolicy.java
new file mode 100644 (file)
index 0000000..d7de5d4
--- /dev/null
@@ -0,0 +1,225 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.policies.containers;
+
+import java.util.Collection;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editparts.ZoomManager;
+import org.eclipse.gef.requests.CreateRequest;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.app.AppManager;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.model.snippet.ISnippet;
+import org.tizen.efluibuilder.model.snippet.ISnippetManager;
+import org.tizen.efluibuilder.model.snippet.SnippetManager;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUnmarshaller;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.views.outline.OutlineConstants;
+import org.w3c.dom.Document;
+
+
+public class ViewTemplateLayoutPolicy extends CommonLayoutPolicy {
+
+    static class TemplateFactory {
+        Part ctxPopupPart = null;
+        Part popupPart = null;
+
+        public TemplateFactory() {
+            init();
+        }
+
+        private void init() {
+            String platform = null;
+            ISnippetManager manager = SnippetManager.getDefault();
+            Collection<ISnippet> templates = manager.getViewTemplates();
+
+            Document document = null;
+
+            for (ISnippet template : templates) {
+                if (!template.getCategory().equals(ISnippet.CATEGORY_SYSTEM)) {
+                    continue;
+                }
+                if (template.getName().equals(OutlineConstants.KEY_POPUP_VIEW)) {
+                    document = template.getModel();
+                    DocumentPart docPart = (DocumentPart) PartUtil.createPart(PartType.DOCUMENT, null);
+                    platform = AppManager.getAppManager().getPlatform();
+                    docPart.setPlatform(platform);
+
+                    PartUnmarshaller unmarshaller = new PartUnmarshaller();
+                    Part part = unmarshaller.unmarshall(docPart, document, false);
+
+                    // get ViewPart from part
+                    popupPart = (part instanceof ViewsPart) ? part.getChildren().get(0) : null;
+                }
+
+                if (template.getName().equals(OutlineConstants.KEY_CTXPOPUP_VIEW)) {
+                    document = template.getModel();
+                    DocumentPart docPart = (DocumentPart) PartUtil.createPart(PartType.DOCUMENT, null);
+                    platform = AppManager.getAppManager().getPlatform();
+                    docPart.setPlatform(platform);
+
+                    PartUnmarshaller unmarshaller = new PartUnmarshaller();
+                    Part part = unmarshaller.unmarshall(docPart, document, false);
+
+                    // get ViewPart from part
+                    ctxPopupPart = (part instanceof ViewsPart) ? part.getChildren().get(0) : null;
+                }
+
+            }
+        }
+
+        Part getPartFromType(String descriptorId) {
+            if (LayoutSchemaConstants.CTXPOPUP.equals(descriptorId)) {
+                if (ctxPopupPart != null) {
+                    return PartUtil.clone(ctxPopupPart, true, null, false);
+                }
+            } else if (LayoutSchemaConstants.POPUP.equals(descriptorId)) {
+                if (popupPart != null) {
+                    return PartUtil.clone(popupPart, true, null, false);
+                }
+            }
+            return null;
+        }
+    }
+
+    TemplateFactory factory = null;
+
+    public ViewTemplateLayoutPolicy() {
+        super();
+    }
+
+    public EditPart getTargetEditPart(Request request) {
+        if (REQ_CREATE.equals(request.getType())) {
+            return getHost();
+        }
+        return null;
+    }
+
+    @Override
+    public void deactivate() {
+        super.deactivate();
+    }
+
+    @Override
+    protected EditPolicy createChildEditPolicy(EditPart child) {
+        return null;
+    }
+
+    public boolean acceptableRequest(Request request) {
+        if (!REQ_CREATE.equals(request.getType())) {
+            return false;
+        }
+        CreateRequest createReq = (CreateRequest) request;
+        Object object = createReq.getNewObjectType();
+        int objtype = (Integer) object;
+        if (ITemplate.COMPONENT == objtype && createReq.getNewObject() instanceof ComponentPart) {
+            ComponentPart part = (ComponentPart) createReq.getNewObject();
+            if (LayoutSchemaConstants.VIEW.equals(part.getDescriptorId()) ||
+                    LayoutSchemaConstants.POPUP.equals(part.getDescriptorId()) ||
+                    LayoutSchemaConstants.CTXPOPUP.equals(part.getDescriptorId())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public void showTargetFeedback(Request request) {
+        if (acceptableRequest(request)) {
+            CreateRequest createReq = (CreateRequest) request;
+            outlineFeedback.setVisible(true);
+            DesignViewer viewer = ((DesignViewer) getHost().getViewer());
+            ZoomManager zoomMgr = viewer.getZoomManager();
+            if (zoomMgr == null) {
+                return;
+            }
+            double scale = zoomMgr.getZoom();
+            Point screenSize = viewer.getMScreenQualifierManager().getScreenSize();
+            outlineFeedback.setBounds(new Rectangle(zoomMgr.getViewport().getViewLocation().x + createReq.getLocation().x,
+                                                    zoomMgr.getViewport().getViewLocation().y + createReq.getLocation().y, (int) (screenSize.x * scale),
+                                                    (int) (screenSize.y * scale)));
+        }
+    }
+
+    @Override
+    public void eraseTargetFeedback(Request request) {
+        if (acceptableRequest(request)) {
+            outlineFeedback.setVisible(false);
+        }
+    }
+
+    @Override
+    public Command getCommand(Request request) {
+        if (REQ_CREATE.equals(request.getType())) {
+            if (factory == null) {
+                factory = new TemplateFactory();
+            }
+            return getCreateCommand((CreateRequest) request);
+        }
+
+        return null;
+    }
+
+    @Override
+    protected Command getCreateCommand(CreateRequest request) {        
+        Object object = request.getNewObjectType();
+        int objtype = (Integer) object;
+        Part newPart = null;
+        Part viewsPart = (Part) getHost().getViewer().getContents().getModel();
+        if (ITemplate.COMPONENT == objtype && request.getNewObject() instanceof ComponentPart) {
+            ComponentPart part = (ComponentPart) request.getNewObject();
+            if (LayoutSchemaConstants.VIEW.equals(part.getDescriptorId())) {
+                newPart = PartUtil.createPartWithInitValue(viewsPart.getOwnerDocumentPart(), PartType.VIEW, viewsPart, LayoutSchemaConstants.VIEW);
+            } else if (LayoutSchemaConstants.POPUP.equals(part.getDescriptorId()) ||
+                    LayoutSchemaConstants.CTXPOPUP.equals(part.getDescriptorId())) {
+                newPart = factory.getPartFromType(part.getDescriptorId());
+            }
+        }
+        if (newPart != null) {
+            ZoomManager zoomMgr = ((DesignViewer) getHost().getViewer()).getZoomManager();
+            if (zoomMgr == null) {
+                return null;
+            }
+            double scale = 1 / zoomMgr.getZoom();
+            newPart.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_X,
+                                     Integer.toString((int) (scale * (request.getLocation().x + zoomMgr.getViewport().getViewLocation().x))));
+            newPart.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_Y,
+                                     Integer.toString((int) (scale * (request.getLocation().y + +zoomMgr.getViewport().getViewLocation().y))));
+            return PartUtil.createAddPartCommand(viewsPart, newPart, null);
+        }
+        return null;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/requests/DesignCreateRequest.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/requests/DesignCreateRequest.java
new file mode 100644 (file)
index 0000000..9bf0030
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.requests;
+
+import org.eclipse.gef.requests.CreateRequest;
+
+
+public class DesignCreateRequest extends CreateRequest {
+    public static String TYPE_DEFAULT = "default";
+    public static String TYPE_PALETTE = "palette";
+    public static String TYPE_FILE = "file";
+    public static String TYPE_TEMPLATE = "template";
+    public static String TYPE_DATABINDING_TEMPLATE = "databindingTemplate";
+    private String createType = null;
+
+    public DesignCreateRequest(String reqType) {
+        super();
+        this.createType = reqType;
+    }
+
+    public DesignCreateRequest() {
+        this(TYPE_DEFAULT);
+    }
+
+    public String getCreateType() {
+        return this.createType;
+    }
+
+    public void setCreateRequestType(String reqType) {
+        createType = reqType;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignCreationTool.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignCreationTool.java
new file mode 100644 (file)
index 0000000..2610e14
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.tools;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.tools.CreationTool;
+
+
+public class DesignCreationTool extends CreationTool {
+    // if command is not executable, change target to parent,
+    private void updateTargetSpecificContainer() {
+        EditPart target = getTargetEditPart();
+        while (target != null && target.getParent() != null) {
+            Command creationToolCommand = getCommand();
+            if ((creationToolCommand != null) && (creationToolCommand.canExecute() == true)) {
+                break;
+            } else {
+                target = target.getParent();
+                setTargetEditPart(target);
+            }
+        }
+    }
+
+    protected boolean updateTargetUnderMouse() {
+        boolean changed = super.updateTargetUnderMouse();
+        updateTargetSpecificContainer();
+        return changed;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignDragEditPartsTracker.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignDragEditPartsTracker.java
new file mode 100644 (file)
index 0000000..2695845
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.tools;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.tools.DragEditPartsTracker;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+/**
+ * A DragTracker that moves {@link org.eclipse.gef.EditPart EditParts}.
+ */
+public class DesignDragEditPartsTracker extends DragEditPartsTracker /* SelectEditPartTracker */ {
+
+    public DesignDragEditPartsTracker(EditPart sourceEditPart) {
+        super(sourceEditPart);
+        // TODO Auto-generated constructor stub
+    }
+
+    @Override
+    protected boolean isMove() {
+        return true;
+    }
+
+    @Override
+    protected void updateTargetRequest() {
+        super.updateTargetRequest();
+    }
+
+    @Override
+    protected void snapPoint(ChangeBoundsRequest request) {
+
+        // !!!!!!!!!!!! NEED TO REFACTORING !!!!!!!!!!
+        if (getTargetEditPart() instanceof DesignEditPart) {
+            DesignEditPart editPart = (DesignEditPart) getTargetEditPart();
+            if (null != editPart) {
+                Part targetPart = (Part) editPart.getModel();
+                if (targetPart.getDescriptorId().equals(LayoutSchemaConstants.GRID)) {
+                    super.snapPoint(request);
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignDragViewEditPartTracker.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignDragViewEditPartTracker.java
new file mode 100644 (file)
index 0000000..f2e2d1b
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.tools;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.tizen.efluibuilder.gef.editparts.ViewEditPart;
+import org.tizen.efluibuilder.gef.viewer.DesignStoryboardRouter;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+
+/**
+ * A DragTracker that moves {@link org.eclipse.gef.EditPart EditParts}.
+ */
+public class DesignDragViewEditPartTracker extends DesignDragEditPartsTracker {
+
+    public DesignDragViewEditPartTracker(EditPart sourceEditPart) {
+        super(sourceEditPart);
+    }
+    
+    @Override
+    protected void showSourceFeedback() {        
+        ChangeBoundsRequest req = (ChangeBoundsRequest) getTargetRequest();
+        DesignViewer viewer = (DesignViewer) this.getSourceEditPart().getViewer();
+        double scale = viewer.getZoomScale();
+        Point delta = req.getMoveDelta().getCopy();
+        delta = new Point((int)(delta.x * (1.0 / scale)), (int)(delta.y * (1.0 / scale)));
+        List<Part> parts = new ArrayList<Part>();
+        List editParts = getOperationSet();
+        for (int i = 0; i < editParts.size(); i++) {
+            EditPart editPart = (EditPart) editParts.get(i);
+            if (editPart instanceof ViewEditPart) {
+                ((ViewEditPart)editPart).moveFigure(delta);
+            }
+            parts.add((Part) editPart.getModel());
+        }
+        
+        DesignStoryboardRouter router = viewer.getStoryBoardRouter();
+        router.setPagesDelta(delta, parts);
+        router.refreshAllConnections();               
+    }    
+    
+    @Override
+    protected boolean handleDragStarted() {
+        DesignViewer viewer = (DesignViewer) this.getSourceEditPart().getViewer();
+        viewer.setVisibleOutlineLayer(false);
+        return super.handleDragStarted();        
+    }
+    
+    public void deactivate() {
+        DesignViewer viewer = (DesignViewer) this.getSourceEditPart().getViewer();
+        if (viewer != null) {
+        DesignStoryboardRouter router = viewer.getStoryBoardRouter();
+        router.clearPagesDelta();                
+        }
+        super.deactivate();
+    }
+    
+    protected boolean handleButtonUp(int button) {
+        if (stateTransition(STATE_DRAG_IN_PROGRESS, STATE_TERMINAL)) {
+            eraseSourceFeedback();
+            eraseTargetFeedback();
+            performDrag();
+            return true;
+        }
+        
+        if (isInState(STATE_DRAG)) {
+            performSelection();            
+            setState(STATE_TERMINAL);
+            return true;
+        }
+        return false;
+    }
+
+    
+    
+    
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignEditDomain.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignEditDomain.java
new file mode 100644 (file)
index 0000000..6052d5e
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.tools;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.tools.ConnectionCreationTool;
+import org.eclipse.gef.tools.PanningSelectionTool;
+import org.eclipse.gef.tools.SelectionTool;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.ui.IEditorPart;
+import org.tizen.efluibuilder.gef.editparts.ComponentEditPart;
+import org.tizen.efluibuilder.gef.tools.DesignPanningTool;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.TizenEditDomain;
+
+
+
+public class DesignEditDomain extends TizenEditDomain {    
+    private ConnectionCreationTool connectionCreationtool = new ConnectionCreationTool();
+    private PanningSelectionTool panningTool = new DesignPanningTool();
+    private boolean connectionEnable = false; 
+    
+    public DesignEditDomain(IEditorPart editorPart) {
+        super(editorPart);
+    }
+    
+    public boolean isConnectionEnabled() {
+        return connectionEnable;
+    }
+            
+    public void clearConnectionEnabled () {
+        connectionEnable = false;
+    }
+
+    public void mouseDown(MouseEvent mouseEvent, EditPartViewer viewer) {
+        Point p = new Point(mouseEvent.x, mouseEvent.y);
+        if ((mouseEvent.stateMask & SWT.SHIFT) != 0 
+                && viewer.findObjectAt(p) instanceof ComponentEditPart && getActiveTool() instanceof SelectionTool
+                ) {
+            this.setActiveTool(connectionCreationtool);
+            connectionEnable = true;
+        }  else if (mouseEvent.button == 2) {
+            this.setActiveTool(panningTool);
+        }        
+        
+        Tool tool = getActiveTool();
+        if (tool != null) {
+            tool.mouseDown(mouseEvent, viewer);
+        }
+    }
+
+    public void mouseUp(MouseEvent mouseEvent, EditPartViewer viewer) {                    
+        if (getActiveTool() instanceof ConnectionCreationTool || getActiveTool() instanceof DesignPanningTool) {
+            this.loadDefaultTool();     
+        }
+        
+        super.mouseUp(mouseEvent, viewer);    
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignMarqueeDragTracker.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignMarqueeDragTracker.java
new file mode 100644 (file)
index 0000000..6efa665
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.tools;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.tools.MarqueeDragTracker;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+
+
+public class DesignMarqueeDragTracker extends MarqueeDragTracker {
+
+    private EditPart sourceEditPart = null;
+
+    public DesignMarqueeDragTracker(EditPart sourceEditPart) {
+
+        this.sourceEditPart = sourceEditPart;
+    }
+
+    private boolean isChildOfEditPart(EditPart parentEditPart, EditPart editPart) {
+        EditPart parent = editPart;
+        while (parent != null) {
+            if (parentEditPart == parent) {
+                return true;
+            }
+            parent = parent.getParent();
+        }
+        return false;
+    }
+
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    @Override
+    protected Collection calculateMarqueeSelectedEditParts() {
+        HashSet<EditPart> selectedEditParts = (HashSet<EditPart>) super.calculateMarqueeSelectedEditParts();
+        ArrayList<EditPart> removeParts = new ArrayList<EditPart>();
+        for (EditPart targetPart : selectedEditParts) {
+            for (EditPart parentPart : selectedEditParts) {
+                if (parentPart == targetPart) {
+                    continue;
+                }
+                if (isChildOfEditPart(parentPart, targetPart) == true) {
+                    removeParts.add(targetPart);
+                    break;
+                }
+            }
+        }
+        selectedEditParts.removeAll(removeParts);
+
+        return selectedEditParts;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    protected void handleFinished() {     
+        @SuppressWarnings("rawtypes")
+        Collection marqueeSelectedEditParts = calculateMarqueeSelectedEditParts();
+        if (0 >= marqueeSelectedEditParts.size()) {
+
+            List<EditPart> selectedEditParts = new ArrayList<EditPart>();
+
+            if (getCurrentViewer().getSelectedEditParts().size() > 0 && getCurrentSelectionMode() > 0) {
+                selectedEditParts.addAll(getCurrentViewer().getSelectedEditParts());
+            }
+            selectedEditParts.add(sourceEditPart);
+
+            ((DesignViewer) getCurrentViewer()).setSelection(new StructuredSelection(selectedEditParts));
+
+        }
+
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignPanningTool.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignPanningTool.java
new file mode 100644 (file)
index 0000000..7d4adf1
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.gef.tools;
+
+import org.eclipse.draw2d.FigureCanvas;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.tools.PanningSelectionTool;
+import org.eclipse.swt.events.KeyEvent;
+
+public class DesignPanningTool extends PanningSelectionTool{
+    private Point viewLocation;
+    
+    @Override
+    protected boolean handleButtonDown(int which) {      
+        if (which == 2 && stateTransition(STATE_INITIAL, PAN) 
+                && getCurrentViewer().getControl() instanceof FigureCanvas
+                && stateTransition(PAN, PAN_IN_PROGRESS)
+                )   {
+            refreshCursor();        
+            viewLocation = ((FigureCanvas) getCurrentViewer().getControl())
+                    .getViewport().getViewLocation();
+            return true;
+        }
+        return super.handleButtonDown(which);
+    }
+    
+    @Override
+    protected boolean handleDrag() {  
+        if (isInState(PAN_IN_PROGRESS)
+                && getCurrentViewer().getControl() instanceof FigureCanvas) {
+            FigureCanvas canvas = (FigureCanvas) getCurrentViewer()
+                    .getControl();
+            canvas.scrollTo(viewLocation.x - getDragMoveDelta().width,
+                    viewLocation.y - getDragMoveDelta().height);
+            return true;
+        } else {
+            return super.handleDrag();
+        }
+    }
+    
+    @Override
+    protected boolean handleKeyDown(KeyEvent e) {
+        return false;
+    }
+    
+    @Override
+    protected boolean handleKeyUp(KeyEvent e) {
+        return false;
+    }
+    
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignRootMarqueeDragTracker.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignRootMarqueeDragTracker.java
new file mode 100644 (file)
index 0000000..7af5e4a
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.tools;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.tools.MarqueeDragTracker;
+import org.tizen.efluibuilder.model.part.ViewPart;
+
+
+public class DesignRootMarqueeDragTracker extends MarqueeDragTracker {
+
+    protected EditPart sourceEditPart = null;
+
+    public DesignRootMarqueeDragTracker(EditPart sourceEditPart) {
+
+        this.sourceEditPart = sourceEditPart;
+    }
+
+    private boolean isChildOfEditPart(EditPart parentEditPart, EditPart editPart) {
+        EditPart parent = editPart;
+        while (parent != null) {
+            if (parentEditPart == parent) {
+                return true;
+            }
+            parent = parent.getParent();
+        }
+        return false;
+    }
+
+    @Override
+    protected Collection<EditPart> calculateMarqueeSelectedEditParts() {
+        @SuppressWarnings("unchecked")
+        HashSet<EditPart> selectedEditParts = (HashSet<EditPart>) super.calculateMarqueeSelectedEditParts();
+        ArrayList<EditPart> removeParts = new ArrayList<EditPart>();
+
+        // remove view part
+        for (EditPart targetPart : selectedEditParts) {
+            if (targetPart.getModel() instanceof ViewPart) {
+                removeParts.add(targetPart);
+            }
+        }
+        selectedEditParts.removeAll(removeParts);
+        removeParts.clear();
+
+        // remove child part
+        for (EditPart targetPart : selectedEditParts) {
+            for (EditPart parentPart : selectedEditParts) {
+                if (parentPart == targetPart) {
+                    continue;
+                }
+                if (isChildOfEditPart(parentPart, targetPart) == true) {
+                    removeParts.add(targetPart);
+                    break;
+                }
+            }
+        }
+        selectedEditParts.removeAll(removeParts);
+
+        return selectedEditParts;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignSelectionTool.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/tools/DesignSelectionTool.java
new file mode 100644 (file)
index 0000000..12c779f
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.tools;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.tools.SelectionTool;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+
+
+public class DesignSelectionTool extends SelectionTool {
+
+    final static private int BORDER_SIZE = 10;
+    final static private String REQ_KEY_CHANGETARGET = "change-target";
+
+    @SuppressWarnings("unchecked")
+    private boolean updateTarget() {
+
+        /*
+         * This logic make a cursor for own parent selection.
+         */
+        boolean changed = false;
+        if (getTargetEditPart() == null)
+            return changed;
+
+        if ((getTargetEditPart().getParent() != null) && (getTargetEditPart().getParent() instanceof DesignEditPart)) {
+            IFigure figure = ((DesignEditPart) getTargetEditPart()).getFigure();
+            Rectangle parentBounds = figure.getParent().getBounds().getCopy();
+
+            Point mousept = getLocation();
+            ((DesignEditPart) getTargetEditPart()).getFigure().translateToRelative(mousept);
+
+            if (parentBounds.contains(mousept)) {
+                parentBounds.shrink(BORDER_SIZE, BORDER_SIZE);
+                if (!parentBounds.contains(mousept)) {
+                    setTargetEditPart(getTargetEditPart().getParent());
+                    changed = true;
+                }
+            }
+            getTargetRequest().getExtendedData().put(REQ_KEY_CHANGETARGET, changed);
+        }
+
+        return changed;
+    }
+
+    protected boolean updateTargetUnderMouse() {
+        boolean changed = super.updateTargetUnderMouse();
+        if (updateTarget() == true) {
+            changed = true;
+        }
+        return changed;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/ConnectionCreateListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/ConnectionCreateListener.java
new file mode 100644 (file)
index 0000000..8791888
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.viewer;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.MenuItem;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+public class ConnectionCreateListener implements SelectionListener {
+
+    DesignViewer viewer = null;
+    Part srcPart = null;
+    Part targetViewPart = null;
+
+    public ConnectionCreateListener(DesignViewer viewer, Part srcPart, Part targetViewPart) {
+        this.viewer = viewer;
+        this.srcPart = srcPart;
+        this.targetViewPart = targetViewPart;
+    }
+
+    protected void createConnection(String text, Part targetViewPart) {
+        this.targetViewPart = targetViewPart;
+    }
+    protected void createConnection(String text) {
+        ConnectionCreater.createConnection(viewer, srcPart, targetViewPart, text);        
+    }
+
+    @Override
+    public void widgetDefaultSelected(SelectionEvent event) {
+         createConnection(((MenuItem) event.getSource()).getText());
+    }
+
+    @Override
+    public void widgetSelected(SelectionEvent event) {
+        createConnection(((MenuItem) event.getSource()).getText());
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/ConnectionCreater.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/ConnectionCreater.java
new file mode 100644 (file)
index 0000000..d3ec8f9
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.viewer;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+public class ConnectionCreater {
+    public static void createConnection(DesignViewer viewer, Part srcPart, Part targetPart, String eventText) {
+        Runnable createConnJob = new Runnable() {
+            @Override
+            public void run() {
+                if (srcPart != null && targetPart != null) {
+                    String eventName = eventText.replace(',', '_');
+                    Command cmd = DesignStoryboardUtil.getCreateConnectionCommand(srcPart, targetPart, eventName, eventText);
+                    viewer.getEditDomain().getCommandStack().execute(cmd);
+                    viewer.getDesignStoryboardUtil().generateConnectionCode(srcPart, eventName);
+                }
+
+            }
+        };
+
+        PlatformUI.getWorkbench().getDisplay().syncExec(createConnJob);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignEventDelegator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignEventDelegator.java
new file mode 100644 (file)
index 0000000..8e4826a
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.viewer;
+
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.MouseMoveListener;
+import org.tizen.efluibuilder.ui.editor.KeyHandler;
+
+
+public class DesignEventDelegator implements MouseMoveListener, MouseListener, KeyListener {
+
+    private KeyHandler keyHandler;
+
+    public DesignEventDelegator(KeyHandler keyHandler) {
+        this.keyHandler = keyHandler;
+    }
+
+    @Override
+    public void mouseMove(MouseEvent e) {
+    }
+
+    @Override
+    public void mouseDown(MouseEvent e) {
+    }
+
+    @Override
+    public void mouseDoubleClick(MouseEvent e) {
+
+    }
+
+    @Override
+    public void mouseUp(MouseEvent e) {
+
+    }
+
+    @Override
+    public void keyReleased(KeyEvent e) {
+        keyHandler.keyReleased(e);
+    }
+
+    @Override
+    public void keyPressed(KeyEvent e) {
+        keyHandler.keyPressed(e);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignStoryboardRouter.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignStoryboardRouter.java
new file mode 100644 (file)
index 0000000..899e506
--- /dev/null
@@ -0,0 +1,424 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.viewer;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.draw2d.AbstractRouter;
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.swt.graphics.Rectangle;
+import org.tizen.efluibuilder.gef.editparts.DesignConnectionEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignStoryboardPolylineConnection;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+
+
+public class DesignStoryboardRouter extends AbstractRouter {
+
+    static int MARGIN = 100;
+    static int SPACE = 80;
+
+    Part docPart = null;
+    MScreenQualifierManager msqm = null;
+    DesignViewer viewer = null;
+    Map<String, ViewConnections> viewConnections = new HashMap<String, ViewConnections>();
+    Map<String, ConnectionModel> connections = new HashMap<String, ConnectionModel>();
+    boolean isViewPositionValidate = false;
+
+    Point pageDelta = new Point(0, 0);
+    List<Part> deltaPages = new ArrayList<Part>();
+
+    public DesignStoryboardRouter(Part docPart, MScreenQualifierManager msqm, DesignViewer viewer) {
+        super();
+        this.docPart = docPart;
+        this.msqm = msqm;
+        this.viewer = viewer;
+        this.refresh();
+    }
+
+    private Part getViewPartByName(String name) {
+        for (ViewConnections vc : viewConnections.values()) {
+            if (vc.viewPart.getPropertyValue(LayoutSchemaConstants.ID).equals(name)) {
+                return vc.viewPart;
+            }
+        }
+        return null;
+    }
+
+    private Rectangle getPageSize(Part viewPart) {
+        Point screenSize = msqm.getScreenSize();
+        org.eclipse.draw2d.geometry.Rectangle bound = DesignEditorUtil.getPageBound(viewPart, screenSize.x, screenSize.y);
+        Rectangle pageBound = new Rectangle(bound.x, bound.y, bound.width, bound.height);
+        if (deltaPages.contains(viewPart)) {
+            pageBound.x += pageDelta.x;
+            pageBound.y += pageDelta.y;
+        }
+        return pageBound;
+    }
+
+    private ConnectionModel createConnectionModel(Part eventPart) {
+        Part srcView = ((ComponentPart) eventPart.getParent()).getOwnerViewPart();
+        Part targetView = getViewPartByName(eventPart.getPropertyValue(LayoutSchemaConstants.EVENT_TARGET));
+        if (srcView != null && targetView != null) {
+            return new ConnectionModel(eventPart, srcView, targetView, getPageSize(srcView), getPageSize(targetView));
+        }
+        return null;
+    }
+
+    private void initData() {
+        List<Part> connectionParts = null;
+        ConnectionModel model = null;
+        Part part = null;
+        connections.clear();
+        for (ViewConnections vc : viewConnections.values()) { // create viewModel
+            part = vc.viewPart;
+            connectionParts = DesignStoryboardUtil.getConnectionPart(part);
+            for (Part connection : connectionParts) { // create connection model
+                model = createConnectionModel(connection);
+                if (model != null) {
+                    connections.put(connection.getUniqueId(), model);
+                }
+            }
+        }
+
+        for (ConnectionModel cd : connections.values()) {
+            if (cd.isBottomSource()) {
+                viewConnections.get(cd.srcViewPart.getUniqueId()).bottomSource.add(cd);
+                viewConnections.get(cd.targetViewPart.getUniqueId()).topTarget.add(cd);
+            } else {
+                viewConnections.get(cd.srcViewPart.getUniqueId()).rightSource.add(cd);
+                viewConnections.get(cd.targetViewPart.getUniqueId()).leftTarget.add(cd);
+            }
+        }
+    }
+
+    public void refresh() {
+        viewConnections = new HashMap<String, ViewConnections>();
+        Part viewsPart = PartUtil.findViewsPart(docPart);
+        if (viewsPart != null) {
+            for (Part part : viewsPart.getChildren()) {
+                viewConnections.put(part.getUniqueId(), new ViewConnections(part));
+            }
+        }
+
+        initData();
+        for (ViewConnections vc : viewConnections.values()) { // create viewModel
+            vc.sort();
+        }
+        for (ViewConnections vc : viewConnections.values()) { // create viewModel
+            vc.setPositions();
+        }
+
+        for (ViewConnections vc : viewConnections.values()) { // create viewModel
+            vc.decoratePolyline();
+        }
+    }
+
+    class ConnectionModel {
+        Part srcPart = null;
+        Part srcViewPart = null;
+        Part targetViewPart = null;
+        Point srcPoint = new Point();
+        Point targetPoint = new Point();
+        PointList points = new PointList();
+        Rectangle srcBound;
+        Rectangle targetBound;
+        boolean isCtxpopupTarget = false;
+
+        public ConnectionModel(Part srcPart, Part srcViewPart, Part targetViewPart, Rectangle srcBound, Rectangle targetBound) {
+            this.srcPart = srcPart;
+            this.srcViewPart = srcViewPart;
+            this.targetViewPart = targetViewPart;
+            this.srcBound = srcBound;
+            this.targetBound = targetBound;
+            isCtxpopupTarget = DesignEditorUtil.isCtxpopupView(targetViewPart);
+        }
+
+        boolean isBottomSource() {
+            if (targetBound.y + targetBound.height < srcBound.y) {
+                return false;
+            } else if ((targetBound.y >= srcBound.y) && (targetBound.x >= srcBound.x + srcBound.width)) {
+                return false;
+            }
+            return true;
+        }
+
+        PointList getConnectionPoints() {
+            double scale = viewer.getZoomScale();
+            PointList pl = new PointList();
+            for (int i = 0; i < points.size(); i++) {
+                pl.addPoint((int) (scale * points.getPoint(i).x), (int) (scale * points.getPoint(i).y));
+
+            }
+            return pl;
+        }
+    }
+
+    private static class xAxisSourceComparator implements Comparator<ConnectionModel> {
+        @Override
+        public int compare(ConnectionModel o1, ConnectionModel o2) {
+            Rectangle p1 = o1.srcBound;
+            Rectangle p2 = o2.srcBound;
+            if (p1.x == p2.x) {
+                return p1.y - p2.y;
+            }
+            return p1.x - p2.x;
+        }
+
+    }
+
+    private static class xAxisTargetComparator implements Comparator<ConnectionModel> {
+        @Override
+        public int compare(ConnectionModel o1, ConnectionModel o2) {
+            Rectangle p1 = o1.targetBound;
+            Rectangle p2 = o2.targetBound;
+            if (p1.x == p2.x) {
+                return p1.y - p2.y;
+            }
+            return p1.x - p2.x;
+        }
+
+    }
+
+    private static class yAxisSourceComparator implements Comparator<ConnectionModel> {
+        @Override
+        public int compare(ConnectionModel o1, ConnectionModel o2) {
+            Rectangle p1 = o1.srcBound;
+            Rectangle p2 = o2.srcBound;
+            if (p1.y == p2.y) {
+                return p1.x - p2.x;
+            }
+            return p1.y - p2.y;
+        }
+
+    }
+
+    private static class yAxisTargetComparator implements Comparator<ConnectionModel> {
+        @Override
+        public int compare(ConnectionModel o1, ConnectionModel o2) {
+            Rectangle p1 = o1.targetBound;
+            Rectangle p2 = o2.targetBound;
+            if (p1.y == p2.y) {
+                return p1.x - p2.x;
+            }
+            return p1.y - p2.y;
+        }
+
+    }
+
+    class ViewConnections {
+        List<Part> connectionParts = null;
+        List<ConnectionModel> connectionModels = null;
+        Part viewPart = null;
+
+        List<ConnectionModel> rightSource = new ArrayList<ConnectionModel>();
+        List<ConnectionModel> bottomSource = new ArrayList<ConnectionModel>();
+        List<ConnectionModel> leftTarget = new ArrayList<ConnectionModel>();
+        List<ConnectionModel> topTarget = new ArrayList<ConnectionModel>();
+
+        ViewConnections(Part viewPart) {
+            this.viewPart = viewPart;
+        }
+
+        public List<ConnectionModel> getRightSource() {
+            return rightSource;
+        }
+
+        public List<ConnectionModel> getBottomSource() {
+            return bottomSource;
+        }
+
+        public List<ConnectionModel> getLeftTarget() {
+            return leftTarget;
+        }
+
+        public List<ConnectionModel> getTopTarget() {
+            return topTarget;
+        }
+
+        public void sort() {
+            rightSource.sort(new yAxisTargetComparator());
+            leftTarget.sort(new yAxisSourceComparator());
+            bottomSource.sort(new xAxisTargetComparator());
+            topTarget.sort(new xAxisSourceComparator());
+        }
+
+        public void setPositions() {
+            int startPos;
+            ConnectionModel connectionModel;
+            // right source
+            Rectangle pageBound = getPageSize(viewPart);
+            startPos = ((pageBound.y + (pageBound.height - (SPACE * rightSource.size() - 1)) / 2));
+            for (int i = 0; i < rightSource.size(); i++) {
+                connectionModel = rightSource.get(i);
+                connectionModel.srcPoint.x = pageBound.x + pageBound.width;
+                connectionModel.srcPoint.y = startPos + SPACE * i;
+            }
+
+            // bottom source
+            startPos = ((pageBound.x + (pageBound.width - (SPACE * bottomSource.size() - 1)) / 2));
+            for (int i = 0; i < bottomSource.size(); i++) {
+                connectionModel = bottomSource.get(i);
+                connectionModel.srcPoint.x = startPos + SPACE * i;
+                connectionModel.srcPoint.y = pageBound.y + pageBound.height;
+            }
+
+            // left target
+            startPos = ((pageBound.y + (pageBound.height - (SPACE * leftTarget.size() - 1)) / 2));
+            for (int i = 0; i < leftTarget.size(); i++) {
+                connectionModel = leftTarget.get(i);
+                connectionModel.targetPoint.x = pageBound.x;
+                connectionModel.targetPoint.y = startPos + SPACE * i;
+            }
+
+            // top target
+            startPos = ((pageBound.x + (pageBound.width - (SPACE * topTarget.size() - 1)) / 2));
+            for (int i = 0; i < topTarget.size(); i++) {
+                connectionModel = topTarget.get(i);
+                connectionModel.targetPoint.x = startPos + SPACE * i;
+                connectionModel.targetPoint.y = pageBound.y;
+            }
+
+        }
+
+        public void decoratePolyline() {
+            ConnectionModel connectionModel;
+            // right source
+            for (int i = 0; i < rightSource.size(); i++) {
+                connectionModel = rightSource.get(i);
+                connectionModel.points = new PointList();
+                connectionModel.points.addPoint(connectionModel.srcPoint);
+                connectionModel.points.addPoint(new Point(connectionModel.srcPoint.x + MARGIN, connectionModel.srcPoint.y));
+                connectionModel.points.addPoint(new Point(connectionModel.targetPoint.x - MARGIN, connectionModel.targetPoint.y));
+                connectionModel.points.addPoint(connectionModel.targetPoint);
+            }
+
+            // bottom source
+            for (int i = 0; i < bottomSource.size(); i++) {
+                connectionModel = bottomSource.get(i);
+                connectionModel.points.addPoint(connectionModel.srcPoint);
+                connectionModel.points.addPoint(new Point(connectionModel.srcPoint.x, connectionModel.srcPoint.y + MARGIN));
+                connectionModel.points.addPoint(new Point(connectionModel.targetPoint.x, connectionModel.targetPoint.y - MARGIN));
+                connectionModel.points.addPoint(connectionModel.targetPoint);
+            }
+        }
+
+        public List<Part> getTargetParts() {
+            List<Part> targets = new ArrayList<Part>();
+            for (ConnectionModel cm : leftTarget) {
+                targets.add(cm.srcPart);
+            }
+
+            for (ConnectionModel cm : topTarget) {
+                targets.add(cm.srcPart);
+            }
+            return targets;
+        }
+
+    }
+
+    public ConnectionModel getConnectionModel(Part part) {
+        return connections.get(part.getUniqueId());
+    }
+
+    private void printConnection(Connection conn) {
+        if (conn.getPoints().size() > 0) {
+            System.out.printf("%s : ", ((DesignStoryboardPolylineConnection) conn).getOwnerPart().getPropertyValue(LayoutSchemaConstants.ID));
+            for (int i = 0; i < conn.getPoints().size(); i++) {
+                Point pt = conn.getPoints().getPoint(i);
+                System.out.printf("%d %d, ", pt.x, pt.y);
+            }
+            System.out.println("");
+        }
+    }
+
+    @Override
+    public void route(Connection connection) {
+        Part part = null;
+        part = ((DesignStoryboardPolylineConnection) connection).getOwnerPart();
+        ConnectionModel model = getConnectionModel(part);
+        if (model == null) {
+            return;
+        }
+        connection.getPoints().removeAllPoints();
+        connection.setPoints(model.getConnectionPoints());        
+        ((DesignStoryboardPolylineConnection) connection).decorate(model.isBottomSource(), model.isCtxpopupTarget, viewer.getZoomScale());
+
+        if (isViewPositionValidate == true) {
+            connection.setVisible(true);
+        } else {
+            connection.setVisible(false);
+        }
+    }
+
+    public void setPagesDelta(Point pageDelta, List<Part> viewParts) {
+        this.pageDelta = pageDelta;
+        this.deltaPages = viewParts;
+    }
+
+    public void clearPagesDelta() {
+        if (deltaPages.isEmpty() == false) {
+            this.deltaPages.clear();
+            refreshAllConnections();
+        }
+    }
+
+    public void refreshAllConnections() {
+        this.refresh();
+        DesignConnectionEditPart editpart;
+        for (ConnectionModel cm : this.connections.values()) {
+            editpart = (DesignConnectionEditPart) viewer.getEditPartRegistry().get(cm.srcPart.getUniqueId());
+            if (editpart != null) {
+                editpart.refreshFigure();
+            }
+        }
+
+    }
+
+    public List<Part> getTargetConnectionPartFromView(Part viewPart) {
+        ViewConnections vc = this.viewConnections.get(viewPart.getUniqueId());
+        if (vc != null) {
+            return vc.getTargetParts();
+        }
+        return new ArrayList<Part>();
+    }
+
+    public void setViewPositionValidate(boolean validate) {
+        if (isViewPositionValidate != validate) {
+            isViewPositionValidate = validate;
+            this.refreshAllConnections();
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignStoryboardUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignStoryboardUtil.java
new file mode 100644 (file)
index 0000000..bf8c018
--- /dev/null
@@ -0,0 +1,357 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.viewer;
+
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Queue;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.storyboard.codegenerator.CodeGenerator;
+import org.tizen.efluibuilder.storyboard.codegenerator.CodeGeneratorConstants;
+import org.w3c.dom.Element;
+
+
+public class DesignStoryboardUtil {
+
+    SBMetaData sbMetaData = null;
+    static int MARGIN = 400;
+    CodeGenerator codeGenerator = null;
+
+    public DesignStoryboardUtil(IProject project) {
+        codeGenerator = new CodeGenerator(project);
+        sbMetaData = new SBMetaData(project);
+    }
+
+    static class Node {
+        int id = 0;
+        int col = 0;
+        int row = 0;
+        Part part = null;
+        List<Node> children = new ArrayList<Node>();
+
+        public Node(Part part, int id) {
+            this.part = part;
+            this.id = id;
+        }
+
+        public void setChildren(List<Node> children) {
+            this.children = children;
+        }
+
+    }
+
+    private static Point dfs(Node node, Node parent, int row, int col, boolean[] visited) {
+        visited[node.id] = true;
+        node.col = col;
+        if (parent != null) {
+            node.row = row;
+        } else {
+            node.row = 0;
+        }
+
+        int lastCol = node.col;
+        int lastRow = row;
+        Point lastChildPos;
+        for (Node child : node.children) {
+            if (visited[child.id] == false) {
+                lastChildPos = dfs(child, node, lastRow++, col + 1, visited);
+                lastCol = Math.max(lastCol, lastChildPos.x);
+                lastRow = Math.max(lastRow, lastChildPos.y);
+            }
+        }
+
+        return new Point(lastCol, lastRow);
+    }
+
+    public static boolean setStoryboardReconstructProperties(Part documentPart, Point screenSize) {
+        List<Part> views = PartUtil.findViewsPart(documentPart).getChildren();
+        int size = views.size();
+        Part view = null;
+        Node entryNode = null;
+        Node newNode = null;
+        Point lastPosition;
+        boolean bPropertyChanged = false;
+
+        boolean[] visited = new boolean[size + 1];
+        List<Node> nodeList = new ArrayList<Node>();
+
+        String entryViewStr = PartUtil.findViewsPart(documentPart).getPropertyValue(LayoutSchemaConstants.STARTUP);
+        for (int i = 0; i < size; i++) {
+            view = views.get(i);
+            newNode = new Node(view, i + 1);
+            nodeList.add(newNode);
+            if (entryViewStr.equals(view.getPropertyValue(LayoutSchemaConstants.ID))) {
+                entryNode = newNode;
+            }
+        }
+
+        if (entryNode == null) {
+            return false;   // Error case
+        }
+
+        for (Node node : nodeList) {
+            List<Part> connections = getConnectionPart(node.part);
+            Node childNode = null;
+            for (Part part : connections) {
+                childNode = getNodeByViewName(nodeList, part.getPropertyValue(LayoutSchemaConstants.EVENT_TARGET));
+                if (childNode != null) {
+                    node.children.add(childNode);
+                }
+            }
+        }
+
+        lastPosition = DesignStoryboardUtil.dfs(entryNode, null, 0, 0, visited);
+        for (Node node : nodeList) {
+            if (visited[node.id] == false) {
+                lastPosition = DesignStoryboardUtil.dfs(node, null, 0, lastPosition.x + 1, visited);
+            }
+        }
+
+        for (int i = 0; i < nodeList.size(); i++) {
+            Node node = nodeList.get(i);
+
+            String x = Integer.toString(node.col * (screenSize.x + MARGIN));
+            String y = Integer.toString(node.row * (screenSize.y + MARGIN));
+            Element element = node.part.getElement();
+            element.setAttribute(LayoutSchemaConstants.PAGE_LOCATION_X, x);
+            element.setAttribute(LayoutSchemaConstants.PAGE_LOCATION_Y, y);
+            node.part.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_X, x);
+            node.part.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_Y, y);
+            bPropertyChanged = true;
+        }
+
+        return bPropertyChanged;
+
+    }
+
+    public static Command getStoryboardReconstructCommand(Part documentPart, Point screenSize) {
+        List<Part> views = PartUtil.findViewsPart(documentPart).getChildren();
+        int size = views.size();
+        Part view = null;
+        Node entryNode = null;
+        Node newNode = null;
+        Point lastPosition;
+        CompoundCommand cmd = new CompoundCommand();
+
+        boolean[] visited = new boolean[size + 1];
+        List<Node> nodeList = new ArrayList<Node>();
+
+        String entryViewStr = PartUtil.findViewsPart(documentPart).getPropertyValue(LayoutSchemaConstants.STARTUP);
+        for (int i = 0; i < size; i++) {
+            view = views.get(i);
+            newNode = new Node(view, i + 1);
+            nodeList.add(newNode);
+            if (entryViewStr.equals(view.getPropertyValue(LayoutSchemaConstants.ID))) {
+                entryNode = newNode;
+            }
+        }
+
+        if (entryNode == null) {
+            return null;   // Error case
+        }
+
+        for (Node node : nodeList) {
+            List<Part> connections = getConnectionPart(node.part);
+            Node childNode = null;
+            for (Part part : connections) {
+                childNode = getNodeByViewName(nodeList, part.getPropertyValue(LayoutSchemaConstants.EVENT_TARGET));
+                if (childNode != null) {
+                    node.children.add(childNode);
+                }
+            }
+        }
+
+        lastPosition = DesignStoryboardUtil.dfs(entryNode, null, 0, 0, visited);
+        for (Node node : nodeList) {
+            if (visited[node.id] == false) {
+                lastPosition = DesignStoryboardUtil.dfs(node, null, 0, lastPosition.x + 1, visited);
+            }
+        }
+
+        for (int i = 0; i < nodeList.size(); i++) {
+            Node node = nodeList.get(i);
+            cmd.add(PartUtil.createSetPropertyCommand(node.part, LayoutSchemaConstants.PAGE_LOCATION_X,
+                                                      Integer.toString(node.col * (screenSize.x + MARGIN))));
+            cmd.add(PartUtil.createSetPropertyCommand(node.part, LayoutSchemaConstants.PAGE_LOCATION_Y,
+                                                      Integer.toString(node.row * (screenSize.y + MARGIN))));
+        }
+
+        if (cmd.size() > 0) {
+            return cmd;
+        } else {
+            return null;
+        }
+
+    }
+
+    private static Node getNodeByViewName(List<Node> nodeList, String name) {
+        for (Node node : nodeList) {
+            if (node.part.getPropertyValue(LayoutSchemaConstants.ID).equals(name)) {
+                return node;
+            }
+        }
+        return null;
+    }
+
+    public static List<Part> getConnectionPart(Part viewPart) {
+        Queue<Part> queue = new ArrayDeque<Part>();
+        List<Part> connections = new ArrayList<Part>();
+
+        queue.add(viewPart);
+        List<Part> views = viewPart.getParent().getChildren();
+        HashSet<String> viewIdSet = new HashSet<String>();
+
+        for (Part view : views) {
+            viewIdSet.add(view.getPropertyValue(LayoutSchemaConstants.ID));
+        }
+
+        while (!queue.isEmpty()) {
+            Part part = queue.poll();
+            if (part.getType() == PartType.EVENT && part.hasProperty(LayoutSchemaConstants.EVENT_CONNECTION) &&
+                    viewIdSet.contains(part.getPropertyValue(LayoutSchemaConstants.EVENT_TARGET))) {
+                connections.add(part);
+            }
+            queue.addAll(part.getChildren());
+        }
+
+        return connections;
+    }
+
+    public boolean isOldVersionStoryboard(Part viewsPart) {
+        if (viewsPart.getChildren().size() == 0) {
+            return false;
+        }
+        for (Part part : viewsPart.getChildren()) {
+            if (part.hasProperty(LayoutSchemaConstants.PAGE_LOCATION_X) == true
+                    || part.hasProperty(LayoutSchemaConstants.PAGE_LOCATION_Y) == true) {
+                return false;
+            }
+        }
+
+        if (sbMetaData.getViewLocationMap().keySet().size() > 0) {
+            return true;
+        }
+
+        return false;
+    }
+
+    public Command getCommandForSetOldPositions(Part viewsPart) {
+        for (Part part : viewsPart.getChildren()) {
+            if (sbMetaData.getPageLocation(part.getPropertyValue(LayoutSchemaConstants.ID)) == null) {
+                return null;
+            }
+        }
+
+        CompoundCommand cmd = new CompoundCommand();
+        Point pos;
+
+        for (Part part : viewsPart.getChildren()) {
+            pos = sbMetaData.getPageLocation(part.getPropertyValue(LayoutSchemaConstants.ID));
+            cmd.add(PartUtil.createSetPropertyCommand(part, LayoutSchemaConstants.PAGE_LOCATION_X, Integer.toString(pos.x)));
+            cmd.add(PartUtil.createSetPropertyCommand(part, LayoutSchemaConstants.PAGE_LOCATION_Y, Integer.toString(pos.y)));
+        }
+
+        if (cmd.size() > 0) {
+            return cmd;
+        }
+
+        return null;
+    }
+
+    public boolean setSetOldPositionsProperties(Part viewsPart) {
+        for (Part part : viewsPart.getChildren()) {
+            if (sbMetaData.getPageLocation(part.getPropertyValue(LayoutSchemaConstants.ID)) == null) {
+                return false;
+            }
+        }
+
+        boolean bPropertyChanged = false;
+
+        Point pos;
+
+        for (Part part : viewsPart.getChildren()) {
+            pos = sbMetaData.getPageLocation(part.getPropertyValue(LayoutSchemaConstants.ID));
+
+            String x = Integer.toString(pos.x);
+            String y = Integer.toString(pos.y);
+            Element element = part.getElement();
+            element.setAttribute(LayoutSchemaConstants.PAGE_LOCATION_X, x);
+            element.setAttribute(LayoutSchemaConstants.PAGE_LOCATION_Y, y);
+            part.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_X, x);
+            part.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_Y, y);
+
+            bPropertyChanged = true;
+        }
+
+        return bPropertyChanged;
+    }
+
+    public static boolean hasInvalidStoryboardPosition(Part viewsPart) {
+        for (Part part : viewsPart.getChildren()) {
+            if (part.hasProperty(LayoutSchemaConstants.PAGE_LOCATION_X) == false
+                    || part.hasProperty(LayoutSchemaConstants.PAGE_LOCATION_Y) == false) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static String getFunctionNameFromEventName(Part srcPart, String eventName) {
+        String functionName = ((ComponentPart) srcPart).getOwnerViewPart().getPropertyValue(LayoutSchemaConstants.ID)
+                + CodeGeneratorConstants.EVENT_UNDERSCORE + srcPart.getPropertyValue(LayoutSchemaConstants.ID)
+                + CodeGeneratorConstants.EVENT_UNDERSCORE + CodeGeneratorConstants.EVENT_PREFIX + eventName;
+        return functionName;
+    }
+
+    public static Command getCreateConnectionCommand(Part srcPart, Part targetViewPart, String eventName, String signalName) {
+        String functionName = getFunctionNameFromEventName(srcPart, eventName);
+        EventPart eventPart =
+                (EventPart) PartUtil.createPartWithInitValue(srcPart.getOwnerDocumentPart(), PartType.EVENT, srcPart, LayoutSchemaConstants.EVENT);
+        if (eventPart != null) {
+            eventPart.setPropertyValue(LayoutSchemaConstants.EVENT_TARGET, targetViewPart.getPropertyValue(LayoutSchemaConstants.ID));
+            eventPart.setPropertyValue(LayoutSchemaConstants.EVENT_CONNECTION, CodeGeneratorConstants.CONNECTION_WRAPPER + functionName);
+            eventPart.setPropertyValue(LayoutSchemaConstants.EVENT_FUNCTION_NAME, functionName);
+            eventPart.setPropertyValue(LayoutSchemaConstants.EVENT_SIGNAL, signalName);
+            Command cmd = PartUtil.createAddPartCommand(srcPart, eventPart, null);
+            return cmd;
+        }
+        return null;
+    }
+
+    public void generateConnectionCode(Part srcPart, String eventName) {
+        codeGenerator.addConnectionAction(srcPart, eventName, getFunctionNameFromEventName(srcPart, eventName));
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignViewer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignViewer.java
new file mode 100644 (file)
index 0000000..14ebe39
--- /dev/null
@@ -0,0 +1,1163 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.viewer;
+
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.draw2d.FigureCanvas;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.dnd.TemplateTransfer;
+import org.eclipse.gef.editparts.ZoomListener;
+import org.eclipse.gef.editparts.ZoomManager;
+import org.eclipse.gef.ui.parts.ScrollingGraphicalViewer;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTarget;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.ui.IEditorInput;
+import org.tizen.efluibuilder.core.configurator.ConfiguratorConstants;
+import org.tizen.efluibuilder.gef.editparts.ContainerEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPartFactory;
+import org.tizen.efluibuilder.gef.editparts.DesignRootEditPart;
+import org.tizen.efluibuilder.gef.editparts.ViewEditPart;
+import org.tizen.efluibuilder.gef.editparts.utility.CellManager;
+import org.tizen.efluibuilder.gef.figure.ComponentFigure;
+import org.tizen.efluibuilder.gef.figure.ViewFigure;
+import org.tizen.efluibuilder.gef.layers.CustomLayerConstants;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.gef.viewer.DesignStoryboardRouter.ConnectionModel;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.IPartChangedListener;
+import org.tizen.efluibuilder.model.part.MScreenPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartMutation;
+import org.tizen.efluibuilder.model.part.PartObserver;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.mscreen.configurator.IScreenConfigurationSelectionChangedListener;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+import org.tizen.efluibuilder.renderer.PlaceholderPosition;
+import org.tizen.efluibuilder.renderer.Position;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.editor.KeyHandler;
+import org.tizen.efluibuilder.ui.editor.dnd.listener.DesignEditorDropTargetListener;
+import org.tizen.efluibuilder.ui.editor.dnd.listener.TemplateTransferDropTargetListener2;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.TizenEditDomain;
+import org.tizen.efluibuilder.ui.editor.palette.DesignEditorPaletteViewer;
+import org.tizen.efluibuilder.ui.editor.toolbar.ScreenDesignToolbar;
+import org.tizen.efluibuilder.ui.editor.toolbar.ViewNavigationToolbar;
+import org.tizen.efluibuilder.ui.editor.toolbar.ZoomControlToolbar;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+import edjResourceSyncManager.EdjResourceChangedEvent;
+import edjResourceSyncManager.EdjResourceSyncManager;
+import edjResourceSyncManager.IEdjResourceChangeListener;
+import graphicalDataManager.ComponentGraphicalData;
+import graphicalDataManager.GraphicalDataChangedEvent;
+import graphicalDataManager.GraphicalDataInitializeFailedException;
+import graphicalDataManager.GraphicalDataManager;
+import graphicalDataManager.IGraphicalDataChangedListener;
+
+
+public final class DesignViewer extends ScrollingGraphicalViewer
+        implements IGraphicalDataChangedListener, IPartChangedListener, IScreenConfigurationSelectionChangedListener, IScalableViewer,
+        IEdjResourceChangeListener {
+    
+    private static final int CONTENTS_PADDING = 20;
+    private static long firstInitializedTimeStamp = 0;
+    private static long initializeWaitTime = 2000; // 2S
+    private Listener resizeListener = null;
+
+    private DropTarget dropTarget = null;
+    private DesignEditorDropTargetListener dropTargetListener = null;
+    private KeyHandler designerKeyHandler = null;
+
+    private GraphicalDataManager graphicalDataManager = null;
+    private MScreenQualifierManager screenQualifierMgr = null;
+    private EditPart currentActivatedViewEditPart = null;
+    private boolean initRootEditPart = false;
+    private PartObserver observer = null;
+
+    private List<ScreenDesignToolbar> mscreenToolbarList = new ArrayList<ScreenDesignToolbar>();
+    private ZoomControlToolbar zoomToolBar = null;
+    private boolean isAutofitEnabled = false;
+    private boolean isInitialized = false;
+
+    private CombineEditorPart editor = null;
+    private EdjResourceSyncManager edjResourceManager = null;
+
+    private boolean enabled = true;
+
+    private HashMap<String, ImageDescriptor> imgDescriptorMap = new HashMap<String, ImageDescriptor>();
+    private HashMap<String, EditPart> revealMap = new HashMap<String, EditPart>();
+    DesignStoryboardRouter router = null;
+
+    DesignStoryboardUtil storyboardUtil = null;
+
+    FitSingleViewState fitSingleViewState = new FitSingleViewState();
+
+    private static class FitSingleViewState {
+        public double zoom;
+        public Point location;
+        public Rectangle storyboardBound = null;
+        public Part targetPart = null;
+
+        public void saveState(double zoom, Point location, Rectangle storyboardBound, Part targetPart) {
+            this.zoom = zoom;
+            this.location = location;
+            this.storyboardBound = storyboardBound;
+            this.targetPart = targetPart;
+        }
+    }
+
+    public DesignViewer() {
+        setEditPartFactory(new DesignEditPartFactory());
+    }
+
+    @Override
+    protected void createDefaultRoot() {
+        setRootEditPart(new DesignRootEditPart());
+    }
+
+    @Override
+    public void setControl(Control control) {
+        super.setControl(control);
+
+        if (control != null) {
+            getFigureCanvas().setHorizontalScrollBarVisibility(FigureCanvas.ALWAYS);
+            getFigureCanvas().setVerticalScrollBarVisibility(FigureCanvas.ALWAYS);
+            addEventListener();
+            addDropTargetListener();
+        }
+    }
+
+    @Override
+    protected void handleDispose(DisposeEvent e) {
+        this.unbindFromGraphicalDataManager();
+        super.handleDispose(e);
+    }
+
+    @Override
+    public void reveal(EditPart part) {
+        // advux: for NPE
+        // https://bugs.eclipse.org/bugs/show_bug.cgi?id=317537
+        if (super.getFigureCanvas() == null) {
+            return;
+        }
+        if (part instanceof DesignEditPart) {
+            if (((DesignEditPart) part).getPosition().width > 0 && ((DesignEditPart) part).getPosition().height > 0) {
+                super.reveal(part);
+            } else {
+                ((DesignEditPart) part).setFlagReveal(true);
+            }
+        }
+
+    }
+
+    public void initContents(Part documentPart, IEditorInput editorInput, GraphicalDataManager graphicalDataManager, EdjResourceSyncManager edjResSyncMgr,
+                             CombineEditorPart editor) {
+        this.observer = new PartObserver(this);
+        this.editor = editor;
+
+        observer.observe(documentPart);
+        createMScreenQualifierManager(editorInput, documentPart);
+        setGraphicalDataManager(graphicalDataManager);
+        router = new DesignStoryboardRouter(documentPart, screenQualifierMgr, this);
+        storyboardUtil = new DesignStoryboardUtil(getProject());
+        setContents(documentPart);
+
+        reqNewPageGraphicData();
+        // updateViewLocation();
+        // setPositionToCenter();
+        // updateAutoZoom();
+        bindResizeListener();
+
+        for (ScreenDesignToolbar mscreenToolbar : this.mscreenToolbarList) {
+            mscreenToolbar.setMscreenManager(this.getMScreenQualifierManager());
+            mscreenToolbar.refreshContents(this.getMScreenQualifierManager().getCommonConfigurationPart());
+        }
+
+        this.edjResourceManager = edjResSyncMgr;
+        edjResSyncMgr.addListener(this);
+
+        if (((DocumentPart) documentPart).isValidDocument() == false) {
+            setEnabled(false);
+        }
+        getControl().addMouseListener(new DesignViewerMouseListener(this));
+        if (checkStoryboardPosition() == true) {
+            router.refresh();
+            router.refreshAllConnections();
+        }
+        setFitMode(true);
+        
+        getControl().setBackground(ColorResources.DESIGN_EDITOR_BACKGROUND);
+
+    }
+
+    private void createMScreenQualifierManager(IEditorInput editorInput, Part documentPart) {
+        Part doc = documentPart;
+        for (Part part : doc.getChildren()) {
+            if (part instanceof MScreenPart) {
+                screenQualifierMgr = new MScreenQualifierManager((MScreenPart) part, editorInput);
+                screenQualifierMgr.addConfigureSelectionChangedListener(this);
+            }
+        }
+    }
+
+    private void updateViewLocation() {
+        updateViewLocation(this.getZoomScale());
+    }
+
+    private void updateViewLocation(double scale) {
+        DesignRootEditPart rootEditPart = (DesignRootEditPart) getRootEditPart();
+        if (rootEditPart == null) {
+            return;
+        }
+        Rectangle storyboardBound = getStoryboardBound();
+
+        Point screenSize = getMScreenQualifierManager().getScreenSize();
+        storyboardBound.expand(screenSize.x * 2, screenSize.y * 2);
+        rootEditPart.setVirtualLayerSize(storyboardBound, (float) scale);
+    }
+
+    @Override
+    public void setContents(Object contents) {
+        Part viewsPart = PartUtil.findViewsPart((Part) contents);
+        if (viewsPart == null) {
+            return;
+        }
+        super.setContents(viewsPart);
+
+        // FIXME
+        if (getRootEditPart().getContents().getChildren().isEmpty() == false) {
+            setActiveViewEditPart((EditPart) getRootEditPart().getContents().getChildren().get(0));
+        }
+    }
+
+    public String getProfile() {
+        String currentDeviceName = screenQualifierMgr.getCurrentDevice().getName().toLowerCase();
+        if (currentDeviceName.contains(ModelConstants.SHAPE_CIRCLE)) {
+            return ConfiguratorConstants.PROFILE_WEARABLE_CIRCLE;
+        }
+
+        return ConfiguratorConstants.PROFILE_MOBILE;
+    }
+
+    private Rectangle getEditorBound() {
+        return new Rectangle(getControl().getParent().getBounds().x,
+                             getControl().getParent().getBounds().y,
+                             getControl().getParent().getBounds().width,
+                             getControl().getParent().getBounds().height);
+    }
+
+    private Rectangle getEditorContentBound() {
+        Rectangle contentBound = new Rectangle(getControl().getParent().getBounds().x,
+                                               getControl().getParent().getBounds().y,
+                                               getControl().getParent().getBounds().width,
+                                               getControl().getParent().getBounds().height);
+        contentBound.width -= (CONTENTS_PADDING * 2);
+        contentBound.height -= (CONTENTS_PADDING * 2);
+        return contentBound;
+    }
+
+    public void setPositionToCenter() {
+        Rectangle editorBound = getEditorBound();
+        Rectangle storyboardBound = getScaledStoryboardBound();
+        int x = 0, y = 0;
+        x = ((storyboardBound.x - ((editorBound.width - storyboardBound.width) / 2)));
+        y = ((storyboardBound.y - ((editorBound.height - storyboardBound.height) / 2)));
+
+        ZoomManager zoomManager = getZoomManager();
+        if (zoomManager != null) {
+            zoomManager.setViewLocation(new org.eclipse.draw2d.geometry.Point(x, y));
+        }
+    }
+
+    private Rectangle getScaledStoryboardBound() {
+        Rectangle rect = getStoryboardBound();
+        rect.scale(getZoomScale());
+        return rect;
+    }
+
+    private Rectangle getStoryboardBound() {
+        Point viewSize = screenQualifierMgr.getScreenSize();
+        return DesignEditorUtil.getPagesOuterBound((Part) getRootEditPart().getContents().getModel(), viewSize.x, viewSize.y);
+    }
+
+    private double updateAutoZoom() {
+        double scale = getFitZoomScale(getStoryboardBound());
+        setZoomScale(scale);
+        return scale;
+    }
+
+    public void addTemplateTransferDropTargetListener2(TemplateTransferDropTargetListener2 listener) {
+        dropTargetListener.addTemplateTransferDropTargetListener2(listener);
+    }
+
+    public void removeTemplateTransferDropTargetListener2(TemplateTransferDropTargetListener2 listener) {
+        dropTargetListener.removeTemplateTransferDropTargetListener2(listener);
+    }
+
+    protected void addDropTargetListener() {
+        dropTarget = new DropTarget(this.getControl(), DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK | DND.DROP_DEFAULT);
+        Transfer[] types = { TemplateTransfer.getInstance(), FileTransfer.getInstance() };
+        dropTarget.setTransfer(types);
+        dropTargetListener = new DesignEditorDropTargetListener(this);
+        dropTarget.addDropListener(dropTargetListener);
+    }
+
+    private void addEventListener() {
+        getControl().addKeyListener(new KeyAdapter() {
+            @Override
+            public void keyPressed(KeyEvent e) {
+                if (e.keyCode == SWT.ESC) {
+                    @SuppressWarnings("unchecked")
+                    List<EditPart> eps = getSelectedEditParts();
+                    for (EditPart ep : eps) {
+                        if (ep instanceof DesignEditPart) {
+                            EditPart parent = ep.getParent();
+                            if (parent != null && parent.getModel() != null) {
+                                DesignViewer.this.select(parent);
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+        });
+
+        DesignEventDelegator delegator = new DesignEventDelegator(designerKeyHandler);
+        getControl().addMouseMoveListener(delegator);
+        getControl().addMouseListener(delegator);
+        getControl().addKeyListener(delegator);
+
+    }
+
+    public KeyHandler getDesignerKeyHandler() {
+        return designerKeyHandler;
+    }
+
+    public void setDesignerKeyHandler(KeyHandler designerKeyHandler) {
+        this.designerKeyHandler = designerKeyHandler;
+    }
+
+    private void bindToGraphicalDataManager() {
+        if (this.graphicalDataManager != null) {
+            this.graphicalDataManager.addEventListener(this);
+        }
+    }
+
+    private void unbindFromGraphicalDataManager() {
+        if (this.graphicalDataManager != null) {
+            this.graphicalDataManager.removeEventListener(this);
+            this.graphicalDataManager = null;
+        }
+    }
+
+    public void setGraphicalDataManager(GraphicalDataManager graphicalDataManager) {
+        if (this.graphicalDataManager != null) {
+            this.unbindFromGraphicalDataManager();
+        }
+        this.graphicalDataManager = graphicalDataManager;
+        this.bindToGraphicalDataManager();
+    }
+
+    private void refreshRecursive(EditPart editpart) {
+        editpart.refresh();
+        List<EditPart> children = editpart.getChildren();
+        for (EditPart child : children) {
+            refreshRecursive(child);
+        }
+    }
+
+    private boolean setActiveViewEditPart(EditPart editpart) {
+        EditPart previousActivatedViewEditPart = currentActivatedViewEditPart;
+        if (currentActivatedViewEditPart != editpart) {
+            if (currentActivatedViewEditPart != null) {
+                // IFigure previousFigure = ((DesignEditPart)
+                // currentActivatedViewEditPart).getFigure();
+                // previousFigure.setVisible(false);
+            }
+            currentActivatedViewEditPart = editpart;
+            if (previousActivatedViewEditPart != null) {
+                refreshRecursive(previousActivatedViewEditPart);
+            }
+
+            if (currentActivatedViewEditPart != null) {
+                ((DesignEditPart) currentActivatedViewEditPart).getFigure().setVisible(true);
+            }
+
+            updatePaletteViewer();
+            return true;
+        }
+        return false;
+    }
+
+    public DesignEditPart getCurrentViewEditPart() {
+        EditPart viewsEditPart = getRootEditPart().getContents();
+        if (viewsEditPart.getChildren().size() > 0) {
+            return (DesignEditPart) viewsEditPart.getChildren().get(0);
+        }
+        return null;
+    }
+
+    public Part getCurrentViewPart() {
+        DesignEditPart viewEditPart = this.getCurrentViewEditPart();
+        if (viewEditPart != null) {
+            return (Part) viewEditPart.getModel();
+        }
+        return null;
+    }
+
+    private boolean isMyGraphicalData(GraphicalDataChangedEvent event) {
+        EditPart viewsEditPart = getRootEditPart().getContents();
+        Part viewPart;
+        if (event.deviceName.equals(screenQualifierMgr.getCurrentDevice().getName())
+                && event.orientation.equals(screenQualifierMgr.getCurrentOrientation()) &&
+                event.locale.equals(screenQualifierMgr.getCurrentLocale())) {
+            for (Object obj : viewsEditPart.getChildren()) {
+                viewPart = (Part) (((EditPart) obj).getModel());
+                if (event.viewId.equals(viewPart.getUniqueId())) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    private void handleComponentImageDataChanged(GraphicalDataChangedEvent event) {
+        if (this.isMyGraphicalData(event) == true) {
+            imgDescriptorMap.put(event.viewId, event.graphicData.imageDescriptor);
+            // this.updatePageImageData(event.graphicData.imageDescriptor);
+        }
+    }
+
+    private void handleComponentPositionChanged(GraphicalDataChangedEvent event) {
+        DesignEditPart viewPart = getViewPartById(event.viewId);
+        if (this.isMyGraphicalData(event) == true) {
+            this.updataPageComponentPositions(viewPart, event.graphicData.componentPositionMap);
+        }
+    }
+
+    private void handlePlaceholderPositionChanged(GraphicalDataChangedEvent event) {
+        DesignEditPart viewPart = getViewPartById(event.viewId);
+        if (this.isMyGraphicalData(event) == true) {
+            this.updataPagePlaceholderPositions(viewPart, event.graphicData.placeholderPositionMap);
+        }
+    }
+
+    private void reqNewPageGraphicData() {
+        reqNewPageGraphicData(false);
+    }
+
+    private void reqNewPageGraphicData(boolean bForce) {
+        DesignEditPart viewEditPart = null;
+        Part viewPart = null;
+        EditPart viewsEditPart = getRootEditPart().getContents();
+        for (int i = 0; i < viewsEditPart.getChildren().size(); i++) {
+            viewEditPart = (DesignEditPart) viewsEditPart.getChildren().get(i);
+            viewPart = (Part) viewEditPart.getModel();
+            if (graphicalDataManager != null) {
+                try {
+                    ComponentGraphicalData graphicalData =
+                            graphicalDataManager.getGraphicalData(viewPart.getUniqueId(), screenQualifierMgr.getCurrentDevice(),
+                                                                  screenQualifierMgr.getCurrentOrientation(), screenQualifierMgr.getCurrentLocale(), bForce);
+
+                    if (graphicalData != null) {
+                        if (graphicalData.imageDescriptor != null) {
+                            imgDescriptorMap.put(viewPart.getUniqueId(), graphicalData.imageDescriptor);
+                            // this.updatePageImageData(graphicalData.imageDescriptor);
+                        }
+
+                        if (graphicalData.componentPositionMap != null) {
+                            this.updataPageComponentPositions(viewEditPart, graphicalData.componentPositionMap);
+                        }
+
+                        if (graphicalData.placeholderPositionMap != null) {
+                            this.updataPagePlaceholderPositions(viewEditPart, graphicalData.placeholderPositionMap);
+                        }
+                    }
+                } catch (GraphicalDataInitializeFailedException e) {
+                    if (this.editor != null && this.isInitialized == false) {
+                        editor.closeEditor();
+                    }
+                    //logger.debug(e.getMessage());
+                }
+            }
+        }
+    }
+
+    private void updatePageImageData(DesignEditPart viewEditPart, ImageDescriptor imageDescriptor) {
+        // TODO FIXME
+        {
+            if (initRootEditPart != false) {
+                this.initRootEditPart();
+            }
+        }
+        // DesignEditPart viewEditPart = this.getCurrentViewEditPart();
+        ((ViewFigure) viewEditPart.getFigure()).setImageDescriptor(imageDescriptor);
+    }
+
+    private Point getPageLocation(Part viewPart) {
+        Point location = new Point(0, 0);
+        try {
+            location.x = Integer.parseInt(viewPart.getPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_X));
+            location.y = Integer.parseInt(viewPart.getPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_Y));
+        } catch (NumberFormatException e) {
+            location.x = location.y = 0;
+        }
+        return location;
+    }
+
+    private void updataPageComponentPositions(DesignEditPart viewEditPart, final Map<String, Position> componentPositionMap) {
+        // final DesignEditPart viewEditPart = this.getCurrentViewEditPart();
+        // TODO FIXME
+        // workaround code for flickering - start
+        // max indicator size = 52
+        // abnormal indicator size = 162, 150, 103, 112
+
+        Part part = (Part) viewEditPart.getModel();
+        List<Part> children = part.getChildren();
+        if (children.size() == 1) {
+            Part child = children.get(0);
+            Position componentPosition = componentPositionMap.get(child.getUniqueId());
+            if (componentPosition != null) {
+                if (componentPosition.y > 100) {
+                    return;
+                }
+            }
+        }
+        // workaround code for flickering - end
+
+        Point delta = getPageLocation(part);
+
+        // delta.x -= 2;
+        // delta.y -= 150;
+
+        if (imgDescriptorMap.containsKey(part.getUniqueId()) == true) {
+            this.updatePageImageData(viewEditPart, imgDescriptorMap.get(part.getUniqueId()));
+        }
+
+        Display.getDefault().asyncExec(new Runnable() {
+            public void run() {
+                if (isInitialized == false) {
+                    isInitialized = true;
+                    updateAutoZoom();
+                    updateViewLocation();
+                    setPositionToCenter();
+                }
+                if (null != viewEditPart) {
+                    updateComponentPosition(delta, viewEditPart, componentPositionMap, true);
+                    setVisibleOutlineLayer(true);
+                }
+            }
+        });
+
+    }
+
+    private void updateComponentPosition(Point delta, DesignEditPart editPart, Map<String, Position> componentPositionMap, boolean isFireEvent) {
+        // FIXME : workaround code for connection's position when editor open
+        router.setViewPositionValidate(true);
+
+        if (editPart != null) {
+            Part part = (Part) editPart.getModel();
+            if (part.getUniqueId() != null && !part.getUniqueId().isEmpty()) {
+                Position componentPosition = componentPositionMap.get(part.getUniqueId());
+                if (componentPosition != null) {
+                    componentPosition = new Position(componentPosition.x + delta.x, componentPosition.y + delta.y,
+                                                     componentPosition.width, componentPosition.height);
+                    if (editPart instanceof ViewEditPart) {
+                        componentPosition = DesignEditorUtil.getPagePositionFromComponentPosition(componentPosition);
+                    }
+                    if (editPart.setPosition(componentPosition) == true) {
+                        // editPart.refresh();
+                    }
+                    editPart.refresh();
+                    if (editPart.getFlagReveal() == true) {
+                        reveal(editPart);
+                        editPart.setFlagReveal(false);
+                    }
+                }
+            }
+
+            List<?> children = editPart.getChildren();
+            for (int i = 0; i < children.size(); i++) {
+                if (children.get(i) instanceof DesignEditPart) {
+                    DesignEditPart childEditPart = (DesignEditPart) children.get(i);
+                    updateComponentPosition(delta, childEditPart, componentPositionMap, isFireEvent);
+                }
+            }
+        }
+    }
+
+    private void updataPagePlaceholderPositions(DesignEditPart viewEditPart, Map<String, List<PlaceholderPosition>> placeholderPositionMap) {
+        if (placeholderPositionMap == null) {
+            return;
+        }
+        DesignRootEditPart rootEditPart = (DesignRootEditPart) getRootEditPart();
+        if (rootEditPart != null) {
+            Point delta = getPageLocation((Part) viewEditPart.getModel());
+            updataPagePlaceholderPosition(delta, viewEditPart, placeholderPositionMap, true);
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    private void updataPagePlaceholderPosition(Point delta, DesignEditPart editPart,
+                                               Map<String, List<PlaceholderPosition>> placeholderPositions, boolean isFireEvent) {
+        if (editPart != null) {
+            if (editPart.getId() != null && !editPart.getId().isEmpty()) {
+                List<PlaceholderPosition> phPos = placeholderPositions.get(editPart.getId());
+                if (null != phPos) {
+                    if (editPart instanceof ContainerEditPart) {
+                        ContainerEditPart containerEditPart = (ContainerEditPart) editPart;
+                        CellManager cellManager = containerEditPart.getCellManager();
+                        if (null != cellManager) {
+                            cellManager.clean();
+                            for (PlaceholderPosition pos : phPos) {
+                                cellManager.addCell(pos.wid, pos.x + delta.x, pos.y + delta.y, pos.width, pos.height);
+                            }
+                            // containerEditPart.refreshCells();
+                            editPart.refresh();
+                        }
+                    }
+                }
+            }
+
+            List<DesignEditPart> myChildren = editPart.getChildren();
+            if (null != myChildren) {
+                for (DesignEditPart ePart : myChildren) {
+                    updataPagePlaceholderPosition(delta, ePart, placeholderPositions, isFireEvent);
+                }
+
+            }
+        }
+    }
+
+    @Override
+    public void componentImageDataChanged(GraphicalDataChangedEvent event) {
+        this.handleComponentImageDataChanged(event);
+    }
+
+    @Override
+    public void componentPositionDataChanged(GraphicalDataChangedEvent event) {
+        this.handleComponentPositionChanged(event);
+
+    }
+
+    @Override
+    public void placeholderPositionDataChanged(GraphicalDataChangedEvent event) {
+        this.handlePlaceholderPositionChanged(event);
+
+    }
+
+    private void initRootEditPart() {
+        // TODO FIXME
+        DesignRootEditPart rootEditPart = (DesignRootEditPart) getRootEditPart();
+        if (rootEditPart == null) {
+            return;
+        }
+        rootEditPart.refresh();
+        this.initRootEditPart = true;
+    }
+
+    public void setEnabled(boolean enabled) {
+        if (this.enabled == enabled) {
+            return;
+        }
+        this.enabled = enabled;
+        if (!enabled) {
+            this.deselectAll();
+        }
+        getLayerManager().getLayer(CustomLayerConstants.BLOCK_LAYER).setVisible(!enabled);
+        DesignEditorPaletteViewer paletteViewer = (DesignEditorPaletteViewer) ((TizenEditDomain) getEditDomain()).getTizenPaletteViewer();
+        paletteViewer.setEnabled(enabled);
+        int scrollbarVisibleMode = enabled ? FigureCanvas.AUTOMATIC : FigureCanvas.NEVER;
+        getFigureCanvas().setScrollBarVisibility(scrollbarVisibleMode);
+        getControl().setEnabled(enabled);
+        editor.setEnableToolBar(enabled);
+    }
+
+    @Override
+    public void partsChanged(List<PartMutation> mutations, PartObserver observer, String sender) {
+        if (sender.equals(PartObserver.MESSAGE_VALID_XML)) {
+            setEnabled(true);
+        } else if (sender.equals(PartObserver.MESSAGE_INVALID_XML)) {
+            setEnabled(false);
+            return;
+        }
+
+        // List<Part> partListToRefresh = new ArrayList<Part>();
+        Map<Part, String> partMapToRefresh = new HashMap<Part, String>();
+        // FIXME: It is not used.
+        // Map<Part, String> partMapToReorder = new HashMap<Part, String>();
+        List<Part> removedScreenParts = new ArrayList<Part>();
+
+        boolean isViewChanged = false;
+        boolean isImageSrcChanged = false;
+        boolean isConfigChanged = false;
+        boolean isViewPositionChanged = false;
+        for (PartMutation mutation : mutations) {
+            String mutationType = mutation.getType();
+            if (mutationType.equals(PartMutation.PARTS_ADDED)) {
+                for (Part part : mutation.getAddedParts()) {
+                    if (part instanceof ViewPart) {
+                        isViewChanged = true;
+                        break;
+                    }
+                }
+            } else if (mutationType.equals(PartMutation.PARTS_REMOVED)) {
+                for (Part part : mutation.getRemovedParts()) {
+                    if (part instanceof ViewPart) {
+                        isViewChanged = true;
+                        // if (part == this.getCurrentViewPart()) {
+                        break;
+                        // }
+                    }
+                }
+            } else if (mutationType.equals(PartMutation.CONFIGURES_REMOVED)) {
+                isConfigChanged = true;
+                for (Part part : mutation.getRemovedParts()) {
+                    removedScreenParts.add(part);
+                }
+            } else if (PartMutation.CONFIGURES_ADDED.equals(mutationType)) {
+                isConfigChanged = true;
+            } else if (PartMutation.CONFIGURE_PROPERTY_CHANGED.equals(mutationType)) {
+                isConfigChanged = true;
+            } else if (mutationType.equals(PartMutation.PROPERTY_CHANGED)) {
+                if (LayoutSchemaConstants.IMAGE.equals(mutation.getTargetPart().getDescriptorId())
+                        && LayoutSchemaConstants.SRC.equals(mutation.getPropertyName())) {
+                    isImageSrcChanged = true;
+                } else if (LayoutSchemaConstants.PAGE_LOCATION_X.equals(mutation.getPropertyName()) ||
+                        LayoutSchemaConstants.PAGE_LOCATION_Y.equals(mutation.getPropertyName())) {
+                    isViewPositionChanged = true;
+                }
+                // partMapToRefresh.put(mutation.getTargetPart(), ""); //to slow when view moved
+            }
+
+            if (mutationType.equals(PartMutation.PARTS_ADDED) || mutationType.equals(PartMutation.PARTS_REMOVED)) {
+                if (mutation.getTargetPart() instanceof ComponentPart) {
+                    partMapToRefresh.put(mutation.getTargetPart(), "");
+                }
+            }
+
+            if (mutationType.equals(PartMutation.PARTS_ORDER_CHANGED)) {
+                if (mutation.getTargetPart() instanceof ComponentPart)
+                    partMapToRefresh.put(mutation.getTargetPart(), "");
+            }
+
+        }
+
+        this.router.refresh();
+
+        if (isViewChanged) {
+            getContents().refresh();
+        }
+        // FIXME: After Storyboard is merged with Design, this routine does not need.
+        if (this.currentActivatedViewEditPart == null) {
+            setActiveViewEditPart((EditPart) getRootEditPart().getContents().getChildren().get(0));
+        }
+
+        for (Part child : partMapToRefresh.keySet()) {
+            DesignEditPart editPart = (DesignEditPart) getEditPartRegistry().get(child.getUniqueId());
+            if (editPart != null) {
+                editPart.refresh();
+            }
+        }
+
+        // FIXME: It is not used
+        // for (Part child : partMapToReorder.keySet()) {
+        // DesignEditPart editPart = (DesignEditPart)
+        // getEditPartRegistry().get(child.getUniqueId());
+        // if (editPart != null) {
+        // editPart.refreshChildren2();
+        // editPart.reorderChildren();
+        // }
+        // }
+
+        // if (isCurrentViewRemoved) {
+        // // FIXME
+        // Part viewPart = ((Part)
+        // getRootEditPart().getContents().getModel()).getComponentChildren().get(0);
+        // selectView((ViewPart) viewPart);
+        // }
+
+        // If screen configuration is changed from text editor
+        if (isConfigChanged) {
+            refreshMScreenToolBar();
+        }
+
+        MScreenQualifierManager mScreenManager = getMScreenQualifierManager();
+        if (removedScreenParts.contains(mScreenManager.getCurrentConfigurePart()) == true) {
+            mScreenManager.setCurrentConfigurePart(mScreenManager.getCommonConfigurationPart());
+        }
+        reqNewPageGraphicData();
+        if (isImageSrcChanged && PlatformUtil.getOS().equals(PlatformUtil.OS_WIN32)) { // workaround
+                                                                                       // code -
+                                                                                       // #TSCP 450
+            reqNewPageGraphicData(true);
+        }
+
+        for (ConnectionModel cm : this.router.connections.values()) {
+            EditPart ep = null;
+            ep = (EditPart) this.getEditPartRegistry().get(cm);
+            if (ep != null) {
+                ep.refresh();
+            }
+        }
+        updatePaletteViewer();
+        if (isViewChanged || isViewPositionChanged) {
+            updateViewLocation();
+            // router.refreshAllConnections();
+        }
+        router.refreshAllConnections();
+
+    }
+
+    public MScreenQualifierManager getMScreenQualifierManager() {
+        return screenQualifierMgr;
+    }
+
+    public void addMScreenToolbar(ScreenDesignToolbar toolbar) {
+        if (!this.mscreenToolbarList.contains(toolbar)) {
+            this.mscreenToolbarList.add(toolbar);
+        }
+    }
+
+    public void setViewNavigationToolbar(ViewNavigationToolbar toolbar) {
+    }
+
+    public void selectView(ViewPart viewPart) {
+        EditPart viewEditPart = (EditPart) this.getEditPartRegistry().get(viewPart.getUniqueId());
+        if (viewEditPart != null) {
+            this.select(viewEditPart);
+        }
+    }
+
+    public boolean isAutoFit() {
+        if (this.zoomToolBar != null) {
+            return this.zoomToolBar.isFitMode();
+        }
+        return false;
+    }
+
+    @Override
+    public void configurationSelected(MScreenQualifierManager mscreenManager) {
+        this.reqNewPageGraphicData();
+        this.setFitMode(true);
+        this.getStoryBoardRouter().refreshAllConnections();
+    }
+
+    @Override
+    public double getZoomScale() {
+        return ((DesignRootEditPart) getRootEditPart()).getZoomManager().getZoom();
+    }
+
+    @Override
+    public void setZoomScale(double scale) {
+        if (((DesignRootEditPart) getRootEditPart()).getZoomManager().getZoom() != scale) {
+            ((DesignRootEditPart) getRootEditPart()).getZoomManager().setZoom(scale);
+            // this.updateViewLocation(scale);
+            // this.setPositionToCenter();
+            // procUpdateScrollbar();
+        }
+    }
+
+    @Override
+    public void setZoomControlToolbar(ZoomControlToolbar toolbar) {
+        zoomToolBar = toolbar;
+        toolbar.setFitMode(true);
+    }
+
+    @Override
+    public void addZoomScaleChangedListener(ZoomListener listener) {
+        ((DesignRootEditPart) getRootEditPart()).getZoomManager().addZoomListener(listener);
+    }
+
+    @Override
+    public void removeZoomScaleChangedListener(ZoomListener listener) {
+        ((DesignRootEditPart) getRootEditPart()).getZoomManager().removeZoomListener(listener);
+    }
+
+    @Override
+    public void setFitMode(boolean isAutoFit) {
+        this.isAutofitEnabled = isAutoFit;
+        if (isAutoFit) {
+            this.updateViewLocation();
+            this.updateAutoZoom();
+            setPositionToCenter();
+        }
+    }
+
+    @Override
+    public boolean getFitMode() {
+        return isAutofitEnabled;
+    }
+
+    public void refreshMScreenToolBar() {
+        mscreenToolbarList.get(0).refreshContents(this.getMScreenQualifierManager().getCurrentConfigurePart());
+    }
+
+    private void updatePaletteViewer() {
+        PaletteViewer paletteViewer = ((TizenEditDomain) getEditDomain()).getTizenPaletteViewer();
+        paletteViewer.setCategoryState(false);
+        // if (currentActivatedViewEditPart != null && paletteViewer != null) {
+        // Part viewPart = (Part) currentActivatedViewEditPart.getModel();
+        // if (viewPart.getChildren().size() == 0) {
+        // paletteViewer.setCategoryState(true);
+        // // hide components
+        // } else {
+        // paletteViewer.setCategoryState(false);
+        // // show components
+        // }
+        // }
+    }
+
+    @Override
+    public void edjResourceChanged(EdjResourceChangedEvent event) {
+        if ((event.type == EdjResourceChangedEvent.TYPE_CHANGED || event.type == EdjResourceChangedEvent.TYPE_REMOVED)
+                && currentActivatedViewEditPart != null) {
+            Part viewPart = (Part) currentActivatedViewEditPart.getModel();
+            Part part = null;
+            ArrayDeque<Part> queue = new ArrayDeque<Part>();
+            queue.add(viewPart);
+            String realPath = null;
+            boolean bNeedRefresh = false;
+            while (!queue.isEmpty()) {
+                part = queue.removeFirst();
+                if (LayoutSchemaConstants.LAYOUT.equals(part.getDescriptorId())) {
+                    realPath = this.graphicalDataManager.getRenderDataGenerator().getRealPathFromResourceProperty(part, LayoutSchemaConstants.SRC,
+                                                                                                                  screenQualifierMgr.getCurrentDevice(),
+                                                                                                                  screenQualifierMgr.getCurrentLocale());
+                    if (realPath.equals(event.path)) {
+                        bNeedRefresh = true;
+                        break;
+                    }
+                }
+                queue.addAll(part.getComponentChildren());
+
+            }
+            if (bNeedRefresh == true) {
+                reqNewPageGraphicData(true);
+            }
+        }
+
+    }
+
+    public EdjResourceSyncManager getEdjResourceSyncManager() {
+        return this.edjResourceManager;
+    }
+
+    public void bindResizeListener() {
+        if (resizeListener == null) {
+            resizeListener = new Listener() {
+
+                @Override
+                public void handleEvent(Event ev) {
+                    if (firstInitializedTimeStamp == 0) {
+                        firstInitializedTimeStamp = System.currentTimeMillis();
+                    } else if (System.currentTimeMillis() - firstInitializedTimeStamp > initializeWaitTime) {
+                        unbindResizeListener();
+                    } else {
+                        updateAutoZoom();
+                        setPositionToCenter();
+                    }
+                }
+            };
+            this.getControl().addListener(SWT.RESIZE, resizeListener);
+        }
+    }
+
+    public void unbindResizeListener() {
+        if (resizeListener != null) {
+            this.getControl().removeListener(SWT.RESIZE, resizeListener);
+            resizeListener = null;
+        }
+    }
+
+    public GraphicalDataManager getGraphicalDataMgr() {
+        return this.graphicalDataManager;
+    }
+
+    public IProject getProject() {
+        return this.editor.getProject();
+    }
+
+    public void showBindingInfo(boolean isBinded) {
+        DesignEditPart currentViewEditPart = getCurrentViewEditPart(); 
+        if (currentViewEditPart != null) {
+            currentViewEditPart.setBinded(isBinded);
+            showBindingInfo(currentViewEditPart.isBinded(), currentViewEditPart);
+        }
+    }
+
+    private void showBindingInfo(boolean isBinded, DesignEditPart editPart) {
+        if (null == editPart) {
+            return;
+        }
+        Part part = (Part) editPart.getModel();
+        IFigure f = editPart.getFigure();
+
+        if (f instanceof ComponentFigure) {
+            ComponentFigure figure = (ComponentFigure) f;
+            String dataBind = part.getPropertyValue(BuilderConstants.ATTRIBUTE_DATA_BIND);
+            if (null != dataBind && !dataBind.isEmpty() && isBinded) {
+                figure.setBinded(true);
+            } else {
+                figure.setBinded(false);
+            }
+            figure.repaint();
+        }
+
+        List children = editPart.getChildren();
+        for (Object child : children) {
+            showBindingInfo(isBinded, (DesignEditPart) child);
+        }
+    }
+
+    DesignEditPart getViewPartById(String id) {
+        Part part = (Part) getRootEditPart().getContents().getModel();
+        for (Part child : part.getChildren()) {
+            if (child.getUniqueId().equals(id)) {
+                return (DesignEditPart) this.getEditPartRegistry().get(child.getUniqueId());
+            }
+        }
+        return null;
+    }
+
+    public DesignStoryboardRouter getStoryBoardRouter() {
+        return router;
+    }
+
+    public void setVisibleOutlineLayer(boolean visible) {
+        this.getLayerManager().getLayer(CustomLayerConstants.OUTLINE_LAYER).setVisible(visible);
+    }
+
+    public void reconstructStoryboard() {
+        Command cmd =
+                DesignStoryboardUtil.getStoryboardReconstructCommand((Part) (getContents().getModel()),
+                                                                     this.getMScreenQualifierManager().getScreenSize());
+        if (cmd != null) {
+            CommandStack cmdStack = getEditDomain().getCommandStack();
+            cmdStack.execute(cmd);
+            setFitMode(true);
+        }
+    }
+
+    private boolean checkStoryboardPosition() {
+        boolean bPropertyChanged = false;
+        Part viewsPart = (Part) (getContents().getModel());
+        if (DesignStoryboardUtil.hasInvalidStoryboardPosition(viewsPart) == true) {
+            bPropertyChanged = storyboardUtil.setSetOldPositionsProperties(viewsPart);
+        }
+
+        if (DesignStoryboardUtil.hasInvalidStoryboardPosition(viewsPart) == true) {
+            DesignStoryboardUtil.setStoryboardReconstructProperties(viewsPart,
+                                                                    this.getMScreenQualifierManager().getScreenSize());
+            bPropertyChanged = true;
+        }
+        return bPropertyChanged;
+    }
+
+    private double getFitZoomScale(Rectangle rect) {
+        double scale;
+        Rectangle editorContentBound = getEditorContentBound();
+        scale = Math.min(editorContentBound.width / (double) rect.width, editorContentBound.height / (double) rect.height);
+        return scale;
+    }
+
+    public ZoomManager getZoomManager() {
+        DesignRootEditPart rootEditPart = (DesignRootEditPart) getRootEditPart();
+        if (rootEditPart != null) {
+            return rootEditPart.getZoomManager();
+        }
+        return null;
+    }
+
+    public void fitToSingleView(Part viewPart) {
+        Point viewSize = screenQualifierMgr.getScreenSize();
+        Rectangle editorBound = getEditorBound();
+        Rectangle viewBound = DesignEditorUtil.getPageBound(viewPart, viewSize.x, viewSize.y);
+        double zoom = getFitZoomScale(viewBound);
+
+        Point viewLocation = new Point();
+        viewBound.scale(zoom);
+        viewLocation.x = viewBound.x - ((editorBound.width - viewBound.width) / 2);
+        viewLocation.y = viewBound.y - ((editorBound.height - viewBound.height) / 2);
+
+        DesignRootEditPart rootEditPart = (DesignRootEditPart) getRootEditPart();
+        ZoomManager zoomManager = getZoomManager();
+        if (rootEditPart == null || zoomManager == null) {
+            return;
+        }
+
+        double currentZoom = zoomManager.getZoom();
+        Point currentLocation = zoomManager.getViewport().getViewLocation();
+        Rectangle storyboardBound = getStoryboardBound();
+
+        if (currentZoom == zoom && viewLocation.equals(currentLocation) && storyboardBound.equals(fitSingleViewState.storyboardBound)
+                && viewPart == fitSingleViewState.targetPart) {
+            zoomManager.setZoom(this.fitSingleViewState.zoom);
+            zoomManager.setViewLocation(this.fitSingleViewState.location);
+        } else {
+            fitSingleViewState.saveState(currentZoom, currentLocation, storyboardBound, viewPart);
+            zoomManager.setZoom(zoom);
+            zoomManager.setViewLocation(viewLocation);
+        }
+    }
+
+    public IFigure findFigureAt(Point pt) {
+        return getLightweightSystem().getRootFigure().findFigureAt(pt.x, pt.y);
+    }
+
+    public DesignStoryboardUtil getDesignStoryboardUtil() {
+        return storyboardUtil;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignViewerMouseListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/DesignViewerMouseListener.java
new file mode 100644 (file)
index 0000000..99f0210
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.viewer;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.tools.DesignEditDomain;
+import org.tizen.efluibuilder.model.descriptors.EventDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+
+
+public class DesignViewerMouseListener implements MouseListener {
+    DesignViewer viewer = null;
+    EditPart srcEditPart = null;
+
+    public DesignViewerMouseListener(DesignViewer viewer) {
+        this.viewer = viewer;
+    }
+
+    @Override
+    public void mouseDoubleClick(MouseEvent arg0) {
+        // TODO Auto-generated method stub
+    }
+
+    @Override
+    public void mouseDown(MouseEvent event) {
+        Point pos = new Point(event.x, event.y);
+        srcEditPart = viewer.findObjectAt(pos);
+    }
+
+    private void createContextMenu(Part sourcePart, Part targetViewPart, org.eclipse.swt.graphics.Point creationPoint) {
+        Menu contextMenu = new Menu(viewer.getControl());
+        ComponentDescriptor componentDescriptor = sourcePart.getOwnerDocumentPart().getComponentDescriptor();
+        for (EventDescriptor descriptor : componentDescriptor.getWidgetDescriptor(sourcePart.getDescriptorId()).getEventDescriptors()) {
+            contextMenu.setVisible(false);
+            MenuItem menuItem = new MenuItem(contextMenu, SWT.POP_UP);
+            menuItem.setText(descriptor.getEventDisplayName());
+            for (Part sourcePartEvent : ((ComponentPart) sourcePart).getEventParts()) {
+                if ((descriptor.getEventDisplayName()).equals(sourcePartEvent.getPropertyValue(LayoutSchemaConstants.EVENT_SIGNAL))) {
+                    menuItem.setEnabled(false);
+                    break;
+                }
+            }
+            menuItem.addSelectionListener(new ConnectionCreateListener(viewer, sourcePart, targetViewPart));
+        }
+        if (creationPoint != null) {
+            contextMenu.setLocation(creationPoint);
+            contextMenu.setVisible(true);
+        }
+    }
+
+    @Override
+    public void mouseUp(MouseEvent event) {
+        DesignEditDomain editdomain = (DesignEditDomain) viewer.getEditDomain();
+        if (editdomain != null && editdomain.isConnectionEnabled()) {
+            editdomain.clearConnectionEnabled();
+        } else {
+            return;
+        }
+
+        Point pos = new Point(event.x, event.y);
+        EditPart targetEditPart = viewer.findObjectAt(pos);
+        if (srcEditPart instanceof DesignEditPart && targetEditPart instanceof DesignEditPart) {
+            Part srcViewPart = PartUtil.findViewPart((Part) srcEditPart.getModel());
+            Part targetViewPart = PartUtil.findViewPart((Part) targetEditPart.getModel());
+            if (srcViewPart != null && targetViewPart != null && srcViewPart != targetViewPart) {
+                createContextMenu((Part) srcEditPart.getModel(), targetViewPart, viewer.getControl().toDisplay(event.x, event.y));
+            }
+        }
+
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/IScalableViewer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/IScalableViewer.java
new file mode 100644 (file)
index 0000000..5b94483
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.gef.viewer;
+
+import org.eclipse.gef.editparts.ZoomListener;
+import org.tizen.efluibuilder.ui.editor.toolbar.ZoomControlToolbar;
+
+
+public interface IScalableViewer {
+    public double getZoomScale();
+
+    public boolean getFitMode();
+
+    public void setZoomScale(double scale);
+
+    public void setFitMode(boolean isAutoFit);
+
+    public void addZoomScaleChangedListener(ZoomListener listener);
+
+    public void removeZoomScaleChangedListener(ZoomListener listener);
+
+    public void setZoomControlToolbar(ZoomControlToolbar toolbar);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/SBMetaData.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/SBMetaData.java
new file mode 100644 (file)
index 0000000..066fac4
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+F * UI Builder - StoryBoard
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.viewer;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.JAXBException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.draw2d.geometry.Point;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.model.app.loader.PropertiesLoader;
+import org.tizen.efluibuilder.model.app.loader.jaxb.Properties;
+import org.tizen.efluibuilder.model.app.loader.jaxb.ViewModel;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+
+
+public class SBMetaData {
+    private Properties properties;
+    private PropertiesLoader propLoader = new PropertiesLoader();
+    private HashMap<String, Point> viewLocationMap = new HashMap<String, Point>();
+    private String path;
+    private IFile file;
+
+    public SBMetaData(IProject project) {
+        this.file = project.getFile(ModelConstants.PROJECT_FILE);
+        try {
+            properties = propLoader.load(file);
+            this.path = file.getLocation().toString();
+            createViewLocationMap();
+        } catch (JAXBException e) {
+            throw new RuntimeException(e.getMessage() + "\nLoad failed. (project file)");
+        }
+    }
+
+    private void createViewLocationMap() {
+        List<ViewModel> viewModelList = properties.getViews();
+        Assert.notNull(viewModelList);
+        for (ViewModel viewModel : viewModelList) {
+            viewLocationMap.put(viewModel.getId(), new Point(viewModel.getLocationX(), viewModel.getLocationY()));
+        }
+    }
+    
+    public Map<String, Point> getViewLocationMap() {
+        return viewLocationMap;
+    }
+
+    public void addViewLocation(String viewId, Point location) {
+        viewLocationMap.put(viewId, location);
+    }
+
+    public void deleteViewLocation(String viewId) {
+        viewLocationMap.remove(viewId);
+    }
+
+    public void updateLocationX(String viewId, int locationX) {
+        Point location = viewLocationMap.get(viewId);
+        if (location != null) {
+            location.x = locationX;
+        }
+    }
+
+    public void updateLocationY(String viewId, int locationY) {
+        Point location = viewLocationMap.get(viewId);
+        if (location != null) {
+            location.y = locationY;
+        }
+    }
+
+    public Point getPageLocation(String viewId) {
+        return viewLocationMap.get(viewId);
+    }
+
+    public String getLocationProperty(String viewId, String propertyName) {
+        Point viewLoc = viewLocationMap.get(viewId);
+        if (viewLoc == null) {
+            return null;
+        }
+        if (propertyName.equals(PropertiesConstant.PROPERTY_LOCATION_X)) {
+            return String.valueOf(viewLoc.x);
+        } else if (propertyName.equals(PropertiesConstant.PROPERTY_LOCATION_Y)) {
+            return String.valueOf(viewLoc.y);
+        }
+        return null;
+    }
+
+    public void saveMetaData() {
+        try {
+            List<ViewModel> viewModelList = createViewModelList();
+            properties.setViews(viewModelList);
+            propLoader.data = properties;
+            propLoader.saveExisting(path);
+
+            // FIXED: File synchronization in project explorer is broken.
+            this.file.refreshLocal(IFile.DEPTH_ZERO, null);
+        } catch (JAXBException e) {
+            throw new RuntimeException(e.getMessage() + "\nLoad failed. (project file)");
+        } catch (CoreException e) {
+            // TODO: Need to add an exception process
+            e.printStackTrace();
+        }
+    }
+
+    private ViewModel createViewModel(String id, Point location) {
+        ViewModel model = new ViewModel();
+        model.setId(id);
+        model.setLocationX(location.x);
+        model.setLocationY(location.y);
+        return model;
+    }
+
+    private List<ViewModel> createViewModelList() {
+        List<ViewModel> viewModelList = new ArrayList<ViewModel>();
+        for (String key : viewLocationMap.keySet()) {
+            viewModelList.add(createViewModel(key, viewLocationMap.get(key)));
+        }
+        return viewModelList;
+    }
+
+    public void updateViewLocationMap(String oldViewId, String newViewId) {
+        List<ViewModel> viewModelList = properties.getViews();
+        Assert.notNull(viewModelList);
+        for (ViewModel viewModel : viewModelList) {
+            if (viewModel.getId().equals(oldViewId)) {
+                viewModel.setId(newViewId);
+                viewLocationMap.put(newViewId, new Point(viewModel.getLocationX(), viewModel.getLocationY()));
+                viewLocationMap.remove(oldViewId);
+                break;
+            }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/modules/RendererManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/gef/viewer/modules/RendererManager.java
new file mode 100644 (file)
index 0000000..48b20de
--- /dev/null
@@ -0,0 +1,247 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.gef.viewer.modules;
+
+public class RendererManager {
+
+    public RendererManager() {
+    }
+
+    // // Renderer
+    // private IRenderer renderer = null;
+    //
+    // // Parent's handle (need to move) for updateModel()
+    // private IViewManager viewManager = null;
+    //
+    // private DesignerRootEditPart rootEditPart = null;
+    // private DesignerEditPart pageEditPart = null;
+    //
+    // private DesignerRootEditPart getRootEditpart() {
+    // return rootEditPart;
+    // }
+    //
+    // public void setRootEditpart(DesignerRootEditPart rootEditPart) {
+    // EditPart doc = rootEditPart.getContents();
+    // @SuppressWarnings("unchecked")
+    // List<EditPart> pageEditParts = doc.getChildren();
+    // if (pageEditParts.size() > 0) {
+    // this.pageEditPart = (DesignerEditPart) pageEditParts.get(0);
+    // }
+    //
+    // this.rootEditPart = rootEditPart;
+    // }
+    //
+    // private DesignerEditPart getPageEditpart() {
+    // return pageEditPart;
+    // }
+    //
+    // public void bindHandle(IViewManager viewManager) {
+    // this.viewManager = viewManager;
+    // }
+    //
+    // public void destroy() {
+    // if (null != renderer) {
+    // renderer.destroy();
+    // }
+    // }
+    //
+    // public void create(int width, int height, String projectPath, String profile) {
+    // RendererFactory factory = RendererFactory.getDefault();
+    // renderer = factory.create(viewManager.getVersion(), profile, projectPath);
+    // renderer.setName("Editor");
+    // renderer.addRendererListener(this);
+    // renderer.create(width, height);
+    // }
+    //
+    // public void updatePage() {
+    // // get selection
+    // String id = viewManager.getSelection();
+    // RenderDataGenerator generator = new RenderDataGenerator(viewManager);
+    // String renderData = generator.generate(id);
+    // renderer.render(IRenderer.RENDER_TYPE_DESIGN, renderData);
+    // }
+    //
+    // public IRenderer getHandle() {
+    // return renderer;
+    // }
+    //
+    // @Override
+    // public void replyRender(RenderEvent event) {
+    // if (!renderer.equals(event.renderer)) {
+    // return;
+    // }
+    // updatePageImage(event);
+    // }
+    //
+    // @Override
+    // public void reply(IArguments message) {
+    // handleReply(message);
+    // }
+    //
+    // public Image getPageImage() {
+    // DesignerEditPart pageEditPart = getPageEditpart();
+    // ViewFigure figure = (ViewFigure) pageEditPart.getFigure();
+    // if (null != figure) {
+    // if (figure.getImageDescriptor() != null) {
+    // return figure.getImageDescriptor().createImage();
+    // }
+    // }
+    //
+    // return null;
+    // }
+    //
+    // private void updatePageImage(RenderEvent event) {
+    // DesignerEditPart pageEditPart = getPageEditpart();
+    // if (pageEditPart == null) {
+    // return;
+    // }
+    // ViewFigure figure = (ViewFigure) pageEditPart.getFigure();
+    // figure.setImageDescriptor(event.imageDescriptor);
+    // }
+    //
+    // private void handleReply(final IArguments message) {
+    // Display.getDefault().syncExec(new Runnable() {
+    // @Override
+    // public void run() {
+    // if (message.getId().equals(RendererConstants.EVENT_CREATE)) {
+    // onCreateCompleted();
+    // } else if (message.getId().equals(RendererConstants.EVENT_GET_ALL_WIDGET_POSITIONS)) {
+    // onGetAllWidgetPosition(message);
+    // } else if (message.getId().equals(RendererConstants.EVENT_GET_PLACEHOLDER_POSITIONS)) {
+    // onGetAllPlaceHolderPosition(message);
+    // }
+    // }
+    // });
+    // }
+    //
+    // private void onCreateCompleted() {
+    // DesignerRootEditPart rootEditPart = getRootEditpart();
+    // if (rootEditPart == null) {
+    // return;
+    // }
+    // rootEditPart.refresh();
+    // rootEditPart.updateScrollBar();
+    // }
+    //
+    // private void onGetAllWidgetPosition(IArguments message) {
+    // @SuppressWarnings("unchecked")
+    // Map<String, ComponentPosition> widgetPositions = (Map<String, ComponentPosition>)
+    // message.getArg(0);
+    // if (widgetPositions == null) {
+    // return;
+    // }
+    //
+    // //viewsEditPart
+    // DesignerEditPart pageEditPart = getPageEditpart();
+    // if (null == pageEditPart) {
+    // return;
+    // }
+    //
+    // List<?> viewEditPartList = pageEditPart.getChildren();
+    // for(int i = 0; i < viewEditPartList.size(); i++) {
+    // DesignerEditPart viewEditPart = (DesignerEditPart)viewEditPartList.get(i);
+    // ViewFigure figure = (ViewFigure) viewEditPart.getFigure();
+    // figure.setVisible(false); // To refresh a ViewFigure (false -> true)
+    // updateOneWidgetPosition(viewEditPart, widgetPositions, true);
+    // figure.setVisible(true);
+    // }
+    // }
+    //
+    // protected void onGetAllPlaceHolderPosition(IArguments message) {
+    // @SuppressWarnings("unchecked")
+    // Map<String, List<PlaceholderPosition>> placeholderPositions = (Map<String,
+    // List<PlaceholderPosition>>) message.getArg(0);
+    // if (placeholderPositions == null) {
+    // return;
+    // }
+    //
+    // DesignerRootEditPart rootEditPart = getRootEditpart();
+    // if (rootEditPart != null) {
+    // updateOnePlaceholderPosition(rootEditPart, null, placeholderPositions, true);
+    // }
+    // }
+    //
+    // private void updateOneWidgetPosition(DesignerEditPart editPart, Map<String,
+    // ComponentPosition> widgetPositions, boolean isFireEvent) {
+    // if (editPart != null) {
+    // Part part = (Part)editPart.getModel();
+    // if (part.getUniqueId() != null && !part.getUniqueId().isEmpty()) {
+    // ComponentPosition pos = widgetPositions.get(part.getUniqueId());
+    // if (pos != null) {
+    // editPart.setPosition(pos);
+    // }
+    // }
+    //
+    // List<?> children = editPart.getChildren();
+    // for (int i = 0; i < children.size(); i++) {
+    // DesignerEditPart childEditPart = (DesignerEditPart) children.get(i);
+    // updateOneWidgetPosition(childEditPart, widgetPositions, isFireEvent);
+    // }
+    // }
+    // }
+    //
+    // @SuppressWarnings("unchecked")
+    // private void updateOnePlaceholderPosition(DesignerRootEditPart rootEditPart, DesignerEditPart
+    // editPart,
+    // Map<String, List<PlaceholderPosition>> placeholderPositions, boolean isFireEvent) {
+    // if (editPart != null) {
+    //
+    // if (editPart.getId() != null && !editPart.getId().isEmpty()) {
+    //
+    // List<PlaceholderPosition> phPos = placeholderPositions.get(editPart.getId());
+    // if (null != phPos) {
+    //
+    // if (editPart instanceof ContainerEditPart) {
+    // ContainerEditPart containerEditPart = (ContainerEditPart) editPart;
+    // CellManager cellManager = containerEditPart.getCellManager();
+    //
+    // if (null != cellManager) {
+    // cellManager.clean();
+    //
+    // for (PlaceholderPosition pos : phPos) {
+    // cellManager.addCell(pos.wid, pos.x, pos.y, pos.width, pos.height);
+    // }
+    //
+    // containerEditPart.refreshCells();
+    // }
+    // }
+    // }
+    // }
+    //
+    // List<DesignerEditPart> myChildren = editPart.getChildren();
+    // if (null != myChildren) {
+    // for (DesignerEditPart ePart : myChildren) {
+    // updateOnePlaceholderPosition(rootEditPart, ePart, placeholderPositions, isFireEvent);
+    // }
+    // }
+    // } else {
+    // List<DesignerEditPart> rootChildren = rootEditPart.getChildren();
+    // if (null != rootChildren) {
+    // for (DesignerEditPart ePart : rootChildren) {
+    // updateOnePlaceholderPosition(rootEditPart, ePart, placeholderPositions, isFireEvent);
+    // }
+    // }
+    // }
+    // }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/AppManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/AppManager.java
new file mode 100644 (file)
index 0000000..e65580f
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.app;
+
+import javax.xml.bind.JAXBException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.application.TizenProjectDescription;
+import org.tizen.common.util.ProjectUtil;
+import org.tizen.efluibuilder.core.configuration.device.DeviceManager;
+import org.tizen.efluibuilder.core.configurator.Configurator;
+import org.tizen.efluibuilder.core.configurator.ConfiguratorConstants;
+import org.tizen.efluibuilder.model.app.loader.PropertiesLoader;
+import org.tizen.efluibuilder.model.app.loader.jaxb.Properties;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+
+
+public final class AppManager {
+    protected static Logger logger = LoggerFactory.getLogger(AppManager.class);
+    private Properties properties = null;
+    private String platform = null;
+    private String profile = null;
+    private String version = null;
+    private DeviceManager deviceManager = null;
+    private String schemaLocation = null;
+    private IProject project = null;
+
+    public static AppManager getAppManager(IProject project) {
+        if (!project.isOpen()) {
+            throw new RuntimeException("Project is not opened");
+        }
+        IProjectNature projectNature = null;
+        try {
+            projectNature = project.getNature("org.tizen.efluibuilder.nature");
+        } catch (CoreException e) {
+            throw new RuntimeException(e.getMessage());
+        }
+
+        if (projectNature == null) {
+            throw new RuntimeException("Nature not found");
+        }
+
+        // is NUIB Project
+        if (!projectNature.getClass().getSimpleName().equals("NUIBNature")) {
+            throw new RuntimeException("NUIB Nature not found");
+        }
+
+        AppManager appManager = new AppManager(project);
+        return appManager;
+    }
+
+    private AppManager(IProject project) {
+        TizenProjectDescription tizenProjectDescription = ProjectUtil.getTizenProjectDescription(project);
+        this.project = project;
+        // get .uproject file
+        IFile file = project.getFile(ModelConstants.PROJECT_FILE);
+        PropertiesLoader loader = new PropertiesLoader();
+        try {
+            properties = loader.load(file);
+        } catch (JAXBException e) {
+            throw new RuntimeException(e.getMessage() + "\nLoad failed. (project file)");
+        }
+
+        String shape = properties.getShape();
+        if (shape.equals(ModelConstants.SHAPE_SQUARE)) {
+            this.platform = tizenProjectDescription.getPlatformName();
+            this.profile = tizenProjectDescription.getProfileName();
+        } else if (shape.equals(ModelConstants.SHAPE_CIRCLE)) {
+            this.profile = ConfiguratorConstants.PROFILE_WEARABLE_CIRCLE;
+            this.platform = profile.concat("-").concat(tizenProjectDescription.getVersion());
+        }
+        this.version = tizenProjectDescription.getVersion();
+
+        Configurator configurator = Configurator.of(platform);
+        this.deviceManager = configurator.getDeviceManager();
+        this.schemaLocation = configurator.getLayoutSchemaLocation();
+    }
+
+    public void dispose() {
+        properties = null;
+        platform = null;
+        profile = null;
+        version = null;
+        deviceManager = null;
+        schemaLocation = null;
+    }
+
+    public String getPlatform() {
+        return platform;
+    }
+
+    public String getProfile() {
+        return profile;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public DeviceManager getDeviceManager() {
+        return deviceManager;
+    }
+
+    public String getSchemaLocation() {
+        return schemaLocation;
+    }
+
+    public IProject getProject() {
+        return project;
+    }
+
+    public static AppManager getAppManager() {
+        IProject project = null;
+        IWorkbenchWindow[] winList = PlatformUI.getWorkbench().getWorkbenchWindows();
+        if (winList == null)
+            return null;
+
+        for (IWorkbenchWindow win : winList) {
+            if (win.getActivePage() != null) {
+                if (win.getActivePage().getActiveEditor() instanceof CombineEditorPart) {
+                    project = ((FileEditorInput) win.getActivePage().getActiveEditor().getEditorInput()).getFile().getProject();
+                    return AppManager.getAppManager(project);
+                }
+            }
+        }
+
+        return null;
+    }
+
+    public static AppManager getAppManager(IEditorInput editorInput) {
+        IProject project = null;
+        project = ((FileEditorInput) editorInput).getFile().getProject();
+        return AppManager.getAppManager(project);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/PropertiesLoader.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/PropertiesLoader.java
new file mode 100644 (file)
index 0000000..aa42106
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.app.loader;
+
+import java.io.File;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+
+import org.eclipse.core.resources.IFile;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.model.app.loader.jaxb.Properties;
+
+
+public final class PropertiesLoader {
+    public Properties data = null;
+
+    public Properties load(IFile iFile) throws JAXBException {
+        String path = iFile.getLocation().toString();
+        return load(path);
+    }
+
+    public void save(IFile iFile) throws JAXBException {
+        String path = iFile.getLocation().toString();
+        save(path);
+    }
+
+    public Properties load(String path) throws JAXBException {
+        File file = new File(path);
+        Assert.isTrue(file.exists(), path);
+        Assert.isTrue(file.isFile(), path);
+
+        JAXBContext jc = JAXBContext.newInstance(Properties.class);
+        Unmarshaller u = jc.createUnmarshaller();
+        Properties properties = (Properties) u.unmarshal(file);
+        return properties;
+    }
+
+    public void save(String path) throws JAXBException {
+        File file = new File(path);
+        Assert.isFalse(file.exists(), path);
+        // StoryBoard_START
+        saveFile(file);
+    }
+
+    private void saveFile(File file) throws JAXBException {
+        JAXBContext jc = JAXBContext.newInstance(Properties.class);
+        Marshaller m = jc.createMarshaller();
+        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+        m.marshal(data, file);
+    }
+
+    public void saveExisting(String path) throws JAXBException {
+        File file = new File(path);
+        Assert.isTrue(file.exists(), path);
+        saveFile(file);
+    }
+    // StoryBoard_END
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/PropertiesLoaderTest.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/PropertiesLoaderTest.java
new file mode 100644 (file)
index 0000000..7371382
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.app.loader;
+
+import javax.xml.bind.JAXBException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.model.app.loader.jaxb.Properties;
+
+
+public final class PropertiesLoaderTest {
+    private static Logger logger = LoggerFactory.getLogger(PropertiesLoaderTest.class);
+    public Properties data = null;
+
+    public void test(String path) {
+        logger.info(path);
+        PropertiesLoader propertiesLoader = new PropertiesLoader();
+        Properties properties;
+        try {
+            properties = propertiesLoader.load(path + "2");
+            logger.info(properties.getShape());
+            properties.setShape("circle");
+            propertiesLoader.data = properties;
+            propertiesLoader.save(path + "3");
+        } catch (JAXBException e) {
+            e.printStackTrace();
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/jaxb/ObjectFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/jaxb/ObjectFactory.java
new file mode 100644 (file)
index 0000000..a8ec050
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.03.08 at 04:51:38 PM KST 
+//
+
+
+package org.tizen.efluibuilder.model.app.loader.jaxb;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each Java content interface and Java element interface
+ * generated in the org.tizen.efluibuilder.model.properties package.
+ * <p>
+ * An ObjectFactory allows you to programatically construct new instances of the Java representation
+ * for XML content. The Java representation of XML content can consist of schema derived interfaces
+ * and classes representing the binding of schema type definitions, element declarations and model
+ * groups. Factory methods for each of these are provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes
+     * for package: org.tizen.efluibuilder.model.properties
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link Properties }
+     * 
+     */
+    public Properties createProperties() {
+        return new Properties();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/jaxb/Properties.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/jaxb/Properties.java
new file mode 100644 (file)
index 0000000..cb564f0
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.03.08 at 04:51:38 PM KST 
+//
+
+
+package org.tizen.efluibuilder.model.app.loader.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>
+ * Java class for anonymous complex type.
+ * 
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="shape">
+ *           &lt;simpleType>
+ *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               &lt;enumeration value="square"/>
+ *               &lt;enumeration value="circle"/>
+ *             &lt;/restriction>
+ *           &lt;/simpleType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = { "shape", "view" })
+@XmlRootElement(name = "properties")
+public class Properties {
+
+    @XmlElement(required = true)
+    protected String shape;
+    // StoryBoard_START
+    @XmlElementWrapper(name = "storyboard")
+    @XmlElement(required = true)
+    protected List<ViewModel> view = new ArrayList<ViewModel>();
+
+    // StoryBoard_END
+
+    /**
+     * Gets the value of the shape property.
+     *
+     * @return possible object is {@link String }
+     *
+     */
+    public String getShape() {
+        return shape;
+    }
+
+    /**
+     * Sets the value of the shape property.
+     * 
+     * @param value
+     *            allowed object is {@link String }
+     * 
+     */
+    public void setShape(String value) {
+        this.shape = value;
+    }
+
+    // StoryBoard_START
+    public List<ViewModel> getViews() {
+        return view;
+    }
+
+    public void setViews(List<ViewModel> views) {
+        this.view = views;
+    }
+    // StoryBoard_END
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/jaxb/ViewModel.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/app/loader/jaxb/ViewModel.java
new file mode 100644 (file)
index 0000000..8f0ec36
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * UI Builder - StoryBoard
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.app.loader.jaxb;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "")
+public class ViewModel {
+    @XmlAttribute(name = "id")
+    private String id;
+    @XmlAttribute(name = "location_x")
+    private int locationX;
+    @XmlAttribute(name = "location_y")
+    private int locationY;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public int getLocationX() {
+        return locationX;
+    }
+
+    public void setLocationX(int locationX) {
+        this.locationX = locationX;
+    }
+
+    public int getLocationY() {
+        return locationY;
+    }
+
+    public void setLocationY(int locationY) {
+        this.locationY = locationY;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/AddPartCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/AddPartCommand.java
new file mode 100644 (file)
index 0000000..a3d9066
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.command;
+
+import org.eclipse.gef.commands.Command;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+
+public final class AddPartCommand extends Command {
+    private Part part = null;
+    private Part child = null;
+    private Part nextSibling = null;
+
+    public AddPartCommand(Part parent, Part child, Part nextSibling) {
+        this.part = parent;
+        this.child = child;
+        this.nextSibling = nextSibling;
+    }
+
+    @Override
+    public boolean canExecute() {
+        if (child.getType() != PartType.COMPONENT) {
+            // TODO There is no descriptor for the others(event, variation, configuration etc)
+            return true;
+        }
+
+        // FIXED: prevent ClassCastException
+        if ((this.part instanceof ComponentPart) && (this.child instanceof ComponentPart)) {
+            DocumentPart documentPart = this.part.getOwnerDocumentPart();
+            if (documentPart != null) {
+                ComponentDescriptor descriptor = documentPart.getComponentDescriptor();
+                if (descriptor != null) {
+                    return descriptor.canHaveChild((ComponentPart) this.part, (ComponentPart) this.child);
+                }
+            }
+        }
+
+        return false;
+    }
+
+    @Override
+    public void execute() {
+        Element parentElement = this.part.getElement();
+        /*
+         * Add new DOM element
+         */
+        Element childElement = makeElementFromPart(parentElement.getOwnerDocument(), part.getOwnerDocumentPart(), child);
+
+        if (this.nextSibling != null) {
+            parentElement.insertBefore(childElement, this.nextSibling.getElement());
+        } else {
+            parentElement.appendChild(childElement);
+        }
+    }
+
+    private Element makeElementFromPart(final Document ownerDocument, final DocumentPart documentPart, Part part) {
+        Element element = ownerDocument.createElement(part.getDescriptorId());
+
+        PartUtil.setPartToElement(element, part);
+        part.setElement(element);
+
+        if (part.hasProperty(LayoutSchemaConstants.ID) == false || part.getPropertyValue(LayoutSchemaConstants.ID).isEmpty()) {
+            documentPart.setPartPropertyIdRecursive(part);
+        }
+
+        for (String key : part.getProperties().keySet()) {
+            String propertyValue = part.getPropertyValue(key);
+            if (propertyValue != null && !propertyValue.isEmpty()) {
+                element.setAttribute(key, part.getPropertyValue(key));
+            }
+        }
+
+        for (int i = 0; i < part.getChildren().size(); i++) {
+            Element childElement = makeElementFromPart(ownerDocument, documentPart, part.getChildren().get(i));
+            element.appendChild(childElement);
+        }
+
+        return element;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/ChangeOrderPartCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/ChangeOrderPartCommand.java
new file mode 100644 (file)
index 0000000..3924265
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.command;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.wst.xml.core.internal.document.TextImpl;
+import org.tizen.efluibuilder.model.part.Part;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+public final class ChangeOrderPartCommand extends Command {
+    private Part parent = null;
+    private Part child = null;
+    private Part nextSibling = null;
+
+    public ChangeOrderPartCommand(Part child, Part nextSibling) {
+        this.parent = child.getParent();
+        this.child = child;
+        this.nextSibling = nextSibling;
+    }
+
+    @Override
+    public boolean canExecute() {
+        Part childParent = child.getParent();
+        if (childParent != null) {
+            if (nextSibling == null) {
+                return true;
+            }
+            if (childParent == nextSibling.getParent()) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    @Override
+    public void execute() {
+        Element parentElement = parent.getElement();
+        Element childElement = child.getElement();
+        Element nextElement = null;
+        if (nextSibling != null) {
+            nextElement = nextSibling.getElement();
+        }
+
+        Node previousNode = childElement.getPreviousSibling();
+        if (previousNode != null && previousNode instanceof TextImpl) {
+            parentElement.removeChild(previousNode);
+        }
+        parentElement.removeChild(childElement);
+
+        if (nextElement == null) {
+            parentElement.appendChild(childElement);
+        } else {
+            parentElement.insertBefore(childElement, nextElement);
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/DisableUndoCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/DisableUndoCommand.java
new file mode 100644 (file)
index 0000000..8badff4
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.command;
+
+import org.eclipse.gef.commands.CompoundCommand;
+
+
+public class DisableUndoCommand extends CompoundCommand {
+    @Override
+    public boolean canUndo() {
+        return false;
+    }
+
+    @Override
+    public boolean canRedo() {
+        return false;
+    }
+
+    @Override
+    public void undo() {
+        // Do nothing
+    }
+
+    @Override
+    public void redo() {
+        // Do nothing
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/EMFCommandAdapter.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/EMFCommandAdapter.java
new file mode 100644 (file)
index 0000000..a39a290
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.command;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.gef.commands.Command;
+
+/*
+ * We now use the EMFCommandStack instead of the GEFCommandStack.
+ * This class makes that GEFCommand can be executed in EMFCommandStack.
+ */
+public class EMFCommandAdapter extends AbstractCommand {
+    private Command gefCommand;
+
+    public EMFCommandAdapter(Command gefCommand) {
+        this.gefCommand = gefCommand;
+    }
+
+    @Override
+    public boolean canExecute() {
+        return gefCommand.canExecute();
+    }
+
+    @Override
+    public boolean canUndo() {
+        return gefCommand.canUndo();
+    }
+
+    @Override
+    public void dispose() {
+        gefCommand.dispose();
+    }
+
+    @Override
+    public void execute() {
+        gefCommand.execute();
+    }
+
+    @Override
+    public void redo() {
+        gefCommand.redo();
+    }
+
+    @Override
+    public void undo() {
+        gefCommand.undo();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/RemovePartCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/RemovePartCommand.java
new file mode 100644 (file)
index 0000000..c800aec
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.command;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.wst.xml.core.internal.document.TextImpl;
+import org.tizen.efluibuilder.model.part.Part;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+public final class RemovePartCommand extends Command {
+
+    private Part parentPart = null;
+    private Part childPart = null;
+
+    public RemovePartCommand(Part parent, Part child) {
+        this.parentPart = parent;
+        this.childPart = child;
+    }
+
+    @Override
+    public boolean canExecute() {
+        return true;
+    }
+
+    @Override
+    public void execute() {
+        Element parentElement = parentPart.getElement();
+        Element childElement = childPart.getElement();
+
+        // Remove white space in layout.xml
+        Node previousNode = childElement.getPreviousSibling();
+        if (previousNode != null && previousNode instanceof TextImpl) {
+            parentElement.removeChild(previousNode);
+        }
+
+        /*
+         * Remove exist DOM element
+         */
+        parentElement.removeChild(this.childPart.getElement());
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/SetPropertyPartCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/command/SetPropertyPartCommand.java
new file mode 100644 (file)
index 0000000..5fc102f
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.command;
+
+import org.eclipse.gef.commands.Command;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.w3c.dom.Element;
+
+
+public final class SetPropertyPartCommand extends Command {
+
+    private Part part = null;
+    private String name = null;
+    private String value = null;
+
+    public SetPropertyPartCommand(Part part, String name, String value) {
+        this.part = part;
+        this.name = name;
+        this.value = value;
+    }
+
+    @Override
+    public boolean canExecute() {
+        if (part instanceof ComponentPart) {
+            return true;
+//            return part.hasProperty(name);
+        }
+
+        // TODO check other part condition
+        return true;
+
+    }
+
+    @Override
+    public void execute() {
+        Element element = this.part.getElement();
+
+        /*
+         * change attribute of the DOM.
+         */
+        element.setAttribute(name, value);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/loader/jaxb/ObjectFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/loader/jaxb/ObjectFactory.java
new file mode 100644 (file)
index 0000000..38ed890
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.03.08 at 04:51:38 PM KST 
+//
+
+
+package org.tizen.efluibuilder.model.loader.jaxb;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each Java content interface and Java element interface
+ * generated in the org.tizen.efluibuilder.model.properties package.
+ * <p>
+ * An ObjectFactory allows you to programatically construct new instances of the Java representation
+ * for XML content. The Java representation of XML content can consist of schema derived interfaces
+ * and classes representing the binding of schema type definitions, element declarations and model
+ * groups. Factory methods for each of these are provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes
+     * for package: org.tizen.efluibuilder.model.properties
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link Properties }
+     * 
+     */
+    public Properties createProperties() {
+        return new Properties();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/loader/jaxb/Properties.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/loader/jaxb/Properties.java
new file mode 100644 (file)
index 0000000..076ac28
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.03.08 at 04:51:38 PM KST 
+//
+
+
+package org.tizen.efluibuilder.model.loader.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>
+ * Java class for anonymous complex type.
+ * 
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="shape">
+ *           &lt;simpleType>
+ *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               &lt;enumeration value="square"/>
+ *               &lt;enumeration value="circle"/>
+ *             &lt;/restriction>
+ *           &lt;/simpleType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = { "shape", "view" })
+@XmlRootElement(name = "properties")
+public class Properties {
+
+    @XmlElement(required = true)
+    protected String shape;
+    // StoryBoard_START
+    @XmlElementWrapper(name = "storyboard")
+    @XmlElement(required = true)
+    protected List<ViewModel> view = new ArrayList<ViewModel>();
+
+    // StoryBoard_END
+
+    /**
+     * Gets the value of the shape property.
+     * 
+     * @return possible object is {@link String }
+     * 
+     */
+    public String getShape() {
+        return shape;
+    }
+
+    /**
+     * Sets the value of the shape property.
+     * 
+     * @param value
+     *            allowed object is {@link String }
+     * 
+     */
+    public void setShape(String value) {
+        this.shape = value;
+    }
+
+    // StoryBoard_START
+    public List<ViewModel> getViews() {
+        return view;
+    }
+
+    public void setViews(List<ViewModel> views) {
+        this.view = views;
+    }
+    // StoryBoard_END
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/loader/jaxb/ViewModel.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/loader/jaxb/ViewModel.java
new file mode 100644 (file)
index 0000000..9cfda9a
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * UI Builder - StoryBoard
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.loader.jaxb;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "")
+public class ViewModel {
+    @XmlAttribute(name = "id")
+    private String id;
+    @XmlAttribute(name = "location_x")
+    private int locationX;
+    @XmlAttribute(name = "location_y")
+    private int locationY;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public int getLocationX() {
+        return locationX;
+    }
+
+    public void setLocationX(int locationX) {
+        this.locationX = locationX;
+    }
+
+    public int getLocationY() {
+        return locationY;
+    }
+
+    public void setLocationY(int locationY) {
+        this.locationY = locationY;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ComponentPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ComponentPart.java
new file mode 100644 (file)
index 0000000..93e0ffb
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+
+
+public class ComponentPart extends Part {
+    private ViewPart ownerViewPart = null;
+
+    public ComponentPart(String uniqueId, Part parentPart) {
+        super(uniqueId, parentPart, PartType.COMPONENT);
+    }
+
+    public ViewPart getOwnerViewPart() {
+        if (this instanceof ViewPart) {
+            return (ViewPart) this;
+        }
+
+        Part parent = getParent();
+        if (parent == null) {
+            return ownerViewPart;
+        } else if (this instanceof ViewPart) {
+            return (ViewPart) this;
+        } else if (parent instanceof ComponentPart) {
+            return ((ComponentPart) parent).getOwnerViewPart();
+        }
+        return null;
+    }
+
+    public void setOwnerViewPart(ViewPart viewPart) {
+        this.ownerViewPart = viewPart;
+    }
+
+    @Override
+    public void removeChild(Part child) {
+        if (children.remove(child)) {
+            if (child instanceof ComponentPart) { // set owner viewPart
+                ((ComponentPart) child).setOwnerViewPart(((ComponentPart) child).getOwnerViewPart());
+            }
+
+            this.addRemovedMutation(child);
+            child.setParent(null);
+        }
+    }
+
+    public List<EventPart> getEventParts(String eventName) {
+        List<EventPart> eventParts = new ArrayList<EventPart>();
+
+        for (Part child : getChildren()) {
+            if (child.getType() == PartType.EVENT) {
+                if (eventName.equals(child.getPropertyValue(LayoutSchemaConstants.EVENT_SIGNAL))) {
+                    eventParts.add((EventPart) child);
+                }
+            }
+        }
+
+        return eventParts;
+    }
+
+    public List<EventPart> getEventParts() {
+        List<EventPart> eventParts = new ArrayList<EventPart>();
+
+        for (Part child : getChildren()) {
+            if (child.getType() == PartType.EVENT) {
+                eventParts.add((EventPart) child);
+            }
+        }
+
+        return eventParts;
+    }
+
+    public List<VariationPart> getVariationParts() {
+        List<VariationPart> variationParts = new ArrayList<VariationPart>();
+
+        for (Part child : getChildren()) {
+            if (child.getType() == PartType.VARIATION) {
+                variationParts.add((VariationPart) child);
+            }
+        }
+
+        return variationParts;
+    }
+
+    public VariationPart getVariationPart(String ref) {
+        if (ref == null) {
+            return null;
+        }
+
+        List<VariationPart> variations = getVariationParts();
+        for (VariationPart variationPart : variations) {
+            if (variationPart.getPropertyValue(LayoutSchemaConstants.CONFIGURATION_REFERENCE).equals(ref)) {
+                return variationPart;
+            }
+        }
+
+        return null;
+    }
+
+    public String getPropertyValue(String configID, String key) {
+        String value = this.getPropertyValue(key);
+        VariationPart variationPart = getVariationPart(configID);
+        if (variationPart != null) {
+            String variationValue = variationPart.getPropertyValue(key);
+            if (variationValue != null) {
+                value = variationValue;
+            }
+        }
+        return value;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ConfigurationPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ConfigurationPart.java
new file mode 100644 (file)
index 0000000..915dc32
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.mscreen.configurator.MscreenConstants;
+
+
+public class ConfigurationPart extends Part {
+    public ConfigurationPart(String uniqueId, Part parentPart) {
+        super(uniqueId, parentPart, PartType.CONFIGURATION);
+    }
+
+    @Override
+    protected void addPropertyChangedMutation(String name, String value) {
+        PartMutation mutation = new PartMutation();
+        mutation.initConfigurePropertyChanged(this, name, value);
+        this.addMutation(mutation);
+    }
+
+    public boolean isCommon() {
+        // TODO FIXME
+        return MscreenConstants.CONFIGURATION_TYPE_COMMON.equals(getConfigurationType());
+    }
+
+    public String getName() {
+        return getPropertyValue(LayoutSchemaConstants.NAME);
+    }
+
+    public String getConfigurationType() {
+        return getPropertyValue(LayoutSchemaConstants.TYPE);
+    }
+
+    public String getDevice() {
+        return getPropertyValue(LayoutSchemaConstants.DEVICE);
+    }
+
+    public String getOrientation() {
+        return getPropertyValue(LayoutSchemaConstants.ORIENTATION);
+    }
+
+    public void setName(String name) {
+        setPropertyValue(LayoutSchemaConstants.NAME, name);
+    }
+
+    public void setConfigurationType(String type) {
+        setPropertyValue(LayoutSchemaConstants.TYPE, type);
+    }
+
+    public void setDevice(String device) {
+        setPropertyValue(LayoutSchemaConstants.DEVICE, device);
+    }
+
+    public void setOrientation(String orientation) {
+        setPropertyValue(LayoutSchemaConstants.ORIENTATION, orientation);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/DataBindingPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/DataBindingPart.java
new file mode 100644 (file)
index 0000000..41fcb62
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.model.part;
+
+import org.tizen.efluibuilder.model.util.IDGenerator;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+
+public class DataBindingPart extends Part {
+
+    private IDGenerator propertyIDGenerator = null;
+
+    public DataBindingPart(String uniqueId, ViewsPart parentPart) {
+        super(uniqueId, parentPart, PartType.DATABINDING);
+        propertyIDGenerator = new IDGenerator();
+    }
+
+    @Override
+    public void insertChildBefore(Part child, Part nextSibling) {
+        super.insertChildBefore(child, nextSibling);
+        if (child.hasProperty(LayoutSchemaConstants.ID) == false || child.getPropertyValue(LayoutSchemaConstants.ID).isEmpty()) {
+            this.setPartPropertyIdRecursive(child);
+        }
+    }
+
+    private void setPartPropertyIdRecursive(Part part) {
+        part.setPropertyValue(LayoutSchemaConstants.ID, generateUniquePropertyId(part.getDescriptorId()));
+        for (Part chid : part.getChildren()) {
+            setPartPropertyIdRecursive(chid);
+        }
+    }
+
+    private String generateUniquePropertyId(String descriptorId) {
+        return propertyIDGenerator.getID(descriptorId);
+    }
+
+    public void updateID() {
+        propertyIDGenerator.update(this);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/DocumentPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/DocumentPart.java
new file mode 100644 (file)
index 0000000..9945237
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+import java.util.List;
+
+import org.tizen.efluibuilder.core.configurator.Configurator;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.IDGenerator;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+
+
+public final class DocumentPart extends Part implements IPartChangedListener {
+
+    private String platform = null;
+    private Integer lastUniqueId = null;
+    private IDGenerator propertyIDGenerator = null;
+    private PartObserver observer = null;
+    private boolean isValidDocument = true;
+
+    public DocumentPart(String uniqueId) {
+        super(uniqueId, null, PartType.DOCUMENT);
+        lastUniqueId = -1;
+        propertyIDGenerator = new IDGenerator();
+        observer = new PartObserver(this);
+        observer.observe(this);
+    }
+
+    public void updateID() {
+        propertyIDGenerator.update(this);
+    }
+
+    public void setPlatform(String platform) {
+        this.platform = platform;
+    }
+
+    public String getPlatform() {
+        return platform;
+    }
+
+    public String generateUniquePropertyId(String descriptorId) {
+        return propertyIDGenerator.getID(descriptorId);
+    }
+
+    public String generateUniqueId() {
+        lastUniqueId++;
+        return lastUniqueId.toString();
+    }
+
+    public ComponentDescriptor getComponentDescriptor() {
+        Configurator configurator = Configurator.of(platform);
+        return new ComponentDescriptor(configurator.getDescriptorManager());
+    }
+
+    public void setPartUniqueIdRecursive(Part part) {
+        part.setUniqueId(generateUniqueId());
+        for (Part chid : part.getChildren()) {
+            setPartUniqueIdRecursive(chid);
+        }
+    }
+
+    public void setPartPropertyIdRecursive(Part part) {
+        if (!(part instanceof VariationPart) && !(part instanceof EventPart)) {
+            part.setPropertyValue(LayoutSchemaConstants.ID, generateUniquePropertyId(part.getDescriptorId()));
+        }
+
+        for (Part chid : part.getChildren()) {
+            setPartPropertyIdRecursive(chid);
+        }
+    }
+
+    @Override
+    public void partsChanged(List<PartMutation> mutations, PartObserver observer, String sender) {
+        for (PartMutation mutation : mutations) {
+            Part targetPart = mutation.getTargetPart();
+            if (targetPart == null) {
+                continue;
+            }
+
+            String mutationType = mutation.getType();
+            if (PartMutation.PROPERTY_CHANGED.equals(mutationType)) {
+                if (LayoutSchemaConstants.ID.equals(mutation.getPropertyName())) {
+                    propertyIDGenerator.updateID(targetPart.getPropertyValue("id"));
+                }
+            }
+        }
+    }
+
+    public boolean isValidDocument() {
+        return this.isValidDocument;
+    }
+
+    public void setValidDocument(boolean isValidDocument) {
+        this.isValidDocument = isValidDocument;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/EventPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/EventPart.java
new file mode 100644 (file)
index 0000000..23e47ba
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+public final class EventPart extends Part {
+    private int eventType = EventType.NONE;
+
+    public EventPart(String uniqueId, Part parentPart) {
+        super(uniqueId, parentPart, PartType.EVENT);
+    }
+
+    public void setEventType(int eventType) {
+        this.eventType = eventType;
+    }
+
+    public int getEventType() {
+        return eventType;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/EventType.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/EventType.java
new file mode 100644 (file)
index 0000000..9282323
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+public final class EventType {
+    public static final int NONE = -1;
+    public static final int GOTO = 0;
+    public static final int RUN_JAVASCRIPT_FUNCTION = 2; // deprecated
+    public static final int OPEN_URL = 3; // deprecated
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/IPartChangedListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/IPartChangedListener.java
new file mode 100644 (file)
index 0000000..b5bcb55
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.model.part;
+
+import java.util.List;
+
+
+public interface IPartChangedListener {
+    public void partsChanged(List<PartMutation> mutations, PartObserver observer, String sender);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/MScreenPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/MScreenPart.java
new file mode 100644 (file)
index 0000000..47092c9
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public final class MScreenPart extends Part {
+    public MScreenPart(String uniqueId, Part parentPart) {
+        super(uniqueId, parentPart, PartType.MSCREEN);
+    }
+
+    @Override
+    protected void addAddedMutation(Part child, Part nextSibling) {
+        PartMutation mutation = new PartMutation();
+        Part prev = child.getPreviousSibling();
+        Part next = child.getNextSibling();
+        List<Part> addedParts = new ArrayList<Part>();
+        addedParts.add(child);
+        mutation.initConfiguresAdded(this, addedParts, prev, next);
+        this.addMutation(mutation);
+    }
+
+    protected void addRemovedMutation(Part child) {
+        PartMutation mutation = new PartMutation();
+        Part prev = child.getPreviousSibling();
+        Part next = child.getNextSibling();
+        List<Part> removedParts = new ArrayList<Part>();
+        removedParts.add(child);
+        mutation.initConfiguresRemoved(this, removedParts, prev, next);
+        this.addMutation(mutation);
+    }
+
+    public ConfigurationPart getCommonConfigurationPart() {
+        for (Part part : this.getChildren()) {
+            if (part instanceof ConfigurationPart) {
+                ConfigurationPart configure = (ConfigurationPart) part;
+                if (configure.isCommon()) {
+                    return configure;
+                }
+            }
+        }
+
+        return null;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/Part.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/Part.java
new file mode 100644 (file)
index 0000000..f5f925b
--- /dev/null
@@ -0,0 +1,443 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+
+
+public abstract class Part implements Cloneable {
+
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
+
+    private final Object lockObj = new Object();
+
+    // Logical Data
+    private String uniqueId = "";
+    protected Element element = null;
+    private Part parent = null;
+    private int type = PartType.NONE;
+    private List<PartMutation> mutations = null;
+    private List<PartObserver> observers = null;
+    private String descriptorId = null;
+
+    // Model Data
+    protected ArrayList<Part> children = new ArrayList<Part>();
+    private Map<String, String> properties = new HashMap<String, String>();
+
+    private void Init() {
+        this.mutations = new ArrayList<PartMutation>();
+        this.observers = new ArrayList<PartObserver>();
+    }
+
+    public Part() {
+        this.Init();
+    }
+
+    protected Part(String uniqueId, Part parent, int type) {
+        setUniqueId(uniqueId);
+        setParent(parent);
+        setType(type);
+        this.Init();
+    }
+
+    protected void addAddedMutation(Part child, Part nextSibling) {
+        PartMutation mutation = new PartMutation();
+        Part prev = child.getPreviousSibling();
+        Part next = child.getNextSibling();
+        List<Part> addedParts = new ArrayList<Part>();
+        addedParts.add(child);
+        mutation.initPartsAdded(this, addedParts, prev, next);
+        this.addMutation(mutation);
+    }
+
+    protected void addRemovedMutation(Part child) {
+        PartMutation mutation = new PartMutation();
+        Part prev = child.getPreviousSibling();
+        Part next = child.getNextSibling();
+        List<Part> removedParts = new ArrayList<Part>();
+        removedParts.add(child);
+        mutation.initPartsRemoved(this, removedParts, prev, next);
+        this.addMutation(mutation);
+    }
+
+    protected void addOrderChangedMutation(Part child, Part nextSibling) {
+        PartMutation mutation = new PartMutation();
+        List<Part> movedParts = new ArrayList<Part>();
+        movedParts.add(child);
+        mutation.initPartsOrderChanged(this, movedParts);
+        this.addMutation(mutation);
+    }
+
+    protected void addPropertyChangedMutation(String name, String value) {
+        PartMutation mutation = new PartMutation();
+        mutation.initPropertyChanged(this, name, value);
+        this.addMutation(mutation);
+    }
+
+    protected void setPartUniqueId(Part part) {
+        DocumentPart doc = this.getOwnerDocumentPart();
+        if (doc != null) {
+            part.setUniqueId(doc.generateUniqueId());
+        }
+    }
+
+    public void dispose() {
+        children.clear();
+        properties.clear();
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        // Must compare about model data
+
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+
+        if (!this.uniqueId.equals(((Part) obj).uniqueId)) {
+            return false;
+        }
+
+        if (!children.equals(((Part) obj).children)) {
+            return false;
+        }
+
+        if (!properties.equals(((Part) obj).properties)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public Part clone() throws CloneNotSupportedException {
+        Part newPart = PartUtil.createPart(this.getType(), this.getDescriptorId());
+        for (Map.Entry<String, String> entry : getProperties().entrySet()) {
+            newPart.setPropertyValue(entry.getKey(), entry.getValue());
+        }
+        return newPart;
+    }
+
+    @Override
+    public int hashCode() {
+        return children.hashCode() + properties.hashCode() + uniqueId.hashCode();
+    }
+
+    public void insertChildBefore(Part child, Part nextSibling) {
+        // set part id;
+        //
+        if (this.getParent() != null) {
+            DocumentPart doc = this.getOwnerDocumentPart();
+            if (doc != null) {
+                if (child.hasProperty(LayoutSchemaConstants.ID) == false || child.getPropertyValue(LayoutSchemaConstants.ID).isEmpty()) {
+                    doc.setPartPropertyIdRecursive(child);
+                }
+            }
+        }
+
+        child.setParent(this);
+        int siblingIndex = this.children.indexOf(nextSibling);
+        if (siblingIndex < 0) {
+            this.children.add(child);
+        } else {
+            this.children.add(siblingIndex, child);
+        }
+        this.addAddedMutation(child, nextSibling);
+    }
+
+    public void moveChildBefore(Part child, Part nextSibling) {
+        if (this.children.contains(child)) {
+            this.children.remove(child);
+            int siblingIndex = this.children.indexOf(nextSibling);
+            if (siblingIndex < 0) {
+                this.children.add(child);
+            } else {
+                this.children.add(siblingIndex, child);
+            }
+            this.addOrderChangedMutation(child, nextSibling);
+        }
+    }
+
+    public void removeChild(Part child) {
+        if (children.contains(child)) {
+            this.addRemovedMutation(child);
+            children.remove(child);
+            child.setParent(null);
+            // Stack<Part> stackParts = new Stack<Part>();
+            // stackParts.add(child);
+            // while (stackParts.size() > 0) {
+            // Part part = stackParts.pop();
+            // part.setElement(null);
+            // stackParts.addAll(part.getChildren());
+            // }
+        }
+    }
+
+    public void removeAllChildren() {
+        Iterator<Part> iter = children.iterator();
+        while (iter.hasNext()) {
+            Part childPart = iter.next();
+            this.addRemovedMutation(childPart);
+            iter.remove();
+            childPart.setParent(null);
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public List<Part> getChildren() {
+        return (ArrayList<Part>) this.children.clone();
+        // return children;
+    }
+
+    public List<Part> getComponentChildren() {
+        List<Part> children = new ArrayList<Part>();
+        for (Part child : this.children) {
+            if (child instanceof ComponentPart) {
+                children.add(child);
+            }
+        }
+        return children;
+    }
+
+    public void setPropertyValue(String key, String value) {
+        if (value == null) {
+            return;
+        }
+        if (this.hasProperty(key) && this.getPropertyValue(key).equals(value)) {
+            // do nothing;
+        } else {
+            properties.put(key, value);
+
+            // FIXME
+            // if (!key.equals(LayoutSchemaConstants.ID))
+            this.addPropertyChangedMutation(key, value);
+        }
+    }
+
+    public String getPropertyValue(String key) {
+        return properties.get(key);
+    }
+
+    public boolean hasProperty(String name) {
+        return this.properties.containsKey(name);
+    }
+
+    public boolean removeProperty(String name) {
+        if (this.properties.containsKey(name)) {
+            this.properties.remove(name);
+            this.addPropertyChangedMutation(name, null);
+            return true;
+        }
+        return false;
+    }
+
+    public Map<String, String> getProperties() {
+        return properties;
+    }
+
+    public void setElement(Element element) {
+        this.element = element;
+    }
+
+    public Element getElement() {
+        return element;
+    }
+
+    public void setParent(Part parent) {
+        this.parent = parent;
+    }
+
+    public Part getParent() {
+        return parent;
+    }
+
+    public void setType(int type) {
+        this.type = type;
+    }
+
+    public int getType() {
+        return type;
+    }
+
+    public void setUniqueId(String uniqueId) {
+        this.uniqueId = uniqueId;
+    }
+
+    public String getUniqueId() {
+        return uniqueId;
+    }
+
+    public DocumentPart getOwnerDocumentPart() {
+        Part currentPart = this;
+        while (currentPart != null) {
+            if (currentPart.getType() == PartType.DOCUMENT) {
+                return (DocumentPart) currentPart;
+            }
+
+            currentPart = currentPart.getParent();
+        }
+
+        return null;
+    }
+
+    public void setDescriptorId(String id) {
+        this.descriptorId = id;
+    }
+
+    public String getDescriptorId() {
+        // FIXME : Return value is null or empty string that is a policy
+        return descriptorId;
+    }
+
+    public void addMutation(PartMutation mutation) {
+        synchronized (this.lockObj) { //
+            this.mutations.add(mutation);
+            if (this.parent != null) {
+                this.parent.addMutation(mutation);
+            }
+        }
+    }
+
+    public void registerObserver(PartObserver observer) {
+        this.observers.add(observer);
+    }
+
+    public void unregisterObserver(PartObserver observer) {
+        this.observers.remove(observer);
+    }
+
+    public void notifyObservers(String sender) {
+        synchronized (this.lockObj) {
+            /*
+             * List<Part> children = this.getChildren(); for (int i = 0; i < children.size(); i++) {
+             * children.get(i).notifyObservers(sender); }
+             */
+
+            List<PartMutation> unmodifiableList = Collections.unmodifiableList(this.mutations);
+            try {
+                List<Exception> exceptionList = new ArrayList<Exception>();
+                for (PartObserver observer : this.observers) {
+                    try {
+                        observer.notify(unmodifiableList, observer, sender);
+                    } catch (Exception e) {
+                        exceptionList.add(e);
+                        logger.error("Notification Error", e);
+                    }
+                }
+
+                if (!exceptionList.isEmpty()) {
+                    // TODO: throw exceptions and follow policy
+                }
+            } finally {
+                this.mutations.clear();
+            }
+        }
+    }
+
+    public int getIndex() {
+        if (this.parent != null) {
+            return parent.children.indexOf(this);
+        }
+        return -1;
+    }
+
+    public Part getNextSibling() {
+        if (this.parent != null) {
+            int index = parent.children.indexOf(this);
+            if (parent.children.size() > index + 1) {
+                return parent.children.get(index + 1);
+            }
+        }
+
+        return null;
+    }
+
+    public Part getPreviousSibling() {
+        if (this.parent != null) {
+            int index = parent.children.indexOf(this);
+            if (index > 0) {
+                return parent.children.get(index - 1);
+            }
+        }
+
+        return null;
+    }
+
+    public boolean isSameWith(Element element) {
+        if (element == null) {
+            return false;
+        }
+
+        // check same type
+        String elementNodeName = element.getNodeName();
+        if (elementNodeName.equals(this.getDescriptorId()) == false) {
+            return false;
+        }
+
+        Map<String, String> partProperties = this.getProperties();
+        NamedNodeMap elementAttributes = element.getAttributes();
+
+        // check a number of properties
+        if (elementAttributes.getLength() != partProperties.size()) {
+            return false;
+        }
+
+        // check each properties
+
+        for (Entry<String, String> property : partProperties.entrySet()) {
+            String key = property.getKey();
+            String partValue = property.getValue();
+            String elementValue = element.getAttribute(key);
+
+            if (partValue == null) {
+                if (elementValue == null) {
+                    continue;
+                }
+                return false;
+            }
+
+            if (partValue.equals(elementValue) == false) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/PartMutation.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/PartMutation.java
new file mode 100644 (file)
index 0000000..4735a7d
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.model.part;
+
+import java.util.List;
+
+
+public class PartMutation {
+    public final static String PARTS_ADDED = "parts_added";
+    public final static String PARTS_REMOVED = "parts_removed";
+    public final static String PARTS_ORDER_CHANGED = "parts_order_changed";
+    public final static String PROPERTY_CHANGED = "property_changed";
+    public final static String CONFIGURES_ADDED = "configures_added";
+    public final static String CONFIGURES_REMOVED = "configures_removed";
+    public final static String CONFIGURE_PROPERTY_CHANGED = "configure_property_changed";
+    public final static String CONNECTION_ADDED = "connection_added";
+    public final static String CONNECTION_REMOVED = "connection_removed";
+
+    protected String type = null;
+    protected Part targetPart = null;
+
+    protected List<Part> addedParts = null;
+    protected List<Part> removedParts = null;
+    protected List<Part> orderChangedParts = null;
+    protected Part previousSibling = null;
+    protected Part nextSibling = null;
+
+    protected String propertyName = null;
+    protected String oldValue = null;
+
+    public PartMutation() {
+
+    }
+
+    public String getType() {
+        return this.type;
+    }
+
+    public Part getTargetPart() {
+        return this.targetPart;
+    }
+
+    public List<Part> getAddedParts() {
+        return this.addedParts;
+    }
+
+    public List<Part> getRemovedParts() {
+        return this.removedParts;
+    }
+
+    public List<Part> getOrderChangedParts() {
+        return this.orderChangedParts;
+    }
+
+    public Part getPreviousSibling() {
+        return this.previousSibling;
+    }
+
+    public Part getNextSibling() {
+        return this.nextSibling;
+    }
+
+    public String getPropertyName() {
+        return this.propertyName;
+    }
+
+    public String getOldValue() {
+        return this.oldValue;
+    }
+
+    public void initPartsAdded(Part targetPart, List<Part> addedParts, Part prevSibling, Part nextSibling) {
+        this.type = PartMutation.PARTS_ADDED;
+        this.targetPart = targetPart;
+        this.addedParts = addedParts;
+        this.previousSibling = prevSibling;
+        this.nextSibling = nextSibling;
+    }
+
+    public void initPartsRemoved(Part targetPart, List<Part> removedParts, Part prevSibling, Part nextSibling) {
+        this.type = PartMutation.PARTS_REMOVED;
+        this.targetPart = targetPart;
+        this.removedParts = removedParts;
+        this.previousSibling = prevSibling;
+        this.nextSibling = nextSibling;
+    }
+
+    public void initPropertyChanged(Part targetPart, String properyName, String oldValue) {
+        this.type = PartMutation.PROPERTY_CHANGED;
+        this.targetPart = targetPart;
+        this.propertyName = properyName;
+        this.oldValue = oldValue;
+    }
+
+    public void initConfiguresAdded(Part targetPart, List<Part> addedParts, Part prevSibling, Part nextSibling) {
+        this.initPartsAdded(targetPart, addedParts, prevSibling, nextSibling);
+        this.type = PartMutation.CONFIGURES_ADDED;
+    }
+
+    public void initConfiguresRemoved(Part targetPart, List<Part> removedParts, Part prevSibling, Part nextSibling) {
+        this.initPartsRemoved(targetPart, removedParts, prevSibling, nextSibling);
+        this.type = PartMutation.CONFIGURES_REMOVED;
+
+    }
+
+    public void initConfigurePropertyChanged(Part targetPart, String properyName, String oldValue) {
+        this.initPropertyChanged(targetPart, properyName, oldValue);
+        this.type = PartMutation.CONFIGURE_PROPERTY_CHANGED;
+    }
+
+    public void initConnectionAdded(Part targetPart) {
+        this.type = PartMutation.CONNECTION_ADDED;
+        this.targetPart = targetPart;
+    }
+
+    public void initConnectionRemoved(Part targetPart) {
+        this.type = PartMutation.CONNECTION_REMOVED;
+        this.targetPart = targetPart;
+    }
+
+    public void initPartsOrderChanged(Part targetPart, List<Part> movedParts) {
+        this.type = PartMutation.PARTS_ORDER_CHANGED;
+        this.targetPart = targetPart;
+        this.orderChangedParts = movedParts;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/PartObserver.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/PartObserver.java
new file mode 100644 (file)
index 0000000..7bd2107
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.model.part;
+
+import java.util.List;
+
+
+public class PartObserver {
+    public static final String MESSAGE_GEF_EXECUTE = "EXECUTE";
+    public static final String MESSAGE_GEF_UNDO = "UNDO";
+    public static final String MESSAGE_GEF_REDO = "REDO";
+    public static final String MESSAGE_VALID_XML = "VALID XML";
+    public static final String MESSAGE_INVALID_XML = "INVALID XML";
+
+    private IPartChangedListener listener = null;
+    private Part target = null;
+
+    public PartObserver(IPartChangedListener listener) {
+        this.listener = listener;
+    }
+
+    public void observe(Part part) {
+        this.target = part;
+        this.target.registerObserver(this);
+    }
+
+    public void disconnect() {
+        this.target.unregisterObserver(this);
+        this.target = null;
+    }
+
+    public void notify(List<PartMutation> mutations, PartObserver observer, String sender) {
+        this.listener.partsChanged(mutations, observer, sender);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/PartType.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/PartType.java
new file mode 100644 (file)
index 0000000..397addf
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+public final class PartType {
+    public static final int NONE = -1;
+    public static final int DOCUMENT = 0;
+    public static final int CONFIGURATION = 1;
+    public static final int COMPONENT = 2;
+    public static final int VIEW = 3;
+    public static final int EVENT = 4;
+    public static final int VARIATION = 5;
+    public static final int MSCREEN = 6;
+    public static final int VIEWS = 7;
+    public static final int DATABINDING = 8;
+    public static final int DATASOURCE = 9;
+    public static final int DATAMODEL = 10;
+    public static final int BINDINGOBJECT = 11;
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/VariationPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/VariationPart.java
new file mode 100644 (file)
index 0000000..110cdc7
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+public final class VariationPart extends Part {
+    public VariationPart(String uniqueId, Part parentPart) {
+        super(uniqueId, parentPart, PartType.VARIATION);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ViewPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ViewPart.java
new file mode 100644 (file)
index 0000000..c7f1528
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+public final class ViewPart extends ComponentPart {
+    int viewType = ViewType.VIEW;
+
+    public ViewPart(String uniqueId, Part parentPart) {
+        super(uniqueId, parentPart);
+        setType(PartType.VIEW);
+    }
+
+    @Override
+    public void removeChild(Part child) {
+        if (children.remove(child)) {
+               if (child instanceof ComponentPart) { // set owner viewPart
+                ((ComponentPart) child).setOwnerViewPart(this);
+            }
+               this.addRemovedMutation(child);
+               child.setParent(null);
+        }
+    }
+
+    public void setViewType(int viewType) {
+        this.viewType = viewType;
+    }
+
+    public int getViewType() {
+        return this.viewType;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ViewType.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ViewType.java
new file mode 100644 (file)
index 0000000..17ca4b2
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+public final class ViewType {
+    public static final int VIEW = 0;
+    public static final int POPUP = 1;
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ViewsPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/part/ViewsPart.java
new file mode 100644 (file)
index 0000000..eff2289
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.part;
+
+public final class ViewsPart extends Part {
+    public ViewsPart(String uniqueId, Part parentPart) {
+        super(uniqueId, parentPart, PartType.VIEWS);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/Constants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/Constants.java
new file mode 100644 (file)
index 0000000..3235527
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.renderDataGenerator;
+
+//FIXME 
+//Need to be merge with LayoutSchemaConstants
+public class Constants {
+    public static final String EMPTY = ""; //$NON-NLS-1$
+    public static final String COLON = ":"; //$NON-NLS-1$
+    public static final String SEMICOLON = ";"; //$NON-NLS-1$
+    public static final String PART_TEXT = "html.text"; //$NON-NLS-1$
+    public static final String PX = "px"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_PART_ID = "part-id"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_STYLE = "style"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_VALUE_WIDTH = "width"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_VALUE_HEIGHT = "height"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_VALUE_PX = PX;
+    public static final String ATTRIBUTE_TEXT = "text"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_LABEL = "label"; //$NON-NLS-1$
+
+    public static final String ATTRIBUTE_SRC = "src"; //$NON-NLS-1$
+    public static final String ATTRIBUTE_END_IMAGE_PATH = "end_image_path"; //$NON-NLS-1$
+    public static final String PROPERTY_GROUP_PREFIX = "group"; //$NON-NLS-1$
+
+    public static final String LOCALE_KEY = "@locale/"; //$NON-NLS-1$
+    public static final String RESOURCE_KEY = "@resource/";
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/RenderDataGenerator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/RenderDataGenerator.java
new file mode 100644 (file)
index 0000000..7ece853
--- /dev/null
@@ -0,0 +1,362 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.renderDataGenerator;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.BuilderPlugin;
+import org.tizen.efluibuilder.core.configuration.device.Device;
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.MScreenPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.renderDataGenerator.reversetable.LayoutReverseConverterTable;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.mscreen.rm.ResourceManagerUtil;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+import org.tizen.efluibuilder.utility.XMLUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+import edjResourceSyncManager.EdjResourceSyncManager;
+import edjResourceSyncManager.ResourceFileDuplicator;
+
+
+public final class RenderDataGenerator {
+    private static final String RENDER_SCRIPT = "/res/xsl/render_script.xsl";
+    private Document xsl = null;
+    private String profile = null;
+    private String version = null;
+    private Path resPath = null;
+    ResourceManagerUtil rmUtil = null;
+
+    private DocumentBuilder docBuilder = null;
+    private ResourceFileDuplicator resFileDuplicator = null;
+    private EdjResourceSyncManager edjResSyncMgr = null;
+
+    public RenderDataGenerator(IProject project, String profile, String version, ResourceFileDuplicator resFileDuplicator,
+            EdjResourceSyncManager edjResSyncMgr) {
+        this.profile = profile;
+        this.version = version;
+        this.rmUtil = new ResourceManagerUtil(project);
+        this.resPath = Paths.get(project.getLocation().toString() + "/res");
+        this.resFileDuplicator = resFileDuplicator;
+        this.edjResSyncMgr = edjResSyncMgr;
+        try {
+            load();
+        } catch (ParserConfigurationException e) {
+            throw new RenderDataGeneratorException();
+        } catch (SAXException e) {
+            throw new RenderDataGeneratorException();
+        } catch (IOException e) {
+            throw new RenderDataGeneratorException();
+        }
+    }
+
+    private DocumentBuilder getDocBuilder() {
+        if (this.docBuilder == null) {
+            try {
+                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+                this.docBuilder = factory.newDocumentBuilder();
+            } catch (ParserConfigurationException e) {
+                throw new RenderDataGeneratorException();
+            }
+        }
+        return this.docBuilder;
+    }
+
+    private Document createtDocument() {
+        return this.getDocBuilder().newDocument();
+    }
+
+    private Element createElement(Document document, String tagName) {
+        return document.createElement(tagName);
+    }
+
+    public String getJsonDataFromPart(Part part, String locale, Device device, String orientation) {
+        try {
+            Part docPart = part.getOwnerDocumentPart();
+            if (docPart == null) {
+                return null;
+            }
+            Document document = createtDocument();
+
+            // create document part
+            Element documentElement = this.createElement(document, "tizen.doc"); // TODO : FIXME
+
+            documentElement.setAttribute(Constants.ATTRIBUTE_PART_ID, docPart.getUniqueId());
+            Element partElement = this.partToElement(document, part, getCurrentConfigurationID(part, device, orientation), locale, device);
+
+            documentElement.appendChild(partElement);
+            document.appendChild(documentElement);
+
+            String renderData = XMLUtil.transform(document, xsl);
+            return renderData;
+        } catch (TransformerException e) {
+            throw new RenderDataGeneratorException();
+        } catch (IOException e) {
+            throw new RenderDataGeneratorException();
+        }
+    }
+
+    public Element partToElement(Document document, Part part, String currentConfigID, String locale, Device device) {
+        Element element = null;
+        String tagName;
+        if (part instanceof ViewPart) {
+            tagName = LayoutReverseConverterTable.convertElement(profile, LayoutSchemaConstants.VIEW);
+        } else {
+            tagName = LayoutReverseConverterTable.convertElement(profile, part.getDescriptorId());
+        }
+
+        element = this.createElement(document, tagName);
+        element.setAttribute(Constants.ATTRIBUTE_PART_ID, part.getUniqueId());
+
+        // this.setStyles(part, parentElement, element);
+        // if (part.getType() == PartType.COMPONENT) {
+        if (part instanceof ComponentPart) {
+            setStyles(document, element, (ComponentPart) part);
+            setProperties(element, (ComponentPart) part, currentConfigID, locale, device);
+        }
+
+        // create element recursively
+        for (Part child : part.getChildren()) {
+            if (child.getType() == PartType.COMPONENT) {
+                Element childElement = partToElement(document, child, currentConfigID, locale, device);
+                if (childElement != null) {
+                    element.appendChild(childElement);
+                }
+            }
+        }
+        return element;
+    }
+
+    private String getCurrentConfigurationID(Part part, Device device, String orientation) {
+        Part docPart = part.getOwnerDocumentPart();
+        for (Part child : docPart.getChildren()) {
+            if (child instanceof MScreenPart) {
+                for (Part configuration : child.getChildren()) {
+                    if (device.getName().equals(configuration.getPropertyValue(LayoutSchemaConstants.DEVICE))
+                            && orientation.equals(configuration.getPropertyValue(LayoutSchemaConstants.ORIENTATION))) {
+                        return configuration.getPropertyValue(LayoutSchemaConstants.ID);
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    private InputStream openStream(String name) throws IOException {
+        Bundle bundle = Platform.getBundle(BuilderPlugin.PLUGIN_ID);
+        if (bundle != null) {
+            URL url = bundle.getResource(name);
+            if (url == null) {
+                throw new IOException();
+            }
+            InputStream stream = url.openStream();
+            return stream;
+        }
+        return null;
+    }
+
+    private void load() throws ParserConfigurationException, SAXException, IOException {
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setNamespaceAware(true);
+        DocumentBuilder builder = factory.newDocumentBuilder();
+        InputStream is = null;
+        try {
+            is = openStream(RENDER_SCRIPT);
+            if (is != null) {
+                xsl = builder.parse(is);
+            }
+        } finally {
+            if (is != null) {
+                is.close();
+            }
+        }
+    }
+
+    private void setStyles(Document document, Element element, ComponentPart part) {
+        ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+        if (!componentDescriptor.canBeVisibleBorder(part)) {
+            return;
+        }
+
+        Assert.isTrue(false);
+        // Adds height style attribute.
+        String heightString = componentDescriptor.getFeedbackHeight(part);
+        if (heightString != null && !heightString.isEmpty()) {
+            String widthString = componentDescriptor.getFeedbackWidth(part);
+            String widthValue = Constants.EMPTY;
+            if (widthString != null && !widthString.isEmpty()) {
+                int width = Integer.valueOf(widthString);
+                widthValue = Constants.ATTRIBUTE_VALUE_WIDTH + Constants.COLON + width + Constants.ATTRIBUTE_VALUE_PX + Constants.SEMICOLON;
+            }
+            String value = widthValue;
+            int height = Integer.valueOf(heightString).intValue();
+            value = widthValue + Constants.ATTRIBUTE_VALUE_HEIGHT + Constants.COLON + height + Constants.ATTRIBUTE_VALUE_PX;
+            element.setAttribute(Constants.ATTRIBUTE_STYLE, value);
+            Element textElem = this.createElement(document, Constants.PART_TEXT);
+            textElem.setAttribute(Constants.ATTRIBUTE_TEXT, componentDescriptor.getGuideText(part));
+            element.appendChild(textElem);
+        }
+    }
+
+    private void setProperties(Element element, ComponentPart part, String currentConfigID, String locale, Device device) {
+        ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+        String widgetId = LayoutReverseConverterTable.convertElement(profile, part.getDescriptorId());
+        String parentWidgetId = LayoutReverseConverterTable.convertElement(profile, (part.getParent()).getDescriptorId());
+
+        ComponentPart parentPart = null;
+        if (part.getParent() instanceof ComponentPart) {
+            parentPart = (ComponentPart) part.getParent();
+        }
+        List<PropertyDescriptor> properties = componentDescriptor.getPropertyDescriptors(parentPart, part);
+        for (PropertyDescriptor property : properties) {
+            String originPropertyName = property.getPropertyName();
+            String value = part.getPropertyValue(currentConfigID, originPropertyName);
+            if (value == null) {
+                continue;
+            }
+
+            // temp reverse converting table
+            String propertyName = LayoutReverseConverterTable.convertAttribute(parentWidgetId, widgetId, originPropertyName);
+            value = LayoutReverseConverterTable.convertValue(parentWidgetId, widgetId, propertyName, value);
+            if (propertyName.equals(Constants.ATTRIBUTE_TEXT) || propertyName.equals(Constants.ATTRIBUTE_LABEL)) {
+                if (value.regionMatches(true, 0, Constants.LOCALE_KEY, 0, Constants.LOCALE_KEY.length())) {
+
+                    String msg = rmUtil.getMsg(value.substring(Constants.LOCALE_KEY.length()), locale);
+                    if (msg == null) {
+                        // no current locale
+                        value = value.substring(Constants.LOCALE_KEY.length());
+                    } else if (msg.equals("")) {
+                        // no default string(no KEY)
+                        value = value.substring(Constants.LOCALE_KEY.length());
+                    } else {
+                        value = msg;
+                    }
+                }
+            }
+            // for RM - The alternative resource support 2.4 platform upper
+            else if (ResourceManagerUtil.isAlternativeResourceSupport(version)) {
+                if (isResProperty(property.getPropertyName())) {
+                    if (value.regionMatches(true, 0, Constants.RESOURCE_KEY, 0, Constants.RESOURCE_KEY.length())) {
+                        String resource = rmUtil.getResourcePath(value.substring(Constants.RESOURCE_KEY.length()), device.getDPI(), locale);
+                        if (resource != null) {
+                            value = resource;
+                        }
+                    }
+                }
+            }
+
+            value = changeEnumValue(property, value);
+
+            if (property.getPropertyType().equals(TypeDescriptor.ID_OF_HTMLSTRING)) {
+                Assert.isTrue(false);
+                element.setTextContent(value);
+            } else if (property.getPropertyType().indexOf(Constants.PROPERTY_GROUP_PREFIX) != 0) {
+                element.setAttribute(propertyName, value);
+            }
+
+            if (value != null && !value.isEmpty() && isResProperty(originPropertyName)) {
+                Path absPath = resPath.resolve(value).normalize();
+                edjResSyncMgr.addObserveTargetPath(resPath.relativize(absPath).toString());
+                if (PlatformUtil.getOS().equals(PlatformUtil.OS_WIN32)) {
+                    value = resFileDuplicator.copyFileToTempFolder(absPath.toString());
+                } else {
+                    value = absPath.toString();
+                }
+
+                if (value != null) {
+                    element.setAttribute(propertyName, value);
+                }
+            }
+
+        }
+    }
+
+    private boolean isResProperty(String propertyName) {
+        if (LayoutSchemaConstants.SRC.equals(propertyName) || LayoutSchemaConstants.IMAGE_PATH.equals(propertyName)
+                || Constants.ATTRIBUTE_END_IMAGE_PATH.equals(propertyName)) {
+            return true;
+        }
+        return false;
+    }
+
+    private String changeEnumValue(PropertyDescriptor property, String value) {
+        TypeDescriptor typeDescriptor = property.getTypeDescriptor();
+        if (typeDescriptor == null) {
+            return value;
+        }
+
+        List<ConstantDescriptor> constants = typeDescriptor.getAvailableConstant();
+        if ((constants == null) || (constants.isEmpty())) {
+            return value;
+        }
+
+        String changedValue = value;
+        for (ConstantDescriptor constant : constants) {
+            if (value.equals(constant.getDisplayName())) {
+                changedValue = constant.getValue();
+            }
+        }
+        return changedValue;
+    }
+
+    public String getRealPathFromResourceProperty(Part part, String propertyName, Device device, String locale) {
+        String ret = part.getPropertyValue(propertyName);
+        if (ResourceManagerUtil.isAlternativeResourceSupport(version) == false || part.getPropertyValue(propertyName) == null ||
+                !isResProperty(propertyName)) {
+            return ret;
+        }
+
+        String value = part.getPropertyValue(propertyName);
+        if (value.regionMatches(true, 0, Constants.RESOURCE_KEY, 0, Constants.RESOURCE_KEY.length())) {
+            String resource = rmUtil.getResourcePath(value.substring(Constants.RESOURCE_KEY.length()), device.getDPI(), locale);
+            if (resource != null) {
+                return resource;
+            }
+        }
+        return ret;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/RenderDataGeneratorException.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/RenderDataGeneratorException.java
new file mode 100644 (file)
index 0000000..530c668
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.renderDataGenerator;
+
+public final class RenderDataGeneratorException extends RuntimeException {
+
+    private static final long serialVersionUID = -1339463271450273863L;
+
+    /**
+     * Constructs an {@code CodeGeneratorException} with {@code null} as its error detail message.
+     */
+    public RenderDataGeneratorException() {
+        super();
+    }
+
+    /**
+     * Constructs an {@code CodeGeneratorException} with the specified detail message.
+     * 
+     * @param message
+     *            The detail message (which is saved for later retrieval by the
+     *            {@link #getMessage()} method)
+     */
+    public RenderDataGeneratorException(String message) {
+        super(message);
+    }
+
+    public RenderDataGeneratorException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/AttributeTable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/AttributeTable.java
new file mode 100644 (file)
index 0000000..af0f920
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.renderDataGenerator.reversetable;
+
+final class AttributeTable {
+
+    private static final int ELEMENT = 0;
+    private static final int PARENT_ELEMENT = 0;
+    private static final int NEW_ATTRIBUTE = 1;
+    private static final int OLD_ATTRIBUTE = 2;
+
+    private static String[][] replaceAttribute = {
+            // element, new attr, old_attr
+            { "efl.bg", "src", "image-path" }, { "efl.box", "direction", "horizontal" }, { "efl.calendar", "min_year", "min-year" },
+            { "efl.calendar", "max_year", "max-year" }, { "efl.calendar", "select-mode", "select_mode" }, { "efl.ctxpopup", "direction", "horizontal" },
+            { "efl.ctxpopupitem", "text", "label" }, { "efl.entry", "scroll", "scrollable" }, { "efl.entry", "single_line", "single-line" },
+            { "efl.entry", "context_menu", "context-menu-disabled" }, { "efl.entry", "file_text_format", "text-format" }, { "efl.entry", "src", "file-path" },
+            { "efl.flipselectoritem", "text", "label" }, { "efl.gengrid", "select_mode", "select-mode" }, { "efl.gengrid", "direction", "horizontal" },
+            { "efl.gengrid", "item_size_w", "item-size-w" }, { "efl.gengrid", "item_size_h", "item-size-h" }, { "efl.gengrid", "multi_select", "multi-select" },
+            { "efl.gengrid", "scrollbar_h", "policy-h" }, { "efl.gengrid", "scrollbar_v", "policy-v" }, { "efl.gengriditem", "src", "image-path" },
+            { "efl.genlist", "select_mode", "select-mode" }, { "efl.genlist", "item_style", "item-style" }, { "efl.genlist", "scrollbar_h", "policy-h" },
+            { "efl.genlist", "scrollbar_v", "policy-v" }, { "efl.genlistitem", "text", "label" }, { "efl.genlistitem", "sub_text", "sub-label" },
+            { "efl.genlistitem", "end_image_path", "end-image-path" }, { "efl.genlistitem", "end_standard_icon", "end-standard-icon" },
+            { "efl.genlistitem", "image_path", "image-path" }, { "efl.genlistitem", "item_type", "item-type" },
+            { "efl.genlistitem", "standard_icon", "standard-icon" }, { "efl.grid", "vsize_w", "col_count" },
+            { "efl.grid", "vsize_h", "row_count" }, { "efl.image", "src", "image-path" }, { "efl.image", "aspect_fixed", "aspect-fixed" },
+            { "efl.image", "fill_outside", "fill-outside" }, { "efl.image", "resizable_up", "resizable-up" },
+            { "efl.image", "resizable_down", "resizable-down" }, { "efl.image", "no_scale", "no-scale" }, { "efl.index", "autohide", "autohide-disabled" },
+            { "efl.index", "indicator", "indicator-disabled" }, { "efl.index", "direction", "horizontal" }, { "efl.label", "wrap_width", "wrap-width" },
+            { "efl.label", "line_wrap", "wrap-set" },
+            { "efl.layout", "src", "file-path" }, { "efl.layout", "group", "group-name" }, { "efl.list", "direction", "horizontal" },
+            { "efl.list", "select_mode", "select-mode" }, { "efl.list", "multi_select", "multi-select" }, { "efl.list", "scrollbar_h", "policy-h" },
+            { "efl.list", "scrollbar_v", "policy-v" }, { "efl.listitem", "text", "label" }, { "efl.map", "zoom_level", "zoom-level" },
+            { "efl.map", "longitude", "region-lon" }, { "efl.map", "latitude", "region-lat" }, { "efl.panes", "direction", "horizontal" },
+            { "efl.panes", "right_size", "right-size" }, { "efl.progressbar", "direction", "horizontal" }, { "efl.progressbar", "span_size", "span-size" },
+            { "efl.radio", "state_value", "state-value" }, { "efl.scroller", "content_min_w", "min-limit-w" },
+            { "efl.scroller", "content_min_h", "min-limit-h" }, { "efl.scroller", "propagate_events", "propagate-events" },
+            { "efl.scroller", "scrollbar_h", "policy-h" }, { "efl.scroller", "scrollbar_v", "policy-v" }, { "efl.slider", "indicator", "show-indicator" },
+            { "efl.slider", "direction", "horizontal" }, { "efl.slider", "indicator_format", "indicator-format" }, { "efl.table", "cols", "col_count" },
+            { "efl.table", "rows", "row_count" }, { "efl.toolbar", "select_mode", "select-mode" }, { "efl.toolbar", "icon_size", "icon-size" },
+            { "efl.toolbar", "direction", "horizontal" }, { "efl.toolbar", "shrink_mode", "shrink-mode" },
+            { "efl.toolbar", "transverse_expand", "transverse-expanded" }, { "efl.toolbaritem", "src", "image-path" }, { "efl.toolbaritem", "text", "label" },
+            { "tizen.view", "location_x", "location-x" }, { "tizen.view", "location_y", "location-y" },
+            { "tizen.view", "screen_orientation", "screen-orientation" }, { "efl.circlegenlistitem", "image_path", "image-path" },
+            { "efl.circlegenlistitem", "end_image_path", "end-image-path" }, { "efl.circlegenlistitem", "text", "label" },
+            { "efl.circlegenlistitem", "sub_text", "sub-label" }, { "efl.circlegenlistitem", "item_style", "item-style" },
+            { "efl.circlescroller", "content_min_w", "min-limit-w" }, { "efl.circlescroller", "content_min_h", "min-limit-h" },
+            { "efl.circlescroller", "propagate_events", "propagate-events" }, };
+
+    private static String[][] commonReplaceAttribute = {
+            // new attr, old attr
+            { "align_h", "align-x" }, { "align_v", "align-y" }, { "weight_h", "weight-x" }, { "weight_v", "weight-y" }, };
+
+    private static String[][] packReplaceAttribute = {
+            // parent, source_attr, target_attr
+            { "efl.grid", "pack_x", "pack-left" }, { "efl.grid", "pack_y", "pack-top" }, { "efl.grid", "pack_w", "pack-width" },
+            { "efl.grid", "pack_h", "pack-height" }, { "efl.table", "pack_col", "pack-left" }, { "efl.table", "pack_row", "pack-top" },
+            { "efl.table", "col_span", "pack-width" }, { "efl.table", "row_span", "pack-height" }, { "efl.table", "row_span", "pack-height" },
+            { "efl.panes", "pack", "pack-left" }, };
+
+    static String getReplaceAttribute(String elem, String attr) {
+        for (int i = 0; i < replaceAttribute.length; i++) {
+            String[] array = replaceAttribute[i];
+            if (array[ELEMENT].equals(elem)) {
+                if (array[NEW_ATTRIBUTE].equals(attr)) {
+                    return array[OLD_ATTRIBUTE];
+                }
+            }
+        }
+        return null;
+    }
+
+    static String getCommonReplaceAttribute(String attr) {
+        for (int i = 0; i < commonReplaceAttribute.length; i++) {
+            String[] array = commonReplaceAttribute[i];
+            if (array[ELEMENT].equals(attr)) {
+                return array[NEW_ATTRIBUTE];
+            }
+        }
+        return null;
+    }
+
+    static String getPackReplaceAttribute(String parentElem, String attr) {
+        for (int i = 0; i < packReplaceAttribute.length; i++) {
+            String[] array = packReplaceAttribute[i];
+            if (array[PARENT_ELEMENT].equals(parentElem)) {
+                if (array[NEW_ATTRIBUTE].equals(attr)) {
+                    return array[OLD_ATTRIBUTE];
+                }
+            }
+        }
+        return null;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/ElementTable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/ElementTable.java
new file mode 100644 (file)
index 0000000..02cf2eb
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.renderDataGenerator.reversetable;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+
+final class ElementTable {
+    private static Map<String, String> replaceElement = createElementMap();
+
+    private static Map<String, String> createElementMap() {
+        Map<String, String> element = new HashMap<String, String>();
+        element.put("bg", "efl.bg");
+        element.put("box", "efl.box");
+        element.put("button", "efl.button");
+        element.put("calendar", "efl.calendar");
+        element.put("check", "efl.check");
+        element.put("colorselector", "efl.colorselector");
+        element.put("ctxpopup", "efl.ctxpopup");
+        element.put("ctxpopupitem", "efl.ctxpopupitem");
+        element.put("datetime", "efl.datetime");
+        element.put("entry", "efl.entry");
+        element.put("flipselector", "efl.flipselector");
+        element.put("flipselectoritem", "efl.flipselectoritem");
+        element.put("gengrid", "efl.gengrid");
+        element.put("gengriditem", "efl.gengriditem");
+        element.put("genlist", "efl.genlist");
+        element.put("genlistitem", "efl.genlistitem");
+        element.put("grid", "efl.grid");
+        element.put("hoversel", "efl.hoversel");
+        element.put("hoverselitem", "efl.hoverselitem");
+        element.put("icon", "efl.icon");
+        element.put("image", "efl.image");
+        element.put("index", "efl.index");
+        element.put("indexitem", "efl.indexitem");
+        element.put("label", "efl.label");
+        element.put("layout", "efl.layout");
+        element.put("list", "efl.list");
+        element.put("listitem", "efl.listitem");
+        element.put("map", "efl.map");
+        element.put("multibuttonentry", "efl.multibuttonentry");
+        element.put("multibuttonentryitem", "efl.multibuttonentryitem");
+        element.put("panel", "efl.panel");
+        element.put("panes", "efl.panes");
+        element.put("popup", "efl.popup");
+        element.put("progressbar", "efl.progressbar");
+        element.put("radio", "efl.radio");
+        element.put("rect", "efl.rect");
+        element.put("scroller", "efl.scroller");
+        element.put("slider", "efl.slider");
+        element.put("spinner", "efl.spinner");
+        element.put("table", "efl.table");
+        element.put("toolbar", "efl.toolbar");
+        element.put("toolbaritem", "efl.toolbaritem");
+        element.put("view", "tizen.view");
+        return Collections.unmodifiableMap(element);
+    }
+
+    private static Map<String, String> wearableElement = createWearableElementMap();
+
+    private static Map<String, String> createWearableElementMap() {
+        Map<String, String> element = new HashMap<String, String>();
+        element.put("datetime", "efl.circledatetime");
+        element.put("genlist", "efl.circlegenlist");
+        element.put("genlistitem", "efl.circlegenlistitem");
+        element.put("progressbar", "efl.circleprogressbar");
+        element.put("scroller", "efl.circlescroller");
+        element.put("slider", "efl.circleslider");
+        return Collections.unmodifiableMap(element);
+    }
+
+    static String getReplaceWearableElement(String source) {
+        return wearableElement.get(source);
+    }
+
+    static String getReplaceElement(String source) {
+        return replaceElement.get(source);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/LayoutReverseConverterTable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/LayoutReverseConverterTable.java
new file mode 100644 (file)
index 0000000..5a19839
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.renderDataGenerator.reversetable;
+
+public final class LayoutReverseConverterTable {
+
+    public static String convertElement(String profile, String source) {
+        String results = null;
+        if (profile.equals("wearable-circle")) {
+            results = ElementTable.getReplaceWearableElement(source);
+            if (results != null) {
+                return results;
+            }
+        }
+
+        results = ElementTable.getReplaceElement(source);
+        if (results != null) {
+            return results;
+        }
+
+        return source;
+    }
+
+    public static String convertAttribute(String parentElem, String elem, String attr) {
+        String results = AttributeTable.getReplaceAttribute(elem, attr);
+        if (results != null) {
+            return results;
+        }
+
+        results = AttributeTable.getCommonReplaceAttribute(attr);
+        if (results != null) {
+            return results;
+        }
+
+        results = AttributeTable.getPackReplaceAttribute(parentElem, attr);
+        if (results != null) {
+            return results;
+        }
+
+        return attr;
+    }
+
+    public static String convertValue(String parent, String elem, String attr, String val) {
+        String results = ValueTable.getCommonValue(attr, val);
+        if (results != null) {
+            return results;
+        }
+
+        results = ValueTable.getReplacePackValue(parent, attr, val);
+        if (results != null) {
+            return results;
+        }
+
+        results = ValueTable.getReplaceValue(elem, attr, val);
+        if (results != null) {
+            return results;
+        }
+
+        return val;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/ValueTable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/renderDataGenerator/reversetable/ValueTable.java
new file mode 100644 (file)
index 0000000..5e0cabd
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.renderDataGenerator.reversetable;
+
+final class ValueTable {
+
+    private static final int ELEMENT = 0;
+    private static final int ATTRIBUTE = 1;
+    private static final int SOURCE_VALUE = 2;
+    private static final int TARGET_VALUE = 3;
+
+    private static final int COMMON_ATTRIBUTE = 0;
+    private static final int COMMON_SOURCE_VALUE = 1;
+    private static final int COMMON_TARGET_VALUE = 2;
+
+    private static final int PACK_PARENT_ELEMENT = 0;
+
+    private static String[][] commonValue = {
+            // attribute, Source_value, Target_value
+            { "align-x", "fill", "FILL" }, { "align-y", "fill", "FILL" }, };
+
+    private static String[][] packValue = { { "efl.panes", "pack-left", "left", "0" }, { "efl.panes", "pack-left", "right", "1" }, };
+
+    private static String[][] replaceValue = {
+            // old element,old attribute, new_value, old_value
+            { "efl.bg", "option", "center", "0" }, { "efl.bg", "option", "scale", "1" }, { "efl.bg", "option", "stretch", "2" },
+            { "efl.bg", "option", "tile", "3" }, { "efl.box", "horizontal", "horizontal", "true" }, { "efl.box", "horizontal", "vertical", "false" },
+            { "efl.calendar", "select-mode", "default", "0" }, { "efl.calendar", "select-mode", "always", "1" }, { "efl.calendar", "select-mode", "none", "2" },
+            { "efl.calendar", "select-mode", "ondemand", "3" }, { "efl.ctxpopup", "horizontal", "horizontal", "true" },
+            { "efl.ctxpopup", "horizontal", "vertical", "false" }, { "efl.entry", "text-format", "plain_utf8", "0" },
+            { "efl.entry", "text-format", "markup_utf8", "1" }, { "efl.entry", "context-menu-disabled", "false", "true" },
+            { "efl.entry", "context-menu-disabled", "true", "false" }, { "efl.gengrid", "horizontal", "horizontal", "true" },
+            { "efl.gengrid", "horizontal", "vertical", "false" }, { "efl.genlist", "select-mode", "default", "0" },
+            { "efl.genlist", "select-mode", "always", "1" }, { "efl.genlist", "select-mode", "none", "2" },
+            { "efl.genlist", "select-mode", "display_only", "3" }, { "efl.genlist", "policy-h", "auto", "0" }, { "efl.genlist", "policy-h", "true", "1" },
+            { "efl.genlist", "policy-h", "false", "2" }, { "efl.genlist", "policy-v", "auto", "0" }, { "efl.genlist", "policy-v", "true", "1" },
+            { "efl.genlist", "policy-v", "false", "2" }, { "efl.index", "autohide-disabled", "false", "true" },
+            { "efl.index", "autohide-disabled", "true", "false" },
+            { "efl.index", "indicator-disabled", "false", "true" }, { "efl.index", "indicator-disabled", "true", "false" },
+            { "efl.index", "horizontal", "horizontal", "true" },
+            { "efl.index", "horizontal", "vertical", "false" },
+            { "efl.image", "orient", "none", "0" },
+            { "efl.image", "orient", "orient_0", "0" }, { "efl.image", "orient", "orient_90", "1" }, { "efl.image", "orient", "rotate_90", "1" },
+            { "efl.image", "orient", "orient_180", "2" }, { "efl.image", "orient", "rotate_180", "2" }, { "efl.image", "orient", "orient_270", "3" },
+            { "efl.image", "orient", "rotate_270", "3" }, { "efl.image", "orient", "flip_horizontal", "4" }, { "efl.image", "orient", "flip_vertical", "5" },
+            { "efl.image", "orient", "flip_transpose", "6" }, { "efl.image", "orient", "flip_transverse", "7" }, { "efl.label", "wrap-set", "none", "0" },
+            { "efl.label", "wrap-set", "char", "1" }, { "efl.label", "wrap-set", "word", "2" }, { "efl.label", "wrap-set", "mixed", "3" },
+            { "efl.list", "horizontal", "horizontal", "true" }, { "efl.list", "horizontal", "vertical", "false" },
+            { "efl.list", "select-mode", "default", "0" }, { "efl.list", "select-mode", "always", "1" }, { "efl.list", "select-mode", "none", "2" },
+            { "efl.list", "select-mode", "display_only", "3" }, { "efl.list", "mode", "compress", "0" }, { "efl.list", "mode", "scroll", "1" },
+            { "efl.list", "mode", "limit", "2" }, { "efl.list", "mode", "expand", "3" }, { "efl.list", "policy-h", "auto", "0" },
+            { "efl.list", "policy-h", "true", "1" }, { "efl.list", "policy-h", "false", "2" }, { "efl.list", "policy-v", "auto", "0" },
+            { "efl.list", "policy-v", "true", "1" }, { "efl.list", "policy-v", "false", "2" }, { "efl.panes", "horizontal", "horizontal", "true" },
+            { "efl.panes", "horizontal", "vertical", "false" }, { "efl.panel", "orient", "top", "0" }, { "efl.panel", "orient", "bottom", "1" },
+            { "efl.panel", "orient", "left", "2" }, { "efl.panel", "orient", "right", "3" }, { "efl.progressbar", "horizontal", "horizontal", "true" },
+            { "efl.progressbar", "horizontal", "vertical", "false" }, { "efl.scroller", "policy-h", "auto", "0" }, { "efl.scroller", "policy-h", "true", "1" },
+            { "efl.scroller", "policy-h", "false", "2" }, { "efl.scroller", "policy-v", "auto", "0" }, { "efl.scroller", "policy-v", "true", "1" },
+            { "efl.scroller", "policy-v", "false", "2" }, { "efl.slider", "horizontal", "horizontal", "true" },
+            { "efl.slider", "horizontal", "vertical", "false" }, { "efl.toolbar", "select-mode", "default", "0" },
+            { "efl.toolbar", "select-mode", "always", "1" }, { "efl.toolbar", "select-mode", "none", "2" },
+            { "efl.toolbar", "select-mode", "display_only", "3" }, { "efl.toolbar", "horizontal", "horizontal", "true" },
+            { "efl.toolbar", "horizontal", "vertical", "false" }, { "efl.toolbar", "shrink-mode", "none", "0" }, { "efl.toolbar", "shrink-mode", "hide", "1" },
+            { "efl.toolbar", "shrink-mode", "scroll", "2" }, { "efl.toolbar", "shrink-mode", "menu", "3" }, { "efl.toolbar", "shrink-mode", "expand", "4" }, };
+
+    static String getCommonValue(String attr, String val) {
+        for (int i = 0; i < commonValue.length; i++) {
+            String[] array = commonValue[i];
+            if (array[COMMON_ATTRIBUTE].equals(attr) && array[COMMON_SOURCE_VALUE].equals(val)) {
+                return array[COMMON_TARGET_VALUE];
+            }
+        }
+        return null;
+    }
+
+    static String getReplaceValue(String elem, String attr, String val) {
+        for (int i = 0; i < replaceValue.length; i++) {
+            String[] array = replaceValue[i];
+            if (array[ELEMENT].equals(elem) && array[ATTRIBUTE].equals(attr) && array[SOURCE_VALUE].equals(val)) {
+                return array[TARGET_VALUE];
+            }
+        }
+        return null;
+    }
+
+    static String getReplacePackValue(String parent, String attr, String val) {
+        for (int i = 0; i < packValue.length; i++) {
+            String[] array = packValue[i];
+            if (array[PACK_PARENT_ELEMENT].equals(parent) && array[ATTRIBUTE].equals(attr) && array[SOURCE_VALUE].equals(val)) {
+                return array[TARGET_VALUE];
+            }
+        }
+        return null;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/ISnippet.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/ISnippet.java
new file mode 100644 (file)
index 0000000..9e034b2
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.snippet;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.w3c.dom.Document;
+
+
+public interface ISnippet extends Comparable<ISnippet> {
+    public static final String CATEGORY_SYSTEM = "system";
+    public static final String CATEGORY_USER = "user";
+
+    public static final String TYPE_VIEW = "view";
+    public static final String TYPE_WIDGET = "widget";
+
+    /**
+     * Gets the id of this snippet
+     * 
+     * @return an id of this snippet
+     */
+    public String getId();
+
+    /**
+     * Sets the name of this snippet
+     * 
+     * @param name
+     *            a name of this snippet
+     */
+    public void setName(String name);
+
+    /**
+     * Gets the name of this snippet
+     * 
+     * @return a name of this snippet
+     */
+    public String getName();
+
+    /**
+     * Sets the type of this snippet
+     * 
+     * @param type
+     *            a type of this snippet
+     */
+    public void setType(String type);
+
+    /**
+     * Gets the type of this snippet
+     * 
+     * @return a type of this snippet
+     */
+    public String getType();
+
+    /**
+     * Gets a category of this snippet
+     * 
+     * @return a category of this snippet
+     */
+    public String getCategory();
+
+    /**
+     * Sets a category of this snippet
+     * 
+     * @param category
+     *            a category of this snippet
+     */
+    public void setCategory(String category);
+
+    /**
+     * Sets description of this snippet
+     * 
+     * @param description
+     *            description of this snippet
+     */
+    public void setDescription(String description);
+
+    /**
+     * Gets description of this snippet
+     * 
+     * @return description of this snippet
+     */
+    public String getDescription();
+
+    /**
+     * Sets image of this snippet
+     * 
+     * @param imageDescriptor
+     *            imageDescriptor of this snippet
+     */
+    public void setImage(ImageDescriptor imageDescriptor);
+
+    /**
+     * Gets image of this snippet
+     * 
+     * @return imageDescriptor of this snippet
+     */
+    public ImageDescriptor getImage();
+
+    /**
+     * Sets model of this snippet
+     * 
+     * @param model
+     *            model of this snippet
+     */
+    public void setModel(Document model);
+
+    /**
+     * Gets model of this snippet
+     * 
+     * @return model of this snippet
+     */
+    public Document getModel();
+
+    /**
+     * Gets icon path of this snippet icon file
+     * 
+     * @return icon path of this snippet
+     */
+    public String getSmallIconPath(); // advux-palette
+
+    /**
+     * Gets icon image descriptor of this snippet icon file
+     * 
+     * @return icon image descriptor of this snippet
+     */
+    public ImageDescriptor getSmallIcon(); // advux-palette
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/ISnippetManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/ISnippetManager.java
new file mode 100644 (file)
index 0000000..613eb0d
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.snippet;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.List;
+
+
+public interface ISnippetManager {
+
+    public void load(File folder);
+
+    /**
+     * 
+     * @return
+     */
+    public List<ISnippet> getSnippets();
+
+    /**
+     * 
+     * @return
+     */
+    public Collection<ISnippet> getViewTemplates();
+
+    /**
+     * 
+     * @param id
+     * @return
+     */
+    public ISnippet find(String id);
+
+    /**
+     * @param snippet
+     */
+    public void create(ISnippet snippet);
+
+    /**
+     * @param snippet
+     */
+    public void remove(ISnippet snippet);
+
+    /**
+     * @param path
+     */
+    @Deprecated
+    public void importSnippet(String path);
+
+    /**
+     * @param snippet
+     */
+    @Deprecated
+    public void importSnippet(ISnippet snippet);
+
+    /**
+     * @param snippet
+     * @param path
+     */
+    @Deprecated
+    public void exportSnippet(ISnippet snippet, String path);
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/Snippet.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/Snippet.java
new file mode 100644 (file)
index 0000000..7039ab0
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.snippet;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.BuilderPlugin;
+import org.w3c.dom.Document;
+
+
+public final class Snippet implements ISnippet {
+
+    private String id = null;
+    private String name = null;
+    private String type = null;
+    private String category = CATEGORY_USER;
+    private String description = null;
+    private ImageDescriptor imageDescriptor = null;
+    private Document model = null;
+
+    // advux-palette
+    private static final String SMALL_ICON_PATH = "snippet/pt_block_icon_nor.png"; //$NON-NLS-1$
+    private ImageDescriptor smallIconImageDescriptor = null;
+
+    public Snippet() {
+        super();
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    @Override
+    public String getId() {
+        return id;
+    }
+
+    @Override
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    @Override
+    public String getType() {
+        return type;
+    }
+
+    @Override
+    public String getCategory() {
+        return category;
+    }
+
+    @Override
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    @Override
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public void setImage(ImageDescriptor imageDescriptor) {
+        this.imageDescriptor = imageDescriptor;
+    }
+
+    @Override
+    public ImageDescriptor getImage() {
+        return imageDescriptor;
+    }
+
+    @Override
+    public void setModel(Document object) {
+        this.model = object;
+    }
+
+    @Override
+    public Document getModel() {
+        return model;
+    }
+
+    @Override
+    public String getSmallIconPath() {
+        // advux-palette
+        return SMALL_ICON_PATH;
+    }
+
+    @Override
+    public ImageDescriptor getSmallIcon() {
+        if (smallIconImageDescriptor == null) {
+            smallIconImageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID, BuilderConstants.ICON_DIR + getSmallIconPath());
+        }
+        return smallIconImageDescriptor;
+
+    }
+
+    @Override
+    public int compareTo(ISnippet o) {
+        return getName().compareTo(o.getName());
+    }
+    
+    @Override
+    public boolean equals(Object o) {
+        if (o instanceof ISnippet) {
+            return getName().equals(((ISnippet)o).getName());
+        }
+        return false;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/SnippetException.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/SnippetException.java
new file mode 100644 (file)
index 0000000..e416c51
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.snippet;
+
+public final class SnippetException extends RuntimeException {
+    private static final long serialVersionUID = -2208650678310419106L;
+
+    /**
+     * Constructs an {@code CodeGeneratorException} with {@code null} as its error detail message.
+     */
+    public SnippetException() {
+        super();
+    }
+
+    /**
+     * Constructs an {@code CodeGeneratorException} with the specified detail message.
+     * 
+     * @param message
+     *            The detail message (which is saved for later retrieval by the
+     *            {@link #getMessage()} method)
+     */
+    public SnippetException(String message) {
+        super(message);
+    }
+
+    public SnippetException(String message, Throwable e) {
+        super(message, e);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/SnippetLoader.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/SnippetLoader.java
new file mode 100644 (file)
index 0000000..74d2941
--- /dev/null
@@ -0,0 +1,219 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.snippet;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.ImageLoader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.utility.ResourceUtil;
+import org.tizen.efluibuilder.utility.XMLUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+
+public final class SnippetLoader {
+    private Logger logger = LoggerFactory.getLogger(SnippetLoader.class);
+    private static final String FILE_META = "meta.xml";
+    private static final String FILE_DESCRIPTOR = "descriptor.xml";
+    private static final String FILE_IMAGE = "image.png";
+
+    public ISnippet snippet = null;
+
+    public SnippetLoader() {
+        super();
+    }
+
+    private void loadMetaFile(File file) throws MalformedURLException, ParserConfigurationException, SAXException, IOException {
+        Document document = XMLUtil.load(file);
+
+        // id
+        NodeList nodes = document.getElementsByTagName("id");
+        Node node = nodes.item(0);
+        String value = node.getTextContent();
+        ((Snippet) snippet).setId(value);
+
+        // name
+        nodes = document.getElementsByTagName("name");
+        node = nodes.item(0);
+        value = node.getTextContent();
+        snippet.setName(value);
+
+        // type
+        nodes = document.getElementsByTagName("type");
+        node = nodes.item(0);
+        value = node.getTextContent();
+        snippet.setType(value);
+
+        // category
+        nodes = document.getElementsByTagName("category");
+        node = nodes.item(0);
+        value = node.getTextContent();
+        snippet.setCategory(value);
+
+        // description
+        nodes = document.getElementsByTagName("description");
+        node = nodes.item(0);
+        value = node.getTextContent();
+        snippet.setDescription(value);
+    }
+
+    private void saveMetaFile(File file) throws ParserConfigurationException, IOException, TransformerException {
+        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder builder = documentBuilderFactory.newDocumentBuilder();
+        Document document = builder.newDocument();
+
+        // root
+        Element rootElement = document.createElement("meta");
+        document.appendChild(rootElement);
+
+        // id
+        Element element = document.createElement("id");
+        element.setTextContent(snippet.getId());
+        rootElement.appendChild(element);
+        // name
+        element = document.createElement("name");
+        element.setTextContent(snippet.getName());
+        rootElement.appendChild(element);
+
+        // type
+        element = document.createElement("type");
+        element.setTextContent(snippet.getType());
+        rootElement.appendChild(element);
+
+        // category
+        element = document.createElement("category");
+        element.setTextContent(snippet.getCategory());
+        rootElement.appendChild(element);
+
+        // description
+        element = document.createElement("description");
+        element.setTextContent(snippet.getDescription());
+        rootElement.appendChild(element);
+
+        XMLUtil.save(document, file);
+    }
+
+    private void loadDescriptorFile(File file) throws ParserConfigurationException, MalformedURLException, SAXException, IOException {
+        Document document = XMLUtil.load(file);
+        snippet.setModel(document);
+    }
+
+    private void saveDescriptorFile(File file) throws IOException, TransformerException {
+        Document document = snippet.getModel();
+        XMLUtil.save(document, file);
+    }
+
+    private void loadImageFile(File file) throws IOException {
+        URL url = file.toURI().toURL();
+        ImageDescriptor imageDescriptor = ResourceUtil.getImageDescriptor(url);
+        snippet.setImage(imageDescriptor);
+    }
+
+    private void saveImageFile(ImageDescriptor image, File file) {
+        ImageLoader imageLoader = new ImageLoader();
+        ImageData imageData = image.getImageData();
+        // imageData = ImageUtils.resize(imageData, IMAGE_WIDTH, IMAGE_HEIGHT, false);
+        imageLoader.data = new ImageData[] { imageData };
+        imageLoader.save(file.getPath(), SWT.IMAGE_PNG);
+    }
+
+    public ISnippet load(File snippetFile) {
+        snippet = new Snippet();
+        try {
+            File[] files = snippetFile.listFiles();
+            if (files != null) {
+                for (File file : files) {
+                    if (file.getName().equals(FILE_META)) {
+                        loadMetaFile(file);
+                    } else if (file.getName().equals(FILE_DESCRIPTOR)) {
+                        loadDescriptorFile(file);
+                    } else if (file.getName().equals(FILE_IMAGE)) {
+                        loadImageFile(file);
+                    }
+                }
+            }
+        } catch (MalformedURLException e) {
+            throw new SnippetException(e.getMessage());
+        } catch (ParserConfigurationException e) {
+            throw new SnippetException(e.getMessage());
+        } catch (SAXException e) {
+            throw new SnippetException(e.getMessage());
+        } catch (IOException e) {
+            throw new SnippetException(e.getMessage());
+        }
+        return snippet;
+    }
+
+    public void save(File snippetFile) {
+        Assert.isTrue(!snippetFile.exists());
+        boolean result = snippetFile.mkdir();
+        if (result == false) {
+            logger.warn("It failed to make directory");
+        }
+        String snippetFilePath = snippetFile.getAbsolutePath();
+        File metaFile = new File(snippetFilePath + "/" + FILE_META);
+        try {
+            saveMetaFile(metaFile);
+        } catch (ParserConfigurationException e) {
+            throw new SnippetException(e.getMessage());
+        } catch (IOException e) {
+            throw new SnippetException(e.getMessage());
+        } catch (TransformerException e) {
+            throw new SnippetException(e.getMessage());
+        }
+
+        File descriptorFile = new File(snippetFilePath + "/" + FILE_DESCRIPTOR);
+        try {
+            saveDescriptorFile(descriptorFile);
+        } catch (IOException e) {
+            throw new SnippetException(e.getMessage());
+        } catch (TransformerException e) {
+            throw new SnippetException(e.getMessage());
+        }
+
+        // save image
+        ImageDescriptor imageDescriptor = snippet.getImage();
+        if (imageDescriptor != null) {
+            File imageFile = new File(snippetFilePath + "/" + FILE_IMAGE);
+            saveImageFile(imageDescriptor, imageFile);
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/SnippetManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/snippet/SnippetManager.java
new file mode 100644 (file)
index 0000000..bc27400
--- /dev/null
@@ -0,0 +1,208 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.snippet;
+
+import java.io.File;
+import java.net.URI;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.tizen.efluibuilder.BuilderPlugin;
+import org.tizen.efluibuilder.utility.ResourceUtil;
+
+
+public final class SnippetManager implements ISnippetManager {
+    private static final String SNIPPET_FOLDER_PATH = "res/snippets";
+    private static final String SNIPPET_PREFIX = "snippet";
+
+    private Map<String, ISnippet> snippets = null;
+
+    private File folder = null;
+
+    private static ISnippetManager snippetManager = null;
+
+    public static synchronized ISnippetManager getDefault() {
+        if (snippetManager == null) {
+            snippetManager = new SnippetManager();
+        }
+        ((SnippetManager) snippetManager).load();
+        return snippetManager;
+    }
+
+    private SnippetManager() {
+        super();
+        snippets = new HashMap<String, ISnippet>();
+    }
+
+    public void dispose() {
+        snippets.clear();
+        snippets = null;
+        folder = null;
+    }
+
+    private boolean isSnippetFile(File snippetFile) {
+        Assert.isTrue(snippetFile.exists());
+        Assert.isTrue(snippetFile.isDirectory());
+        return true;
+    }
+
+    @Override
+    public List<ISnippet> getSnippets() {
+        List<ISnippet> collection = new LinkedList<ISnippet>();
+        Collection<ISnippet> values = snippets.values();
+
+        for (ISnippet snippet : values) {
+            if (!snippet.getType().equals(ISnippet.TYPE_WIDGET)) {
+                continue;
+            }
+            collection.add(snippet);
+        }
+        return collection;
+    }
+
+    @Override
+    public Collection<ISnippet> getViewTemplates() {
+        List<ISnippet> collection = new LinkedList<ISnippet>();
+        Collection<ISnippet> values = snippets.values();
+
+        for (ISnippet snippet : values) {
+            if (!snippet.getType().equals(ISnippet.TYPE_VIEW)) {
+                continue;
+            }
+            collection.add(snippet);
+        }
+        return collection;
+    }
+
+    @Override
+    public ISnippet find(String id) {
+        return snippets.get(id);
+    }
+
+    public void load() {
+        URI uri = ResourceUtil.getURI(BuilderPlugin.PLUGIN_ID, SNIPPET_FOLDER_PATH);
+        folder = new File(uri);
+        load(folder);
+    }
+
+    public void load(File folder) {
+        snippets.clear();
+
+        this.folder = folder;
+        if (!folder.exists()) {
+            throw new SnippetException("Snippet folder not found");
+        }
+
+        if (!folder.isDirectory()) {
+            throw new SnippetException("Snippet folder not found");
+        }
+
+        File[] files = folder.listFiles();
+        if (files != null) {
+            for (File file : files) {
+                if (!isSnippetFile(file)) {
+                    continue;
+                }
+                SnippetLoader loader = new SnippetLoader();
+                ISnippet snippet = loader.load(file);
+                if (snippet.getType().equals(ISnippet.TYPE_VIEW)) {
+                    snippets.put(snippet.getId(), snippet);
+                } else if (snippet.getType().equals(ISnippet.TYPE_WIDGET)) {
+                    snippets.put(snippet.getId(), snippet);
+                }
+            }
+        }
+    }
+
+    private String createId() {
+        int index = 1;
+        String id = SNIPPET_PREFIX + index;
+        while (snippets.containsKey(id)) {
+            index++;
+            id = SNIPPET_PREFIX + index;
+        }
+
+        return id;
+    }
+
+    private File getFile(ISnippet snippet) {
+        String path = folder.getAbsolutePath() + File.separator + snippet.getId();
+        File file = new File(path);
+        return file;
+    }
+
+    public void create(ISnippet snippet) {
+        // create id;
+        String id = createId();
+        ((Snippet) snippet).setId(id);
+        snippets.put(id, snippet);
+
+        File snippetFile = getFile(snippet);
+        SnippetLoader loader = new SnippetLoader();
+        loader.snippet = snippet;
+        loader.save(snippetFile);
+        load();
+    }
+
+    public void remove(ISnippet snippet) {
+        File file = getFile(snippet);
+        try {
+            IFileStore fileStore = EFS.getStore(file.toURI());
+            fileStore.delete(EFS.NONE, new NullProgressMonitor());
+        } catch (CoreException e) {
+            throw new SnippetException(e.getMessage());
+        }
+
+        load();
+    }
+
+    public void importSnippet(String path) {
+        File file = new File(path);
+        SnippetLoader loader = new SnippetLoader();
+        ISnippet snippet = loader.load(file);
+        importSnippet(snippet);
+    }
+
+    public void importSnippet(ISnippet snippet) {
+        create(snippet);
+    }
+
+    public void exportSnippet(ISnippet snippet, String path) {
+        // Remove ID
+        ((Snippet) snippet).setId("");
+        SnippetLoader snippetLoader = new SnippetLoader();
+        snippetLoader.snippet = snippet;
+        File file = new File(path + File.separator + snippet.getName());
+        snippetLoader.save(file);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/ComponentDescriptor.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/ComponentDescriptor.java
new file mode 100644 (file)
index 0000000..31e70c1
--- /dev/null
@@ -0,0 +1,362 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.model.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.tizen.efluibuilder.model.descriptors.DescriptorManager;
+import org.tizen.efluibuilder.model.descriptors.EventDescriptor;
+import org.tizen.efluibuilder.model.descriptors.EventParamDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PartConditionDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.model.descriptors.WidgetDescriptor;
+import org.tizen.efluibuilder.model.descriptors.WidgetDescriptor.DescriptorType;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+public class ComponentDescriptor {
+
+    private DescriptorManager descriptorManager = null;
+
+    public ComponentDescriptor(final DescriptorManager descriptorManager) {
+        this.descriptorManager = descriptorManager;
+    }
+
+    // DEPRECATED
+    public WidgetDescriptor getWidgetDescriptor(String descriptorId) {
+        return descriptorManager.getWidgetDescriptor(descriptorId);
+    }
+
+    public boolean canBeVisibleBorder(ComponentPart part) {
+        WidgetDescriptor widgetDescriptor = descriptorManager.getWidgetDescriptor(part.getDescriptorId());
+        if (widgetDescriptor != null) {
+            if (widgetDescriptor.isBorderVisible()) {
+                // Checks that part can have a child part.
+                String condition = widgetDescriptor.getFeedbackCondition();
+                if (condition == null || condition.isEmpty() || condition.equals(ModelConstants.ASTERISK)) {
+                    if (widgetDescriptor.canHaveChildren()) {
+                        if (part.getComponentChildren().size() == 0) {
+                            return true;
+                        } else {
+                            return false;
+                        }
+                    } else {
+                        return true;
+                    }
+                } else {
+                    String[] con = condition.split(ModelConstants.COMMA);
+                    for (int i = 0; i < con.length; i++) {
+                        if (widgetDescriptor.getPropertyDescriptor(con[i]) != null) {
+                            String value = part.getPropertyValue(condition);
+                            if (value == null || value.isEmpty()) {
+                                continue;
+                            } else {
+                                return false;
+                            }
+                        } else {
+
+                        }
+                    }
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+    public boolean canHaveChild(ComponentPart part, ComponentPart childPart) {
+        WidgetDescriptor partDescriptor = descriptorManager.getWidgetDescriptor(part.getDescriptorId());
+        WidgetDescriptor childPartDescriptor = descriptorManager.getWidgetDescriptor(childPart.getDescriptorId());
+
+        if (partDescriptor != null && childPartDescriptor != null) {
+            String exclusiveGroup = partDescriptor.getExclusiveGroupOfContent(childPartDescriptor.getDescriptorId());
+            if (exclusiveGroup != null) {
+                if (findExclusiveGroupOfContent(part, exclusiveGroup)) {
+                    return false;
+                }
+            }
+            int childSize = part.getComponentChildren().size();
+            return partDescriptor.canHaveChild(childPartDescriptor, childSize) && childPartDescriptor.canSetParent(partDescriptor);
+        } else {
+            return false;
+        }
+    }
+
+    private boolean findExclusiveGroupOfContent(ComponentPart part, String exclusiveGroup) {
+        WidgetDescriptor widgetDescriptor = descriptorManager.getWidgetDescriptor(part.getDescriptorId());
+        if (widgetDescriptor == null || exclusiveGroup == null) {
+            return false;
+        }
+
+        Iterator<Part> itr = part.getChildren().iterator();
+        ComponentPart child = null;
+        boolean exclusiveType = false;
+        String groupName = null;
+
+        while (itr.hasNext()) {
+            child = (ComponentPart) itr.next();
+            groupName = widgetDescriptor.getExclusiveGroupOfContent(child.getDescriptorId());
+            if ((groupName != null) && (exclusiveGroup.equals(groupName))) {
+                exclusiveType = true;
+                break;
+            }
+        }
+
+        return exclusiveType;
+    }
+
+    public boolean canCopyChild(ComponentPart part, ComponentPart childPart) {
+        WidgetDescriptor partDescriptor = descriptorManager.getWidgetDescriptor(part.getDescriptorId());
+        WidgetDescriptor childPartDescriptor = descriptorManager.getWidgetDescriptor(childPart.getDescriptorId());
+        if (partDescriptor != null && childPartDescriptor != null) {
+            return partDescriptor.canCopyChild(childPartDescriptor);
+        } else {
+            return false;
+        }
+    }
+
+    public boolean canRemoveChild(ComponentPart part, ComponentPart childPart) {
+        WidgetDescriptor partDescriptor = descriptorManager.getWidgetDescriptor(part.getDescriptorId());
+        WidgetDescriptor childPartDescriptor = descriptorManager.getWidgetDescriptor(childPart.getDescriptorId());
+        if (partDescriptor != null && childPartDescriptor != null) {
+
+            // getNumberOfChildByDescriptorId()
+            int number = 0;
+            {
+                Iterator<Part> itr = part.getChildren().iterator();
+                while (itr.hasNext()) {
+                    ComponentPart child = (ComponentPart) itr.next();
+                    if (child.getDescriptorId().equals(childPartDescriptor.getDescriptorId())) {
+                        number++;
+                    }
+                }
+            }
+            return partDescriptor.canRemoveChild(childPartDescriptor, number);
+        } else {
+            return false;
+        }
+    }
+
+    public boolean isContainer(ComponentPart part) {
+        if (descriptorManager.getWidgetDescriptor(part.getDescriptorId()).getLayoutType() != null) {
+            return true;
+        }
+        return false;
+    }
+
+    public List<EventParamDescriptor> getEventParams(ComponentPart part, String id) {
+        List<EventParamDescriptor> params = null;
+        for (EventDescriptor event : getEventDescriptors(part)) {
+            if (event.getEventName().equals(id)) {
+                params = event.getEventTypeDescriptor().getEventParameters();
+            }
+        }
+        return params;
+    }
+
+    public String getEventInfo(ComponentPart part, String id) {
+        String eventInfo = null;
+        for (EventDescriptor event : getEventDescriptors(part)) {
+            if (event.getEventName().equals(id)) {
+                eventInfo = event.getEventInfo();
+            }
+        }
+        return eventInfo;
+    }
+
+    public String getLayoutType(ComponentPart part) {
+        WidgetDescriptor desc = getPartComponentDescriptor(part);
+        if (desc != null) {
+            return desc.getLayoutType();
+        }
+        return null;
+    }
+
+    public String getMinWidth(ComponentPart part) {
+        WidgetDescriptor desc = getPartComponentDescriptor(part);
+        if (desc != null) {
+            return desc.getMinWidth();
+        }
+        return null;
+    }
+
+    public String getMinHeight(ComponentPart part) {
+        WidgetDescriptor desc = getPartComponentDescriptor(part);
+        if (desc != null) {
+            return desc.getMinHeight();
+        }
+        return null;
+    }
+
+    public String getFeedbackWidth(ComponentPart part) {
+        WidgetDescriptor desc = getPartComponentDescriptor(part);
+        if (desc != null) {
+            return desc.getFeedbackWidth();
+        }
+        return null;
+    }
+
+    public String getFeedbackHeight(ComponentPart part) {
+        WidgetDescriptor desc = getPartComponentDescriptor(part);
+        if (desc != null) {
+            return desc.getFeedbackHeight();
+        }
+        return null;
+    }
+
+    public String getIcon16(ComponentPart part) {
+        WidgetDescriptor desc = getPartComponentDescriptor(part);
+        if (desc != null) {
+            return desc.getIcon16();
+        }
+        return null;
+    }
+
+    public String getDisplayName(ComponentPart part) {
+        WidgetDescriptor desc = getPartComponentDescriptor(part);
+        if (desc != null) {
+            return desc.getDisplayName();
+        }
+        return null;
+    }
+
+    private WidgetDescriptor getPartComponentDescriptor(Part part) {
+        if (part != null && part.getDescriptorId() != null && descriptorManager.getWidgetDescriptor(part.getDescriptorId()) != null) {
+            return descriptorManager.getWidgetDescriptor(part.getDescriptorId());
+        }
+        return null;
+    }
+
+    public Collection<String> getWidgetCategories() {
+        return descriptorManager.getWidgetCategories();
+    }
+
+    public List<WidgetDescriptor> getWidgetDescriptorsOfCategory(String category) {
+        return descriptorManager.getWidgetDescriptorsOfCategory(category);
+    }
+
+    public List<PropertyDescriptor> getChildUIComponentPropertyDescriptors(String descriptorId) {
+        if (descriptorManager.getWidgetDescriptor(descriptorId) == null) {
+            return new ArrayList<PropertyDescriptor>();
+        }
+        return descriptorManager.getWidgetDescriptor(descriptorId).getChildUIComponentPropertyDescriptors();
+    }
+
+    public List<PropertyDescriptor> getPropertyDescriptors(String parentDescriptorId, String descriptorId) {
+        List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
+        descriptors.addAll(descriptorManager.getWidgetDescriptor(descriptorId).getPropertyDescriptors());
+        if (parentDescriptorId != null) {
+            descriptors.addAll(descriptorManager.getWidgetDescriptor(parentDescriptorId).getChildUIComponentPropertyDescriptors());
+        }
+        return descriptors;
+    }
+
+    public PropertyDescriptor getPropertyDescriptor(Part parent, ComponentPart part, String property) {
+        // property that has own properties
+        PropertyDescriptor propertyDescriptor = descriptorManager.getWidgetDescriptor(part.getDescriptorId()).getPropertyDescriptor(property);
+        if (propertyDescriptor != null) {
+            return propertyDescriptor;
+        }
+
+        if (parent != null && parent instanceof ComponentPart) {
+            // property that has parent properties(like pack_x, pack_y...)
+            return descriptorManager.getWidgetDescriptor(parent.getDescriptorId()).getChildUIComponentPropertyDescriptor(property);
+        }
+        return null;
+    }
+
+    public String getGuideText(ComponentPart part) {
+        WidgetDescriptor desc = getPartComponentDescriptor(part);
+        if (desc != null) {
+            return desc.getGuideText();
+        }
+        return null;
+    }
+
+    public List<PartConditionDescriptor> getConditions(ComponentPart part) {
+        return descriptorManager.getWidgetDescriptor(part.getDescriptorId()).getConditions();
+    }
+
+    public List<EventDescriptor> getEventDescriptors(ComponentPart part) {
+        return descriptorManager.getWidgetDescriptor(part.getDescriptorId()).getEventDescriptors();
+    }
+
+    public DescriptorType getDescriptorType(String descriptorId) {
+        return descriptorManager.getWidgetDescriptor(descriptorId).getDescriptorType();
+    }
+
+    public Map<String, String> getInitValues(ComponentPart parent, ComponentPart part) {
+        return getInitValues(getPropertyDescriptors(parent, part));
+    }
+
+    public List<PropertyDescriptor> getPropertyDescriptors(ComponentPart parent, ComponentPart part) {
+        List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
+        if (part != null && part.getDescriptorId() != null && descriptorManager.getWidgetDescriptor(part.getDescriptorId()) != null) {
+            descriptors.addAll(descriptorManager.getWidgetDescriptor(part.getDescriptorId()).getPropertyDescriptors());
+            if (parent != null && parent.getDescriptorId() != null && descriptorManager.getWidgetDescriptor(parent.getDescriptorId()) != null) {
+                descriptors.addAll(descriptorManager.getWidgetDescriptor(parent.getDescriptorId()).getChildUIComponentPropertyDescriptors());
+            }
+        }
+        return descriptors;
+    }
+
+    private Map<String, String> getInitValues(List<PropertyDescriptor> propertiesList) {
+        if (propertiesList == null) {
+            return new HashMap<String, String>();
+        }
+
+        Map<String, String> results = new HashMap<String, String>();
+
+        for (PropertyDescriptor property : propertiesList) {
+            String name = property.getPropertyName();
+            String value = null;
+            String type = property.getPropertyType();
+            // TODO check why string or color2 does not use default value
+            if (TypeDescriptor.ID_OF_STRING.equals(type) || TypeDescriptor.ID_OF_COLOR2.equals(type)) {
+                value = ModelConstants.EMPTY;
+            } else {
+                value = property.getDefaultValue();
+            }
+            String initValue = property.getInitValue();
+            if (initValue != null) {
+                value = initValue;
+            }
+
+            results.put(name, value);
+        }
+
+        return results;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/ComponentValidator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/ComponentValidator.java
new file mode 100644 (file)
index 0000000..df87d57
--- /dev/null
@@ -0,0 +1,968 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.util;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.osgi.util.NLS;
+import org.tizen.efluibuilder.model.descriptors.ConditionDescriptor;
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyConditionDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor.Types;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.EventType;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+
+
+/**
+ * A Component validator.
+ */
+public class ComponentValidator {
+
+    /**
+     * The OK string.
+     */
+    public static final String OK = "ok"; //$NON-NLS-1$
+
+    /**
+     * The error string.
+     */
+    public static final String ERROR = "error"; //$NON-NLS-1$
+
+    /**
+     * The string-id error key.
+     */
+    private static final String ERROR_STRING_ID = "string-id"; //$NON-NLS-1$
+
+    /**
+     * The string-page-id error key.
+     */
+    private static final String ERROR_STRING_PAGE_ID = "string-page-id"; //$NON-NLS-1$
+
+    /**
+     * The string-max-length error key.
+     */
+    private static final String ERROR_STRING_MAX_LENGTH = "string-max-length"; //$NON-NLS-1$
+
+    /**
+     * The integer-min error key.
+     */
+    private static final String ERROR_INTEGER_MIN = "integer-min"; //$NON-NLS-1$
+
+    /**
+     * The integer-min-by error key.
+     */
+    private static final String ERROR_INTEGER_MIN_BY = "integer-min-by"; //$NON-NLS-1$
+
+    /**
+     * The integer-max error key.
+     */
+    private static final String ERROR_INTEGER_MAX = "integer-max"; //$NON-NLS-1$
+
+    /**
+     * The integer-max-by error key.
+     */
+    private static final String ERROR_INTEGER_MAX_BY = "integer-max-by"; //$NON-NLS-1$
+
+    /**
+     * The integer-max error key.
+     */
+    private static final String ERROR_INTEGER_MIN_BY_PARENT_PROPERTY = "integer-min-by-parent-property"; //$NON-NLS-1$
+
+    /**
+     * The integer-max-by error key.
+     */
+    private static final String ERROR_INTEGER_MAX_BY_PARENT_PROPERTY = "integer-max-by-parent-property"; //$NON-NLS-1$
+
+    /**
+     * The size-max error key.
+     */
+    private static final String ERROR_SIZE_MAX = "size-max"; //$NON-NLS-1$
+
+    public String isValidName(String name) {
+        if (isCSyntaxReservedWord(name)) {
+            return BuilderMessages.ERROR_ID_EQUALS_RESERVED_WORD;
+        }
+
+        if (!checkIdValue(name)) {
+            return BuilderMessages.ERROR_ID_INVALID_REGX;
+        }
+        return OK;
+    }
+
+    /**
+     * Returns OK if property value can be set.
+     * 
+     * @param part
+     *            a {@link Part}
+     * @param propertyName
+     *            a property name
+     * @param value
+     *            a property value
+     * @return OK if property value can be set, and error message otherwise
+     */
+    public String canSetPropertyValue(Part part, String propertyName, String value) {
+        return canSetPropertyValue(part, part.getParent(), propertyName, value);
+    }
+
+    /**
+     * Returns OK if property value can be set.
+     * 
+     * @param part
+     *            a {@link Part}
+     * @param parent
+     *            a part to be parent {@link Part}
+     * @param propertyName
+     *            a property name
+     * @param value
+     *            a property value
+     * @return OK if property value can be set, and error message otherwise
+     */
+    private String canSetPropertyValue(Part part, Part parent, String propertyName, String value) {
+        if (part == null) {
+            // This case should not be happened.
+            return ERROR;
+        }
+
+        ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+        PropertyDescriptor desc = componentDescriptor.getPropertyDescriptor(parent, (ComponentPart) part, propertyName);
+        if (desc == null) {
+            // This case should not be happened.
+            return OK;
+        }
+
+        Types type = desc.getTypeDescriptor().getType();
+        switch (type) {
+            case INTEGER:
+                if (!checkIntegerValue(value)) {
+                    return BuilderMessages.ERROR_INTEGER_VALUE;
+                }
+
+                // FIXME
+                // workaround code to check input value range
+                // table padding_h/padding_v, gengrid item_size_w/item_size_h
+                if (!checkIntegerRange(value)) {
+                    return BuilderMessages.ERROR_INTEGER_RANGE;
+                }
+                break;
+            case SCALE:
+            case DOUBLE:
+                if (!checkDoubleValue(value)) {
+                    return BuilderMessages.ERROR_DOUBLE_VALUE;
+                }
+                break;
+            case STRING:
+            case RM_STRING: // for RM - localization
+            case BOOLEAN:
+            case SUB_VIEW:
+            case IMAGE:
+            case COLOR:
+            case COLOR2:
+            case DATE:
+            case TIME:
+            case AUDIO:
+            case VIDEO:
+            case HTMLSTRING:
+            case ENUM:
+                List<ConstantDescriptor> items = desc.getTypeDescriptor().getAvailableConstant();
+                for (ConstantDescriptor item : items) {
+                    if (value.equals(item.getValue())) {
+                        return OK;
+                    }
+                }
+                break;
+            case CHECK_SCALE:
+                List<ConstantDescriptor> check_scale_items = desc.getTypeDescriptor().getAvailableConstant();
+                for (ConstantDescriptor item : check_scale_items) {
+                    if (value.equals(item.getValue())) {
+                        return OK;
+                    }
+                }
+                if (!checkDoubleValue(value)) {
+                    return BuilderMessages.ERROR_DOUBLE_VALUE;
+                }
+                break;
+            case UNKNOWN:
+            default:
+                break;
+        }
+
+        String message = checkPropertyConditions(part, parent, desc.getConditionDescriptors(), value);
+
+        return message;
+    }
+
+    /**
+     * Returns OK if property value can be set.
+     * 
+     * @param condition
+     *            a {@link PropertyConditionDescriptor}
+     * @param value
+     *            a property value
+     * @param comparerValue
+     *            a comparer value
+     * @param displayName
+     *            a display name of comparer property
+     * @return OK if property value can be set, and error message otherwise
+     */
+    public String canSetPropertyValue(PropertyConditionDescriptor condition, String value, String comparerValue, String displayName) {
+        if (condition == null) {
+            // This case should not be happened.
+            return ERROR;
+        }
+
+        String name = condition.getName();
+        String error = condition.getError();
+        if (name == null) {
+            // This case should not be happened.
+            return ERROR;
+        }
+
+        if (name.equals(PropertyConditionDescriptor.INTEGER_MIN_BY)) {
+            if (!checkMinValue(value, comparerValue)) {
+                return NLS.bind(getErrorMessage(error), displayName);
+            }
+        } else if (name.equals(PropertyConditionDescriptor.INTEGER_MAX_BY)) {
+            if (!checkMaxValue(value, comparerValue)) {
+                return NLS.bind(getErrorMessage(error), displayName);
+            }
+        }
+
+        return OK;
+    }
+
+    /**
+     * Returns OK if value can be set.
+     * 
+     * @param condition
+     *            a {@link PropertyConditionDescriptor}
+     * @param value
+     *            a style declaration value
+     * @return OK if style declaration value can be set, and error message otherwise
+     */
+    public String canSetSizeStyleValue(PropertyConditionDescriptor condition, String value) {
+        if (condition == null || value.isEmpty()) {
+            return OK;
+        }
+
+        String name = condition.getName();
+        String conditionValue = condition.getValue();
+        String error = condition.getError();
+        if (name == null) {
+            return OK;
+        }
+
+        String digitValue = ModelConstants.EMPTY;
+        StringBuffer buffer = new StringBuffer();
+
+        for (int i = 0; i < value.length(); i++) {
+            char c = value.charAt(i);
+            if (Character.isDigit(c) || c == '.' || c == '-' || c == '+') {
+                buffer.append(c);
+            } else {
+                break;
+            }
+        }
+
+        digitValue = buffer.toString();
+
+        if (name.equals(PropertyConditionDescriptor.INTEGER_MIN)) {
+            if (!checkMinValue(digitValue, conditionValue)) {
+                return NLS.bind(getErrorMessage(error), conditionValue);
+            }
+        } else if (name.equals(PropertyConditionDescriptor.INTEGER_MAX)) {
+            if (!checkMaxValue(digitValue, conditionValue)) {
+                return NLS.bind(getErrorMessage(error), conditionValue);
+            }
+        }
+
+        return OK;
+    }
+
+    /**
+     * Returns OK if value can be set.
+     * 
+     * @param descriptor
+     *            a {@link PropertyDescriptor}
+     * @param value
+     *            a style value
+     * @return OK if style value can be set, and error message otherwise
+     */
+    public String canSetStyleDeclarationValue(PropertyDescriptor descriptor, String value) {
+        if (descriptor == null || value.isEmpty()) {
+            return OK;
+        }
+        Types type = descriptor.getTypeDescriptor().getType();
+        switch (type) {
+            case SIZE:
+            case STYLE_FONT_SIZE:
+            case SIZE_PERCENT:
+            case SIZE_PIXEL:
+            case SIZE_ANGLE:
+                String message = checkSizeValue(value);
+                if ((message.equals(OK))) {
+                    return checkSizeConditions(descriptor, value);
+                } else {
+                    List<ConstantDescriptor> items = descriptor.getTypeDescriptor().getAvailableConstant();
+                    for (ConstantDescriptor item : items) {
+                        if (value.equals(item.getValue())) {
+                            return OK;
+                        }
+                    }
+                    return message;
+                }
+            case SIZE_REAL:
+                if (checkFloatValue(value)) {
+                    return checkSizeConditions(descriptor, value);
+                } else {
+                    return BuilderMessages.ERROR_STYLE_SIZE_NUMBER;
+                }
+            case INTEGER:
+                if (!checkIntegerValue(value)) {
+                    return BuilderMessages.ERROR_INTEGER_VALUE;
+                }
+                break;
+            case SIZE_INTEGER:
+                if (checkIntegerValue(value)) {
+                    return checkSizeConditions(descriptor, value);
+                } else {
+                    List<ConstantDescriptor> items = descriptor.getTypeDescriptor().getAvailableConstant();
+                    for (ConstantDescriptor item : items) {
+                        if (value.equals(item.getValue())) {
+                            return OK;
+                        }
+                    }
+                    return BuilderMessages.ERROR_STYLE_SIZE_NUMBER;
+                }
+            case STRING:
+                if (!checkStringValue(value)) {
+                    return BuilderMessages.ERROR_STRING_VALUE;
+                }
+                break;
+            case BOOLEAN:
+            case SUB_VIEW:
+            case IMAGE:
+            case COLOR:
+            case COLOR2:
+            case DATE:
+            case TIME:
+            case AUDIO:
+            case VIDEO:
+            case HTMLSTRING:
+            case ENUM:
+            case UNKNOWN:
+            default:
+                break;
+        }
+
+        return OK;
+    }
+
+    private String checkSizeConditions(PropertyDescriptor descriptor, String value) {
+        String message = OK;
+
+        List<PropertyConditionDescriptor> conditions = descriptor.getConditionDescriptors();
+
+        for (PropertyConditionDescriptor condition : conditions) {
+            message = canSetSizeStyleValue(condition, value);
+            if (!(message.equals(OK))) {
+                return message;
+            }
+        }
+        return message;
+    }
+
+    /**
+     * Returns OK if property condition is valid.
+     * 
+     * @param part
+     *            a {@link Part}
+     * @param parent
+     *            a part to be parent {@link Part}
+     * @param conditions
+     *            a List containing {@link ConditionDescriptor}
+     * @param value
+     *            a property value to check validity
+     * @return OK if property condition is valid, and error message otherwise
+     */
+    private String checkPropertyConditions(Part part, Part parent, List<PropertyConditionDescriptor> conditions, String value) {
+        if (conditions == null) {
+            // This case should not be happened.
+            return ERROR;
+        }
+
+        int size = conditions.size();
+        if (size == 0) {
+            return OK;
+        }
+
+        for (int i = 0; i < size; i++) {
+            String message = checkPropertyCondition(part, parent, conditions.get(i), value);
+            if (message != OK) {
+                return message;
+            }
+        }
+
+        return OK;
+    }
+
+    /**
+     * Returns OK if property condition is valid.
+     * 
+     * @param part
+     *            a {@link Part}
+     * @param parent
+     *            a part to be parent {@link Part}
+     * @param condition
+     *            a {@link ConditionDescriptor}
+     * @param value
+     *            a property value to check validity
+     * @return OK if property condition is valid, and error message otherwise
+     */
+    private String checkPropertyCondition(Part part, Part parent, PropertyConditionDescriptor condition, String value) {
+        if (part == null || condition == null || value == null) {
+            // This case should not be happened.
+            return ERROR;
+        }
+
+        String name = condition.getName();
+
+        String error = condition.getError();
+
+        if (name.equals(PropertyConditionDescriptor.STRING_ID)) {
+            // 150408: added by sonbc121: implementation for C Standard Styled Widget ID====//
+            // true if value is a C language syntax word, and false otherwise
+            if (isCSyntaxReservedWord(value))
+                return BuilderMessages.ERROR_ID_EQUALS_RESERVED_WORD;
+
+            // 150408: modified by sonbc121: implementation for C Standard Styled Widget ID====//
+            if (!checkIdValue(value)) {
+                return BuilderMessages.ERROR_ID_INVALID_REGX;
+            }
+
+            Part docPart = null;
+            // Part pagePart = null;
+
+            if (parent != null) {
+                docPart = (part instanceof DocumentPart) ? part : parent.getOwnerDocumentPart();
+                // pagePart = (part.isViewPart()) ? part : parent.getOwnerPage();
+            } else {
+                docPart = part.getOwnerDocumentPart();
+                // pagePart = part.getOwnerPage();
+            }
+
+            if (docPart != null) {
+                if (!searchUsedPropertyValue(part, docPart, ModelConstants.PROPERTY_ID, value)) {
+                    return getErrorMessage(error);
+                }
+            }
+
+            // if (pagePart != null) {
+            // if (!searchUsedPropertyValue(part, pagePart, Constants.PROPERTY_ID, value,
+            // true)) {
+            // return getErrorMessage(error);
+            // }
+            // }
+        } else if (name.equals(PropertyConditionDescriptor.STRING_MAX_LENGTH)) {
+            String conditionValue = condition.getValue();
+            int length = Long.valueOf(conditionValue).intValue();
+
+            if (value.length() > length) {
+                return NLS.bind(getErrorMessage(error), conditionValue);
+            }
+        } else if (name.equals(PropertyConditionDescriptor.INTEGER_MIN)) {
+            String conditionValue = condition.getValue();
+
+            if (!checkMinValue(value, conditionValue)) {
+                return NLS.bind(getErrorMessage(error), conditionValue);
+            }
+        } else if (name.equals(PropertyConditionDescriptor.INTEGER_MAX)) {
+            String conditionValue = condition.getValue();
+
+            if (!checkMaxValue(value, conditionValue)) {
+                return NLS.bind(getErrorMessage(error), conditionValue);
+            }
+        } else if (name.equals(PropertyConditionDescriptor.INTEGER_MIN_BY_PARENT_PROPERTY)) {
+            String conditionValue = condition.getTargetValue();
+
+            if (!checkMinValueByParentProperty(part, value, conditionValue)) {
+                return NLS.bind(getErrorMessage(error), conditionValue);
+            }
+        } else if (name.equals(PropertyConditionDescriptor.INTEGER_MAX_BY_PARENT_PROPERTY)) {
+            String conditionValue = condition.getTargetValue();
+
+            if (!checkMaxValueByParentProperty(part, value, conditionValue)) {
+                return NLS.bind(getErrorMessage(error), conditionValue);
+            }
+        } else if (name.equals(PropertyConditionDescriptor.SIZE_MAX)) {
+            String conditionValue = condition.getValue();
+            String conditionTargetValue = condition.getTargetValue();
+
+            if (!checkMaxSize(part, value, conditionTargetValue, conditionValue)) {
+                return NLS.bind(getErrorMessage(error), conditionValue);
+            }
+        }
+
+        return OK;
+    }
+
+    /**
+     * Returns an error message corresponding to the key.
+     * 
+     * @param key
+     *            the key
+     * @return error message
+     */
+    private String getErrorMessage(String key) {
+        if (key == null || key.equals(ModelConstants.EMPTY)) {
+            // This case should not be happened.
+            return ERROR;
+        }
+
+        if (key.equals(ERROR_STRING_ID)) {
+            return BuilderMessages.ERROR_STRING_ID;
+        } else if (key.equals(ERROR_STRING_PAGE_ID)) {
+            return BuilderMessages.ERROR_STRING_PAGE_ID;
+        } else if (key.equals(ERROR_STRING_MAX_LENGTH)) {
+            return BuilderMessages.ERROR_STRING_MAX_LENGTH;
+        } else if (key.equals(ERROR_INTEGER_MIN)) {
+            return BuilderMessages.ERROR_INTEGER_MIN;
+        } else if (key.equals(ERROR_INTEGER_MIN_BY)) {
+            return BuilderMessages.ERROR_INTEGER_MIN_BY;
+        } else if (key.equals(ERROR_INTEGER_MAX)) {
+            return BuilderMessages.ERROR_INTEGER_MAX;
+        } else if (key.equals(ERROR_INTEGER_MAX_BY)) {
+            return BuilderMessages.ERROR_INTEGER_MAX_BY;
+        } else if (key.equals(ERROR_INTEGER_MIN_BY_PARENT_PROPERTY)) {
+            return BuilderMessages.ERROR_INTEGER_MIN_BY_PARENT_PROPERTY;
+        } else if (key.equals(ERROR_INTEGER_MAX_BY_PARENT_PROPERTY)) {
+            return BuilderMessages.ERROR_INTEGER_MAX_BY_PARENT_PROPERTY;
+        } else if (key.equals(ERROR_SIZE_MAX)) {
+            return BuilderMessages.ERROR_SIZE_MAX;
+        }
+
+        // This case should not be happened.
+        return ERROR;
+    }
+
+    /**
+     * Checks that value is an integer.
+     * 
+     * @param value
+     *            a property value
+     * @return true if value is an integer, and false otherwise
+     */
+    private boolean checkIntegerValue(String value) {
+        if (value != null && value.matches(ModelConstants.INTEGERVALUE)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private boolean checkIntegerRange(String value) {
+        if (value == null) {
+            return false;
+        }
+        double doubleValue = Double.parseDouble(value);
+        if ((Integer.MIN_VALUE <= doubleValue) && (doubleValue <= Integer.MAX_VALUE)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private boolean checkDoubleValue(String value) {
+        if (value != null && value.matches(ModelConstants.FLOATVALUE)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * Checks that value is a proper string.
+     * 
+     * @param value
+     *            a property value
+     * @return true if value is a proper string, and false otherwise
+     */
+    private boolean checkStringValue(String value) {
+        if (value != null && value.matches(ModelConstants.REGULAREXPRESSION)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * Checks that value is a proper ID.
+     * 
+     * @param value
+     *            an ID value
+     * @return true if value is a ID, and false otherwise
+     */
+    private boolean checkIdValue(String value) {
+        if (value != null && value.matches(ModelConstants.ID_PATTERN)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    // ====[START]== 150407: added by sonbc121: implementation for C Standard Styled Widget ID====//
+
+    private final String[] mstrArrayReservedKeywords = new String[] { // 45
+            // == type ==//
+            "auto", "_Bool", "char", "_Complex", "const", "double", "enum", "extern", "float", // 24
+            "int", "long", "register", "restrict", "short", "signed", "static", "struct", "typedef", "union", "unsigned", "void", "volatile", "NULL", "errno",
+
+            // == predefine macro ==//
+            "__TIME__", "__DATE__", "__FILE__", "__LINE__", "__VA_ARGS__", "__FUNCTION__", // 6
+
+            // == C syntax ==//
+            "break", "case", "continue", "default", "do", "else", "for", "goto", "if", // 15
+            "_Imaginary", // Complex data type
+            "inline", "return", "sizeof", "switch", "while" };
+
+    /**
+     * Checks that value is a proper ID by C language style.
+     * 
+     * @param value
+     *            an ID value
+     * @return true if value is a C language syntax word, and false otherwise
+     */
+    private boolean isCSyntaxReservedWord(String strIdValue) {
+        strIdValue = strIdValue.trim();
+        for (int iIdx = 0; iIdx < mstrArrayReservedKeywords.length; iIdx++) {
+            if (strIdValue.equals(mstrArrayReservedKeywords[iIdx])) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    // ====[END]== 150407: added by sonbc121: implementation for C Standard Styled Widget ID====//
+
+    private boolean searchUsedPropertyValue(Part myselfPart, Part part, String propertyName, String value) {
+        if (myselfPart == null || part == null) {
+            return false;
+        }
+
+        Iterator<Part> itr = part.getChildren().iterator();
+        List<Part> children = null;
+        while (itr.hasNext()) {
+            Part childPart = itr.next();
+            if (!myselfPart.equals(childPart)) {
+                String propertyValue = childPart.getPropertyValue(propertyName);
+                if (propertyValue != null && propertyValue.equals(value)) {
+                    return false;
+                }
+            }
+
+            children = childPart.getChildren();
+            if (children != null) {
+                if (!searchUsedPropertyValue(myselfPart, childPart, propertyName, value)) {
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    }
+
+    public int searchUsedEventValue(Part part, String value) {
+        int count = 0;
+        Part pagepart = ((ComponentPart) part).getOwnerViewPart();
+        if (pagepart != null) {
+            count = searchUsedValue(pagepart, value);
+        }
+
+        return count;
+    }
+
+    private int searchUsedValue(Part part, String value) {
+        int refCount = 0;
+        List<EventPart> eventParts = ((ComponentPart) part).getEventParts();
+
+        for (EventPart event : eventParts) {
+            if (event.getEventType() == EventType.RUN_JAVASCRIPT_FUNCTION) {
+                String eventName = event.getPropertyValue(LayoutSchemaConstants.EVENT_FUNCTION_NAME);
+                if (value.equals(eventName))
+                    refCount++;
+            }
+        }
+
+        for (Part child : part.getChildren()) {
+            refCount += searchUsedValue(child, value);
+        }
+        return refCount;
+    }
+
+    public int getUsedEventNameCount(Part part, String value) {
+        int count = 0;
+        if (!(part instanceof ComponentPart)) {
+            return count;
+        }
+        Part viewPart = ((ComponentPart) part).getOwnerViewPart();
+        if (viewPart != null) {
+            count = searchUsedEventName(viewPart, value);
+        }
+
+        return count;
+    }
+
+    private int searchUsedEventName(Part part, String value) {
+        int refCount = 0;
+        List<Part> children = part.getChildren();
+
+        for (Part child : children) {
+            if (child instanceof EventPart) {
+                String eventFunName = child.getPropertyValue(LayoutSchemaConstants.EVENT_FUNCTION_NAME);
+                if (value.equals(eventFunName)) {
+                    refCount++;
+                }
+            }
+            refCount += searchUsedEventName(child, value);
+        }
+
+        return refCount;
+    }
+
+    /**
+     * Checks that value is less than minValue.
+     * 
+     * @param part
+     * 
+     * @param value
+     *            an integer property value
+     * @param minValue
+     *            a minimum value
+     * @return true if value is less than minValue, and false otherwise
+     */
+    public boolean checkMinValueByParentProperty(Part part, String value, String minValue) {
+        if (part == null || value == null || value.isEmpty() || minValue == null || minValue.isEmpty()) {
+            return false;
+        }
+        int val = Integer.valueOf(value);
+        int min = 0;
+        ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+        List<PropertyDescriptor> parentProperties =
+                componentDescriptor.getPropertyDescriptors((ComponentPart) part.getParent().getParent(), (ComponentPart) part.getParent());
+        for (PropertyDescriptor property : parentProperties) {
+            if (property.getPropertyName().equals(minValue)) {
+                String parentProperty = part.getPropertyValue(minValue);
+                min = Integer.valueOf(parentProperty);
+            }
+        }
+
+        if (val <= min) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Checks that value is more than maxValue.
+     * 
+     * @param part
+     * 
+     * @param value
+     *            an integer property value
+     * @param maxValue
+     *            a maximum value
+     * @return true if value is more than maxValue, and false otherwise
+     */
+    public boolean checkMaxValueByParentProperty(Part part, String value, String maxValue) {
+        if (part == null || value == null || value.isEmpty() || maxValue == null || maxValue.isEmpty()) {
+            return false;
+        }
+        int val = Integer.valueOf(value);
+        int max = 0;
+        ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+        List<PropertyDescriptor> parentProperties =
+                componentDescriptor.getPropertyDescriptors((ComponentPart) part.getParent().getParent(), (ComponentPart) part.getParent());
+        for (PropertyDescriptor property : parentProperties) {
+            if (property.getPropertyName().equals(maxValue)) {
+                String parentProperty = part.getParent().getPropertyValue(maxValue);
+                if (parentProperty != null) {
+                    max = Integer.valueOf(parentProperty);
+                }
+            }
+        }
+
+        if (val >= max) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Checks that value is less than minValue.
+     * 
+     * @param value
+     *            an integer property value
+     * @param minValue
+     *            a minimum value
+     * @return true if value is less than minValue, and false otherwise
+     */
+    public boolean checkMinValue(String value, String minValue) {
+        if (value == null || value.isEmpty() || minValue == null || minValue.isEmpty()) {
+            return false;
+        }
+        float val = Float.valueOf(value);
+        float min = Float.valueOf(minValue);
+
+        if (val < min) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Checks that value is more than maxValue.
+     * 
+     * @param value
+     *            an integer property value
+     * @param maxValue
+     *            a maximum value
+     * @return true if value is more than maxValue, and false otherwise
+     */
+    public boolean checkMaxValue(String value, String maxValue) {
+        if (value == null || value.isEmpty() || maxValue == null || maxValue.isEmpty()) {
+            return false;
+        }
+        float val = Float.valueOf(value);
+        float min = Float.valueOf(maxValue);
+
+        if (val > min) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Checks that value is more than maxValue.
+     * 
+     * @param part
+     * 
+     * @param value
+     *            an integer property value
+     * @param value
+     *            an integer property value
+     * @param maxValue
+     *            a maximum value
+     * @return true if value is more than maxValue, and false otherwise
+     */
+    public boolean checkMaxSize(Part part, String value, String conditionTargetValue, String conditionValue) {
+        if (part == null || value == null || value.isEmpty() || conditionTargetValue == null || conditionTargetValue.isEmpty() || conditionValue == null
+                || conditionValue.isEmpty()) {
+            return false;
+        }
+        int val = Integer.valueOf(value);
+        int maxContainerSize = 0;
+        int currentPosition = 0;
+
+        ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+        List<PropertyDescriptor> properties =
+                componentDescriptor.getPropertyDescriptors((ComponentPart) part.getParent().getParent(), (ComponentPart) part.getParent());
+        for (PropertyDescriptor property : properties) {
+            if (property.getPropertyName().equals(conditionTargetValue)) {
+                String parentProperty = part.getParent().getPropertyValue(conditionTargetValue);
+                if (parentProperty != null) {
+                    maxContainerSize = Integer.valueOf(parentProperty);
+                }
+            }
+        }
+
+        properties = componentDescriptor.getPropertyDescriptors((ComponentPart) part.getParent(), (ComponentPart) part);
+        for (PropertyDescriptor property : properties) {
+            if (property.getPropertyName().equals(conditionValue)) {
+                String parentProperty = part.getPropertyValue(conditionValue);
+                if (parentProperty != null) {
+                    currentPosition = Integer.valueOf(parentProperty);
+                }
+            }
+        }
+
+        if (val > (maxContainerSize - (currentPosition))) {
+            return false;
+        }
+
+        return true;
+    }
+
+    private String checkSizeValue(String value) {
+        if (value == null) {
+            // This case should not be happened.
+            return ERROR;
+        }
+
+        String message = OK;
+
+        if (!value.matches(ModelConstants.SIZEVALUE)) {
+            String number = ModelConstants.EMPTY;
+            String unit = ModelConstants.EMPTY;
+            StringBuffer buffer = new StringBuffer();
+
+            for (int i = 0; i < value.length(); i++) {
+                char c = value.charAt(i);
+                if (Character.isDigit(c) || c == '.') {
+                    buffer.append(c);
+                } else {
+                    number = buffer.toString();
+                    unit = value.substring(i);
+                    break;
+                }
+            }
+
+            if (number.isEmpty()) {
+                message = BuilderMessages.ERROR_STYLE_SIZE_NUMBER;
+            } else {
+                if (!unit.matches(ModelConstants.UNITPATTERN)) {
+                    message = BuilderMessages.ERROR_STYLE_SIZE_UNIT;
+                } else {
+                    // This case should not be happened.
+                    message = ERROR;
+                }
+            }
+        }
+
+        return message;
+    }
+
+    private boolean checkFloatValue(String value) {
+        return value.matches(ModelConstants.FLOATVALUE);
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/DBPartUnmarshaller.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/DBPartUnmarshaller.java
new file mode 100644 (file)
index 0000000..efafe1e
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.model.util;
+
+import org.tizen.efluibuilder.model.part.DataBindingPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingObject;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public final class DBPartUnmarshaller {
+    public Part unmarshall(Part rootPart, Document document, boolean bAssign) {
+        return writePartbyElement(document.getDocumentElement(), rootPart, null, bAssign, bAssign);
+    }
+
+    public Part unmarshallForUpdate(Part rootPart, Document document) {
+        return writePartbyElement(document.getDocumentElement(), rootPart, null, true, false);
+    }
+
+    private Part writePartbyElement(Element element, Part rootPart, Part parentPart, boolean bAssignElementToPart, boolean bAssignPartToElement) {
+        String tagName = element.getTagName();
+
+        Part part = null;
+
+        if (tagName.equals(LayoutSchemaConstants.DATABINDING)) {
+            if (parentPart == null || parentPart instanceof DocumentPart) {
+                if (rootPart == null) {
+                    rootPart = PartUtil.createPart(PartType.DATABINDING, tagName);
+                }
+                part = rootPart;
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.DATASOURCE)) {
+            if (parentPart == null || parentPart instanceof DataBindingPart) {
+                part = PartUtil.createPart(PartType.DATASOURCE, tagName);
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.DATAMODEL)) {
+            if (parentPart == null || parentPart instanceof DataBindingPart) {
+                part = PartUtil.createPart(PartType.DATAMODEL, tagName);
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.BINDINGOBJECT)) {
+            if (parentPart == null || parentPart instanceof BindingData || parentPart instanceof BindingObject) {
+                part = PartUtil.createPart(PartType.BINDINGOBJECT, tagName);
+            }
+        }
+
+        if (part == null)
+            return null;
+
+        NamedNodeMap attrList = element.getAttributes();
+        for (int i = 0; i < attrList.getLength(); i++) {
+            Attr attr = (Attr) attrList.item(i);
+            part.setPropertyValue(attr.getName(), attr.getValue());
+        }
+
+        NodeList nodes = element.getChildNodes();
+        for (int i = 0; i < nodes.getLength(); i++) {
+            Node child = nodes.item(i);
+            if (child instanceof Element) {
+                Part childPart = writePartbyElement((Element) child, rootPart, part, bAssignElementToPart, bAssignPartToElement);
+                if (childPart != null) {
+                    childPart.setParent(part);
+                    part.insertChildBefore(childPart, null);
+                }
+            }
+        }
+
+        if (bAssignElementToPart) {
+            part.setElement(element);
+        }
+
+        if (bAssignPartToElement) {
+            element.setUserData(ModelConstants.ELEMENT_UD_PART_KEY, part, null);
+        }
+        return part;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/IDGenerator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/IDGenerator.java
new file mode 100644 (file)
index 0000000..00e8f83
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.util;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.tizen.efluibuilder.model.part.Part;
+
+
+public class IDGenerator {
+    private Map<String, Integer> maxIDs = new HashMap<String, Integer>();
+
+    public void update(Part part) {
+        updateMaxID(part);
+    }
+
+    public void clear() {
+        maxIDs.clear();
+    }
+    
+    public void updateID(String id) {
+        if (id == null) {
+            return;
+        }
+
+        // seperate number and strings from id
+        String number = getNumber(id);
+        String text = getText(id, number);
+        if (text == null) {
+            return;
+        }
+        int index = 0;
+        try {
+            index = Integer.parseInt(number);
+        } catch (NumberFormatException e) {
+            // This exception does not effect seriously in this case
+            return;
+        }
+
+        Integer integer = maxIDs.get(text);
+        if (integer == null || index > integer.intValue()) {
+            maxIDs.put(text, Integer.valueOf(index));
+        }
+    }
+
+    private void updateMaxID(Part part) {
+        for (Part child : part.getChildren()) {
+            updateID(child.getPropertyValue("id"));
+            updateMaxID(child);
+        }
+    }
+
+    private String getNumber(String id) {
+        String str = id.replaceAll("[^-?0-9]+", ",");
+
+        String[] results = str.trim().split(",");
+        if (results.length == 0) {
+            return null;
+        }
+
+        return results[results.length - 1];
+    }
+
+    private String getText(String id, String number) {
+        if (id == null || id.isEmpty()) {
+            return null;
+        }
+
+        if (number == null || number.isEmpty()) {
+            return id;
+        }
+
+        int lastIndex = id.lastIndexOf(number);
+        if (lastIndex >= id.length()) {
+            return null;
+        }
+
+        return id.substring(0, lastIndex);
+    }
+
+    public String getID(String descriptorId) {
+        if (descriptorId == null) {
+            return null;
+        }
+
+        int id;
+        Integer maxID = maxIDs.get(descriptorId);
+        if (maxID == null) {
+            id = 1;
+        } else {
+            id = maxID.intValue() + 1;
+        }
+
+        maxIDs.put(descriptorId, Integer.valueOf(id));
+        return descriptorId + String.valueOf(id);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/LayoutSchemaConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/LayoutSchemaConstants.java
new file mode 100644 (file)
index 0000000..99adec0
--- /dev/null
@@ -0,0 +1,160 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.util;
+
+public class LayoutSchemaConstants {
+
+    // document
+    public static final String DOCUMENT = "document"; //$NON-NLS-1$
+
+    // view
+    public static final String VIEWS = "views"; //$NON-NLS-1$
+    public static final String VIEW = "view"; //$NON-NLS-1$
+    public static final String STARTUP = "startup"; //$NON-NLS-1$
+    public static final String VIEWID = "viewId"; //$NON-NLS-1$
+    public static final String DEVICE = "device"; //$NON-NLS-1$
+    public static final String NAME = "name"; //$NON-NLS-1$
+    public static final String TYPE = "type"; //$NON-NLS-1$
+
+    // databinding
+    public static final String DATABINDING = "dataBinding"; //$NON-NLS-1$
+    public static final String DATASOURCE = "dataSource"; //$NON-NLS-1$
+    public static final String DATAMODEL = "dataModel"; //$NON-NLS-1$
+    public static final String BINDINGOBJECT = "observableObject"; //$NON-NLS-1$
+
+    // widget & element
+    public static final String BG = "bg"; //$NON-NLS-1$
+    public static final String BOX = "box"; //$NON-NLS-1$
+    public static final String BUTTON = "button"; //$NON-NLS-1$
+    public static final String CALENDAR = "calendar"; //$NON-NLS-1$
+    public static final String CHECK = "check"; //$NON-NLS-1$
+    public static final String COLORSELECTOR = "colorselector"; //$NON-NLS-1$
+    public static final String CTXPOPUP = "ctxpopup"; //$NON-NLS-1$
+    public static final String CTXPOPUPITEM = "ctxpopupitem"; //$NON-NLS-1$
+    public static final String DATETIME = "datetime"; //$NON-NLS-1$
+    public static final String ENTRY = "entry"; //$NON-NLS-1$
+    public static final String FLIPSELECTOR = "flipselector"; //$NON-NLS-1$
+    public static final String FLIPSELECTORITEM = "flipselectoritem"; //$NON-NLS-1$
+    public static final String GENGRID = "gengrid"; //$NON-NLS-1$
+    public static final String GENGRIDITEM = "gengriditem"; //$NON-NLS-1$
+    public static final String GENLIST = "genlist"; //$NON-NLS-1$
+    public static final String GENLISTITEM = "genlistitem"; //$NON-NLS-1$
+    public static final String GRID = "grid"; //$NON-NLS-1$
+    public static final String GROUP = "group"; //$NON-NLS-1$
+    public static final String HOVERSEL = "hoversel"; //$NON-NLS-1$
+    public static final String HOVERSELITEM = "hoverselitem"; //$NON-NLS-1$
+    public static final String ICON = "icon"; //$NON-NLS-1$
+    public static final String IMAGE = "image"; //$NON-NLS-1$
+    public static final String INDEX = "index"; //$NON-NLS-1$
+    public static final String INDEXITEM = "indexitem"; //$NON-NLS-1$
+    public static final String LABEL = "label"; //$NON-NLS-1$
+    public static final String LAYOUT = "layout"; //$NON-NLS-1$
+    public static final String LIST = "list"; //$NON-NLS-1$
+    public static final String LISTITEM = "listitem"; //$NON-NLS-1$
+    public static final String MAP = "map"; //$NON-NLS-1$
+    public static final String MULTIBUTTONENTRY = "multibuttonentry"; //$NON-NLS-1$
+    public static final String MULTIBUTTONENTRYITEM = "multibuttonentryitem"; //$NON-NLS-1$
+    public static final String PANEL = "panel"; //$NON-NLS-1$
+    public static final String PANES = "panes"; //$NON-NLS-1$
+    public static final String POPUP = "popup"; //$NON-NLS-1$
+    public static final String PROGRESSBAR = "progressbar"; //$NON-NLS-1$
+    public static final String RADIO = "radio"; //$NON-NLS-1$
+    public static final String RECT = "rect"; //$NON-NLS-1$
+    public static final String SCROLLER = "scroller"; //$NON-NLS-1$
+    public static final String SLIDER = "slider"; //$NON-NLS-1$
+    public static final String SPINNER = "spinner"; //$NON-NLS-1$
+    public static final String TABLE = "table"; //$NON-NLS-1$
+    public static final String TOOLBAR = "toolbar"; //$NON-NLS-1$
+    public static final String TOOLBARITEM = "toolbaritem"; //$NON-NLS-1$
+    public static final String DOC = "doc"; //$NON-NLS-1$
+    public static final String MSCREEN = "mscreen"; //$NON-NLS-1$
+    public static final String CONFIGURATION = "configuration"; //$NON-NLS-1$
+    public static final String VARIATION = "variation"; //$NON-NLS-1$
+    public static final String ID = "id"; //$NON-NLS-1$
+
+    // property
+    // common
+    public static final String ALIGN_H_FILL = "fill";
+    public static final String TEXT = "text";
+    public static final String SUB_LABEL = "sub-label";
+
+    public static final String GRID_VSIZE_W = "vsize_w"; //$NON-NLS-1$
+    public static final String GRID_VSIZE_H = "vsize_h"; //$NON-NLS-1$
+    public static final String GRID_PACK_X = "pack_x"; //$NON-NLS-1$
+    public static final String GRID_PACK_Y = "pack_y"; //$NON-NLS-1$
+    public static final String GRID_PACK_W = "pack_w"; //$NON-NLS-1$
+    public static final String GRID_PACK_H = "pack_h"; //$NON-NLS-1$
+
+    public static final String TABLE_COLS = "cols"; //$NON-NLS-1$
+    public static final String TABLE_ROWS = "rows"; //$NON-NLS-1$
+    public static final String TABLE_PACK_COL = "pack_col"; //$NON-NLS-1$
+    public static final String TABLE_PACK_ROW = "pack_row"; //$NON-NLS-1$
+    public static final String TABLE_COL_SPAN = "col_span"; //$NON-NLS-1$
+    public static final String TABLE_ROW_SPAN = "row_span"; //$NON-NLS-1$
+
+    public static final String PANES_PACK = "pack"; //$NON-NLS-1$
+    public static final String DIRECTION = "direction"; //$NON-NLS-1$
+    public static final String VISIBLE = "visible"; //$NON-NLS-1$
+
+    public static final String SRC = "src"; //$NON-NLS-1$
+    public static final String IMAGE_PATH = "image_path"; //$NON-NLS-1$
+    public static final String STYLE = "style"; //$NON-NLS-1$
+
+    public static final String COLORS = "colors"; //$NON-NLS-1$
+
+    // event
+    public static final String EVENT = "event"; //$NON-NLS-1$
+    public static final String EVENT_SIGNAL = "signal"; //$NON-NLS-1$
+    public static final String EVENT_NAME = "event_name"; //$NON-NLS-1$
+    public static final String EVENT_FUNCTION_NAME = "function_name"; //$NON-NLS-1$
+    public static final String EVENT_TARGET = "target"; //$NON-NLS-1$
+    public static final String EVENT_CONNECTION = "connection_wrapper"; //$NON-NLS-1$
+
+    // value
+    public static final String TRUE = "true"; //$NON-NLS-1$
+    public static final String FALSE = "false"; //$NON-NLS-1$
+    public static final String PANES_PACK_LEFT = "left"; //$NON-NLS-1$
+    public static final String PANES_PACK_RIGHT = "right"; //$NON-NLS-1$
+    public static final String BOX_DIRECTION_HORIZONTAL = "horizontal"; //$NON-NLS-1$
+    public static final String BOX_DIRECTION_VERTICAL = "vertical"; //$NON-NLS-1$
+
+    // configure
+    public static final String ORIENTATION = "orientation"; //$NON-NLS-1$
+    public static final String CONFIGURATION_TYPE_COMMON = "common"; //$NON-NLS-1$
+    public static final String CONFIGURATION_TYPE_SPECIFIC = "specific"; //$NON-NLS-1$
+    public static final String CONFIGURATION_ID_PREFIX = "config"; //$NON-NLS-1$
+    public static final String CONFIGURATION_REFERENCE = "config_ref"; //$NON-NLS-1$
+
+    // variation properties
+    public static final String[] GRID_PACK_PROPERTIES = { GRID_PACK_X, GRID_PACK_Y, GRID_PACK_W, GRID_PACK_H };
+    public static final String[] TABLE_PACK_PROPERTIES = { TABLE_PACK_COL, TABLE_PACK_ROW, TABLE_COL_SPAN, TABLE_ROW_SPAN };
+    public static final String[] PANES_PACK_PROPERTIES = { PANES_PACK };
+    public static final String[] VARIATION_PROPERTIES =
+            { GRID_PACK_X, GRID_PACK_Y, GRID_PACK_W, GRID_PACK_H, TABLE_PACK_COL, TABLE_PACK_ROW, TABLE_COL_SPAN, TABLE_ROW_SPAN, PANES_PACK, VISIBLE };
+
+    // page location
+    public static final String PAGE_LOCATION_X = "page_location_x";
+    public static final String PAGE_LOCATION_Y = "page_location_y";
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/ModelConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/ModelConstants.java
new file mode 100644 (file)
index 0000000..e61ad1f
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.util;
+
+public final class ModelConstants {
+
+    public static final String EMPTY = "";
+    public static final String ASTERISK = "*";
+    public static final String COMMA = ",";
+
+    public static final String ELEMENT_UD_PART_KEY = "part";
+    public static final String PROJECT_FILE = ".uproject";
+    public static final String SHAPE_SQUARE = "square";
+    public static final String SHAPE_CIRCLE = "circle";
+
+    // part & element
+    public static final String PART_DOC = "doc";
+    public static final String PART_VIEW = "view";
+    public static final String PART_VARIATION = "variation"; //$NON-NLS-1$
+    public static final String PART_MSCREEN = "mscreen"; //$NON-NLS-1$
+    public static final String PART_CONFIGURATION = "configuration"; //$NON-NLS-1$
+
+    // property & attribute
+    public static final String PROPERTY_ID = "id"; //$NON-NLS-1$
+    public static final String PROPERTY_VSIZE_W = "vsize_w"; //$NON-NLS-1$
+    public static final String PROPERTY_VSIZE_H = "vsize_h"; //$NON-NLS-1$
+    public static final String CONFIGURATION_REFERENCE = "config_ref"; //$NON-NLS-1$
+
+    // property & attribute value
+    public static final String CONFIGURATION_TYPE_COMMON = "common"; //$NON-NLS-1$
+    public static final String CONFIGURATION_TYPE_SPECIFIC = "specific"; //$NON-NLS-1$
+    public static final String CONFIGURATION_NAME = "name"; //$NON-NLS-1$
+    public static final String CONFIGURATION_TYPE = "type"; //$NON-NLS-1$
+    public static final String CONFIGURATION_ID = "id"; //$NON-NLS-1$
+    public static final String CONFIGURATION_ID_PREFIX = "config"; //$NON-NLS-1$
+
+    // Component Validator
+    public static final String REGULAREXPRESSION = "^[a-zA-Z]+[a-zA-Z0-9_]*$"; //$NON-NLS-1$
+    public static final String ID_PATTERN = "^[a-zA-Z_]+[a-zA-Z0-9_]*$"; //$NON-NLS-1$ , 150407:
+                                                                         // updated by sonbc121:
+                                                                         // implementation for C
+                                                                         // Standard Styled Widget
+                                                                         // ID (Added under bar)
+    public static final String INTEGERVALUE = "^[0-9-]?+[0-9]*$"; //$NON-NLS-1$
+    public static final String FLOATVALUE = "^[-]?\\d*(\\.?\\d*)$"; //$NON-NLS-1$
+    public static final String SIZEVALUE = "^[0-9-]+[.?0-9]*(?:px|%|cm|em|deg)$"; //$NON-NLS-1$
+    public static final String UNITPATTERN = "(px|%|cm|em)?$"; //$NON-NLS-1$
+    // StoryBoard_START
+    public static final String PROPERTY_LOCATION_X = "location_x"; //$NON-NLS-1$
+    public static final String PROPERTY_LOCATION_Y = "location_y"; //$NON-NLS-1$
+    // StoryBoard_END
+
+    public static final String KEY_WIDGET_NAVIFRAME = "efl.naviframe";
+    public static final String KEY_PART_VIEW = "tizen.view";
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/PartMarshaller.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/PartMarshaller.java
new file mode 100644 (file)
index 0000000..fc56280
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.util;
+
+import java.util.Map.Entry;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor.UnusedEditors;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+
+public final class PartMarshaller {
+
+    public Document marshall(Part part) {
+        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder builder = null;
+        try {
+            builder = documentBuilderFactory.newDocumentBuilder();
+        } catch (ParserConfigurationException e) {
+        }
+        // write document node
+        if (builder != null) {
+            Document document = builder.newDocument();
+
+            Element element = writeElementbyPart(document, part);
+            document.appendChild(element);
+            return document;
+        }
+        return null;
+    }
+
+    public Element marshall(Document document, Part part) {
+        return writeElementbyPart(document, part);
+    }
+
+    private String getTagName(Part part) {
+        switch (part.getType()) {
+            case PartType.DOCUMENT:
+                return LayoutSchemaConstants.DOCUMENT;
+            case PartType.CONFIGURATION:
+                return LayoutSchemaConstants.CONFIGURATION;
+            case PartType.VIEW:
+                return LayoutSchemaConstants.VIEW;
+            case PartType.EVENT:
+                return LayoutSchemaConstants.EVENT;
+            case PartType.VARIATION:
+                return LayoutSchemaConstants.VARIATION;
+            case PartType.MSCREEN:
+                return LayoutSchemaConstants.MSCREEN;
+            case PartType.VIEWS:
+                return LayoutSchemaConstants.VIEWS;
+            case PartType.COMPONENT:
+                return ((ComponentPart) part).getDescriptorId();
+            case PartType.DATABINDING:
+                return part.getDescriptorId();
+            case PartType.DATASOURCE:
+                return part.getDescriptorId();
+            case PartType.DATAMODEL:
+                return part.getDescriptorId();
+            case PartType.BINDINGOBJECT:
+                return part.getDescriptorId();
+            default:
+                break;
+        }
+
+        return null;
+    }
+
+    private Element writeElementbyPart(Document document, Part part) {
+        String tagName = getTagName(part);
+        Element element = null;
+
+        if (tagName != null)
+            element = document.createElement(tagName);
+
+        ComponentDescriptor componentDescriptor = null;
+        DocumentPart documentPart = part.getOwnerDocumentPart();
+        if (documentPart != null) {
+            componentDescriptor = documentPart.getComponentDescriptor();
+        }
+
+        for (Entry<String, String> property : part.getProperties().entrySet()) {
+            if (part instanceof ComponentPart && componentDescriptor != null) {
+                // check property not to be exposed to the xml by unusedEditor property from
+                // descriptor
+                PropertyDescriptor propertyDescriptor = componentDescriptor.getPropertyDescriptor(part.getParent(), (ComponentPart) part, property.getKey());
+                if (propertyDescriptor != null) {
+                    if (propertyDescriptor.checkUnusedEditors(UnusedEditors.SOURCE_TAB)) {
+                        continue;
+                    }
+                }
+            }
+            if (element != null) {
+                element.setAttribute(property.getKey(), property.getValue());
+            }
+        }
+
+        if (element != null) {
+            for (Part child : part.getChildren()) {
+                Element childElement = writeElementbyPart(document, child);
+                if (childElement != null) {
+                    element.appendChild(childElement);
+                }
+            }
+        }
+
+        return element;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/PartUnmarshaller.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/PartUnmarshaller.java
new file mode 100644 (file)
index 0000000..faa191b
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.util;
+
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.MScreenPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+public final class PartUnmarshaller {
+    public Part unmarshall(DocumentPart docPart, Document document, boolean bAssign) {
+        return writePartbyElement(document.getDocumentElement(), docPart, null, bAssign, bAssign);
+    }
+
+    public Part unmarshallForUpdate(DocumentPart docPart, Document document) {
+        return writePartbyElement(document.getDocumentElement(), docPart, null, true, false);
+    }
+
+    private Part writePartbyElement(Element element, DocumentPart docPart, Part parentPart, boolean bAssignElementToPart, boolean bAssignPartToElement) {
+        String tagName = element.getTagName();
+
+        Part part = null;
+
+        if (tagName.equals(LayoutSchemaConstants.DOCUMENT)) {
+            if (docPart == null)
+                docPart = (DocumentPart) PartUtil.createPart(PartType.DOCUMENT, null);
+            part = docPart;
+        } else if (tagName.equals(LayoutSchemaConstants.MSCREEN)) {
+            if (parentPart == null || parentPart instanceof DocumentPart)
+                // part = PartUtil.createMScreenPart((DocPart) parentPart);
+                part = PartUtil.createPartWithInitValue(docPart, PartType.MSCREEN, parentPart, tagName);
+        } else if (tagName.equals(LayoutSchemaConstants.VIEWS)) {
+            if (parentPart == null || parentPart instanceof DocumentPart) {
+                // part = PartUtil.createViewsPart((DocPart) parentPart);
+                part = PartUtil.createPartWithInitValue(docPart, PartType.VIEWS, parentPart, tagName);
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.CONFIGURATION)) {
+            if (parentPart == null || parentPart instanceof MScreenPart) {
+                // part = PartUtil.createConfigurationPart((MScreenPart) parentPart);
+                part = PartUtil.createPartWithInitValue(docPart, PartType.CONFIGURATION, parentPart, tagName);
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.VIEW)) {
+            if (parentPart == null || parentPart instanceof ViewsPart) {
+                // part = PartUtil.createViewPart((ViewsPart) parentPart);
+                part = PartUtil.createPartWithInitValue(docPart, PartType.VIEW, parentPart, tagName);
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.EVENT)) {
+            if (parentPart == null || parentPart instanceof ComponentPart) {
+                // part = PartUtil.createEventPart((ComponentPart) parentPart);
+                part = PartUtil.createPartWithInitValue(docPart, PartType.EVENT, parentPart, tagName);
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.VARIATION)) {
+            if (parentPart == null || parentPart instanceof ComponentPart) {
+                // part = PartUtil.createVariationPart((ComponentPart) parentPart);
+                part = PartUtil.createPartWithInitValue(docPart, PartType.VARIATION, parentPart, tagName);
+            }
+        } else {
+            // assume component
+            if (parentPart == null || (parentPart instanceof ViewPart) || (parentPart instanceof ComponentPart)) {
+                // part = PartUtil.createComponentPart(parentPart);
+                if (docPart.getComponentDescriptor().getWidgetDescriptor(tagName) != null) {
+                    part = PartUtil.createPartWithInitValue(docPart, PartType.COMPONENT, parentPart, tagName);
+                }
+            } else {
+                return null;
+            }
+        }
+
+        if (part == null)
+            return null;
+
+        NamedNodeMap attrList = element.getAttributes();
+        for (int i = 0; i < attrList.getLength(); i++) {
+            Attr attr = (Attr) attrList.item(i);
+            part.setPropertyValue(attr.getName(), attr.getValue());
+        }
+
+        NodeList nodes = element.getChildNodes();
+        for (int i = 0; i < nodes.getLength(); i++) {
+            Node child = nodes.item(i);
+            if (child instanceof Element) {
+                Part childPart = writePartbyElement((Element) child, docPart, part, bAssignElementToPart, bAssignPartToElement);
+                if (childPart != null) {
+                    childPart.setParent(part);
+                    part.insertChildBefore(childPart, null);
+                }
+            }
+        }
+
+        if (bAssignElementToPart) {
+            part.setElement(element);
+        }
+
+        if (bAssignPartToElement) {
+            element.setUserData(ModelConstants.ELEMENT_UD_PART_KEY, part, null);
+        }
+        return part;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/PartUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/model/util/PartUtil.java
new file mode 100644 (file)
index 0000000..8685ed3
--- /dev/null
@@ -0,0 +1,748 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.model.util;
+
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Queue;
+import java.util.Stack;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.model.command.AddPartCommand;
+import org.tizen.efluibuilder.model.command.ChangeOrderPartCommand;
+import org.tizen.efluibuilder.model.command.RemovePartCommand;
+import org.tizen.efluibuilder.model.command.SetPropertyPartCommand;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.model.part.DataBindingPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.MScreenPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.part.VariationPart;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingObject;
+import org.w3c.dom.Node;
+
+
+public final class PartUtil {
+    public static int SUCCESS = 0;
+    public static int ERROR_ID_EXISTS = 1;
+    public static int ERROR_INVALID_ID = 2;
+
+    private static int uniqueId = 0;
+
+    private static String getUniqueId() {
+        return "" + uniqueId++;
+    }
+
+    /**
+     * Process searching a part of views.
+     * 
+     * @param rootPart
+     *            a root node of tree. @return a part which has views type. it is null if there has
+     *            no one. @throws
+     * 
+     */
+    public static Part findViewsPart(Part rootPart) {
+        if (rootPart != null) {
+            Stack<Part> partStack = new Stack<Part>();
+            partStack.add(rootPart);
+
+            while (partStack.size() > 0) {
+                Part popPart = partStack.pop();
+                if (popPart.getType() == PartType.VIEWS)
+                    return popPart;
+
+                for (Part child : popPart.getChildren())
+                    partStack.add(child);
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Process searching a part of view from a leaf node.
+     * 
+     * @param leafPart
+     *            a part which is behind the view. @return a part which has view type. it is null if
+     *            there has no one. @throws
+     * 
+     */
+    public static Part findViewPart(Part leafPart) {
+        while (leafPart != null) {
+            if (leafPart.getType() == PartType.VIEW) {
+                return leafPart;
+            }
+            leafPart = leafPart.getParent();
+        }
+
+        return null;
+    }
+
+    /**
+     * Create a part with initial values by a own descriptor
+     * 
+     * @param docPart
+     *            you can get componentDescriptor @param type a type of part @param parent @param
+     *            tagName will be descriptorId
+     * 
+     * @return a new part @throws
+     */
+    public static Part createPartWithInitValue(DocumentPart docPart, int type, Part parent, String tagName) {
+        if (docPart == null) {
+            return null;
+        }
+        Part part = createPart(type, tagName);
+
+        if (part instanceof ComponentPart) {
+            ComponentDescriptor componentDescriptor = docPart.getComponentDescriptor();
+            Map<String, String> initValues = null;
+            if (parent instanceof ComponentPart) {
+                initValues = componentDescriptor.getInitValues((ComponentPart) parent, (ComponentPart) part);
+            } else {
+                initValues = componentDescriptor.getInitValues(null, (ComponentPart) part);
+            }
+            setInitValues(part, initValues);
+        }
+        return part;
+    }
+
+    /**
+     * Set initial values to a part
+     * 
+     * @param part
+     * @param initValues
+     * @return @throws
+     */
+    public static void setInitValues(Part part, Map<String, String> initValues) {
+        if (part == null) {
+            return;
+        }
+        if (initValues == null || initValues.isEmpty()) {
+            return;
+        }
+
+        for (Entry<String, String> entry : initValues.entrySet()) {
+            part.setPropertyValue(entry.getKey(), entry.getValue());
+        }
+    }
+
+    /**
+     * Create a part
+     * 
+     * @param type
+     *            PartType @param tagName will be descriptorId @return a new part @throws
+     */
+    public static Part createPart(int type, String tagName) {
+        return PartUtil.createPart(type, tagName, null);
+    }
+
+    /**
+     * Create a part
+     * 
+     * @param type
+     *            PartType @param tagName will be descriptorId @param parent
+     * 
+     * @return a new part @throws
+     */
+    public static Part createPart(int type, String tagName, Part parent) {
+        Part part = null;
+        switch (type) {
+            case PartType.DOCUMENT:
+                part = createDocPart();
+                part.setDescriptorId(LayoutSchemaConstants.DOCUMENT);
+                break;
+            case PartType.MSCREEN:
+                part = createMScreenPart((DocumentPart) parent);
+                part.setDescriptorId(LayoutSchemaConstants.MSCREEN);
+                break;
+            case PartType.CONFIGURATION:
+                part = createConfigurationPart((MScreenPart) parent);
+                part.setDescriptorId(LayoutSchemaConstants.CONFIGURATION);
+                break;
+            case PartType.VIEWS:
+                part = createViewsPart((DocumentPart) parent);
+                part.setDescriptorId(LayoutSchemaConstants.VIEWS);
+                break;
+            case PartType.VIEW:
+                part = createViewPart((ViewsPart) parent);
+                part.setDescriptorId(LayoutSchemaConstants.VIEW);
+                break;
+            case PartType.VARIATION:
+                part = createVariationPart((ComponentPart) parent);
+                part.setDescriptorId(LayoutSchemaConstants.VARIATION);
+                break;
+            case PartType.COMPONENT:
+                part = createComponentPart(parent);
+                break;
+            case PartType.EVENT:
+                part = createEventPart((ComponentPart) parent);
+                part.setDescriptorId(LayoutSchemaConstants.EVENT);
+                break;
+            case PartType.DATABINDING:
+                part = createDataBindingPart((ViewsPart) parent);
+                part.setDescriptorId(LayoutSchemaConstants.DATABINDING);
+                break;
+            case PartType.DATASOURCE:
+                part = createDataSourcePart((DataBindingPart) parent);
+                part.setDescriptorId(LayoutSchemaConstants.DATASOURCE);
+                break;
+            case PartType.DATAMODEL:
+                part = createDataModelPart((DataBindingPart) parent);
+                part.setDescriptorId(LayoutSchemaConstants.DATAMODEL);
+                break;
+            case PartType.BINDINGOBJECT:
+                part = createBindingObjectPart((DataBindingPart) parent);
+                part.setDescriptorId(LayoutSchemaConstants.BINDINGOBJECT);
+                break;
+        }
+
+        if (part instanceof ComponentPart) {
+            part.setDescriptorId(tagName);
+        }
+        return part;
+    }
+
+    /**
+     * Create a AddPartCommand
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createAddPartCommand(Part parent, Part child, Part nextSibiling) {
+        return new AddPartCommand(parent, child, nextSibiling);
+    }
+
+    /**
+     * Create a RemovePartCommand
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createRemovePartCommand(Part parent, Part child) {
+        return new RemovePartCommand(parent, child);
+    }
+
+    /**
+     * Create a SetPropertyPartCommand
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createSetPropertyCommand(Part part, String name, String value) {
+        return new SetPropertyPartCommand(part, name, value);
+    }
+
+    /**
+     * Create SetPropertiesPartCommand
+     *
+     * @param @return
+     *            @throws
+     */
+    public static Command createSetPropertiesCommand(Part part, VariationPart variationPart, List<String> keys) {
+        if (part == null || variationPart == null || keys == null) {
+            return null;
+        }
+
+        CompoundCommand compCmd = new CompoundCommand();
+        for (String key : keys) {
+            String value = part.getPropertyValue(key);
+            compCmd.add(PartUtil.createSetPropertyCommand(variationPart, key, value));
+        }
+
+        return compCmd;
+    }
+
+    /**
+     * 
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createMovePartCommand(Part part, Part oldParent, Part newParent, Part nextSibling) {
+        CompoundCommand compCmd = new CompoundCommand();
+        if (part == null || newParent == null) {
+            return compCmd;
+        }
+        compCmd.add(createRemovePartCommand(oldParent, part));
+        compCmd.add(createAddPartCommand(newParent, part, nextSibling));
+
+        return compCmd;
+    }
+
+    /**
+     * 
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createChangePartOrderCommand(Part part, Part newNextSibling) {
+        return new ChangeOrderPartCommand(part, newNextSibling);
+    }
+
+    /**
+     * Create a CompoundCommand about event
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createEventPartCommand(Part parent, Part part, String eventName, String signal) {
+        CompoundCommand compCmd = new CompoundCommand();
+        if (part == null || parent == null) {
+            return compCmd;
+        }
+        compCmd.add(createAddPartCommand(parent, part, null));
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.EVENT_FUNCTION_NAME, eventName));
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.EVENT_SIGNAL, signal));       
+        return compCmd;
+    }
+
+    /**
+     * 
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createPackCommandWithVariation(ComponentPart part, Part parent, ConfigurationPart configPart, Rectangle packBound) {
+        CompoundCommand compCmd = new CompoundCommand();
+        if (part == null || parent == null || configPart == null) {
+            return null;
+        }
+        String type = configPart.getPropertyValue(LayoutSchemaConstants.TYPE);
+        if (type.equals(LayoutSchemaConstants.CONFIGURATION_TYPE_COMMON)) {
+            compCmd.add(PartUtil.createPackCommand(part, parent, packBound));
+        } else {
+            // if current configuration is specific configuration
+            String configurationId = configPart.getPropertyValue(LayoutSchemaConstants.ID);
+            VariationPart variationPart = part.getVariationPart(configurationId);
+            if (variationPart == null) {
+                variationPart = (VariationPart) PartUtil.createPartWithInitValue(part.getOwnerDocumentPart(), PartType.VARIATION, part, null);
+                compCmd.add(PartUtil.createVariationPartCommand(part, variationPart, configurationId, LayoutSchemaConstants.TRUE));
+            }
+            compCmd.add(PartUtil.createPackCommand(variationPart, parent, packBound));
+        }
+
+        if (compCmd.isEmpty()) {
+            compCmd = null;
+            return null;
+        } else {
+            return compCmd;
+        }
+    }
+
+    /**
+     * Create a CompoundCommand about variation
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createVariationPartCommand(Part parent, Part part, String config_ref, String visible) {
+        CompoundCommand compCmd = new CompoundCommand();
+        if (part == null || parent == null) {
+            return null;
+        }
+
+        compCmd.add(createAddPartCommand(parent, part, null));
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.CONFIGURATION_REFERENCE, config_ref));
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.VISIBLE, visible));
+
+        return compCmd;
+    }
+
+    /**
+     * Create a CompoundCommand about pack
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createPackCommand(Part part, Part parent, Rectangle rectangle) {
+        Command cmd = null;
+        if (part == null) {
+            return cmd;
+        }
+
+        if (parent == null) {
+            if (part instanceof ComponentPart) {
+                parent = part.getParent();
+            } else if (part instanceof VariationPart) {
+                parent = part.getParent().getParent();
+            }
+            if (parent == null) {
+                return cmd;
+            }
+        }
+
+        String descriptorId = parent.getDescriptorId();
+        if (descriptorId.equals(LayoutSchemaConstants.GRID)) {
+            cmd = createGridPackCommand(part, rectangle);
+        } else if (descriptorId.equals(LayoutSchemaConstants.TABLE)) {
+            cmd = createTablePackCommand(part, rectangle);
+        } else if (descriptorId.equals(LayoutSchemaConstants.PANES)) {
+            cmd = createPanesPackCommand(part, rectangle);
+        }
+
+        return cmd;
+    }
+
+    /**
+     * Create a CompoundCommand about gridPack
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createGridPackCommand(Part part, Rectangle rectangle) {
+        CompoundCommand compCmd = new CompoundCommand();
+        if (part == null) {
+            return null;
+        }
+
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.GRID_PACK_X, Integer.toString(rectangle.x)));
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.GRID_PACK_Y, Integer.toString(rectangle.y)));
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.GRID_PACK_W, Integer.toString(rectangle.width)));
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.GRID_PACK_H, Integer.toString(rectangle.height)));
+
+        return compCmd;
+    }
+
+    /**
+     * Create a CompoundCommand about tablePack
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createTablePackCommand(Part part, Rectangle rectangle) {
+        CompoundCommand compCmd = new CompoundCommand();
+        if (part == null) {
+            return null;
+        }
+
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.TABLE_PACK_COL, Integer.toString(rectangle.x)));
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.TABLE_PACK_ROW, Integer.toString(rectangle.y)));
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.TABLE_COL_SPAN, Integer.toString(rectangle.width)));
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.TABLE_ROW_SPAN, Integer.toString(rectangle.height)));
+        return compCmd;
+    }
+
+    /**
+     * Create a CompoundCommand panesPack
+     * 
+     * @param @return
+     *            @throws
+     */
+    public static Command createPanesPackCommand(Part part, Rectangle rectangle) {
+        CompoundCommand compCmd = new CompoundCommand();
+        if (part == null) {
+            return null;
+        }
+        compCmd.add(createSetPropertyCommand(part, LayoutSchemaConstants.PANES_PACK, getPanesPackValue(rectangle)));
+        return compCmd;
+    }
+
+    public static Command createSetViewPropertyIdCommand(ViewPart part, String value) {
+        CompoundCommand compCmd = new CompoundCommand();
+        compCmd.add(new SetPropertyPartCommand(part, LayoutSchemaConstants.ID, value));
+        if (part.getParent().getPropertyValue(LayoutSchemaConstants.STARTUP).equals(part.getPropertyValue(LayoutSchemaConstants.ID))) {
+            compCmd.add(new SetPropertyPartCommand(part.getParent(), LayoutSchemaConstants.STARTUP, value));
+        }
+        List<Part> events = getEventPartsFromTargetView(part);
+        for (Part event : events) {
+            compCmd.add(new SetPropertyPartCommand(event, LayoutSchemaConstants.EVENT_TARGET, value));
+        }
+        return compCmd;
+    }
+
+    public static List<Part> getEventPartsFromTargetView(ViewPart viewPart) {
+        List<Part> events = new ArrayList<Part>();
+        Queue<Part> queue = new ArrayDeque<Part>();
+        Part part;
+        String viewId = viewPart.getPropertyValue(LayoutSchemaConstants.ID);
+        if (viewPart.getParent() != null) {            
+            for (Part child : viewPart.getParent().getChildren()) {
+                queue.addAll(child.getChildren());
+                while(queue.isEmpty() == false) {
+                    part = queue.poll();
+                    if (part instanceof EventPart && part.hasProperty(LayoutSchemaConstants.EVENT_CONNECTION) && viewId.equals(part.getPropertyValue(LayoutSchemaConstants.EVENT_TARGET))) {
+                        events.add(part);
+                    }
+                    queue.addAll(part.getChildren());
+                }
+            }
+        }
+        return events;
+    }
+
+    private static String getPanesPackValue(Rectangle rectangle) {
+        // FIXME need to check parent's direction
+        // if direction is vertical, value can be left or right
+        // also if direction is horizontal, value can be top or bottom
+        String value = null;
+        if (0 == rectangle.x) {
+            value = LayoutSchemaConstants.PANES_PACK_LEFT;
+        } else {
+            value = LayoutSchemaConstants.PANES_PACK_RIGHT;
+        }
+        return value;
+    }
+
+    public static int isValidViewName(Part viewsPart, String name) {
+        Assert.notNull(name);
+
+        ComponentValidator validator = new ComponentValidator();
+        String result = validator.isValidName(name);
+        if (result.equals(BuilderMessages.ERROR_ID_EQUALS_RESERVED_WORD)) {
+            return ERROR_INVALID_ID;
+        } else if (result.equals(BuilderMessages.ERROR_ID_INVALID_REGX)) {
+            return ERROR_INVALID_ID;
+        }
+
+        if (isViewNameExist(viewsPart, name)) {
+            return ERROR_ID_EXISTS;
+        }
+
+        return SUCCESS;
+    }
+
+    private static boolean isViewNameExist(Part viewsPart, String name) {
+        String idValue;
+        for (Part view : viewsPart.getChildren()) {
+            idValue = view.getPropertyValue(LayoutSchemaConstants.ID);
+            if (idValue != null && idValue.equals(name)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static Part clone(Part part) {
+        return PartUtil.clone(part, true, null);
+    }
+
+    public static Part clone(Part part, boolean deep, String configurationID, boolean bRemainUniqueId) {
+        if (part instanceof ComponentPart != true) {
+            return null;
+        }
+
+        Part newPart = PartUtil.createPart(part.getType(), part.getDescriptorId());
+        if (bRemainUniqueId) {
+            newPart.setUniqueId(part.getUniqueId());
+        }
+        Part newChild = null;
+        for (Entry<String, String> entry : part.getProperties().entrySet()) {
+            newPart.setPropertyValue(entry.getKey(), entry.getValue());
+        }
+        if (configurationID != null) {
+            for (Part child : part.getChildren()) {
+                if (child instanceof VariationPart && configurationID.equals(child.getPropertyValue(LayoutSchemaConstants.CONFIGURATION_REFERENCE))) {
+                    for (Entry<String, String> entry : child.getProperties().entrySet()) {
+                        String childKey = entry.getKey();
+                        if (newPart.hasProperty(childKey)) {
+                            // Set only the attributes that exist in the component from variation
+                            newPart.setPropertyValue(childKey, entry.getValue());
+                        }
+                    }
+                }
+            }
+        }
+
+        if (deep) {
+            for (Part child : part.getChildren()) {
+                newChild = PartUtil.clone(child, deep, configurationID);
+                if (newChild != null) {
+                    newPart.insertChildBefore(newChild, null);
+
+                }
+            }
+        }
+        return newPart;
+    }
+
+    public static Part clone(Part part, boolean deep, String configurationID) {
+        return clone(part, deep, configurationID, false);
+    }
+
+    private static DocumentPart createDocPart() {
+        return new DocumentPart(getUniqueId());
+    }
+
+    private static MScreenPart createMScreenPart(DocumentPart _parentPart) {
+        return new MScreenPart(getUniqueId(), _parentPart);
+    }
+
+    private static ConfigurationPart createConfigurationPart(MScreenPart _parentPart) {
+        return new ConfigurationPart(getUniqueId(), _parentPart);
+    }
+
+    private static ViewsPart createViewsPart(DocumentPart _parentPart) {
+        return new ViewsPart(getUniqueId(), _parentPart);
+    }
+
+    private static ViewPart createViewPart(ViewsPart _parentPart) {
+        return new ViewPart(getUniqueId(), _parentPart);
+    }
+
+    private static ComponentPart createComponentPart(Part _parentPart) {
+        return new ComponentPart(getUniqueId(), _parentPart);
+    }
+
+    private static EventPart createEventPart(ComponentPart _parentPart) {
+        return new EventPart(getUniqueId(), _parentPart);
+    }
+
+    private static VariationPart createVariationPart(ComponentPart _parentPart) {
+        return new VariationPart(getUniqueId(), _parentPart);
+    }
+
+    public static String setColorString(String colorValues, String partName, String color) {
+        if (colorValues != null) {
+            Map<String, String> colorMap = getPartColors(colorValues);
+            if (colorMap == null) {
+                colorMap = new HashMap<String, String>();
+            }
+            colorMap.put(partName, color);
+            return convertColorMapToPropertyValue(colorMap);
+        }
+        return null;
+    }
+
+    public static String setColorString(String colorValues, Map<String, String> partColorMap) {
+        if (colorValues != null) {
+            Map<String, String> colorMap = getPartColors(colorValues);
+            if (colorMap == null) {
+                colorMap = new HashMap<String, String>();
+            }
+            colorMap.putAll(partColorMap);
+            return convertColorMapToPropertyValue(colorMap);
+        }
+        return null;
+    }
+
+    public static String convertColorMapToPropertyValue(Map<String, String> colorMap) {
+        StringBuffer str = new StringBuffer();
+        boolean bFirst = true;
+        for (Entry<String, String> entry : colorMap.entrySet()) {
+            if (bFirst) {
+                str.append(entry.getKey() + ":" + entry.getValue() + ";");
+                bFirst = false;
+            } else {
+                str.append(" " + entry.getKey() + ":" + entry.getValue() + ";");
+            }
+        }
+        return str.toString();
+    }
+
+    public static String getColor(String colorValues, String partName) {
+        Map<String, String> colorMap = getPartColors(colorValues);
+        if (colorMap != null) {
+            return colorMap.get(partName);
+        }
+        return null;
+    }
+
+    public static String getColor(Part part, String partName) {
+        Map<String, String> colorMap = getPartColors(part);
+        if (colorMap != null) {
+            return colorMap.get(partName);
+        }
+        return null;
+    }
+
+    public static Map<String, String> getPartColors(String colorValues) {
+        Map<String, String> colorMap = null;
+        if (colorValues != null && !colorValues.isEmpty()) {
+            String[] color = colorValues.split(";");
+            String[] colorPart;
+            for (int i = 0; i < color.length; i++) {
+                colorPart = color[i].split(":");
+                if (colorPart.length == 2) {
+                    if (colorMap == null) {
+                        colorMap = new HashMap<String, String>();
+                    }
+                    String key = colorPart[0].trim();
+                    String colorValue = colorPart[1].trim();
+                    colorMap.put(key, colorValue);
+                }
+            }
+        }
+        return colorMap;
+    }
+
+    public static Map<String, String> getPartColors(Part part) {
+        String colorValues = part.getPropertyValue(LayoutSchemaConstants.COLORS);
+        return getPartColors(colorValues);
+    }
+
+    public static String getRemovedColorString(String colorValues, String partName) {
+        Map<String, String> colorMap = getPartColors(colorValues);
+        if (colorMap != null) {
+            colorMap.remove(partName);
+            return convertColorMapToPropertyValue(colorMap);
+        }
+        return null;
+
+    }
+
+    private static Part createDataBindingPart(ViewsPart _parentPart) {
+        return new DataBindingPart(getUniqueId(), _parentPart);
+    }
+
+    private static Part createDataSourcePart(DataBindingPart _parentPart) {
+        return new BindingData(getUniqueId(), _parentPart, PartType.DATASOURCE);
+    }
+
+    private static Part createDataModelPart(DataBindingPart _parentPart) {
+        return new BindingData(getUniqueId(), _parentPart, PartType.DATAMODEL);
+    }
+
+    private static Part createBindingObjectPart(DataBindingPart _parentPart) {
+        return new BindingObject(getUniqueId(), _parentPart);
+    }
+
+    public static Part getPartFrom(Node node) {
+        if (node != null) {
+            Object userData = node.getUserData(ModelConstants.ELEMENT_UD_PART_KEY);
+            if (userData instanceof Part) {
+                return (Part) userData;
+            }
+        }
+
+        return null;
+    }
+
+    public static void setPartToElement(Node node, Part part) {
+        node.setUserData(ModelConstants.ELEMENT_UD_PART_KEY, part, null);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/IScreenConfigurationSelectionChangedListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/IScreenConfigurationSelectionChangedListener.java
new file mode 100644 (file)
index 0000000..7ddd17f
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.mscreen.configurator;
+
+public interface IScreenConfigurationSelectionChangedListener {
+    public void configurationSelected(MScreenQualifierManager mscreenManager);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MScreenQualifierManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MScreenQualifierManager.java
new file mode 100644 (file)
index 0000000..991845f
--- /dev/null
@@ -0,0 +1,210 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.mscreen.configurator;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.ui.IEditorInput;
+import org.tizen.efluibuilder.core.configuration.device.Device;
+import org.tizen.efluibuilder.model.app.AppManager;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.model.part.MScreenPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.mscreen.rm.ResourceManagerUtil;
+
+
+public class MScreenQualifierManager {
+    private ConfigurationPart currentConfigurePart = null; // can be NULL
+    private MScreenPart mscreenPart = null;
+    Collection<Device> devices = null;
+    String[] locales = null;
+    String locale = null;
+    List<IScreenConfigurationSelectionChangedListener> listeners =
+            new ArrayList<IScreenConfigurationSelectionChangedListener>();
+
+    public MScreenQualifierManager(MScreenPart rootPart, IEditorInput editorInput) {
+        AppManager appManager = AppManager.getAppManager(editorInput);
+        devices = appManager.getDeviceManager().getDevices();
+
+        ResourceManagerUtil resourceManager = new ResourceManagerUtil(appManager.getProject());
+        locales = resourceManager.getLocales();
+        locale = locales[0];
+
+        // this.setCurrentConfigurePart(this.getCommonConfigurationPart());
+
+        this.mscreenPart = rootPart;
+    }
+
+    public ConfigurationPart getCurrentConfigurePart() {
+        if (this.currentConfigurePart == null) {
+            return getCommonConfigurationPart();
+        } else {
+            return this.currentConfigurePart;
+        }
+    }
+
+    public void setCurrentConfigurePart(ConfigurationPart configurePart) {
+        this.currentConfigurePart = configurePart;
+        this.fireCurrentConfigureChanged();
+    }
+
+    public void fireCurrentConfigureChanged() {
+        for (IScreenConfigurationSelectionChangedListener listener : this.listeners) {
+            listener.configurationSelected(this);
+        }
+    }
+
+    public void fireCurrentLocaleChanged() {
+        fireCurrentConfigureChanged();
+    }
+
+    private ConfigurationPart getConfigurePartFromQualifiers(String deviceName, String orientation) {
+        if (deviceName == null || orientation == null) {
+            return null;
+        }
+
+        for (Part part : this.mscreenPart.getChildren()) {
+            if (part instanceof ConfigurationPart) {
+                ConfigurationPart configPart = (ConfigurationPart) part;
+                if (deviceName.equals(configPart.getDevice())
+                        && orientation.equals(configPart.getOrientation())) {
+                    return configPart;
+                }
+            }
+        }
+
+        return null;
+    }
+
+    public ConfigurationPart getConfigurePartFromQualifiers(Device device, String orientation) {
+        if (device == null) {
+            return null;
+        }
+
+        return getConfigurePartFromQualifiers(device.getName(), orientation);
+    }
+
+    public ConfigurationPart getConfigurePartFromScreenConfiguration(ScreenConfiguration configuration) {
+        if (configuration == null) {
+            return null;
+        }
+
+        String deviceName = configuration.getQualifier(LayoutSchemaConstants.DEVICE);
+        String orientation = configuration.getQualifier(LayoutSchemaConstants.ORIENTATION);
+
+        return getConfigurePartFromQualifiers(deviceName, orientation);
+    }
+
+    public List<ScreenConfiguration> getScreenConfiguration() {
+        List<ScreenConfiguration> configurations = new ArrayList<ScreenConfiguration>();
+        for (Part part : this.mscreenPart.getChildren()) {
+            if (part instanceof ConfigurationPart) {
+                configurations.add(new ScreenConfiguration((ConfigurationPart) part));
+            }
+        }
+
+        return configurations;
+    }
+
+    public void updateConfigurePartFromQualifiers(String device, String orientation) {
+
+    }
+
+    public void resetCurrentConfigurePart() {
+        List<Part> children = this.mscreenPart.getChildren();
+        if (children.size() > 0) {
+            setCurrentConfigurePart((ConfigurationPart) children.get(0));
+        }
+    }
+
+    public ConfigurationPart getCommonConfigurationPart() {
+        return this.mscreenPart.getCommonConfigurationPart();
+    }
+
+    public String getCurrentOrientation() {
+        ConfigurationPart currentPart = getCurrentConfigurePart();
+        if (currentPart == null) {
+            return null;
+        }
+
+        return currentPart.getOrientation();
+    }
+
+    public Device getCurrentDevice() {
+        ConfigurationPart currentPart = getCurrentConfigurePart();
+        if (currentPart == null) {
+            return null;
+        }
+
+        String deviceName = currentPart.getDevice();
+        for (Device device : this.devices) {
+            if (device.getName().equals(deviceName)) {
+                return device;
+            }
+        }
+
+        return null;
+    }
+
+    public void setLocale(String locale) {
+        if (locale != null && locale.equals(this.locale) == false) {
+            this.locale = locale;
+            fireCurrentLocaleChanged();
+        }
+    }
+
+    public String getCurrentLocale() {
+        return this.locale;
+    }
+
+    public MScreenPart getMScreenPart() {
+        return this.mscreenPart;
+    }
+
+    public Point getScreenSize() {
+        Device device = getCurrentDevice();
+        String orientation = getCurrentOrientation();
+        if (MscreenConstants.ORIENTATION_PORTRAIT.equals(orientation)) {
+            return new Point(device.getWidth(), device.getHeight());
+        } else {
+            return new Point(device.getHeight(), device.getWidth());
+        }
+    }
+
+    public void addConfigureSelectionChangedListener(IScreenConfigurationSelectionChangedListener listener) {
+        this.listeners.add(listener);
+    }
+
+    public void removeConfigureSelectionChangedListener(IScreenConfigurationSelectionChangedListener listener) {
+        this.listeners.remove(listener);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MsConfiguratorWizard.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MsConfiguratorWizard.java
new file mode 100644 (file)
index 0000000..bb2ad58
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.mscreen.configurator;
+
+import org.eclipse.gef.commands.Command;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.model.part.MScreenPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.wizard.snippet.AbstractWizard;
+
+
+public class MsConfiguratorWizard extends AbstractWizard {
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    private MsConfiguratorWizardFirstPage firstPage = null;
+
+    public MsConfiguratorWizard() {
+        super();
+        setWindowTitle(MscreenMessage.CONFIGURATOR_DLG_TITLE);
+    }
+
+    @Override
+    public void addPages() {
+        super.addPages();
+        firstPage = new MsConfiguratorWizardFirstPage(MsConfiguratorWizardFirstPage.NAME, MscreenMessage.CONFIGURATOR_DLG_FIRST_PAGE_TITLE, null);
+        // TODO FIXME
+        Part mscreenPart = (Part) getModel();
+        if (mscreenPart instanceof MScreenPart) {
+            firstPage.setContents((MScreenPart) mscreenPart);
+        }
+        addPage(firstPage);
+    }
+
+    @Override
+    public boolean performFinish() {
+        try {
+            return firstPage.remakeMscreenConfigurations();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return false;
+        }
+    }
+
+    public Command getCommand() {
+        return firstPage.getCommand();
+    }
+
+    @Override
+    public void dispose() {
+        firstPage.dispose();
+        super.dispose();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MsConfiguratorWizardFirstPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MsConfiguratorWizardFirstPage.java
new file mode 100644 (file)
index 0000000..a8f26c3
--- /dev/null
@@ -0,0 +1,1017 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.mscreen.configurator;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.custom.TableEditor;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseTrackAdapter;
+import org.eclipse.swt.events.MouseTrackListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.core.configuration.device.Device;
+import org.tizen.efluibuilder.core.configuration.device.ScreenDesc.DPI;
+import org.tizen.efluibuilder.core.configurator.ConfiguratorConstants;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.model.part.MScreenPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.wizard.snippet.AbstractWizardPage;
+
+
+public class MsConfiguratorWizardFirstPage extends AbstractWizardPage {
+    public static final String NAME = MsConfiguratorWizardFirstPage.class.getName();
+
+    private static final int NAME_COLUMN_MAX_LEN = 30;
+    // controls
+    private Composite rootComposite = null;
+
+    private ScrolledComposite tableComposite = null;
+
+    private static final String KEY_TBL_ITEM_DATA_MS_CONFIG = "key-ms-data"; //$NON-NLS-1$
+
+    // name key
+    private static final String KEY_NAME = "" + eTBLCol.NAME.value; //$NON-NLS-1$
+    private static final String KEY_TBL_ITEM_DATA_TBL_NAME_EDITOR = KEY_NAME + "editor"; //$NON-NLS-1$
+
+    // resolution key
+    private static final String KEY_DEVICE = "" + eTBLCol.DEVICE.value; //$NON-NLS-1$
+    private static final String KEY_TBL_ITEM_DATA_TBL_DEVICE_EDITOR = "" + KEY_DEVICE + "editor"; //$NON-NLS-1$
+
+    // orientation key
+    private static final String KEY_ORIENTATION = "" + eTBLCol.ORIENTATION.value;
+    private static final String KEY_TBL_ITEM_DATA_TBL_ORIENTATION_EDITOR = KEY_ORIENTATION + "editor"; //$NON-NLS-1$
+    private static final String KEY_TBL_ITEM_DATA_ORIENTATION_STRING = KEY_ORIENTATION + "string"; //$NON-NLS-1$
+    private static final String KEY_ORIENTATION_ICON_DATA_TBL_ITEM = KEY_ORIENTATION + "item"; //$NON-NLS-1$
+
+    // delete key
+    private static final String KEY_DELETE = "" + eTBLCol.DELETE.value;
+    private static final String KEY_TBL_ITEM_DATA_TBL_DELETE_EDITOR = KEY_DELETE + "editor"; //$NON-NLS-1$
+    private static final String KEY_DEL_ICON_DATA_TBL_ITEM = KEY_DELETE + "item"; //$NON-NLS-1$
+
+    private static final String SPACING = "\n";
+
+    private static Logger logger = LoggerFactory.getLogger(MsConfiguratorWizardFirstPage.class);
+
+    // Define control variable
+    private Table table = null;
+    private Button addBtn = null;
+
+    private MScreenPart mscreenPart = null;
+
+    CompoundCommand compCmd = null;
+    TableEditor editor = null;
+    // Define Logic variable
+    // private MscreenManager mscreenManager = null;
+
+    private int deleteColumnWidth = 225;
+
+    private void setDeleteColumnWidth() {
+        if (Platform.OS_MACOSX.equals(Platform.getOS())) {
+            deleteColumnWidth = 255;
+        } else { // linux, windows case
+            deleteColumnWidth = 225;
+        }
+    }
+
+    private enum eTBLCol {
+        TEMP(0), NAME(1), DEVICE(2), ORIENTATION(3), DELETE(4);
+        private int value;
+
+        private eTBLCol(int value) {
+            this.value = value;
+        }
+    }
+
+    protected MsConfiguratorWizardFirstPage(String pageName, String title, ImageDescriptor titleImage) {
+        super(pageName, title, titleImage);
+        setDeleteColumnWidth();
+        setTitle(MscreenMessage.CONFIGURATOR_DLG_FIRST_PAGE_TITLE);
+        setDescription(MscreenMessage.CONFIGURATOR_DLG_FIRST_PAGE_DESCRIPTION);
+
+    }
+
+    private SelectionListener buttonAddListener = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent event) {
+            disposeEditor(editor);
+
+            editor.horizontalAlignment = SWT.CENTER;
+            editor.grabHorizontal = true;
+
+            addRow(table, null, true);
+            setPageComplete(false);
+
+            TableContainInfo tblContainInfo = new TableContainInfo(table.getItemCount() - 1, table.getItem(table.getItemCount() - 1));
+            final TableItem item = tblContainInfo.getTableItem();
+            // Create the Text object for our editor
+            editNameColumn(editor, item);
+        }
+
+        @Override
+        public void widgetDefaultSelected(SelectionEvent e) {
+        }
+    };
+
+    @Override
+    public void createControl(Composite parent) {
+        boolean bNew = true;
+        if (bNew) {
+            // Root Composite
+            rootComposite = new Composite(parent, SWT.NONE);
+            rootComposite.setLayout(new GridLayout(6, false));
+            rootComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+            setControl(rootComposite);
+
+            addBtn = new Button(rootComposite, SWT.PUSH);
+            addBtn.setText(MscreenMessage.CONFIGURATOR_DLG_BTN_ADD);
+
+            GridData gd = createGridData(GridData.HORIZONTAL_ALIGN_END, 6, SWT.RIGHT, 65);
+            gd.heightHint = 30;
+            addBtn.setLayoutData(gd);
+            addBtn.setSelection(false);
+
+            tableComposite = new ScrolledComposite(rootComposite, SWT.NONE);
+            tableComposite.setBackground(ColorResources.DIALOG_TABLE_BG);
+            tableComposite.setLayout(new GridLayout());
+            gd = createGridData(GridData.FILL_BOTH, 6, -1, -1);
+            tableComposite.setLayoutData(gd);
+            table = new Table(tableComposite, SWT.MULTI | SWT.BORDER);
+            tableComposite.setContent(table);
+            tableComposite.setExpandHorizontal(true);
+            tableComposite.setExpandVertical(true);
+            tableComposite.setAlwaysShowScrollBars(true);
+            tableComposite.setMinSize(table.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+            tableComposite.setFocus();
+            table.setHeaderVisible(true);
+            table.setLinesVisible(false);
+            initTableEditors();
+            createTableContents();
+            setPageComplete(false);
+            addListeners();
+            this.getShell().setMinimumSize(660, 461);
+            this.getShell().setLocation(SWT.CENTER, SWT.CENTER);
+        }
+    }
+
+    @Override
+    public void dispose() {
+        removeListeners();
+        super.dispose();
+    }
+
+    private void addListeners() {
+        table.addListener(SWT.MeasureItem, tableActionListener);
+        table.addListener(SWT.Selection, tableActionListener);
+        table.getColumn(0).addListener(SWT.Selection, tableColumnListener);
+        addBtn.addSelectionListener(buttonAddListener);
+    }
+
+    private void removeListeners() {
+        if (!table.isDisposed()) {
+            table.removeListener(SWT.MeasureItem, tableActionListener);
+            table.removeListener(SWT.Selection, tableActionListener);
+            table.getColumn(0).removeListener(SWT.Selection, tableColumnListener);
+        }
+        if (!addBtn.isDisposed()) {
+            addBtn.removeSelectionListener(buttonAddListener);
+        }
+    }
+
+    private void setValidate(String errorMessage) {
+        if (errorMessage != null) {
+            setMessage(null, errorMessage);
+            setPageComplete(false);
+        } else {
+            setMessage(MscreenMessage.CONFIGURATOR_DLG_FIRST_PAGE_DESCRIPTION, null);
+            setPageComplete(checkUniqueConfigurations());
+
+        }
+    }
+
+    public void printAllMscreenConfiguration() {
+        logger.debug("==============[printAllMscreenConfiguration]===========");
+        List<ScreenConfiguration> configurations = this.getScreenConfigurations();
+        for (Iterator<ScreenConfiguration> itr = configurations.iterator(); itr.hasNext();) {
+            ScreenConfiguration msConfiguration = itr.next();
+            logger.debug("-------------------------------------------------------");
+            logger.debug("* config-id:{}, config-name:{}", msConfiguration.getId(), msConfiguration.getName());
+            logger.debug("* config-orientation:{}, config-device:{}", msConfiguration.getQualifier(MscreenConstants.ORIENTATION),
+                         msConfiguration.getQualifier(MscreenConstants.DEVICE));
+        }
+        logger.debug("==============[printAllMscreenConfiguration]===========");
+    }
+
+    private boolean isStringEmpty(String string) {
+        if (string == null)
+            return false;
+        string = string.trim();
+        return (string.isEmpty()) ? true : false;
+    }
+
+    private boolean isUniqueName(String srcName, int srcIdx) {
+        TableItem destItem = null;
+        String destName;
+        srcName = srcName.trim();
+
+        if (srcName.isEmpty()) {
+            return true;
+        }
+
+        for (int j = 0; j < table.getItemCount(); j++) {
+            destItem = table.getItems()[j];
+            destName = destItem.getText(eTBLCol.NAME.value).trim();
+            if (destName.isEmpty()) {
+                continue;
+            }
+            if (srcIdx == j) {
+                continue;
+            }
+
+            if (srcName.equals(destName)) {
+                setValidate(MscreenMessage.CONFIGURATOR_DLG_MSG_NOT_UNIQ_NAME);
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private boolean isUniqueNames() {
+        String srcName;
+
+        for (TableItem srcItem : table.getItems()) {
+            srcName = srcItem.getText(eTBLCol.NAME.value).trim();
+            if (!checkValidName(srcName, srcItem, eTBLCol.NAME.value)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private boolean checkAllUnique() {
+        return isUniqueNames() && checkUniqueConfigurations();
+    }
+
+    private boolean checkUniqueConfigurations() {
+        TableItem srcItem = null, destItem = null;
+
+        for (int i = 0; i < table.getItemCount(); i++) {
+            srcItem = table.getItems()[i];
+
+            if (isStringEmpty(srcItem.getText(eTBLCol.NAME.value))) {
+                continue;
+            }
+
+            String strSrcRowItemValue = srcItem.getText(eTBLCol.DEVICE.value) + ":" + srcItem.getData(KEY_TBL_ITEM_DATA_ORIENTATION_STRING);
+
+            for (int j = 0; j < table.getItemCount(); j++) {
+                destItem = table.getItems()[j];
+                String strCompareRowItemValue = destItem.getText(eTBLCol.DEVICE.value) + ":" + destItem.getData(KEY_TBL_ITEM_DATA_ORIENTATION_STRING);
+
+                if (isMscreenTypeCommon(destItem)) {
+                    continue;
+                }
+                if (isStringEmpty(destItem.getText(eTBLCol.NAME.value))) {
+                    continue;
+                }
+                if (i == j) { // own self item
+                    continue;
+                }
+
+                if (strSrcRowItemValue.equals(strCompareRowItemValue)) {
+                    setValidate(MscreenMessage.CONFIGURATOR_DLG_MSG_NOT_UNIQ_ITEM);
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    public boolean remakeMscreenConfigurations() {
+        if (!checkAllUnique()) {
+            return false;
+        }
+        this.compCmd = new CompoundCommand();
+
+        // check removed parts
+        for (ScreenConfiguration config : getScreenConfigurations()) {
+            boolean isExist = false;
+            for (TableItem item : table.getItems()) {
+                ScreenConfiguration msConfigurationItem = getItemData(item);
+                if (msConfigurationItem != null && (msConfigurationItem.getPart() == config.getPart())) {
+                    isExist = true;
+                    break;
+                }
+            }
+            if (isExist == false) {
+                compCmd.add(PartUtil.createRemovePartCommand(config.getPart().getParent(), config.getPart()));
+            }
+        }
+
+        for (TableItem item : table.getItems()) {
+            ScreenConfiguration oldConfiguration = getItemData(item);
+            if (oldConfiguration != null) {
+                ScreenConfiguration newConfiguration = getCurrentScreenConfiguration(item);
+                if (newConfiguration != null) {
+                    Part configurePart = newConfiguration.getPart();
+                    // configuration name changed
+                    if (configurePart.getPropertyValue(LayoutSchemaConstants.NAME).equals(newConfiguration.getName()) == false) {
+                        compCmd.add(PartUtil.createSetPropertyCommand(configurePart, LayoutSchemaConstants.NAME, newConfiguration.getName()));
+                    }
+
+                    // qualifiers changed
+                    for (Map.Entry<String, String> entry : newConfiguration.getQualifiers().entrySet()) {
+                        if (configurePart.getPropertyValue(entry.getKey()).equals(entry.getValue()) == false) {
+                            compCmd.add(PartUtil.createSetPropertyCommand(configurePart, entry.getKey(), entry.getValue()));
+                        }
+                    }
+                }
+            } else {
+                // configuration added
+                if (!item.getText(eTBLCol.NAME.value).isEmpty()) {
+                    Part configurePart = PartUtil.createPart(PartType.CONFIGURATION, LayoutSchemaConstants.CONFIGURATION);
+                    configurePart.setPropertyValue(LayoutSchemaConstants.NAME, item.getText(eTBLCol.NAME.value));
+                    configurePart.setPropertyValue(LayoutSchemaConstants.DEVICE, item.getText(eTBLCol.DEVICE.value));
+                    configurePart.setPropertyValue(LayoutSchemaConstants.ORIENTATION, (String) item.getData(KEY_TBL_ITEM_DATA_ORIENTATION_STRING));
+                    configurePart.setPropertyValue(LayoutSchemaConstants.TYPE, LayoutSchemaConstants.CONFIGURATION_TYPE_SPECIFIC);
+                    compCmd.add(PartUtil.createAddPartCommand(mscreenPart, configurePart, null));
+                }
+            }
+        }
+        // printAllMscreenConfiguration();
+        if (compCmd.isEmpty()) {
+            compCmd = null;
+        }
+        return true;
+
+    }
+
+    private ScreenConfiguration getCurrentScreenConfiguration(TableItem item) {
+        ScreenConfiguration oldConfiguration = getItemData(item);
+        if (oldConfiguration == null) {
+            return null;
+        }
+        ConfigurationPart part = oldConfiguration.getPart();
+        Map<String, String> qualifiers = new HashMap<String, String>();
+        qualifiers.put(LayoutSchemaConstants.DEVICE, item.getText(eTBLCol.DEVICE.value));
+        qualifiers.put(LayoutSchemaConstants.ORIENTATION, (String) item.getData(KEY_TBL_ITEM_DATA_ORIENTATION_STRING));
+        return new ScreenConfiguration(part, item.getText(eTBLCol.NAME.value), part.getConfigurationType(), qualifiers);
+    }
+
+    private ScreenConfiguration getItemData(TableItem item) {
+        if (item == null) {
+            return null;
+        }
+
+        return (ScreenConfiguration) item.getData(KEY_TBL_ITEM_DATA_MS_CONFIG);
+    }
+
+    private boolean isMscreenTypeCommon(TableItem item) {
+        ScreenConfiguration msConfiguration = getItemData(item);
+        if (msConfiguration == null) {
+            return false;
+        }
+        return msConfiguration.isCommon();
+    }
+
+    private Device findDeviceByDisplayName(String deviceName) {
+        Collection<Device> devices = deviceManager.getDevices();
+        for (Device device : devices) {
+            if (device.getName().equals(deviceName)) {
+                return device;
+            }
+        }
+        return null;
+    }
+
+    private String getDeviceDetails(String deviceName) {
+        StringBuilder deviceDetails = new StringBuilder(MscreenMessage.DEVICE_DETAILS_TITLE);
+        Device device = findDeviceByDisplayName(deviceName);
+        if (device != null) {
+            if (device.getWidth() > 0) {
+                deviceDetails.append(SPACING);
+                deviceDetails.append(MscreenMessage.DEVICE_DETAILS_WIDTH);
+                deviceDetails.append(device.getWidth());
+
+            }
+            if (device.getHeight() > 0) {
+                deviceDetails.append(SPACING);
+                deviceDetails.append(MscreenMessage.DEVICE_DETAILS_HEIGHT);
+                deviceDetails.append(device.getHeight());
+            }
+            if ((device.getDPI() != DPI.INVALID_VALUE)) {
+                deviceDetails.append(SPACING);
+                deviceDetails.append(MscreenMessage.DEVICE_DETAILS_DPI);
+                deviceDetails.append(device.getDPI().name());
+            }
+            if (isStringEmpty(device.getDisplaySize())) {
+                deviceDetails.append(SPACING);
+                deviceDetails.append(MscreenMessage.DEVICE_DETAILS_SIZE);
+                deviceDetails.append(device.getDisplaySize());
+            }
+        }
+        return deviceDetails.toString();
+    }
+
+    private void initTableEditors() {
+        editor = new TableEditor(table);
+        editor.horizontalAlignment = SWT.CENTER;
+        editor.grabHorizontal = true;
+
+        table.addMouseTrackListener(new MouseTrackListener() {
+
+            @Override
+            public void mouseEnter(MouseEvent arg0) {
+                // TODO Auto-generated method stub
+
+            }
+
+            @Override
+            public void mouseExit(MouseEvent arg0) {
+                // TODO Auto-generated method stub
+
+            }
+
+            @Override
+            public void mouseHover(MouseEvent event) {
+                // TODO Auto-generated method stub
+
+                TableContainInfo tblContainInfo = new TableContainInfo(table, event.x, event.y);
+                final TableItem item = tblContainInfo.getTableItem();
+                if (item != null) {
+                    String deviceName = item.getText(eTBLCol.DEVICE.value);
+                    String deviceDetails = getDeviceDetails(deviceName);
+                    table.setToolTipText(deviceDetails);
+                } else {
+                    table.setToolTipText(null);
+                }
+            }
+
+        });
+
+        // TextEdit Handler
+        table.addMouseListener(new MouseAdapter() {
+            public void mouseDown(MouseEvent event) {
+                // Dispose any existing editor
+                disposeEditor(editor);
+                // Determine where the mouse was clicked
+                TableContainInfo tblContainInfo = new TableContainInfo(table, event.x, event.y);
+                final TableItem item = tblContainInfo.getTableItem();
+
+                if (item != null) {
+                    // Determine which column was selected
+                    int column = tblContainInfo.getColumn();
+                    if (isMscreenTypeCommon(item)) {
+                        return; // No edit..
+                    }
+                    if (column == eTBLCol.NAME.value) { // 1?
+                        // Create the Text object for our editor
+                        editNameColumn(editor, item);
+                    } else if (column == eTBLCol.DEVICE.value) {
+                        createDeviceCombo(editor, table, column, item, getDeviceNames(), item.getText(column));
+                    }
+                }
+            }
+        });
+    }
+
+    private boolean checkNameValue(String strValue) {
+        return strValue != null && strValue.matches(ModelConstants.ID_PATTERN);
+    }
+
+    private Listener tableActionListener = new Listener() {
+        @Override
+        public void handleEvent(Event event) {
+
+            switch (event.type) {
+                case SWT.MeasureItem: {
+                    final int widths[] = { 22, 157, 150, 150, deleteColumnWidth };
+                    event.width = widths[event.index];
+                    event.height = event.gc.getFontMetrics().getHeight(); // default
+                                                                          // height
+                                                                          // is
+                                                                          // 18
+
+                }
+                    break;
+                case SWT.Selection: {
+                    table.deselectAll();
+                }
+                    break;
+                default:
+
+                    break;
+            }
+        }
+    };
+
+    private Listener tableColumnListener = new Listener() {
+        @Override
+        public void handleEvent(Event event) {
+            // TODO SORTING
+        }
+    };
+
+    private void createDeviceCombo(TableEditor editor, Table tbl, int iColNum, final TableItem tblItem, String[] arrayStrings, String strSelectedValue) {
+        final CCombo combo = new CCombo(tbl, SWT.READ_ONLY);
+        for (int i = 0, n = arrayStrings.length; i < n; i++) {
+            combo.add(arrayStrings[i]);
+        }
+        tblItem.setText(iColNum, tblItem.getText(eTBLCol.DEVICE.value));
+        combo.select(combo.indexOf(strSelectedValue)); // assign selected string
+        editor.minimumWidth = combo.computeSize(150, SWT.DEFAULT).x;
+        tbl.getColumn(iColNum).setWidth(editor.minimumWidth);
+
+        // Set the focus on the dropdown and set into the editor
+        combo.setFocus();
+        editor.horizontalAlignment = SWT.CENTER;
+        editor.setEditor(combo, tblItem, iColNum);
+
+        // Add a listener to set the selected item back into the cell
+        final int iCol = iColNum;
+        combo.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent event) {
+                tblItem.setText(iCol, combo.getText());
+
+                if (checkAllUnique()) {
+                    setValidate(null);
+                }
+            }
+        });
+        tblItem.setData(KEY_TBL_ITEM_DATA_TBL_DEVICE_EDITOR, editor);
+    }
+
+    private void changeOrientationImage(String orientation, Label portraitLabel, Label landscapeLabel) {
+        Image portraitImage = null;
+        Image landScapeImage = null;
+        if (orientation.equals(MscreenConstants.ORIENTATION_PORTRAIT)) { // port on
+            portraitImage = ImageResources.getImage(ImageResources.DIALOG_DEVICE_MOBILE_PORTRAIT_NOR);
+            landScapeImage = ImageResources.getImage(ImageResources.DIALOG_DEVICE_MOBILE_LANDSCAPE_DIM);
+        } else {
+            portraitImage = ImageResources.getImage(ImageResources.DIALOG_DEVICE_MOBILE_PORTRAIT_DIM);
+            landScapeImage = ImageResources.getImage(ImageResources.DIALOG_DEVICE_MOBILE_LANDSCAPE_NOR);
+        }
+        portraitLabel.setImage(portraitImage);
+        landscapeLabel.setImage(landScapeImage);
+        portraitLabel.pack();
+        landscapeLabel.pack();
+    }
+
+    private boolean isWearableProfile() {
+        return profile.startsWith(ConfiguratorConstants.PROFILE_WEARABLE);
+    }
+
+    private void selectOrientation(Table table, String orientation, Label portraitLabel, Label landscapeLabel) {
+
+        TableItem item = (TableItem) portraitLabel.getData(KEY_ORIENTATION_ICON_DATA_TBL_ITEM);
+        if (item != null) {
+            if (orientation.equals(item.getData(KEY_TBL_ITEM_DATA_ORIENTATION_STRING))) {
+                return; // No change
+            } else if (orientation.equals(MscreenConstants.ORIENTATION_LANDSCAPE)) {
+                // exclude: wearable profile is only portrait
+                if (isWearableProfile()) {
+                    return;
+                }
+            }
+            changeOrientationImage(orientation, portraitLabel, landscapeLabel);
+            item.setData(KEY_TBL_ITEM_DATA_ORIENTATION_STRING, orientation);
+            if (checkAllUnique()) {
+                setValidate(null);
+            }
+        }
+    }
+
+    private void setOrientation(Table table, TableItem item, String orientation, Label portraitLabel, Label landscapeLabel) {
+
+        // final TableItem item = item;
+        if (item != null) {
+            changeOrientationImage(orientation, portraitLabel, landscapeLabel);
+            item.setData(KEY_TBL_ITEM_DATA_ORIENTATION_STRING, orientation);
+            portraitLabel.setData(KEY_ORIENTATION_ICON_DATA_TBL_ITEM, item);
+            landscapeLabel.setData(item);
+        }
+    }
+
+    private void addBlankColumn(TableItem item, String defaultValue) {
+        item.setText(eTBLCol.TEMP.value, defaultValue);
+        if (isMscreenTypeCommon(item)) {
+            item.setGrayed(true);
+        }
+    }
+
+    private void addNameColumn(TableItem item, String defaultValue) {
+        item.setText(eTBLCol.NAME.value, defaultValue);
+
+        if (isMscreenTypeCommon(item)) {
+            item.setGrayed(true);
+        }
+    }
+
+    private void addDeviceColumn(TableItem item, String defaultValue) {
+        if (defaultValue.isEmpty()) {
+            defaultValue = getDeviceNames()[0];
+        }
+        item.setText(eTBLCol.DEVICE.value, defaultValue);
+    }
+
+    private void addOrientationColumn(TableItem item, String defaultValue) {
+        if (defaultValue.isEmpty()) {
+            defaultValue = MscreenConstants.ORIENTATIONS[0];
+        }
+        final TableEditor editor = new TableEditor(table);
+        Composite orientationComposite = new Composite(table, SWT.NONE);
+        FormData form = new FormData();
+        form.left = new FormAttachment(0, -10);
+        editor.setEditor(orientationComposite, item, eTBLCol.ORIENTATION.value);
+
+        orientationComposite.setLayout(new FormLayout());
+        orientationComposite.setLayoutData(form);
+
+        final Label portraitLabel = new Label(orientationComposite, SWT.NONE);
+        form = new FormData();
+        form.left = new FormAttachment(0, 48);
+        form.top = new FormAttachment(0, 6);
+
+        portraitLabel.setLayoutData(form);
+        portraitLabel.pack();
+
+        form = new FormData();
+        form.left = new FormAttachment(portraitLabel, 1);
+        form.top = new FormAttachment(0, 6);
+
+        final Label landscapeLabel = new Label(orientationComposite, SWT.NONE);
+        landscapeLabel.setLayoutData(form);
+        landscapeLabel.pack();
+        orientationComposite.setBackgroundMode(SWT.INHERIT_FORCE);
+
+        portraitLabel.addMouseListener(new MouseAdapter() {
+            public void mouseUp(MouseEvent event) {
+                selectOrientation(table, MscreenConstants.ORIENTATION_PORTRAIT, portraitLabel, landscapeLabel);
+            }
+        });
+        landscapeLabel.addMouseListener(new MouseAdapter() {
+            public void mouseUp(MouseEvent event) {
+                selectOrientation(table, MscreenConstants.ORIENTATION_LANDSCAPE, portraitLabel, landscapeLabel);
+            }
+        });
+        setOrientation(table, item, defaultValue, portraitLabel, landscapeLabel);
+        editor.minimumWidth = portraitLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT).x + landscapeLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT).x + 100;
+        editor.minimumHeight = portraitLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
+
+        if (Platform.OS_WIN32.equals(Platform.getOS())) {
+            table.getColumn(eTBLCol.ORIENTATION.value).setWidth(editor.minimumWidth + 2);
+
+        } else if (Platform.OS_LINUX.equals(Platform.getOS())) {
+            table.getColumn(eTBLCol.ORIENTATION.value).setWidth(editor.minimumWidth + 4);
+        } else { // OS X Select
+            table.getColumn(eTBLCol.ORIENTATION.value).setWidth(editor.minimumWidth + 2);
+
+        }
+        editor.horizontalAlignment = SWT.CENTER;
+        editor.verticalAlignment = SWT.CENTER;
+
+        item.setData(KEY_TBL_ITEM_DATA_TBL_ORIENTATION_EDITOR, editor);
+    }
+
+    private void addDeleteColumn(TableItem item) {
+        if (!isMscreenTypeCommon(item)) {
+            final TableEditor editorDel = new TableEditor(table);
+            Composite deleteComposite = new Composite(table, SWT.NONE);
+            deleteComposite.setLayout(new FormLayout());
+            final Label deleteLabel = new Label(deleteComposite, SWT.NONE);
+            FormData form = new FormData();
+            form.left = new FormAttachment(0, 29);
+            form.top = new FormAttachment(0, 6);
+
+            deleteLabel.setLayoutData(form);
+            // deleteLabel.pack();
+            Image image = ImageResources.getImage(ImageResources.DIALOG_PROFILE_DELETE_NOR);
+            deleteLabel.setImage(image);
+            // deleteLabel.pack();
+
+            editorDel.minimumWidth = deleteLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT).x + 56;
+            editorDel.minimumHeight = deleteLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
+            table.getColumn(eTBLCol.DELETE.value)
+                    .setWidth(table.getColumn(eTBLCol.DELETE.value).getParent().getSize().x - table.getColumn(eTBLCol.TEMP.value).getWidth()
+                            - table.getColumn(eTBLCol.NAME.value).getWidth()
+                            - table.getColumn(eTBLCol.DEVICE.value).getWidth() - table.getColumn(eTBLCol.ORIENTATION.value).getWidth() - 21);
+
+            editorDel.horizontalAlignment = SWT.CENTER;
+            editorDel.verticalAlignment = SWT.CENTER;
+            editorDel.setEditor(deleteComposite, item, eTBLCol.DELETE.value);
+            item.setData(KEY_TBL_ITEM_DATA_TBL_DELETE_EDITOR, editorDel);
+            deleteLabel.setData(KEY_DEL_ICON_DATA_TBL_ITEM, item);
+
+            deleteLabel.addMouseTrackListener(new MouseTrackAdapter() {
+                @Override
+                public void mouseEnter(MouseEvent event) {
+                    Image image = ImageResources.getImage(ImageResources.DIALOG_PROFILE_DELETE_OVER);
+
+                    deleteLabel.setImage(image);
+                }
+
+                @Override
+                public void mouseExit(MouseEvent event) {
+                    Image image = ImageResources.getImage(ImageResources.DIALOG_PROFILE_DELETE_NOR);
+
+                    deleteLabel.setImage(image);
+                }
+
+            });
+            deleteLabel.addMouseListener(new MouseAdapter() {
+
+                @Override
+                public void mouseDown(MouseEvent event) {
+                    Image image = ImageResources.getImage(ImageResources.DIALOG_PROFILE_DELETE_SEL);
+
+                    deleteLabel.setImage(image);
+
+                }
+
+                public void mouseUp(MouseEvent event) {
+                    final TableItem item = (TableItem) deleteLabel.getData(KEY_DEL_ICON_DATA_TBL_ITEM);
+                    table.setRedraw(false);
+                    disposeEditor(item, KEY_TBL_ITEM_DATA_TBL_NAME_EDITOR);
+                    disposeEditor(item, KEY_TBL_ITEM_DATA_TBL_DEVICE_EDITOR);
+                    disposeEditor(item, KEY_TBL_ITEM_DATA_TBL_ORIENTATION_EDITOR);
+                    disposeEditor(item, KEY_TBL_ITEM_DATA_TBL_DELETE_EDITOR);
+                    table.remove(table.indexOf(item));
+                    table.pack();
+                    // addEmptyRow();
+                    table.pack();
+                    table.setRedraw(true);
+                    if (isUniqueNames() && checkUniqueConfigurations()) {
+                        setValidate(null);
+                    }
+                }
+            });
+        }
+    }
+
+    private void addRow(Table tbl, ScreenConfiguration mScreenConfiguration, boolean bAddToBottom) {
+        String name = "", device = "", orientation = ""; //$NON-NLS-1$
+        if (mScreenConfiguration != null) {
+            name = mScreenConfiguration.getName();
+            device = mScreenConfiguration.getQualifier(MscreenConstants.DEVICE);
+            orientation = mScreenConfiguration.getQualifier(MscreenConstants.ORIENTATION);
+        }
+
+        int iAddIdx = (bAddToBottom) ? tbl.getItemCount() : 1; // Add or init?
+        TableItem item = new TableItem(tbl, SWT.NONE, iAddIdx);
+
+        Image makeHeightImage = new Image(tbl.getDisplay(), 22, 37);
+
+        item.setImage(0, makeHeightImage);
+        item.setData(KEY_TBL_ITEM_DATA_MS_CONFIG, mScreenConfiguration);
+
+        addBlankColumn(item, "");
+        addNameColumn(item, name);
+        addDeviceColumn(item, device);
+        addOrientationColumn(item, orientation);
+        addDeleteColumn(item);
+        table.setBackgroundMode(SWT.INHERIT_FORCE);
+        table.pack();
+
+    }
+
+    //
+
+    // ms-util
+    private GridData createGridData(int style, int horizontalSpan, int horizontalAlignment, int widthHint) {
+        GridData gd = new GridData(style);
+        if (horizontalSpan > 0)
+            gd.horizontalSpan = horizontalSpan;
+        if (horizontalAlignment > 0)
+            gd.horizontalAlignment = horizontalAlignment;
+        if (widthHint > 0)
+            gd.widthHint = widthHint;
+        return gd;
+    }
+
+    // ms-util
+    private void disposeEditor(TableItem item, String key) {
+        TableEditor tblEidtor = (TableEditor) item.getData(key);
+        if (tblEidtor != null) {
+            disposeEditor(tblEidtor);
+        }
+    }
+
+    // ms-util
+    private void disposeEditor(TableEditor editor) {
+        // Dispose any existing editor
+        Control old = editor.getEditor();
+        if (old != null) {
+            old.dispose();
+        }
+    }
+
+    // ms-util
+    private void editNameColumn(TableEditor editor, TableItem nameItem) {
+
+        final int iCol = eTBLCol.NAME.value;
+        final TableItem item = nameItem;
+        final Text text = new Text(table, SWT.LEFT);
+        text.setTextLimit(NAME_COLUMN_MAX_LEN);
+        text.setText(item.getText(iCol));
+        text.setForeground(item.getForeground());
+        text.setFocus();
+        text.selectAll();
+
+        // Recalculate the minimum width for the editor
+        editor.minimumWidth = text.getBounds().width;
+        editor.minimumHeight = text.getBounds().height;
+        // Set the control into the editor
+        editor.setEditor(text, item, iCol);
+        item.setData(KEY_TBL_ITEM_DATA_TBL_NAME_EDITOR, editor);
+
+        // Add a handler to transfer the text back to the cell
+        // any time it's modified
+        // final int iCol = column;
+
+        text.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent event) {
+                checkValidName(text.getText().trim(), item, iCol);
+                if (checkAllUnique()) {
+                    setPageComplete(true);
+                } else {
+                    setPageComplete(false);
+                }
+
+            }
+        });
+        text.addFocusListener(new FocusListener() {
+
+            @Override
+            public void focusLost(FocusEvent arg0) {
+                checkValidName(text.getText().trim(), item, iCol);
+                if (checkAllUnique()) {
+                    setPageComplete(true);
+                } else {
+                    setPageComplete(false);
+                }
+            }
+
+            @Override
+            public void focusGained(FocusEvent arg0) {
+            }
+        });
+
+    }
+
+    private boolean checkValidName(String inputName, TableItem item, int iCol) {
+        boolean isSucceed = false;
+        int srcIdx = table.indexOf(item);
+        if (inputName.isEmpty()) {
+            setValidate(MscreenMessage.CONFIGURATOR_DLG_MSG_CONFIG_NAME_EMPTY);
+            item.setText(iCol, inputName);
+        } else if (inputName.length() >= NAME_COLUMN_MAX_LEN) {
+            setValidate(MscreenMessage.CONFIGURATOR_DLG_MSG_NAME_LENGTH);
+            item.setText(iCol, inputName);
+        } else if (!checkNameValue(inputName)) {
+            setValidate(MscreenMessage.CONFIGURATOR_DLG_MSG_CONFIG_NAME_REGX);
+            item.setText(iCol, inputName);
+        } else if (!isUniqueName(inputName, srcIdx)) {
+            item.setText(iCol, inputName);
+        } else { // succeed
+            item.setText(iCol, inputName);
+            if (checkUniqueConfigurations()) {
+                setValidate(null);
+            }
+            isSucceed = true;
+        }
+        return isSucceed;
+    }
+
+    private void drawTable(Table tbl) {
+        tbl.setRedraw(false);
+        tbl.removeAll();
+        List<ScreenConfiguration> configurations = this.getScreenConfigurations();
+        for (Iterator<ScreenConfiguration> itr = configurations.iterator(); itr.hasNext();) {
+            ScreenConfiguration msConfiguration = itr.next();
+
+            addRow(tbl, msConfiguration, true);
+
+        }
+
+        tbl.setRedraw(true);
+    }
+
+    private void createTableContents() {
+        String[] strColTitle = new String[] { " ", MscreenMessage.CONFIGURATOR_TBL_TITLE_NAME, MscreenMessage.CONFIGURATOR_TBL_TITLE_DEVICE,
+                MscreenMessage.CONFIGURATOR_TBL_TITLE_ORIENTATION, MscreenMessage.CONFIGURATOR_TBL_TITLE_DELETE };
+        TableColumn[] columns = new TableColumn[strColTitle.length];
+
+        for (int i = 0; i < strColTitle.length; i++) {
+            if (i == 1) {
+                columns[i] = new TableColumn(table, SWT.LEFT);
+            } else {
+                columns[i] = new TableColumn(table, SWT.CENTER);
+            }
+            columns[i].setText(strColTitle[i]);
+
+        }
+
+        drawTable(table);
+        table.setBackground(ColorResources.DIALOG_TABLE_BG);
+        table.addListener(SWT.MeasureItem, tableActionListener);
+
+        // Pack each column so initial display is good
+        for (int i = 0, n = columns.length; i < n; i++) {
+            columns[i].pack();
+        }
+
+    }
+
+    private String[] getDeviceNames() {
+        String[] results = new String[deviceManager.getDevices().size()];
+        int i = 0;
+        for (Device device : deviceManager.getDevices()) {
+            results[i] = device.getName();
+            i++;
+        }
+
+        return results;
+    }
+
+    public void setContents(MScreenPart mscreenPart) {
+        this.mscreenPart = mscreenPart;
+    }
+
+    private List<ScreenConfiguration> getScreenConfigurations() {
+        List<ScreenConfiguration> configurations = new ArrayList<ScreenConfiguration>();
+        for (Part part : mscreenPart.getChildren()) {
+            if (part instanceof ConfigurationPart) {
+                configurations.add(new ScreenConfiguration((ConfigurationPart) part));
+            }
+        }
+
+        return configurations;
+    }
+
+    public Command getCommand() {
+        return this.compCmd;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MscreenConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MscreenConstants.java
new file mode 100644 (file)
index 0000000..70b77e8
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.mscreen.configurator;
+
+public class MscreenConstants {
+
+    public static final String LOCALE_KEY = "@locale/"; //$NON-NLS-1$
+    public static final String RESOURCE_KEY = "@resource/";
+    public static final String RESOURCE_DIRECTORY = "/res/"; //$NON-NLS-1$
+    public static final String CONFIGURATION_TYPE_COMMON = "common"; //$NON-NLS-1$
+
+    public static final String DEVICE = "device"; //$NON-NLS-1$
+    public static final String ORIENTATION = "orientation"; //$NON-NLS-1$
+    public static final String ORIENTATION_PORTRAIT = "portrait"; //$NON-NLS-1$
+    public static final String ORIENTATION_LANDSCAPE = "landscape"; //$NON-NLS-1$
+
+    public static final String[] ORIENTATIONS = {
+            ORIENTATION_PORTRAIT,
+            ORIENTATION_LANDSCAPE
+    };
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MscreenMessage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MscreenMessage.java
new file mode 100644 (file)
index 0000000..9e83ddd
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.mscreen.configurator;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public class MscreenMessage extends NLS {
+
+    private static final String BUNDLE_NAME = MscreenMessage.class.getName();
+
+    public static String CONFIGURATOR_DLG_TITLE;
+    public static String CONFIGURATOR_DLG_FIRST_PAGE_TITLE;
+    public static String CONFIGURATOR_DLG_FIRST_PAGE_DESCRIPTION;
+    public static String CONFIGURATOR_DLG_BTN_ADD;
+    public static String CONFIGURATOR_DLG_BTN_DELETE;
+
+    public static String CONFIGURATOR_TBL_TITLE_NAME;
+    public static String CONFIGURATOR_TBL_TITLE_DEVICE;
+    public static String CONFIGURATOR_TBL_TITLE_ORIENTATION;
+    public static String CONFIGURATOR_TBL_TITLE_DELETE;
+
+    public static String CONFIGURATOR_DLG_MSG_NOT_UNIQ_ITEM;
+    public static String CONFIGURATOR_DLG_MSG_NOT_UNIQ_NAME;
+    public static String CONFIGURATOR_DLG_MSG_CONFIG_NAME_EMPTY;
+    public static String CONFIGURATOR_DLG_MSG_CONFIG_NAME_REGX;
+    public static String CONFIGURATOR_DLG_MSG_NAME_LENGTH;
+
+    public static String RM_DND_ERR_TITLE_INVALID_PROJECT;
+    public static String RM_DND_MSG_TITLE_INVALID_PROJECT;
+
+    public static String DEVICE_DETAILS_TITLE;
+    public static String DEVICE_DETAILS_WIDTH;
+    public static String DEVICE_DETAILS_HEIGHT;
+    public static String DEVICE_DETAILS_DPI;
+    public static String DEVICE_DETAILS_SIZE;
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, MscreenMessage.class);
+    }
+
+    private MscreenMessage() {
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MscreenMessage.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/MscreenMessage.properties
new file mode 100644 (file)
index 0000000..b299b90
--- /dev/null
@@ -0,0 +1,21 @@
+CONFIGURATOR_DLG_TITLE=Screen Configurations
+CONFIGURATOR_DLG_FIRST_PAGE_TITLE=Manage screen configurations
+CONFIGURATOR_DLG_FIRST_PAGE_DESCRIPTION=Specify the name, resolution, and orientation of the application screen. 
+CONFIGURATOR_DLG_BTN_ADD=Add
+CONFIGURATOR_DLG_BTN_DELETE=Delete
+CONFIGURATOR_TBL_TITLE_NAME=Name
+CONFIGURATOR_TBL_TITLE_DEVICE=Resolution
+CONFIGURATOR_TBL_TITLE_ORIENTATION=Orientation
+CONFIGURATOR_TBL_TITLE_DELETE=Remove
+CONFIGURATOR_DLG_MSG_NOT_UNIQ_ITEM=The same configuration already exists. Specify another configuration. 
+CONFIGURATOR_DLG_MSG_NOT_UNIQ_NAME=A configuration with the same name already exists. Enter another name.
+CONFIGURATOR_DLG_MSG_CONFIG_NAME_EMPTY=Enter a screen name.
+CONFIGURATOR_DLG_MSG_CONFIG_NAME_REGX=The name must begin with a letter (case-sensitivity alphabet or underscore), and can only contain letters (A-Z, a-z,_) and digits (0-9).
+CONFIGURATOR_DLG_MSG_NAME_LENGTH=The name must be 1 - 30 characters long.
+RM_DND_ERR_TITLE_INVALID_PROJECT=Drag-and-drop failure
+RM_DND_MSG_TITLE_INVALID_PROJECT=Please select file in your current project (res directory only)
+DEVICE_DETAILS_TITLE=Details:
+DEVICE_DETAILS_WIDTH=- Width: 
+DEVICE_DETAILS_HEIGHT=- Height: 
+DEVICE_DETAILS_DPI=- DPI: 
+DEVICE_DETAILS_SIZE=- Size: 
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/ScreenConfiguration.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/ScreenConfiguration.java
new file mode 100644 (file)
index 0000000..95c4039
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.mscreen.configurator;
+
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+
+
+public final class ScreenConfiguration {
+
+    private ConfigurationPart part = null;
+
+    private String id = null;
+    private String name = null;
+    private String type = "";
+
+    private Map<String, String> qualifiers = null;
+
+    public ScreenConfiguration(ConfigurationPart part, String name, String type, Map<String, String> qualifiers) {
+        this.part = part;
+
+        this.id = part.getUniqueId();
+        this.name = name;
+        this.type = type;
+
+        if (qualifiers == null) {
+            qualifiers = createQualifiers(part);
+        }
+        this.qualifiers = qualifiers;
+    }
+
+    public ScreenConfiguration(ConfigurationPart configurePart) {
+        this.part = configurePart;
+        this.id = configurePart.getUniqueId();
+        this.name = configurePart.getName();
+        this.type = configurePart.getConfigurationType();
+
+        this.qualifiers = createQualifiers(configurePart);
+    }
+
+    public static Map<String, String> createQualifiers(ConfigurationPart configPart) {
+        Map<String, String> qualifiers = new HashMap<String, String>();
+        qualifiers.put(LayoutSchemaConstants.DEVICE, configPart.getDevice());
+        qualifiers.put(LayoutSchemaConstants.ORIENTATION, configPart.getOrientation());
+        return qualifiers;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public boolean isCommon() {
+        return MscreenConstants.CONFIGURATION_TYPE_COMMON.equals(this.type);
+    }
+
+    public void setType(String type) {
+        if (type == null) {
+            return;
+        }
+        this.type = type;
+    }
+
+    public String getQualifier(String key) {
+        Assert.notNull(key);
+        return qualifiers.get(key);
+    }
+
+    public Iterator<String> getQualifierKeys() {
+        return qualifiers.keySet().iterator();
+    }
+
+    public Map<String, String> getQualifiers() {
+        return qualifiers;
+    }
+
+    public String getDisplayName() {
+        StringBuffer results = new StringBuffer(name + " (");
+        Iterator<String> itr = getQualifierKeys();
+        while (itr.hasNext()) {
+            String key = itr.next();
+            results.append(getQualifier(key));
+
+            if (itr.hasNext()) {
+                results.append("_");
+            }
+        }
+
+        results.append(")");
+
+        return results.toString();
+    }
+
+    @Override
+    public String toString() {
+        return MessageFormat.format("{0}:{1}:{2}:{3}:{4}",
+                                    getId(),
+                                    getName(),
+                                    getType(),
+                                    getQualifier(MscreenConstants.DEVICE),
+                                    getQualifier(MscreenConstants.ORIENTATION));
+    }
+
+    public ConfigurationPart getPart() {
+        return this.part;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/TableContainInfo.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/configurator/TableContainInfo.java
new file mode 100644 (file)
index 0000000..cb51168
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.mscreen.configurator;
+
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+
+
+public class TableContainInfo {
+    private int column;
+    private TableItem tableItem;
+
+    protected TableContainInfo(int column, TableItem tableItem) {
+        this.column = column;
+        this.tableItem = tableItem;
+    }
+
+    public void measureContainInfo(Table table, int x, int y) {
+        // Determine where the mouse was clicked
+        Point pt = new Point(x, y);
+
+        // Determine which row was selected
+        TableItem[] tableItems = table.getItems();
+        TableItem tableItemIter = null;
+        int column = -1;
+
+        for (int itemIdx = 0; itemIdx < tableItems.length; itemIdx++) {
+            for (int colIdx = 0; colIdx < table.getColumnCount(); colIdx++) {
+                Rectangle rect = tableItems[itemIdx].getBounds(colIdx);
+                if (rect.contains(pt)) {
+                    tableItemIter = tableItems[itemIdx];
+                    column = colIdx;
+                    break;
+                }
+            }
+        }
+        final TableItem item = tableItemIter;
+        if ((item == null) || (column < 0)) {
+            this.column = -1;
+            this.tableItem = null;
+            return;
+        } else {
+            this.column = column;
+            this.tableItem = item;
+        }
+    }
+
+    protected TableContainInfo(Table table, int x, int y) {
+        measureContainInfo(table, x, y);
+    }
+
+    public int getColumn() {
+        return column;
+    }
+
+    public TableItem getTableItem() {
+        return tableItem;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/rm/AutoCompleteTextUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/rm/AutoCompleteTextUtil.java
new file mode 100644 (file)
index 0000000..e88d0d7
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.mscreen.rm;
+
+import org.eclipse.jface.bindings.keys.KeyStroke;
+import org.eclipse.jface.bindings.keys.ParseException;
+import org.eclipse.jface.fieldassist.ContentProposal;
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.SimpleContentProposalProvider;
+import org.eclipse.jface.fieldassist.TextContentAdapter;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class AutoCompleteTextUtil {
+
+    private static Logger logger = LoggerFactory.getLogger(AutoCompleteTextUtil.class);
+    private static final String KEYSTROKE_PRESS = "Ctrl+Space"; //$NON-NLS-1$
+    private static final String KEY_ENABLE_SHORTCUT = "enable-shortcut"; //$NON-NLS-1$
+    private static final String LOG_PRINT_KEYSTROKE_EXCEPTION = "KeyStroke Parse Exception"; //$NON-NLS-1$
+    private static final String LOG_PRINT_PROPOSALS_EXCEPTION = "This proposals are null or no data."; //$NON-NLS-1$
+
+    /**
+     * This method is used to provide the implementaion of eclipse autocompletion feature. User has
+     * to press "CTRL+Space" to see the autocompletion effect.
+     * 
+     * @param text
+     *            of type {@link Text}
+     * @param proposals
+     *            of type String Array
+     * @param shortcut
+     *            <code>String</code> if this Method use shortcut string, and <code>null</code>
+     *            otherwise
+     * @param itemCommonImage
+     *            <code>Image</code> if this Method use item image, and <code>null</code> otherwise
+     */
+    public static void setAutoCompletion(Text text, String[] proposals, String shortcut, Image itemCommonImage) {
+        try {
+            String autoActivationCharacters = "";
+            SimpleContentProposalProvider simpleContentProposalProvider = new SimpleContentProposalProvider(proposals);
+            StringBuffer buf = new StringBuffer();
+
+            if ((proposals == null) || (proposals.length < 1)) {
+                logger.warn(LOG_PRINT_PROPOSALS_EXCEPTION);
+                return;
+            }
+
+            for (int i = 0; i < proposals.length; i++) {
+                if (proposals[i].length() == 0)
+                    continue;
+
+                char c = proposals[i].charAt(0);
+                if (autoActivationCharacters.indexOf(c) == -1) {
+                    buf.append(c);
+                }
+            }
+            autoActivationCharacters = autoActivationCharacters + buf.toString();
+            /* This is very important for pre-builtin text */
+            autoActivationCharacters += text.getText();
+
+            KeyStroke keyStroke = null;
+            simpleContentProposalProvider.setFiltering(true);
+            try {
+                keyStroke = KeyStroke.getInstance(KEYSTROKE_PRESS);
+            } catch (ParseException e) {
+                logger.warn(LOG_PRINT_KEYSTROKE_EXCEPTION);
+            }
+
+            final Text labelText = text;
+            final String labelShortcut = shortcut;
+            final Image labelItemCommonImage = itemCommonImage;
+
+            boolean enableShortcutStatus = true;
+            labelText.setData(KEY_ENABLE_SHORTCUT, enableShortcutStatus);
+            ContentProposalAdapter proposalAdapter = new ContentProposalAdapter(text, new TextContentAdapter(), simpleContentProposalProvider, keyStroke,
+                                                                                autoActivationCharacters.toCharArray());
+
+            proposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
+            proposalAdapter.setLabelProvider(new ILabelProvider() {
+
+                @Override
+                public void removeListener(ILabelProviderListener listener) {
+                }
+
+                @Override
+                public boolean isLabelProperty(Object element, String property) {
+                    return false;
+                }
+
+                @Override
+                public void dispose() {
+                }
+
+                @Override
+                public void addListener(ILabelProviderListener listener) {
+                }
+
+                @Override
+                public String getText(Object element) {
+                    /*
+                     * This eventListener is inappropriate. Whenever text is matched, Same listener
+                     * is added to Text object. Furthermore, this listener seems unnecessary. It
+                     * works well without this listener.
+                     */
+
+                    boolean enableShortcutStatus = (Boolean) labelText.getData(KEY_ENABLE_SHORTCUT);
+
+                    if ((labelShortcut != null) && (labelShortcut.length() > 1)) {
+                        String firstCh = labelShortcut.charAt(0) + "";
+                        String secondChs = labelShortcut.substring(1);
+                        if (labelText.getText().equals(firstCh) && (enableShortcutStatus)) { // eg)
+                                                                                             // "@"
+                            labelText.insert(secondChs); // eg) "resource"
+                        }
+                    }
+                    return ((ContentProposal) element).getLabel();
+                }
+
+                @Override
+                public Image getImage(Object element) {
+                    return labelItemCommonImage; // <insert image>
+                }
+            });
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/rm/IRMWrapper.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/rm/IRMWrapper.java
new file mode 100644 (file)
index 0000000..33d035a
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.mscreen.rm;
+
+import org.tizen.efluibuilder.core.configuration.device.ScreenDesc.DPI;
+
+
+public interface IRMWrapper {
+
+    public String getMsg(String id, String locale);
+
+    public String[] getLocales();
+
+    public String getResourcePath(String id, DPI dpi, String locale);
+
+    /* [START]==added by SBC for AutoCompleteText */
+    public String[] getAllResourceKeys(String shortcutPrefixString, String[] extentionFilters);
+
+    public String[] getMsgKeys(String shortcutPrefixString);
+    /* [END]==added by SBC for AutoCompleteText */
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/rm/ResourceManagerUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/mscreen/rm/ResourceManagerUtil.java
new file mode 100644 (file)
index 0000000..00f89a2
--- /dev/null
@@ -0,0 +1,310 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.mscreen.rm;
+
+import java.io.File;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.core.configuration.device.ScreenDesc.DPI;
+import org.tizen.efluibuilder.model.app.AppManager;
+import org.tizen.efluibuilder.mscreen.configurator.MscreenConstants;
+import org.tizen.nativecommon.po.INativeLocaleMessages;
+import org.tizen.nativecommon.po.NativeLocaleMessageManager;
+import org.tizen.nativecommon.rm.model.ITizenRMFeature;
+import org.tizen.nativecommon.rm.model.RMHandler;
+import org.tizen.nativecommon.rm.model.ResConfig.Key;
+import org.tizen.nativecommon.rm.model.TizenDPI;
+import org.tizen.nativecommon.rm.model.TizenLocale;
+
+
+public final class ResourceManagerUtil {
+
+    private IProject project = null;
+
+    public ResourceManagerUtil(IProject project) {
+        this.project = project;
+    }
+
+    private static final float SUPPORT_RM_VERSION = 2.4F;
+    public static final TizenLocale RM_LOCALE_ALL = TizenLocale.ALL;
+
+    // for fallback resources
+    private static final int FB_STEP0_START = 0; // 0
+    private static final int FB_STEP1_LOCALE_ALL = FB_STEP0_START + 1; // 1
+    private static final int FB_STEP2_ALL_DPI = FB_STEP1_LOCALE_ALL + 1; // 2
+    private static final int FB_STEP3_ALL_ALL = FB_STEP2_ALL_DPI + 1; // 3
+
+    private DPI selectedDpi = DPI.ALL;
+    private String selectedLocale = RM_LOCALE_ALL.getName();
+
+    // == [START]==added by SBC for AutoCompleteText==//
+
+    public static boolean isAlternativeResourceSupport(String platformVersionString) {
+        platformVersionString = platformVersionString.substring(0, 3); // eg) 2.3.1 -> 2.3
+        float platformVersionFloat = Float.parseFloat(platformVersionString);
+        if (platformVersionFloat >= SUPPORT_RM_VERSION) { // The alternative resource support 2.4
+                                                          // platform upper
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public String[] getAllResourceKeys(String shortcutPrefixString, String[] extentionFilters) {
+
+        List<String> listResourceKeys = new ArrayList<String>();
+
+        // eg) projectPath==/home/sonbc121/workspace/UIBuilderSingleView
+        String projectResRootPath = project.getLocation().toString() + MscreenConstants.RESOURCE_DIRECTORY;
+        getResFilePaths(projectResRootPath, projectResRootPath, listResourceKeys, extentionFilters);
+
+        String platformVersionString = AppManager.getAppManager().getVersion();
+
+        if (isAlternativeResourceSupport(platformVersionString)) {
+            getResourceKeys(shortcutPrefixString, listResourceKeys, extentionFilters);
+        }
+        return listResourceKeys.toArray(new String[listResourceKeys.size()]);
+    }
+
+    private void getResFilePaths(String projectResRootPath, String resCurrentPath, List<String> resourcePaths, String[] extentionFilters) {
+        String resRelativePath = null;
+        File file = new File(resCurrentPath);
+        File[] fileList = file.listFiles();
+
+        for (int i = 0; i < fileList.length; i++) {
+            File f = fileList[i];
+            if (f.isDirectory()) {
+                getResFilePaths(projectResRootPath, f.getAbsolutePath(), resourcePaths, extentionFilters);
+            } else {
+                for (int j = 0; j < extentionFilters.length; j++) {
+                    if (f.getPath().toLowerCase().endsWith(extentionFilters[j])) {
+                        resRelativePath = f.getPath().substring(projectResRootPath.length());
+                        resourcePaths.add(resRelativePath);
+                    }
+                }
+            }
+        }
+        return;
+    }
+
+    private List<String> getResourceKeys(String shortcutPrefixString, List<String> listResourceKeys, String[] extentionFilters) {
+
+        String defaultKeyAnnotationString = null;
+        RMHandler rmHandler = new RMHandler(project);
+        Set<String> defaultKeysString = rmHandler.getDefaultKeysString();
+
+        if (defaultKeysString == null) {
+            return null;
+        }
+
+        for (String keyString : defaultKeysString) {
+            for (int j = 0; j < extentionFilters.length; j++) {
+                if (keyString.toLowerCase().endsWith(extentionFilters[j])) {
+                    if (shortcutPrefixString != null) {
+                        defaultKeyAnnotationString = shortcutPrefixString + keyString;
+                    }
+                    listResourceKeys.add(defaultKeyAnnotationString);
+                    break;
+                }
+            }
+        }
+        return listResourceKeys;
+    }
+
+    public String[] getMsgKeys(String shortcutPrefixString) {
+        INativeLocaleMessages localeMessages = NativeLocaleMessageManager.getLocaleMessages(project);
+
+        /* You must pass to null in order to get MsgIDs (default string) */
+        String[] msgKeys = localeMessages.getMsgIds(null);
+
+        if (msgKeys == null)
+            return null;
+
+        /* add shortcut prefix string */
+        if (shortcutPrefixString != null) {
+            for (int i = 0; i < msgKeys.length; i++) {
+                msgKeys[i] = shortcutPrefixString + msgKeys[i];
+            }
+        }
+        return msgKeys;
+    }
+
+    // == [END]==added by SBC for AutoCompleteText==//
+
+    public String[] getLocales() {
+        List<String> results = new ArrayList<String>();
+        results.add(RM_LOCALE_ALL.getName());
+        // from RM(Resource Management)
+        RMHandler rmHandler = new RMHandler(project);
+        Set<ITizenRMFeature> supportedLocales = rmHandler.getSupportedLocales();
+        Iterator<ITizenRMFeature> iterator = supportedLocales.iterator();
+        while (iterator.hasNext()) {
+            ITizenRMFeature next = iterator.next();
+            if (!results.contains(next.getName())) {
+                results.add(next.getName());
+            }
+        }
+
+        // from po
+        INativeLocaleMessages localeMessages = NativeLocaleMessageManager.getLocaleMessages(project);
+        String[] locales = localeMessages.getLocales();
+        for (int i = 0; i < locales.length; i++) {
+            String locale = locales[i];
+            if (!results.contains(locale)) {
+                results.add(locale);
+            }
+        }
+
+        Collections.sort(results, new LocaleAscCompare());
+
+        return results.toArray(new String[results.size()]);
+    }
+
+    /*
+     * RM(Image, Audio, Video....)
+     */
+
+    public String getResourcePath(String id, DPI dpi, String locale) {
+        if (id == null || id.equals("")) {
+            return null;
+        }
+        selectedDpi = dpi;
+        selectedLocale = locale;
+
+        Key rmResKey = getFallbackRmResKey(id, dpi, locale, FB_STEP0_START);
+        if (rmResKey == null) {
+            return null;
+        }
+        // comment end
+
+        String results = rmResKey.getRes().getFullPath().toString();
+        int indexOf = results.indexOf(MscreenConstants.RESOURCE_DIRECTORY) + MscreenConstants.RESOURCE_DIRECTORY.length();
+        results = results.substring(indexOf);
+        return results;
+    }
+
+    private Key getFallbackRmResKey(String id, DPI dpi, String locale, int fallBackTargetStep) {
+        if (id == null || id.equals("")) {
+            return null;
+        }
+
+        HashSet<ITizenRMFeature> feature = new HashSet<ITizenRMFeature>();
+        feature.add(convertDPI(dpi));
+        feature.add(convertLocale(locale));
+
+        RMHandler rmHandler = new RMHandler(project);
+        Key rmResKey = rmHandler.getResSpecificKey(id, feature);
+
+        if (rmResKey != null) {
+            return rmResKey;
+        }
+
+        fallBackTargetStep++; // change next-step
+
+        // check next-step and call
+        switch (fallBackTargetStep) {
+            case FB_STEP1_LOCALE_ALL:
+                return getFallbackRmResKey(id, DPI.ALL, selectedLocale, fallBackTargetStep);
+            case FB_STEP2_ALL_DPI:
+                return getFallbackRmResKey(id, selectedDpi, RM_LOCALE_ALL.getName(), fallBackTargetStep);
+            case FB_STEP3_ALL_ALL:
+                return rmHandler.getResKey(id, feature); // get default key!
+            default:
+                break;
+        }
+        return rmResKey;
+    }
+
+    /*
+     * PO editor(Locale)
+     */
+    public String getMsg(String id, String locale) {
+        Assert.notNull(id);
+        INativeLocaleMessages localeMessages = NativeLocaleMessageManager.getLocaleMessages(project);
+        TizenLocale convertLocale = convertLocale(locale);
+        Assert.notNull(convertLocale);
+        return localeMessages.getMsgString(id, convertLocale);
+    }
+
+    private TizenDPI convertDPI(DPI dpi) {
+        TizenDPI results = TizenDPI.ALL;
+        switch (dpi) {
+            case ALL:
+                results = TizenDPI.ALL; // for resource fallback
+                break;
+            case LDPI:
+                results = TizenDPI.LDPI;
+                break;
+            case MDPI:
+                results = TizenDPI.MDPI;
+                break;
+            case HDPI:
+                results = TizenDPI.HDPI;
+                break;
+            case XHDPI:
+                results = TizenDPI.XHDPI;
+                break;
+            case XXHDPI:
+                results = TizenDPI.XXHDPI;
+                break;
+            default:
+
+        }
+
+        return results;
+    }
+
+    private TizenLocale convertLocale(String locale) {
+        if (locale == null) {
+            return RM_LOCALE_ALL;
+        }
+
+        TizenLocale[] locales = TizenLocale.values();
+        for (int i = 0; i < locales.length; i++) {
+            TizenLocale tizenLocale = locales[i];
+            if (tizenLocale.getName().equals(locale)) {
+                return tizenLocale;
+            }
+        }
+        return RM_LOCALE_ALL;
+    }
+
+    static class LocaleAscCompare implements Comparator<String>, Serializable {
+        private static final long serialVersionUID = -4912444302160863880L;
+
+        @Override
+        public int compare(String arg0, String arg1) {
+            return arg0.compareTo(arg1);
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/nl/BuilderMessages.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/nl/BuilderMessages.java
new file mode 100644 (file)
index 0000000..3890583
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.nl;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public final class BuilderMessages {
+
+    private static final String BUNDLE_NAME = BuilderMessages.class.getName();
+
+    /**************************************************************************
+     * Design Editor
+     ***************************************************************************/
+    public static String TABTEXTDESIGN;
+    public static String TABTEXTTEXTEDITOR;
+    public static String TABTEXTPRVIEW;
+    public static String TABTEXTSTORYBOARD;
+
+    // ScaleControlToolbar tooltip
+    public static String SCREEN_PERCENTAGE;
+    public static String AUTO_FIT;
+    public static String AUTO_FIT_ON;
+    public static String AUTO_FIT_OFF;
+    public static String ZOOM_IN;
+    public static String ZOOM_OUT;
+    public static String ROTATE;
+    public static String DESIGNERMODE;
+
+    // MscreenDesignToolbar messages
+    public static String MS_DESIGN_LAUNCH_CONFIGURATION;
+
+    // MscreenDesignToolbar tooltip
+    public static String MS_CONFIG_BTN;
+    public static String MS_DESIGN_CONFIGURATION;
+    public static String MS_DESIGN_CONFIGURATION_NONE;
+
+    // MscreenPreviewToolbar tooltip
+    public static String MS_PREVIEW_DEVICE;
+    public static String MS_PREVIEW_ORIENTATION;
+    public static String MS_PREVIEW_LOCALE;
+
+    // ViewControlToolbar tooltip
+    public static String SELECT_VIEW;
+    public static String PREV_VIEW;
+    public static String NEXT_VIEW;
+
+    // EditorModeToolbar tooltip
+    public static String SOURCE_MODE;
+    public static String DESIGN_MODE;
+
+    // StoryboardAutoLayoutToolbar tooltip
+    public static String AUTO_LAYOUT;
+
+    // View Title
+    public static String POPUP_VIEW_TITLE;
+    public static String CTX_POPUP_VIEW_TITLE;
+
+    /**************************************************************************
+     * Error Messages
+     ***************************************************************************/
+    // ==[START]==150408: added by sonbc121: implementation for C Standard Styled Widget ID==//
+    public static String ERROR_ID_INVALID_REGX;
+    public static String ERROR_ID_EQUALS_RESERVED_WORD;
+    // ==[END]==150408: added by sonbc121: implementation for C Standard Styled Widget ID==//
+    // Properties view, Outline view error tooltip
+    public static String ERROR_STRING_VALUE;
+    public static String ERROR_INTEGER_VALUE;
+    public static String ERROR_INTEGER_RANGE;
+    public static String ERROR_DOUBLE_VALUE;
+    public static String ERROR_STRING_ID;
+    public static String ERROR_STRING_PAGE_ID;
+    public static String ERROR_STRING_MAX_LENGTH;
+    public static String ERROR_INTEGER_MIN;
+    public static String ERROR_INTEGER_MIN_BY;
+    public static String ERROR_INTEGER_MAX;
+    public static String ERROR_INTEGER_MAX_BY;
+    public static String ERROR_INTEGER_MIN_BY_PARENT_PROPERTY;
+    public static String ERROR_INTEGER_MAX_BY_PARENT_PROPERTY;
+    public static String ERROR_SIZE_MAX;
+    public static String ERROR_STYLE_SIZE_UNIT;
+    public static String ERROR_STYLE_SIZE_NUMBER;
+    public static String ERROR_INVALID_XML_TITLE;
+    public static String ERROR_INVALID_XML_DESCRIPTION_01;
+    public static String ERROR_INVALID_XML_DESCRIPTION_02;
+
+    /**************************************************************************
+     * Component designer
+     ***************************************************************************/
+    public static String COMPONENT_DESIGNER_DIALOG_TITLE;
+    public static String COMPONENT_DESIGNER_DIALOG_LABEL;
+    public static String COMPONENT_DESIGNER_BUTTON_DELETE;
+    public static String COMPONENT_DESIGNER_BUTTON_MODIFY;
+    public static String COMPONENT_DESIGNER_BUTTON_EXTEND;
+    public static String COMPONENT_DESIGNER_BUTTON_RESET;
+    public static String COMPONENT_DESIGNER_LABEL_INPUT;
+    public static String COMPONENT_DESIGNER_BUTTON_OK;
+    public static String COMPONENT_DESIGNER_BUTTON_CANCEL;
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, BuilderMessages.class);
+    }
+
+    /**
+     * Constructor.
+     */
+    private BuilderMessages() {
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/nl/BuilderMessages.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/nl/BuilderMessages.properties
new file mode 100644 (file)
index 0000000..5eedb90
--- /dev/null
@@ -0,0 +1,84 @@
+###################################################################
+# Design Editor
+###################################################################
+TABTEXTDESIGN=Design
+TABTEXTTEXTEDITOR=Source
+TABTEXTPRVIEW=Preview
+TABTEXTSTORYBOARD=Storyboard
+
+# ScaleControlToolbar tooltip
+SCREEN_PERCENTAGE=Screen percentage
+AUTO_FIT=Fit to Screen
+AUTO_FIT_ON=Turn on Autofit
+AUTO_FIT_OFF=Turn off Autofit
+ZOOM_IN=Zoom in
+ZOOM_OUT=Zoom out
+ROTATE=Rotate
+DESIGNERMODE=Designer Mode
+
+# MscreenDesignToolbar messages
+MS_DESIGN_LAUNCH_CONFIGURATION=Edit Screen Configuration
+
+# MscreenDesignToolbar tooltip
+MS_CONFIG_BTN=Screen Configurator
+MS_DESIGN_CONFIGURATION=Screen Configuration
+MS_DESIGN_CONFIGURATION_NONE=None
+
+# MscreenPreviewToolbar tooltip
+MS_PREVIEW_DEVICE=Resolution
+MS_PREVIEW_ORIENTATION=Orientation
+MS_PREVIEW_LOCALE=Locale
+
+# ViewControlToolbar tooltip
+SELECT_VIEW=Select view
+PREV_VIEW=Previous view
+NEXT_VIEW=Next view
+
+# EditorModeToolbar tooltip
+SOURCE_MODE=Source Editor
+DESIGN_MODE=Design Editor
+
+# StoryboardAutoLayoutToolbar tooltip
+AUTO_LAYOUT=Auto Layout
+
+# View Title
+POPUP_VIEW_TITLE=(Popup)
+CTX_POPUP_VIEW_TITLE=(Ctxpopup)
+
+#==[START] 150408: added by sonbc121: implementation for C Standard Styled Widget ID====//
+ERROR_ID_INVALID_REGX=The ID can be composed of alphabets, digits and underscore ("_"), and must not begin with a digit.
+ERROR_ID_EQUALS_RESERVED_WORD=The ID uses a reserved word and is consequently invalid.
+#==[END] 150408: added by sonbc121: implementation for C Standard Styled Widget ID====//
+
+#Properties view, Outline view error tooltip
+ERROR_STRING_VALUE=The string is invalid; you can only enter an alphabet, a number, or a '_'.
+ERROR_INTEGER_VALUE=The value must be an integer.
+ERROR_INTEGER_RANGE=The value must be in integer range.
+ERROR_DOUBLE_VALUE=The value must be a double.
+ERROR_STRING_ID=The ID must be unique in a view.
+ERROR_STRING_PAGE_ID=The ID must be unique in a project.
+ERROR_STRING_MAX_LENGTH=The maximum length of the string is {0}.
+ERROR_INTEGER_MIN=The value cannot be less than {0}.
+ERROR_INTEGER_MIN_BY=The value cannot be less than value of the {0} property.
+ERROR_INTEGER_MAX=The value cannot be more than {0}.
+ERROR_INTEGER_MAX_BY=The value cannot be more than value of the {0} property.
+ERROR_INTEGER_MIN_BY_PARENT_PROPERTY=The value cannot be less than value of the parents {0} property.
+ERROR_INTEGER_MAX_BY_PARENT_PROPERTY=The value cannot be more than value of the parents {0} property.
+ERROR_SIZE_MAX=The value cannot be more than value of the container size.
+ERROR_STYLE_SIZE_UNIT = The unit must be px, %, em, or cm.
+ERROR_STYLE_SIZE_NUMBER = Enter a number.
+ERROR_INVALID_XML_TITLE=Invalid XML
+ERROR_INVALID_XML_DESCRIPTION_01=You must fix the layout in the Source Editor
+ERROR_INVALID_XML_DESCRIPTION_02=before you can edit your application in the Design Editor.
+
+#Component designer
+COMPONENT_DESIGNER_DIALOG_TITLE=Component Designer: Style design
+COMPONENT_DESIGNER_DIALOG_LABEL=After you edit a style from the component designer or remove styles,\n\
+please refresh your project in the Project Explorer.
+COMPONENT_DESIGNER_BUTTON_DELETE=Delete
+COMPONENT_DESIGNER_BUTTON_MODIFY=Modify
+COMPONENT_DESIGNER_BUTTON_EXTEND=Extend
+COMPONENT_DESIGNER_BUTTON_RESET=Reset
+COMPONENT_DESIGNER_LABEL_INPUT=New Style
+COMPONENT_DESIGNER_BUTTON_OK=OK
+COMPONENT_DESIGNER_BUTTON_CANCEL=Cancel
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/CodeGenerator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/CodeGenerator.java
new file mode 100644 (file)
index 0000000..9e14df1
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * UI Builder - StoryBoard
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.storyboard.codegenerator;
+
+import java.io.File;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorException;
+import org.tizen.efluibuilder.codegenerator.ICodeGenerator;
+import org.tizen.efluibuilder.codegenerator.event.EventCodeGenerator;
+import org.tizen.efluibuilder.codegenerator.event.EventCodeGeneratorUtil;
+import org.tizen.efluibuilder.codegenerator.event.IEventCodeGenerator;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditorException;
+import org.tizen.efluibuilder.ui.views.properties.events.HandlerCodeWriter;
+import org.tizen.efluibuilder.ui.views.properties.events.IHandlerCodeWriter;
+
+
+/**
+ * Code generator for storyboard connection
+ * 
+ */
+public class CodeGenerator {
+    private IHandlerCodeWriter codeWriter = new HandlerCodeWriter();
+    private IProject project;
+
+    public CodeGenerator(IProject project) {
+        this.project = project;
+    }
+
+    /**
+     * Create action for the sourcePart
+     * 
+     * @param command
+     * @return
+     */
+
+    public boolean addConnectionAction(Part sourcePart, String eventName, String functionName) {
+        if (sourcePart != null) {
+            ComponentDescriptor componentDescriptor = sourcePart.getOwnerDocumentPart().getComponentDescriptor();
+            String eventInfo = componentDescriptor.getEventInfo((ComponentPart) sourcePart, eventName);
+            String pageID = ((ComponentPart) sourcePart).getOwnerViewPart().getPropertyValue(LayoutSchemaConstants.ID);
+            IFile ifile = getFile(pageID);
+            if (ifile != null) {
+                String projectName = ifile.getProject().getName();
+                if (projectName != null && projectName.equals(project.getName())) {
+                    codeWriter.addConnectionHandler(functionName, pageID, CodeGeneratorUtil.getEventParams(sourcePart, eventName), eventInfo);
+                    // Create a worker thread to generate managed code section
+                    ExecutorService executor = Executors.newFixedThreadPool(1);
+                    executor.execute(new GenerateManagedCode());
+                    executor.shutdown();
+                }
+            }
+        } else {
+            // SBLoggerManager.logErrorMessage(CodeGenerator.class,
+            // Messages.CodeGenerator_SRC_PART_NULL + connectionData.getSource() +
+            // SBConstants.EMPTY_SPACE + connectionData.getParent());
+        }
+        return true;
+    }
+
+    /**
+     * Retrieve code writer handler
+     * 
+     * @return
+     */
+    public IHandlerCodeWriter getCodeWriter() {
+        return codeWriter;
+    }
+
+    /**
+     * Retrieve design editor
+     * 
+     * @return
+     */
+
+    private class GenerateManagedCode implements Runnable {
+
+        @Override
+        public void run() {
+            File managedFolder = new File(new File(project.getLocation().toString()), Messages.CodeGenerator_2);
+            if (!managedFolder.exists()) {
+                ICodeGenerator generator = new org.tizen.efluibuilder.codegenerator.CodeGenerator(project);
+                try {
+                    generator.generate();
+                } catch (CodeGeneratorException e) {
+                    throw new DesignEditorException(e.getMessage());
+                }
+            }
+        }
+    }
+
+    private IFile getFile(String id) {
+        IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+        if (editorPart == null) {
+            return null;
+        }
+
+        IFileEditorInput input = (IFileEditorInput) editorPart.getEditorInput();
+        IFile file = input.getFile();
+        IProject project = file.getProject();
+        IFile eventHandlerFile = EventCodeGeneratorUtil.getEventHandlerFile(project, id);
+        if (eventHandlerFile.exists()) {
+            return eventHandlerFile;
+        }
+
+        IEventCodeGenerator generator = new EventCodeGenerator(project);
+        try {
+            generator.addView(id);
+        } catch (CodeGeneratorException e) {
+            // SBLoggerManager.logErrorMessage(CodeGenerator.class, e.getMessage());
+        }
+
+        return eventHandlerFile;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/CodeGeneratorConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/CodeGeneratorConstants.java
new file mode 100644 (file)
index 0000000..a358a7b
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * UI Builder - StoryBoard
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.storyboard.codegenerator;
+
+import org.tizen.efluibuilder.BuilderConstants;
+
+
+public class CodeGeneratorConstants {
+    public static final String PAGENAME = "$(page_name)";
+    public static final String FUNCNAME = "%FuncName%";
+    public static final String FUNCPARAMS = "%FuncParams%";
+    public static final String EVENT_HANDLER_SIGNATURE = "\nvoid " + FUNCNAME + "(" + FUNCPARAMS + ")";
+    public static final String COMMENT = "\t// This method is added by Storyboard\n";
+    public static final String EVENT_PREFIX = "on";
+    public static final String EVENT_UNDERSCORE = "_";
+    public static final String LAYOUT_FOLDER = "layout";
+    public static final String LAYOUT_XML = "layout.xml";
+    public static final String CONNECTION_WRAPPER = "connection_";
+    public static final String WRAPPER_COMMENT_PRE = BuilderConstants.TAB + BuilderConstants.COMMENT + "Invoked at the start of wrapper function ";
+    public static final String WRAPPER_COMMENT_POST = BuilderConstants.TAB + BuilderConstants.COMMENT + "Invoked post wrapper function ";
+    public static final String WRAPPER_COMMENT = BuilderConstants.COMMENT + "Invoked";
+    public static final String WRAPPER_POST = "_post";
+    public static final String WRAPPER_PARAM = "void* param, ";
+    public static final String SUBTITLE_SET_METHOD = "\telm_object_item_part_text_set(navi_item, \"subtitle\", ";
+    public static final String QUOTES = "\"";
+    public static final String TYPE_POST = "post";
+    public static final String TYPE_PRE = "pre";
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/CodeGeneratorUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/CodeGeneratorUtil.java
new file mode 100644 (file)
index 0000000..c7dcb22
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * UI Builder - StoryBoard
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.storyboard.codegenerator;
+
+import java.util.List;
+
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.EventDescriptor;
+import org.tizen.efluibuilder.model.descriptors.EventParamDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+
+
+public class CodeGeneratorUtil {
+
+    public static String getWrapperComment(String pageID, String funcName, String type) {
+        String comment;
+        if (type.equals(CodeGeneratorConstants.TYPE_POST))
+            comment = CodeGeneratorConstants.WRAPPER_COMMENT_POST;
+        else
+            comment = CodeGeneratorConstants.WRAPPER_COMMENT_PRE;
+        return comment + pageID + BuilderConstants.UNDERSCORE + CodeGeneratorConstants.CONNECTION_WRAPPER + funcName + "\n";
+    }
+
+    public static String getFunctionDefinition(String pageID, String funcName, String type) {
+        return CodeGeneratorConstants.EVENT_HANDLER_SIGNATURE + " {\n" + getWrapperComment(pageID, funcName, type) + "\n}\n";
+    }
+
+    /*
+     * public static String getChangePage(ConnectionData connectionData) { String changePage = "";
+     * if (connectionData != null) { changePage =
+     * "Elm_Object_Item* navi_item = change_page(vc->parent, \"" +
+     * connectionData.getConnectionPropertyValue(PropertiesConstant.PROPERTY_TITLE) +
+     * "\", NULL, NULL, \"" +
+     * connectionData.getConnectionPropertyValue(PropertiesConstant.PROPERTY_TARGET_VIEW) +
+     * "\", NULL);"; } return changePage; }
+     */
+
+    /**
+     * Remove target attribute from the action of the source widget
+     * 
+     * @param sourcePart
+     * @param event
+     */
+    public static void removeTargetFromAction(Part sourcePart, String event) {
+        List<EventPart> events = ((ComponentPart) sourcePart).getEventParts();
+        for (EventPart child : events) {
+            if (event.equals(child.getPropertyValue(LayoutSchemaConstants.EVENT_SIGNAL))) {
+                sourcePart.removeChild(child);
+                // events.remove(child); // Removing the event
+            }
+        }
+    }
+
+
+    /**
+     * Retrieve parameters for events
+     * 
+     * @param model
+     * @param id
+     * @return
+     */
+    public static List<EventParamDescriptor> getEventParams(Part model, String eventName) {
+        ComponentDescriptor componentDescriptor = model.getOwnerDocumentPart().getComponentDescriptor();
+        final List<EventDescriptor> events = componentDescriptor.getEventDescriptors((ComponentPart) model);
+        List<EventParamDescriptor> params = null;
+        for (EventDescriptor event : events) {
+            if (event.getEventName().equals(eventName)) {
+                params = event.getEventTypeDescriptor().getEventParameters();
+                break;
+            }
+        }
+        return params;
+    }
+
+    /**
+     * Check if the event exists in the widget
+     * 
+     * @param sourcePart
+     * @param event
+     * @return
+     */
+    public static boolean isEventExists(Part sourcePart, String event) {
+        List<EventPart> events = ((ComponentPart) sourcePart).getEventParts();
+        for (EventPart child : events) {
+            if (event.equals(child.getPropertyValue(LayoutSchemaConstants.EVENT_SIGNAL))) {
+                return true;
+            }
+
+        }
+
+        return false;
+    }
+
+    /**
+     * Create connection code upon undo of delete view
+     * 
+     * @param connection
+     * @param editor
+     * @param model
+     */
+    /*
+     * public static void codeGenForUndoDeleteView(Connection connection, DesignEditor editor,
+     * Storyboard model) { ConnectionData connectionData = connection.getConnectionData(); String
+     * event = CodeGeneratorConstants.EVENT_PREFIX + connection.getConnectionData().getEvent();
+     * WidgetAction partAction = new WidgetAction(ActionType.RUN_JAVASCRIPT_FUNCTION,
+     * connection.getSource().getIdPartPropertyValue() + CodeGeneratorConstants.EVENT_UNDERSCORE +
+     * event, null, connectionData); if (connection.getSource() != null) { if
+     * (!isEventExists(connection.getSource(), event)) connection.getSource().addPartAction(event,
+     * partAction, false); IHandlerCodeWriter codeWriter = new HandlerCodeWriter(); String eventInfo
+     * = editor.getPartDescriptor().getEventInfo(connection.getSource(), event);
+     * codeWriter.addConnectionHandler(connection.getSource().getIdPartPropertyValue() +
+     * CodeGeneratorConstants.EVENT_UNDERSCORE + event, connection.getSource().getOwnerPage()
+     * .getIdPartPropertyValue(), CodeGeneratorUtil.getEventParams(editor, connection.getSource(),
+     * event), eventInfo); } }
+     */
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/Messages.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/Messages.java
new file mode 100644 (file)
index 0000000..ee4bdfc
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder - StoryBoard
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.storyboard.codegenerator;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.tizen.efluibuilder.storyboard.codegenerator.messages"; //$NON-NLS-1$
+    public static String CodeGenerator_0;
+    public static String CodeGenerator_2;
+    public static String CodeGenerator_CHANGE_PAGE_METHOD;
+    public static String CodeGenerator_COMMA;
+    public static String CodeGenerator_CHANGE_END;
+    public static String CodeGenerator_CHANGE_START;
+    public static String CodeGenerator_COMMENT_START;
+    public static String CodeGenerator_COMMENT_END;
+    public static String CodeGenerator_SRC_PART_NULL;
+    public static String StoryboardMouseListener_PART_NULL_ERROR;
+    public static String StoryboardViewer_EFL_NAVIFRAME;
+    public static String StoryboardViewer_NAVIFRAME_MSG;
+    public static String StoryboardViewer_SAME_VIEW_MSG;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/messages.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/codegenerator/messages.properties
new file mode 100644 (file)
index 0000000..c6b59ca
--- /dev/null
@@ -0,0 +1,13 @@
+StoryboardMouseListener_PART_NULL_ERROR=Source or Target Part is null 
+StoryboardViewer_EFL_NAVIFRAME=efl.naviframe
+StoryboardViewer_NAVIFRAME_MSG=Cannot add naviframe view
+StoryboardViewer_SAME_VIEW_MSG=\ already added
+CodeGenerator_0=
+CodeGenerator_2=src/managed
+CodeGenerator_CHANGE_PAGE_METHOD=change_page
+CodeGenerator_COMMA=, 
+CodeGenerator_CHANGE_END=;
+CodeGenerator_COMMENT_START=/*
+CodeGenerator_COMMENT_END=*/
+CodeGenerator_CHANGE_START=Elm_Object_Item
+CodeGenerator_SRC_PART_NULL=Source Part is null
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/gef/policies/NodeComponentEditPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/gef/policies/NodeComponentEditPolicy.java
new file mode 100644 (file)
index 0000000..322dad8
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * UI Builder - StoryBoard
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.storyboard.gef.policies;
+
+import org.eclipse.gef.editpolicies.ComponentEditPolicy;
+
+
+public class NodeComponentEditPolicy extends ComponentEditPolicy {
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/gef/policies/NodeGraphicalNodeEditPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/storyboard/gef/policies/NodeGraphicalNodeEditPolicy.java
new file mode 100644 (file)
index 0000000..b2263dd
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder - StoryBoard
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.storyboard.gef.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy;
+import org.eclipse.gef.requests.CreateConnectionRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+
+
+public class NodeGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
+
+    private static class ConnectionStartCommand extends Command {
+
+    }
+
+    protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
+        return null;
+    }
+
+    protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
+        return new ConnectionStartCommand();
+    }
+
+    protected Command getReconnectTargetCommand(ReconnectRequest request) {
+        return null;
+    }
+
+    protected Command getReconnectSourceCommand(ReconnectRequest request) {
+        return null;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/SelectionManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/SelectionManager.java
new file mode 100644 (file)
index 0000000..6c0fb5b
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui;
+
+import org.eclipse.core.commands.common.EventManager;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+
+
+public class SelectionManager extends EventManager {
+    /**
+     * 
+     * @param listener
+     *            listen
+     */
+    public void addSelectionChangedListener(ISelectionChangedListener listener) {
+        addListenerObject(listener);
+    }
+
+    /**
+     * 
+     * @param listener
+     *            listen
+     */
+    public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+        removeListenerObject(listener);
+    }
+
+    /**
+     * 
+     * @param event
+     *            the event
+     */
+    public void selectionChanged(final SelectionChangedEvent event) {
+        // pass on the notification to listeners
+        Object[] listeners = getListeners();
+        for (int i = 0; i < listeners.length; ++i) {
+            final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
+            SafeRunner.run(new SafeRunnable() {
+                @Override
+                public void run() {
+                    l.selectionChanged(event);
+                }
+            });
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/SelectionProvider.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/SelectionProvider.java
new file mode 100644 (file)
index 0000000..62e77fc
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+
+
+public class SelectionProvider implements ISelectionProvider {
+    private SelectionManager selectionListener = new SelectionManager();
+    private ISelection selection;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener
+     * (org.eclipse.jface.viewers.ISelectionChangedListener)
+     */
+    @Override
+    public void addSelectionChangedListener(ISelectionChangedListener listener) {
+        selectionListener.addSelectionChangedListener(listener);
+    }
+
+    /*
+     * (non-Javadoc) Method declared on ISelectionProvider.
+     */
+    @Override
+    public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+        selectionListener.removeSelectionChangedListener(listener);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse
+     * .jface.viewers.ISelection)
+     */
+    @Override
+    public void setSelection(ISelection selection) {
+        this.selection = selection;
+        selectionChanged(new SelectionChangedEvent(this, selection));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
+     */
+    @Override
+    public ISelection getSelection() {
+        return selection;
+    }
+
+    /**
+     * The selection has changed. Process the event, notifying selection listeners and post
+     * selection listeners.
+     * 
+     * @param event
+     *            the change
+     */
+    public void selectionChanged(final SelectionChangedEvent event) {
+        selectionListener.selectionChanged(event);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/SelectionProviderAdapter.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/SelectionProviderAdapter.java
new file mode 100644 (file)
index 0000000..e5cf6e6
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui;
+
+import org.eclipse.core.commands.common.EventManager;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+
+
+/**
+ * Provides an simple implementation of {@link ISelectionProvider} that propagates selection events
+ * to registered listeners.
+ * 
+ * @author Steffen Pingel
+ * @since 3.7
+ */
+public class SelectionProviderAdapter extends EventManager implements ISelectionProvider, ISelectionChangedListener {
+    private ISelection selection;
+
+    /**
+     * Constructs a <code>SelectionProviderAdapter</code> and initializes the selection to
+     * <code>selection</code>.
+     * 
+     * @param selection
+     *            the initial selection
+     * @see #setSelection(ISelection)
+     */
+    public SelectionProviderAdapter(ISelection selection) {
+        setSelection(selection);
+    }
+
+    /**
+     * Constructs a <code>SelectionProviderAdapter</code> with a <code>null</code> selection.
+     */
+    public SelectionProviderAdapter() {
+    }
+
+    public void addSelectionChangedListener(ISelectionChangedListener listener) {
+        addListenerObject(listener);
+    }
+
+    public ISelection getSelection() {
+        return selection;
+    }
+
+    public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+        removeListenerObject(listener);
+    }
+
+    public void selectionChanged(final SelectionChangedEvent event) {
+        this.selection = event.getSelection();
+        Object[] listeners = getListeners();
+        for (Object listener2 : listeners) {
+            final ISelectionChangedListener listener = (ISelectionChangedListener) listener2;
+            SafeRunner.run(new SafeRunnable() {
+                public void run() {
+                    listener.selectionChanged(event);
+                }
+            });
+        }
+    }
+
+    public void setSelection(ISelection selection) {
+        selectionChanged(new SelectionChangedEvent(this, selection));
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/actions/ActionConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/actions/ActionConstants.java
new file mode 100644 (file)
index 0000000..0174021
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.actions;
+
+import org.eclipse.gef.ui.actions.GEFActionConstants;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.actions.ActionFactory;
+
+
+public final class ActionConstants implements IWorkbenchActionConstants {
+
+    public static final String ALIGN = "Align";
+    public static final String ALIGN_LEFT = GEFActionConstants.ALIGN_LEFT;
+    public static final String ALIGN_TOP = GEFActionConstants.ALIGN_TOP;
+    public static final String ALIGN_RIGHT = GEFActionConstants.ALIGN_RIGHT;
+    public static final String ALIGN_BOTTOM = GEFActionConstants.ALIGN_BOTTOM;
+    public static final String ALIGN_VERTICAL_CENTER = GEFActionConstants.ALIGN_MIDDLE;
+    public static final String ALIGN_HORIZONTAL_CENTER = GEFActionConstants.ALIGN_CENTER;
+
+    public static final String ALIGN_DISTRIBUTE_VERTICAL_SPACING = "org.tizen.efluibuilder.align_v_distribute";//$NON-NLS-1$
+    public static final String ALIGN_DISTRIBUTE_HORIZONTAL_SPACING = "org.tizen.efluibuilder.align_h_distribute";//$NON-NLS-1$
+
+    public static final String MATCH_SIZE = "Match Size";
+    public static final String MATCH_WIDTH = GEFActionConstants.MATCH_WIDTH;
+    public static final String MATCH_HEIGHT = GEFActionConstants.MATCH_HEIGHT;
+
+    public static final String NAVIGATE_SELECTION = "Select";
+    public static final String CHANGE_SELECTION = "org.tizen.efluibuilder.select";//$NON-NLS-1$
+    public static final String SELECT_PARENT = "org.tizen.efluibuilder.select_parent";//$NON-NLS-1$
+    public static final String SELECT_CHILD = "org.tizen.efluibuilder.select_child";//$NON-NLS-1$
+    public static final String SELECT_PREV_SIBLING = "org.tizen.efluibuilder.select_prev_sibling";//$NON-NLS-1$
+    public static final String SELECT_NEXT_SIBLING = "org.tizen.efluibuilder.select_next_sibling";//$NON-NLS-1$
+
+    public static final String DELETE_PART = ActionFactory.DELETE.getId();
+    public static final String UNDO = ActionFactory.UNDO.getId();
+    public static final String REDO = ActionFactory.REDO.getId();
+    public static final String CUT_PART = ActionFactory.CUT.getId();
+    public static final String COPY_PART = ActionFactory.COPY.getId();
+    public static final String PASTE_PART = ActionFactory.PASTE.getId();
+    public static final String PASTE_PART_COLOR = "org.tizen.efluibuilder.paste.color";//$NON-NLS-1$
+
+    public static final String ZORDER_FRONT = "org.tizen.efluibuilder.zorder.front";//$NON-NLS-1$
+    public static final String ZORDER_BACK = "org.tizen.efluibuilder.zorder.back";//$NON-NLS-1$
+    public static final String ZORDER = "org.tizen.efluibuilder.group.zorder";//$NON-NLS-1$
+    public static final String ZORDER_FRONTWARD = "org.tizen.efluibuilder.zorder.frontward";//$NON-NLS-1$
+    public static final String ZORDER_BACKWARD = "org.tizen.efluibuilder.zorder.backward";//$NON-NLS-1$
+    public static final String GROUP_ZORDER = "org.tizen.efluibuilder.group.zorder";//$NON-NLS-1$
+    public static final String NEW = "New";//$NON-NLS-1$
+    public static final String ADD_VIEW_EMPTY = "org.tizen.efluibuilder.add_view_empty";//$NON-NLS-1$
+    public static final String SET_STARTUP_VIEW = "org.tizen.efluibuilder.set_startup_view";//$NON-NLS-1$
+    
+    public static final String STORYBOARD = "storyboard";
+    public static final String ALIGN_STORYBOARD = "org.tizen.efluibuilder.align_storyboard";//$NON-NLS-1$
+
+    public static final String OPEN_EDC_EDITOR = "org.tizen.efluibuilder.open_edc_editor";//$NON-NLS-1$
+    public static final String FIT_TO_SINGLE_VIEW = "org.tizen.efluibuilder.fit_to_single_view";//$NON-NLS-1$
+    
+    public static final String VIEW = "view";//$NON-NLS-1$
+    
+    /**
+     * New Snippet action id. Value: <code>"org.tizen.efluibuilder.newSnippet"</code>
+     */
+    public static final String NEW_SNIPPET = "org.tizen.efluibuilder.newSnippet";//$NON-NLS-1$
+
+    /**
+     * Delete Snippet action id. Value: <code>"org.tizen.efluibuilder.deleteSnippet"</code>
+     */
+    public static final String DELETE_SNIPPET = "org.tizen.efluibuilder.deleteSnippet";//$NON-NLS-1$
+
+    /**
+     * Import Snippet action id. Value: <code>"org.tizen.efluibuilder.importSnippet"</code>
+     */
+    public static final String IMPORT_SNIPPET = "org.tizen.efluibuilder.importSnippet";//$NON-NLS-1$
+
+    /**
+     * Export Snippet action id. Value: <code>"org.tizen.efluibuilder.exportSnippet"</code>
+     */
+    public static final String EXPORT_SNIPPET = "org.tizen.efluibuilder.exportSnippet";//$NON-NLS-1$
+
+    public static final String NEW_EMPTY_VIEW = "org.tizen.efluibuilder.ui.view.outline.NewEmptyView";//$NON-NLS-1$
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/contextmenu/CommonContextMenu.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/contextmenu/CommonContextMenu.java
new file mode 100644 (file)
index 0000000..c64949c
--- /dev/null
@@ -0,0 +1,287 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.contextmenu;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.ContextMenuProvider;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.gef.ui.actions.GEFActionConstants;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.ui.actions.ActionFactory;
+import org.tizen.efluibuilder.core.configurator.ConfiguratorConstants;
+import org.tizen.efluibuilder.model.app.AppManager;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.views.outline.Messages;
+import org.tizen.efluibuilder.ui.views.outline.OutlineConstants;
+
+
+/**
+ * A context menu class.
+ */
+public abstract class CommonContextMenu extends ContextMenuProvider {
+
+    public static class EditPartSet {
+        public static final int TYPE_EMPTY = 0;
+        public static final int TYPE_VIEW = 1;
+        public static final int TYPE_COMPONENT = 2;
+        public static final int TYPE_CONNECTION = 4;
+        public static final int TYPE_MULTI = 8;
+
+        public int type;
+        public List<EditPart> views;
+        public List<EditPart> components;
+        public List<EditPart> events;
+
+        public EditPartSet(List<Object> selection) {
+            type = TYPE_EMPTY;
+            views = new ArrayList<EditPart>();
+            components = new ArrayList<EditPart>();
+            events = new ArrayList<EditPart>();
+            for (Object editpart : selection) {
+                if (((EditPart) editpart).getModel() instanceof ViewPart) {
+                    views.add((EditPart) editpart);
+                    type |= TYPE_VIEW;
+                } else if (((EditPart) editpart).getModel() instanceof ComponentPart) {
+                    components.add((EditPart) editpart);
+                    type |= TYPE_COMPONENT;
+                } else if (((EditPart) editpart).getModel() instanceof EventPart) {
+                    events.add((EditPart) editpart);
+                    type |= TYPE_CONNECTION;
+                }
+            }
+            if (Integer.bitCount(type) > 1) {
+                type = TYPE_MULTI;
+            }
+        }
+    }
+
+    private ActionRegistry actionRegistry = null;
+
+    /**
+     * Constructor.
+     * 
+     * @param viewer
+     *            a {@link EditPartViewer}
+     * @param registry
+     *            a {@link ActionRegistry}
+     */
+    public CommonContextMenu(EditPartViewer viewer, ActionRegistry registry) {
+        super(viewer);
+        actionRegistry = registry;
+    }
+
+    protected IAction getAction(String id) {
+        return actionRegistry.getAction(id);
+    }
+
+    protected void appendAction(String actionId, IMenuManager toMenu, String toGroup) {
+
+        IAction action = getAction(actionId);
+        if (null != action) {
+            toMenu.appendToGroup(toGroup, action);
+        }
+    }
+
+    protected void addUndoContextMenu(IMenuManager menu) {
+
+        menu.add(new Separator(GEFActionConstants.GROUP_UNDO));
+
+        appendAction(ActionFactory.UNDO.getId(), menu, GEFActionConstants.GROUP_UNDO);
+        appendAction(ActionFactory.REDO.getId(), menu, GEFActionConstants.GROUP_UNDO);
+    }
+
+    protected void addEditContextMenu(IMenuManager menu) {
+
+        menu.add(new Separator(GEFActionConstants.GROUP_EDIT));
+
+        appendAction(ActionConstants.CUT_PART, menu, GEFActionConstants.GROUP_EDIT);
+        appendAction(ActionConstants.COPY_PART, menu, GEFActionConstants.GROUP_EDIT);
+        appendAction(ActionConstants.PASTE_PART, menu, GEFActionConstants.GROUP_EDIT);
+        appendAction(ActionConstants.DELETE_PART, menu, GEFActionConstants.GROUP_EDIT);
+        appendAction(ActionConstants.PASTE_PART_COLOR, menu, GEFActionConstants.GROUP_EDIT);
+    }
+
+    protected void addMatchSizeContextMenu(IMenuManager menu) {
+
+        menu.add(new Separator(ActionConstants.MATCH_SIZE));
+
+        MenuManager subMenu = new MenuManager(ActionConstants.MATCH_SIZE, null);
+        IAction action = getAction(ActionConstants.MATCH_WIDTH);
+        if (null != action) {
+            subMenu.add(action);
+        }
+        action = getAction(ActionConstants.MATCH_HEIGHT);
+        if (null != action) {
+            subMenu.add(action);
+        }
+
+        menu.appendToGroup(ActionConstants.ALIGN, subMenu);
+
+    }
+
+    protected void addAlignContextMenu(IMenuManager menu) {
+
+        menu.add(new Separator(ActionConstants.ALIGN));
+
+        MenuManager subMenu = new MenuManager(ActionConstants.ALIGN, null);
+        IAction action = getAction(ActionConstants.ALIGN_LEFT);
+        if (null != action) {
+            subMenu.add(action);
+        }
+        action = getAction(ActionConstants.ALIGN_HORIZONTAL_CENTER);
+        if (null != action) {
+            subMenu.add(action);
+        }
+        action = getAction(ActionConstants.ALIGN_RIGHT);
+        if (null != action) {
+            subMenu.add(action);
+        }
+
+        action = getAction(ActionConstants.ALIGN_TOP);
+        if (null != action) {
+            subMenu.add(action);
+        }
+        action = getAction(ActionConstants.ALIGN_VERTICAL_CENTER);
+        if (null != action) {
+            subMenu.add(action);
+        }
+        action = getAction(ActionConstants.ALIGN_BOTTOM);
+        if (null != action) {
+            subMenu.add(action);
+        }
+
+        action = getAction(ActionConstants.ALIGN_DISTRIBUTE_HORIZONTAL_SPACING);
+        if (null != action) {
+            subMenu.add(action);
+        }
+        action = getAction(ActionConstants.ALIGN_DISTRIBUTE_VERTICAL_SPACING);
+        if (null != action) {
+            subMenu.add(action);
+        }
+
+        menu.appendToGroup(ActionConstants.ALIGN, subMenu);
+
+        return;
+    }
+
+    protected void addNavigateContextMenu(IMenuManager menu) {
+        menu.add(new Separator(ActionConstants.NAVIGATE_SELECTION));
+
+        MenuManager subMenu = new MenuManager(ActionConstants.NAVIGATE_SELECTION, null);
+        IAction action = getAction(ActionConstants.SELECT_PARENT);
+        if (null != action) {
+            subMenu.add(action);
+        }
+        action = getAction(ActionConstants.SELECT_CHILD);
+        if (null != action) {
+            subMenu.add(action);
+        }
+        action = getAction(ActionConstants.SELECT_PREV_SIBLING);
+        if (null != action) {
+            subMenu.add(action);
+        }
+        action = getAction(ActionConstants.SELECT_NEXT_SIBLING);
+        if (null != action) {
+            subMenu.add(action);
+        }
+
+        menu.appendToGroup(ActionConstants.NAVIGATE_SELECTION, subMenu);
+    }
+
+    protected void addNewContextMenu(IMenuManager menu) {
+        menu.add(new Separator(ActionConstants.NEW));
+
+        MenuManager subMenu = new MenuManager(ActionConstants.NEW, null);
+        IAction action = getAction(ActionConstants.NEW_SNIPPET);
+        if (null != action) {
+            subMenu.add(action);
+        }
+
+        menu.appendToGroup(ActionConstants.NEW, subMenu);
+    }
+
+    protected void addStoryboardContextMenu(IMenuManager menu) {
+        // menu.add(new Separator(ActionConstants.STORYBOARD));
+        // appendAction(ActionConstants.ALIGN_STORYBOARD, menu, ActionConstants.STORYBOARD);
+    }
+
+    protected void addViewSpecificContextMenu(IMenuManager menu) {
+        addCreateViewMenu(menu);
+        addControlViewMenu(menu);
+    }
+
+    protected void addCreateViewMenu(IMenuManager menu) {
+        menu.add(new Separator(OutlineConstants.ADD_VIEW_GROUP));
+
+        MenuManager subMenu = new MenuManager(Messages.ACTION_ADD_VIEW_TITLE, null);
+
+        String id = ActionConstants.ADD_VIEW_EMPTY;
+        subMenu.add(getAction(id));
+
+        id = OutlineConstants.ADD_VIEW_TEMPLATE;
+        subMenu.add(getAction(id));
+
+        if (AppManager.getAppManager().getProfile().equals(ConfiguratorConstants.PROFILE_MOBILE)) {
+            id = OutlineConstants.ADD_VIEW_POPUP;
+            subMenu.add(getAction(id));
+
+            id = OutlineConstants.ADD_VIEW_CTXPOPUP;
+            subMenu.add(getAction(id));
+        }
+        menu.appendToGroup(OutlineConstants.ADD_VIEW_GROUP, subMenu);
+    }
+
+    protected void addControlViewMenu(IMenuManager menu) {
+        IAction action = null;
+        menu.add(new Separator(OutlineConstants.ADD_VIEW_GROUP));
+        action = getAction(ActionConstants.SET_STARTUP_VIEW);
+        menu.appendToGroup(OutlineConstants.ADD_VIEW_GROUP, action);
+
+        action = getAction(OutlineConstants.CREATE_TEMPLATE_VIEW);
+        menu.appendToGroup(OutlineConstants.ADD_VIEW_GROUP, action);
+    }
+
+    protected void addComponentSpecificContextMenu(IMenuManager menu) {
+
+    }
+
+    protected void addCanvasSpecificContextMenu(IMenuManager menu) {
+
+    }
+
+    protected EditPartSet getSelectedPartSet() {
+        return new EditPartSet(getViewer().getSelectedEditParts());
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/CombineEditorPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/CombineEditorPart.java
new file mode 100644 (file)
index 0000000..61091c3
--- /dev/null
@@ -0,0 +1,493 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.ui.parts.SelectionSynchronizer;
+import org.eclipse.jface.dialogs.IPageChangedListener;
+import org.eclipse.jface.dialogs.PageChangedEvent;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.BuilderPlugin;
+import org.tizen.efluibuilder.codegenerator.CodeGenerator;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorException;
+import org.tizen.efluibuilder.codegenerator.ICodeGenerator;
+import org.tizen.efluibuilder.core.configuration.device.Device;
+import org.tizen.efluibuilder.core.configurator.Configurator;
+import org.tizen.efluibuilder.model.app.AppManager;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.mscreen.configurator.MscreenConstants;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditor;
+import org.tizen.efluibuilder.ui.editor.texteditor.TextEditor;
+import org.tizen.efluibuilder.ui.editor.toolbar.DesignEditorToolbar;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingManager;
+import org.tizen.efluibuilder.ui.views.outline.OutlinePage;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesPage;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleEDJManager;
+import org.tizen.efluibuilder.utility.IDEUtil;
+
+import edjResourceSyncManager.EdjResourceSyncManager;
+import edjResourceSyncManager.ResourceFileDuplicator;
+import graphicalDataManager.GraphicalDataInitializeFailedException;
+import graphicalDataManager.GraphicalDataManager;
+
+
+public class CombineEditorPart extends MultiPageEditorPart implements IPageChangedListener, IResourceChangeListener {
+
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
+
+    public static final int DESIGN_TAB = 0;
+    public static final int TEXTEDITOR_TAB = 1;
+    public static final int STORYBOARD_TAB = 2;
+
+    private DesignEditorToolbar designEditorToolBar;
+    private DesignEditorToolbar storyboardToolBar;
+
+    private ResourceFileDuplicator resFileDuplicator = new ResourceFileDuplicator(System.getProperty("java.io.tmpdir") + "TIZEN_UIB_RES\\");
+
+    private DesignEditor designEditor = new DesignEditor() {
+        @Override
+        public void createPartControl(Composite parent) {
+            designEditorToolBar = new DesignEditorToolbar(parent, CombineEditorPart.this);
+            designEditorToolBar.setType(DESIGN_TAB);
+            parent = designEditorToolBar.create();
+            edjResSyncMgr = new EdjResourceSyncManager();
+            super.createPartControl(parent);
+        }
+    };
+    private TextEditor textEditor = new TextEditor();
+    // private DesignEditorToolbar toolbar = null;
+
+    private PropertiesPage properties = null;
+
+    private GraphicalDataManager graphicalDataManager = null;
+    private Part documentPart = null;
+    private Part dataBindingPart = null;
+    private SelectionSynchronizer editorsSelectionSynchronizer = new EditorsSelectionSynchronizer();
+    private DataBindingManager dataBindManager = new DataBindingManager();
+    private EdjResourceSyncManager edjResSyncMgr = null;
+    private StyleEDJManager styleEDJManager = null;
+
+    @Override
+    public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+        super.init(site, input);
+        addListeners();
+        createDocumentPart(input);
+        createDataBindingPart();
+    }
+
+    private void createDataBindingPart() {
+        dataBindingPart = PartUtil.createPart(PartType.DATABINDING, null);
+    }
+
+    private void createDocumentPart(IEditorInput input) {
+        documentPart = PartUtil.createPart(PartType.DOCUMENT, null);
+
+        AppManager appManager = AppManager.getAppManager(input);
+        ((DocumentPart) documentPart).setPlatform(appManager.getPlatform());
+    }
+
+    @Override
+    public void resourceChanged(IResourceChangeEvent event) {
+        IResourceDelta parentDelta = event.getDelta();
+        if (parentDelta == null) { // res folder, extension EDJ;
+            return;
+        }
+
+        // get 'layout.xml' file
+        IFile file = getFile();
+        if (file == null) {
+            return;
+        }
+
+        // if have delta of 'layout.xml' with removed state, close editor.
+        IResourceDelta member = parentDelta.findMember(file.getFullPath());
+        if (member != null && member.getKind() == IResourceDelta.REMOVED) {
+            closeEditor();
+        }
+    }
+
+    protected void addListeners() {
+        addPageChangedListener(this);
+        ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
+    }
+
+    protected void removeListeners() {
+        removePageChangedListener(this);
+        ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
+    }
+
+    @Override
+    protected void createPages() {
+        createDesignEditor();
+        createTextEditor();
+        // createStoryboardView();
+
+        createLayoutModel();
+        createDataBindingModel();
+        try {
+            initContents();
+        } catch (GraphicalDataInitializeFailedException e) { // renderer
+                                                             // connection
+                                                             // timeout
+            closeEditor();
+        } catch (Exception e) {
+            closeEditor();
+
+            IDEUtil.showErrorDialogWithStacktrace(BuilderPlugin.PLUGIN_ID, getContainer().getShell(), this.getTitle(), "Failed to initialize Layout Editor", e);
+        }
+    }
+
+    public void setActivePage(int index) {
+        super.setActivePage(index);
+    }
+
+    private void createDesignEditor() {
+        try {
+            addPage(DESIGN_TAB, designEditor, getEditorInput());
+        } catch (PartInitException e) {
+            logger.error(e.getMessage(), e);
+        }
+        setPartName(getFile().getName());
+    }
+
+    private void createTextEditor() {
+        refreshLocal();
+        try {
+            addPage(TEXTEDITOR_TAB, textEditor, getEditorInput());
+        } catch (PartInitException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    private void refreshLocal() {
+        try {
+
+            IEditorInput input = this.getEditorInput();
+
+            // FIXED: If the file is not synchronized,
+            // this model doesn't have a document element.
+            if (input instanceof IFileEditorInput) {
+                IFile file = ((IFileEditorInput) input).getFile();
+                if (file.isSynchronized(IResource.DEPTH_ZERO) == false) {
+                    file.refreshLocal(IResource.DEPTH_ZERO, null);
+                }
+            }
+
+        } catch (CoreException e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    private void initContents() {
+        AppManager appMgr = AppManager.getAppManager(getEditorInput());
+        Configurator configurator = Configurator.of(appMgr.getPlatform());
+        List<String> defaultStyleEDJs = configurator.getDescriptorManager().getDefaultStyleEDJs();
+        if (documentPart != null) {
+            styleEDJManager = new StyleEDJManager(documentPart, getProject(), appMgr.getVersion(), appMgr.getProfile(), defaultStyleEDJs, resFileDuplicator);
+            edjResSyncMgr.addListener(styleEDJManager);
+            styleEDJManager.init();
+            graphicalDataManager = new GraphicalDataManager(getEditorInput(), documentPart, resFileDuplicator, edjResSyncMgr, styleEDJManager);
+            edjResSyncMgr.initContents(getProject(), appMgr.getVersion(), appMgr.getProfile(), resFileDuplicator, styleEDJManager);
+
+            designEditor.initContents(documentPart, dataBindingPart, getSelectionSynchronizer(), graphicalDataManager, edjResSyncMgr, this, textEditor);
+
+            textEditor.initContents(this, documentPart, getEditorInput(), getEditDomain(), getSelectionSynchronizer(), graphicalDataManager);
+
+            // sbTabManager.initializeSBTab(this, documentPart, getEditorInput(),
+            // getSelectionSynchronizer());
+            // sbTabManager.initializeViewerControl();
+
+            this.designEditorToolBar.initContents();
+            // this.storyboardToolBar.initContents();
+            this.dataBindManager.initializeDataBindingModelListener(dataBindingPart);
+        }
+        // FIXED: Error state problem for modified project when delete it.
+        this.textEditor.validateEditorInputState();
+    }
+
+    private void createDataBindingModel() {
+        dataBindManager.createDataBindingModel(dataBindingPart, getEditorInput());
+    }
+
+    private void createLayoutModel() {
+        try {
+            // POLICY: If XML model has a fault, Part model is null;
+            boolean bValid = textEditor.isValidDocument();
+            if (bValid == false) {
+                logger.warn("XML model is invalid.");
+                Part mscreenPart = PartUtil.createPart(PartType.MSCREEN, null);
+                ConfigurationPart configurationPart = (ConfigurationPart) PartUtil.createPart(PartType.CONFIGURATION, null);
+                Iterator<Device> iter = AppManager.getAppManager(getEditorInput()).getDeviceManager().getDevices().iterator();
+                configurationPart.setPropertyValue(LayoutSchemaConstants.DEVICE, iter.next().getName());
+                configurationPart.setPropertyValue(LayoutSchemaConstants.TYPE, MscreenConstants.CONFIGURATION_TYPE_COMMON);
+                configurationPart.setPropertyValue(LayoutSchemaConstants.NAME, MscreenConstants.CONFIGURATION_TYPE_COMMON);
+                configurationPart.setPropertyValue(LayoutSchemaConstants.ORIENTATION, MscreenConstants.ORIENTATION_PORTRAIT);
+                mscreenPart.insertChildBefore(configurationPart, null);
+
+                Part viewsPart = PartUtil.createPart(PartType.VIEWS, null);
+
+                documentPart.insertChildBefore(mscreenPart, null);
+                documentPart.insertChildBefore(viewsPart, null);
+
+                ((DocumentPart) documentPart).setValidDocument(bValid);
+                return;
+            }
+
+            documentPart = textEditor.createLayoutModel(documentPart);
+            // TODO: Need to find cause of null
+            if (documentPart == null) {
+                closeEditor();
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            closeEditor();
+        }
+    }
+
+    @Override
+    public void dispose() {
+        removeListeners();
+        // if (toolbar != null) {
+        // toolbar.dispose();
+        // toolbar = null;
+        // }
+
+        if (this.designEditorToolBar != null) {
+            this.designEditorToolBar.dispose();
+            this.designEditorToolBar = null;
+        }
+        if (this.storyboardToolBar != null) {
+            this.storyboardToolBar.dispose();
+            this.storyboardToolBar = null;
+        }
+
+        if (textEditor != null) {
+            textEditor.dispose();
+            textEditor = null;
+        }
+
+        if (designEditor != null) {
+            designEditor.dispose();
+            designEditor = null;
+        }
+
+        if (graphicalDataManager != null) {
+            graphicalDataManager.destroy();
+            graphicalDataManager = null;
+        }
+
+        if (edjResSyncMgr != null) {
+            edjResSyncMgr.dispose();
+            edjResSyncMgr = null;
+        }
+
+        super.dispose();
+    }
+
+    public IProject getProject() {
+        return getFile().getProject();
+    }
+
+    public IFile getFile() {
+        IEditorInput input = getEditorInput();
+        if (input instanceof IFileEditorInput) {
+            return ((IFileEditorInput) input).getFile();
+        }
+
+        throw new IllegalArgumentException("Cannot get an editing file.");
+    }
+
+    @Override
+    public void doSave(IProgressMonitor monitor) {
+        try {
+            SubMonitor subMonitor = SubMonitor.convert(monitor, "Saving layout.xml", 100);
+
+            getFile().refreshLocal(IResource.DEPTH_ZERO, subMonitor.newChild(10));
+
+            {
+                // // 1. write location of view to .uproject
+                // sbTabManager.saveMetaData();
+
+                // 2. write layout.xml
+                textEditor.doSave(subMonitor.newChild(20));
+
+                // 3. write binding meta data
+                dataBindManager.doSave(subMonitor.newChild(20));
+
+                // 4. generate managed sources
+                if (textEditor.isValidDocument()) {
+                    boolean isAutoBuild = getProject().getWorkspace().getDescription().isAutoBuilding();
+                    if (isAutoBuild == false) {
+                        ICodeGenerator codeGenerator = new CodeGenerator(getProject());
+                        subMonitor.newChild(40);
+                        try {
+                            codeGenerator.generate();
+                        } catch (CodeGeneratorException e) {
+                            logger.error(e.getMessage());
+                        }
+                        subMonitor.done();
+                    }
+                }
+            }
+
+            designEditor.getEditDomain().getCommandStack().markSaveLocation();
+            getFile().refreshLocal(IResource.DEPTH_INFINITE, subMonitor.newChild(10));
+        } catch (CoreException e) {
+        } finally {
+            if (monitor != null) {
+                monitor.done();
+            }
+        }
+    }
+
+    @Override
+    public void doSaveAs() {
+        designEditor.doSaveAs();
+    }
+
+    @Override
+    public boolean isSaveAsAllowed() {
+        return false;
+    }
+
+    @Override
+    public void pageChanged(PageChangedEvent arg0) {
+
+        switch (getActivePage()) {
+            case DESIGN_TAB: {
+                designEditor.setGraphicalViewer(designEditor.getViewer());
+                // this.designEditorToolBar.refreshToolbar();
+                break;
+            }
+            case TEXTEDITOR_TAB: {
+                break;
+            }
+            default:
+                return;
+        }
+        // computeToolbarBounds();
+        // toolbar.refreshToolbar();
+    }
+
+    @Override
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    public Object getAdapter(Class type) {
+        if (type == null)
+            return null;
+
+        if (type == CommandStack.class) {
+            return designEditor.getEditDomain().getCommandStack();
+        }
+
+        if (type == org.eclipse.ui.views.properties.IPropertySheetPage.class) {
+            properties = new PropertiesPage(designEditor.getEditDomain().getCommandStack(), designEditor.getActions(), documentPart, edjResSyncMgr,
+                                            graphicalDataManager, styleEDJManager);
+            return properties;
+        } else if (type == IContentOutlinePage.class) {
+            // return new OutlinePage(documentPart,
+            // designEditor.getEditDomain(),
+            // designEditor.getActions(), editorsSelectionSynchronizer,
+            // sbTabManager);
+            return new OutlinePage(documentPart, designEditor.getEditDomain(), designEditor.getActions(), editorsSelectionSynchronizer);
+        }
+
+        return super.getAdapter(type);
+    }
+
+    public void setEnableToolBar(boolean enable) {
+        this.designEditorToolBar.setEnabled(enable);
+    }
+
+    public Part getDocumentPart() {
+        return documentPart;
+    }
+
+    public Part getDataBindingPart() {
+        return dataBindingPart;
+    }
+
+    public GraphicalDataManager getGraphiclaDataManager() {
+        return graphicalDataManager;
+    }
+
+    public EditDomain getEditDomain() {
+        return designEditor.getEditDomain();
+    }
+
+    public SelectionSynchronizer getSelectionSynchronizer() {
+        return editorsSelectionSynchronizer;
+    }
+
+    public DesignEditor getDesignEditor() {
+        return designEditor;
+    }
+
+    public void closeEditor() {
+        Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                getSite().getPage().closeEditor(CombineEditorPart.this, false);
+            }
+        });
+    }
+
+    public EdjResourceSyncManager getEdjResourceSyncManager() {
+        return this.edjResSyncMgr;
+    }
+
+    public DataBindingManager getDataBindManager() {
+        return dataBindManager;
+    }
+
+    public void setDataBindManager(DataBindingManager dataBindManager) {
+        this.dataBindManager = dataBindManager;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/EditorConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/EditorConstants.java
new file mode 100644 (file)
index 0000000..da911e5
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor;
+
+public final class EditorConstants {
+    // TextEditor
+    public static final String ENCODING = "UTF-8"; //$NON-NLS-1$
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/EditorsSelectionSynchronizer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/EditorsSelectionSynchronizer.java
new file mode 100644 (file)
index 0000000..0d06d6d
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.ui.parts.SelectionSynchronizer;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+public class EditorsSelectionSynchronizer extends SelectionSynchronizer {
+
+    @Override
+    protected EditPart convert(EditPartViewer viewer, EditPart editPart) {
+        Assert.notNull(viewer);
+        Assert.notNull(editPart);
+        Object model = editPart.getModel();
+        Assert.notNull(model);
+        if (!(model instanceof Part)) {
+            return null;
+        }
+        Object object = viewer.getEditPartRegistry().get(((Part) model).getUniqueId());
+        if (object == null) {
+            return null;
+        }
+
+        Assert.isTrue(object instanceof EditPart);
+        return (EditPart) object;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/IProjectResourceFileChangeListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/IProjectResourceFileChangeListener.java
new file mode 100644 (file)
index 0000000..02391c6
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.editor;
+
+import java.util.ArrayList;
+
+public interface IProjectResourceFileChangeListener {
+    public void projectResourceFileChanged(ArrayList<String> changedFiles);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/KeyHandler.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/KeyHandler.java
new file mode 100644 (file)
index 0000000..1689877
--- /dev/null
@@ -0,0 +1,266 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.tizen.efluibuilder.gef.actions.Messages;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public class KeyHandler {
+
+    private Map<KeyStroke, IAction> actions;
+    private IAction prevExecutedAction = null;
+    long actionExecutedTime = 0;
+    long actionExecutableMinTime = 100;
+    public static int KEY_CODE_A = 97;
+
+    public KeyHandler(ActionRegistry actionRegistry) {
+        init(actionRegistry);
+    }
+
+    public boolean keyPressed(KeyEvent event) {
+        if (performStroke(KeyStroke.getPressed(event.keyCode, event.stateMask))) {
+            event.doit = false;
+            return true;
+        }
+        return false;
+    }
+
+    public boolean keyReleased(KeyEvent event) {
+        if (performStroke(KeyStroke.getReleased(event.keyCode, event.stateMask))) {
+            return true;
+        }
+        return false;
+    }
+
+    private boolean performStroke(KeyStroke keyStroke) {
+        if (actions == null)
+            return false;
+        IAction action = actions.get(keyStroke);
+        if (action == null) {
+            return false;
+        } else {
+            if (this.prevExecutedAction != action) {
+                this.prevExecutedAction = action;
+            } else {
+                if (this.actionExecutedTime != 0) {
+                    long currentTime = System.currentTimeMillis();
+                    long timediff = currentTime - this.actionExecutedTime;
+                    if (timediff < this.actionExecutableMinTime) {
+                        return false;
+                    }
+                }
+            }
+            if (action.isEnabled()) {
+                this.actionExecutedTime = System.currentTimeMillis();
+                action.run();
+            }
+        }
+
+        return true;
+    }
+
+    public void put(KeyStroke keyStroke, IAction action) {
+        if (actions == null)
+            actions = new HashMap<KeyStroke, IAction>();
+        actions.put(keyStroke, action);
+    }
+
+    public void remove(KeyStroke keyStroke) {
+        if (actions != null)
+            actions.remove(keyStroke);
+    }
+
+    private int getKeycodeFromChar(char character) {
+        return KEY_CODE_A + Character.toLowerCase(character) - 'a';
+    }
+
+    private void init(ActionRegistry actionRegistry) {
+
+        // REGISTER EDIT : Del, Undo&Redo, Copy&Paste, Cut
+        {
+            // put(KeyStroke.getPressed(127, SWT.NONE), // Del
+            // actionRegistry.getAction(ActionConstants.DELETE_PART));
+            // put(KeyStroke.getReleased(122, SWT.CTRL), // Ctrl+z
+            // actionRegistry.getAction(ActionFactory.UNDO.getId()));
+            // put(KeyStroke.getReleased(121, SWT.CTRL), // Ctrl+y
+            // actionRegistry.getAction(ActionFactory.REDO.getId()));
+
+            // put(KeyStroke.getReleased(99, SWT.CTRL), // Ctrl+c
+            // actionRegistry.getAction(ActionConstants.COPY_PART));
+            // put(KeyStroke.getReleased(118, SWT.CTRL), // Ctrl+v
+            // actionRegistry.getAction(ActionConstants.PASTE_PART));
+            // put(KeyStroke.getReleased(120, SWT.CTRL), // Ctrl+x
+            // actionRegistry.getAction(ActionConstants.CUT_PART));
+            // put(KeyStroke.getPressed(getKeycodeFromChar('V'), SWT.CTRL + SWT.SHIFT),
+            // actionRegistry.getAction(Messages.ACTION_MOVE_DOWN));
+        }
+
+        // REGISTER EDIT : Move
+        {
+            put(KeyStroke.getPressed(SWT.ARROW_LEFT, SWT.NONE), actionRegistry.getAction(Messages.ACTION_MOVE_LEFT));
+            put(KeyStroke.getPressed(SWT.ARROW_RIGHT, SWT.NONE), actionRegistry.getAction(Messages.ACTION_MOVE_RIGHT));
+            put(KeyStroke.getPressed(SWT.ARROW_UP, SWT.NONE), actionRegistry.getAction(Messages.ACTION_MOVE_UP));
+            put(KeyStroke.getPressed(SWT.ARROW_DOWN, SWT.NONE), actionRegistry.getAction(Messages.ACTION_MOVE_DOWN));
+        }
+
+        // REGISTER ALIGN
+        {
+            put(KeyStroke.getReleased(SWT.ARROW_LEFT, SWT.CTRL), actionRegistry.getAction(ActionConstants.ALIGN_LEFT));
+
+            put(KeyStroke.getReleased(SWT.ARROW_UP, SWT.CTRL), actionRegistry.getAction(ActionConstants.ALIGN_TOP));
+
+            put(KeyStroke.getReleased(SWT.ARROW_RIGHT, SWT.CTRL), actionRegistry.getAction(ActionConstants.ALIGN_RIGHT));
+
+            put(KeyStroke.getReleased(SWT.ARROW_DOWN, SWT.CTRL), actionRegistry.getAction(ActionConstants.ALIGN_BOTTOM));
+
+            put(KeyStroke.getReleased(SWT.ARROW_LEFT, SWT.CTRL + SWT.SHIFT), actionRegistry.getAction(ActionConstants.ALIGN_HORIZONTAL_CENTER));
+
+            put(KeyStroke.getReleased(SWT.ARROW_UP, SWT.CTRL + SWT.SHIFT), actionRegistry.getAction(ActionConstants.ALIGN_VERTICAL_CENTER));
+
+            put(KeyStroke.getReleased(SWT.ARROW_RIGHT, SWT.CTRL + SWT.SHIFT), actionRegistry.getAction(ActionConstants.ALIGN_DISTRIBUTE_HORIZONTAL_SPACING));
+
+            put(KeyStroke.getReleased(SWT.ARROW_DOWN, SWT.CTRL + SWT.SHIFT), actionRegistry.getAction(ActionConstants.ALIGN_DISTRIBUTE_VERTICAL_SPACING));
+        }
+
+        // REGISTER NAVIGATE_SELECTION
+        {
+            put(KeyStroke.getReleased(SWT.ARROW_LEFT, SWT.SHIFT), actionRegistry.getAction(ActionConstants.SELECT_PREV_SIBLING));
+
+            put(KeyStroke.getReleased(SWT.ARROW_UP, SWT.SHIFT), actionRegistry.getAction(ActionConstants.SELECT_PARENT));
+
+            put(KeyStroke.getReleased(SWT.ARROW_RIGHT, SWT.SHIFT), actionRegistry.getAction(ActionConstants.SELECT_NEXT_SIBLING));
+
+            put(KeyStroke.getReleased(SWT.ARROW_DOWN, SWT.SHIFT), actionRegistry.getAction(ActionConstants.SELECT_CHILD));
+        }
+
+        // REGISTER ZORDER
+        {
+            // put(KeyStroke.getReleased(getKeycodeFromChar('b'), SWT.CTRL + SWT.SHIFT),
+            // actionRegistry.getAction(ActionConstants.ZORDER_BACK));
+            // put(KeyStroke.getReleased(getKeycodeFromChar('f'), SWT.CTRL + SWT.SHIFT),
+            // actionRegistry.getAction(ActionConstants.ZORDER_FRONT));
+
+            put(KeyStroke.getReleased(getKeycodeFromChar('b'), SWT.CTRL + SWT.SHIFT), actionRegistry.getAction(ActionConstants.ZORDER_BACKWARD));
+            put(KeyStroke.getReleased(getKeycodeFromChar('f'), SWT.CTRL + SWT.SHIFT), actionRegistry.getAction(ActionConstants.ZORDER_FRONTWARD));
+        }
+        // put(KeyStroke.getReleased(SWT.ARROW_LEFT, SWT.CTRL),
+        // actionRegistry.getAction(Messages.ACTION_MOVE_LEFT_DETAIL));
+        // put(KeyStroke.getReleased(SWT.ARROW_RIGHT, SWT.CTRL),
+        // actionRegistry.getAction(Messages.ACTION_MOVE_RIGHT_DETAIL));
+        // put(KeyStroke.getReleased(SWT.ARROW_UP, SWT.CTRL),
+        // actionRegistry.getAction(Messages.ACTION_MOVE_UP_DETAIL));
+        // put(KeyStroke.getReleased(SWT.ARROW_DOWN, SWT.CTRL),
+        // actionRegistry.getAction(Messages.ACTION_MOVE_DOWN_DETAIL));
+        //
+        // put(KeyStroke.getPressed(SWT.ARROW_LEFT, SWT.SHIFT),
+        // actionRegistry.getAction(Messages.ACTION_DEC_WIDTH));
+        // put(KeyStroke.getPressed(SWT.ARROW_RIGHT, SWT.SHIFT),
+        // actionRegistry.getAction(Messages.ACTION_INC_WIDTH));
+        // put(KeyStroke.getPressed(SWT.ARROW_UP, SWT.SHIFT),
+        // actionRegistry.getAction(Messages.ACTION_DEC_HEIGHT));
+        // put(KeyStroke.getPressed(SWT.ARROW_DOWN, SWT.SHIFT),
+        // actionRegistry.getAction(Messages.ACTION_INC_HEIGHT));
+        //
+        // put(KeyStroke.getReleased(SWT.ARROW_LEFT, SWT.CTRL + SWT.SHIFT),
+        // actionRegistry.getAction(Messages.ACTION_DEC_WIDTH_DETAIL));
+        // put(KeyStroke.getReleased(SWT.ARROW_RIGHT, SWT.CTRL + SWT.SHIFT),
+        // actionRegistry.getAction(Messages.ACTION_INC_WIDTH_DETAIL));
+        // put(KeyStroke.getReleased(SWT.ARROW_UP, SWT.CTRL + SWT.SHIFT),
+        // actionRegistry.getAction(Messages.ACTION_DEC_HEIGHT_DETAIL));
+        // put(KeyStroke.getReleased(SWT.ARROW_DOWN, SWT.CTRL + SWT.SHIFT),
+        // actionRegistry.getAction(Messages.ACTION_INC_HEIGHT_DETAIL));
+
+        // put(KeyStroke.getPressed(105, SWT.CTRL + SWT.SHIFT + SWT.ALT), // Ctrl+Shift+Alt+I
+        // actionRegistry.getAction(Messages.ACTION_SHOW_INSPECTOR));
+
+    }
+
+    private static class KeyStroke {
+        private int keyCode;
+        private int stateMask;
+        private boolean isPressed;
+
+        private KeyStroke(int keyCode, int stateMask, boolean isPressed) {
+            this.keyCode = keyCode;
+            this.stateMask = stateMask;
+            this.isPressed = isPressed;
+        }
+
+        public static KeyStroke getPressed(int keyCode, int stateMask) {
+            KeyStroke keyStroke = new KeyStroke(keyCode, stateMask, true);
+            return keyStroke;
+        }
+
+        public static KeyStroke getReleased(int keyCode, int stateMask) {
+            KeyStroke keyStroke = new KeyStroke(keyCode, stateMask, false);
+            return keyStroke;
+        }
+
+        public int getKeyCode() {
+            return keyCode;
+        }
+
+        public int getStateMask() {
+            return stateMask;
+        }
+
+        public boolean isPressed() {
+            return isPressed;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (!(obj instanceof KeyStroke)) {
+                return false;
+            }
+
+            KeyStroke keyStroke = (KeyStroke) obj;
+
+            if (this.keyCode == keyStroke.getKeyCode() && this.stateMask == keyStroke.getStateMask() && this.isPressed == keyStroke.isPressed()) {
+                return true;
+            }
+
+            return false;
+        }
+
+        @Override
+        public int hashCode() {
+            final int PRIME = 31;
+            int result = 1;
+            result = PRIME * result + keyCode;
+            result = PRIME * result + stateMask;
+            result = result + ((isPressed) ? 0 : PRIME);
+            return result;
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/Messages.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/Messages.java
new file mode 100644 (file)
index 0000000..c5d0a1a
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public final class Messages {
+    private static final String BUNDLE_NAME = Messages.class.getName();
+
+    public static String PALETTE_GROUP_SNIPPET;
+
+    public static String ACTION_NEW_SNIPPET;
+    public static String ACTION_DELETE_SNIPPET;
+
+    public static String ACTION_IMPORT_SNIPPET;
+    public static String ACTION_EXPORT_SNIPPET;
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/Messages.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/Messages.properties
new file mode 100644 (file)
index 0000000..b64b812
--- /dev/null
@@ -0,0 +1,5 @@
+PALETTE_GROUP_SNIPPET = Snippets
+ACTION_NEW_SNIPPET = New Snippet
+ACTION_DELETE_SNIPPET = Delete
+ACTION_IMPORT_SNIPPET = Import;
+ACTION_EXPORT_SNIPPET = Export;
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MouseWheelZoomHandler.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MouseWheelZoomHandler.java
new file mode 100644 (file)
index 0000000..8589a13
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor;
+
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.MouseWheelHandler;
+import org.eclipse.swt.widgets.Event;
+import org.tizen.efluibuilder.gef.viewer.IScalableViewer;
+
+
+public class MouseWheelZoomHandler implements MouseWheelHandler {
+
+    public static final MouseWheelHandler SINGLETON = new MouseWheelZoomHandler();
+
+    public MouseWheelZoomHandler() {
+    }
+
+    @Override
+    public void handleMouseWheel(Event event, EditPartViewer viewer) {
+        if (viewer instanceof IScalableViewer) {
+            IScalableViewer scalableViewer = (IScalableViewer) viewer;
+            double zoomValue = ((scalableViewer.getZoomScale() * 100) + event.count) / 100;
+            scalableViewer.setZoomScale(zoomValue);
+            event.doit = false;
+
+            // Off Fit-mode
+            if (scalableViewer.getFitMode()) {
+                scalableViewer.setFitMode(false);
+            }
+
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MultiPageEditorPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MultiPageEditorPart.java
new file mode 100644 (file)
index 0000000..269fd45
--- /dev/null
@@ -0,0 +1,1427 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Lars Vogel <Lars.Vogel@gmail.com> - Bug 440810
+ * 2017-10-10 Seongwon Shim sw83.shim@samsung.com
+ * Modified by S-Core Co.Ltd.
+ * 1. Internalization of Code in Tizen SDK
+ *  1) update package name
+ *  2) Replace container(CTabFolder -> Composite(stacklayout)) and modify related code
+ *     - replace member variable type : CTabFolder - > Composite
+ *     - addPage, addControl, removeControl : manage composite for each page
+ *     - createContainer : replace createContinaer method
+ *     - createItem, initializePageSwitching, setPageImage, setPageText, getPageImage, getPageText, getTabFolder : comment out unnecessary source code
+ *     - dispose : dispose page control
+ *     - getActivePage : replace implementation for active page
+ *     - getControl : replace implementation to get page control
+ *     - getEditor : replace implementation to get Editor
+ *     - getPageCount : replace implementation to get page count
+ *     - setActivePage : replace implementation to set active page     
+ *******************************************************************************/
+
+package org.tizen.efluibuilder.ui.editor;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.util.Tracing;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.jface.dialogs.IPageChangeProvider;
+import org.eclipse.jface.dialogs.IPageChangedListener;
+import org.eclipse.jface.dialogs.PageChangedEvent;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Layout;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.IEditorActionBarContributor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IKeyBindingService;
+import org.eclipse.ui.INestableKeyBindingService;
+import org.eclipse.ui.IPartService;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.internal.PartSite;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.misc.Policy;
+import org.eclipse.ui.internal.services.INestable;
+import org.eclipse.ui.internal.services.IServiceLocatorCreator;
+import org.eclipse.ui.internal.util.Util;
+import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.part.IWorkbenchPartOrientation;
+import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
+import org.eclipse.ui.services.IDisposable;
+import org.eclipse.ui.services.IServiceLocator;
+
+
+/**
+ * A multi-page editor is an editor with multiple pages, each of which may contain an editor or an
+ * arbitrary SWT control.
+ * <p>
+ * Subclasses must implement the following methods:
+ * <ul>
+ * <li><code>createPages</code> - to create the required pages by calling one of the
+ * <code>addPage</code> methods</li>
+ * <li><code>IEditorPart.doSave</code> - to save contents of editor</li>
+ * <li><code>IEditorPart.doSaveAs</code> - to save contents of editor</li>
+ * <li><code>IEditorPart.isSaveAsAllowed</code> - to enable Save As</li>
+ * <li><code>IEditorPart.gotoMarker</code> - to scroll to a marker</li>
+ * </ul>
+ * </p>
+ * <p>
+ * Multi-page editors have a single action bar contributor, which manages contributions for all the
+ * pages. The contributor must be a subclass of <code>MultiPageEditorActionBarContributor</code>.
+ * Note that since any nested editors are created directly in code by callers of
+ * <code>addPage(IEditorPart,IEditorInput)</code>, nested editors do not have their own
+ * contributors.
+ * </p>
+ * <p>
+ * As of 3.5 multi-page editors will post PageChangedEvents at the end of {@link #pageChange(int)}.
+ * Subclasses may override {@link #getSelectedPage()} to return a page appropriate to their
+ * multi-page editor. IPartListener2 listeners registered with the IPartService can implement
+ * IPageChangedListener to be notified about all page change events within the workbench page or
+ * workbench window.
+ * </p>
+ *
+ * @see org.eclipse.ui.part.MultiPageEditorActionBarContributor
+ * @see org.eclipse.jface.dialogs.IPageChangeProvider
+ * @see org.eclipse.jface.dialogs.IPageChangedListener
+ * @see org.eclipse.ui.IPartService
+ */
+public abstract class MultiPageEditorPart extends EditorPart implements IPageChangeProvider {
+
+    private static final String COMMAND_NEXT_SUB_TAB = "org.eclipse.ui.navigate.nextSubTab"; //$NON-NLS-1$
+    private static final String COMMAND_PREVIOUS_SUB_TAB = "org.eclipse.ui.navigate.previousSubTab"; //$NON-NLS-1$
+
+    /**
+     * Subclasses that override {@link #createPageContainer(Composite)} can use this constant to get
+     * a site for the container that can be active while the current page is deactivated.
+     *
+     * @since 3.4
+     * @see #activateSite()
+     * @see #deactivateSite(boolean, boolean)
+     * @see #getPageSite(int)
+     */
+    protected static final int PAGE_CONTAINER_SITE = 65535;
+
+    /**
+     * Private tracing output.
+     */
+    private static final String TRACING_COMPONENT = "MPE"; //$NON-NLS-1$
+
+    /**
+     * The active service locator. This value may be <code>null</code> if there is no selected page,
+     * or if the selected page is a control with no site.
+     */
+    private INestable activeServiceLocator;
+
+    /**
+     * The container widget.
+     */
+    // private CTabFolder container;
+    /* TIZEN: add new UI: replace container { */
+    private Composite container;
+
+    private List<Control> pageControls;
+    /* TIZEN } */
+
+    /**
+     * List of nested editors. Element type: IEditorPart. Need to hang onto them here, in addition
+     * to using get/setData on the items, because dispose() needs to access them, but widgetry has
+     * already been disposed at that point.
+     */
+    private ArrayList nestedEditors = new ArrayList(3);
+
+    private List pageSites = new ArrayList(3);
+
+    private IServiceLocator pageContainerSite;
+
+    private ListenerList pageChangeListeners = new ListenerList(
+                                                                ListenerList.IDENTITY);
+
+    /**
+     * Creates an empty multi-page editor with no pages.
+     */
+    protected MultiPageEditorPart() {
+        super();
+    }
+
+    /**
+     * Creates and adds a new page containing the given control to this multi-page editor. The
+     * control may be <code>null</code>, allowing it to be created and set later using
+     * <code>setControl</code>.
+     *
+     * @param control
+     *            the control, or <code>null</code>
+     * @return the index of the new page
+     *
+     * @see MultiPageEditorPart#setControl(int, Control)
+     */
+    public int addPage(Control control) {
+        int index = getPageCount();
+        addPage(index, control);
+        return index;
+    }
+
+    /**
+     * Creates and adds a new page containing the given control to this multi-page editor. The page
+     * is added at the given index. The control may be <code>null</code>, allowing it to be created
+     * and set later using <code>setControl</code>.
+     *
+     * @param index
+     *            the index at which to add the page (0-based)
+     * @param control
+     *            the control, or <code>null</code>
+     *
+     * @see MultiPageEditorPart#setControl(int, Control)
+     */
+    public void addPage(int index, Control control) {
+        addControl(index, control);
+    }
+
+    /**
+     * Creates and adds a new page containing the given editor to this multi-page editor. This also
+     * hooks a property change listener on the nested editor.
+     *
+     * @param editor
+     *            the nested editor
+     * @param input
+     *            the input for the nested editor
+     * @return the index of the new page
+     * @exception PartInitException
+     *                if a new page could not be created
+     *
+     * @see MultiPageEditorPart#handlePropertyChange(int) the handler for property change events
+     *      from the nested editor
+     */
+    public int addPage(IEditorPart editor, IEditorInput input)
+            throws PartInitException {
+        int index = getPageCount();
+        addPage(index, editor, input);
+        return index;
+    }
+
+    /**
+     * Creates and adds a new page containing the given editor to this multi-page editor. The page
+     * is added at the given index. This also hooks a property change listener on the nested editor.
+     *
+     * @param index
+     *            the index at which to add the page (0-based)
+     * @param editor
+     *            the nested editor
+     * @param input
+     *            the input for the nested editor
+     * @exception PartInitException
+     *                if a new page could not be created
+     *
+     * @see MultiPageEditorPart#handlePropertyChange(int) the handler for property change events
+     *      from the nested editor
+     */
+    public void addPage(int index, IEditorPart editor, IEditorInput input)
+            throws PartInitException {
+        IEditorSite site = createSite(editor);
+        // call init first so that if an exception is thrown, we have created no
+        // new widgets
+        editor.init(site, input);
+        Composite parent2 = new Composite(getContainer(),
+                                          getOrientation(editor));
+        parent2.setLayout(new FillLayout());
+        editor.createPartControl(parent2);
+        editor.addPropertyListener(new IPropertyListener() {
+            @Override
+            public void propertyChanged(Object source, int propertyId) {
+                MultiPageEditorPart.this.handlePropertyChange(propertyId);
+            }
+        });
+
+        /* TIZEN: add new UI: manage composite for each page { */
+        parent2.setData(editor);
+        addControl(index, parent2);
+        /* TIZEN } */
+
+        nestedEditors.add(editor);
+    }
+
+    /* TIZEN: add new UI: manage composite for each page { */
+    private void addControl(int index, Control composite) {
+        if (index < 0 || index > pageControls.size()) {
+            return;
+        }
+
+        if (index < pageControls.size() && pageControls.get(index) != null) {
+            pageControls.remove(index);
+        }
+
+        pageControls.add(index, composite);
+    }
+
+    private void removeControl(int index) {
+        if (index < 0 || index > pageControls.size()) {
+            return;
+        }
+
+        pageControls.remove(index);
+    }
+    /* TIZEN } */
+
+    /**
+     * Get the orientation of the editor.
+     *
+     * @param editor
+     * @return int the orientation flag
+     * @see SWT#RIGHT_TO_LEFT
+     * @see SWT#LEFT_TO_RIGHT
+     * @see SWT#NONE
+     */
+    private int getOrientation(IEditorPart editor) {
+        if (editor instanceof IWorkbenchPartOrientation) {
+            return ((IWorkbenchPartOrientation) editor).getOrientation();
+        }
+        return getOrientation();
+    }
+
+    /* TIZEN: add new UI: replace createContinaer method { */
+    /**
+     * Creates an empty container. Creates a CTabFolder with no style bits set, and hooks a
+     * selection listener which calls <code>pageChange()</code> whenever the selected tab changes.
+     *
+     * @param parent
+     *            The composite in which the container tab folder should be created; must not be
+     *            <code>null</code>.
+     * @return a new container
+     */
+//    private CTabFolder createContainer(Composite parent) {
+//        // use SWT.FLAT style so that an extra 1 pixel border is not reserved
+//        // inside the folder
+//        parent.setLayout(new FillLayout());
+//        final CTabFolder newContainer = new CTabFolder(parent, SWT.BOTTOM
+//                | SWT.FLAT);
+//        newContainer.addSelectionListener(new SelectionAdapter() {
+//            @Override
+//            public void widgetSelected(SelectionEvent e) {
+//                int newPageIndex = newContainer.indexOf((CTabItem) e.item);
+//                pageChange(newPageIndex);
+//            }
+//        });
+//        newContainer.addTraverseListener(new TraverseListener() {
+//            // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=199499 : Switching tabs by Ctrl+PageUp/PageDown must not be caught on the inner tab set
+//            @Override
+//            public void keyTraversed(TraverseEvent e) {
+//                switch (e.detail) {
+//                    case SWT.TRAVERSE_PAGE_NEXT:
+//                    case SWT.TRAVERSE_PAGE_PREVIOUS:
+//                        int detail = e.detail;
+//                        e.doit = true;
+//                        e.detail = SWT.TRAVERSE_NONE;
+//                        Control control = newContainer.getParent();
+//                        do {
+//                            if (control.traverse(detail))
+//                                return;
+//                            if (control.getListeners(SWT.Traverse).length != 0)
+//                                return;
+//                            if (control instanceof Shell)
+//                                return;
+//                            control = control.getParent();
+//                        } while (control != null);
+//                }
+//            }
+//        });
+//        return newContainer;
+//    }
+
+    
+    private Composite createContainer(Composite parent) {
+        StackLayout layout = new StackLayout();
+        parent.setLayout(layout);
+        this.pageControls = new ArrayList<Control>();
+        parent.setData(this.pageControls);
+
+        parent.addTraverseListener(new TraverseListener() {
+            // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=199499 : Switching tabs by
+            // Ctrl+PageUp/PageDown must not be caught on the inner tab set
+            @Override
+            public void keyTraversed(TraverseEvent e) {
+                switch (e.detail) {
+                    case SWT.TRAVERSE_PAGE_NEXT:
+                    case SWT.TRAVERSE_PAGE_PREVIOUS:
+                        int detail = e.detail;
+                        e.doit = true;
+                        e.detail = SWT.TRAVERSE_NONE;
+                        Control control = parent.getParent();
+                        do {
+                            if (control.traverse(detail))
+                                return;
+                            if (control.getListeners(SWT.Traverse).length != 0)
+                                return;
+                            if (control instanceof Shell)
+                                return;
+                            control = control.getParent();
+                        } while (control != null);
+                }
+            }
+        });
+        return parent;
+
+    }
+    /* TIZEN } */
+
+    /* TIZEN: add new UI: comment out unnecessary source code{ */
+    /**
+     * Creates a tab item at the given index and places the given control in the new item. The item
+     * is a CTabItem with no style bits set.
+     *
+     * @param index
+     *            the index at which to add the control
+     * @param control
+     *            is the control to be placed in an item
+     * @return a new item
+     */
+//     private CTabItem createItem(int index, Control control) {
+//         CTabItem item = new CTabItem(getTabFolder(), SWT.NONE, index);
+//         item.setControl(control);
+//         return item;
+//     }
+    /* TIZEN } */
+    
+
+    /**
+     * Creates the pages of this multi-page editor.
+     * <p>
+     * Subclasses must implement this method.
+     * </p>
+     */
+    protected abstract void createPages();
+
+    /**
+     * The <code>MultiPageEditor</code> implementation of this <code>IWorkbenchPart</code> method
+     * creates the control for the multi-page editor by calling <code>createContainer</code>, then
+     * <code>createPages</code>. Subclasses should implement <code>createPages</code> rather than
+     * overriding this method.
+     *
+     * @param parent
+     *            The parent in which the editor should be created; must not be <code>null</code>.
+     */
+    @Override
+    public final void createPartControl(Composite parent) {
+        Composite pageContainer = createPageContainer(parent);
+        this.container = createContainer(pageContainer);
+        createPages();
+        // set the active page (page 0 by default), unless it has already been
+        // done
+        if (getActivePage() == -1) {
+            setActivePage(0);
+            IEditorPart part = getEditor(0);
+            if (part != null) {
+                final IServiceLocator serviceLocator = part.getEditorSite();
+                if (serviceLocator instanceof INestable) {
+                    activeServiceLocator = (INestable) serviceLocator;
+                    activeServiceLocator.activate();
+                }
+            }
+        }
+        initializePageSwitching();
+        initializeSubTabSwitching();
+    }
+
+    /**
+     * Initialize the MultiPageEditorPart to use the page switching command. Clients can override
+     * this method with an empty body if they wish to opt-out.
+     *
+     * @since 3.4
+     */
+    protected void initializePageSwitching() {
+        /* TIZEN: add new UI: comment out unnecessary source code{ */
+ /*       new PageSwitcher(this) {
+            @Override
+            public Object[] getPages() {
+                int pageCount = getPageCount();
+                Object[] result = new Object[pageCount];
+                for (int i = 0; i < pageCount; i++) {
+                    result[i] = new Integer(i);
+                }
+                return result;
+            }
+
+            @Override
+            public String getName(Object page) {
+                return getPageText(((Integer) page).intValue());
+            }
+
+            @Override
+            public ImageDescriptor getImageDescriptor(Object page) {
+                Image image = getPageImage(((Integer) page).intValue());
+                if (image == null)
+                    return null;
+
+                return ImageDescriptor.createFromImage(image);
+            }
+
+            @Override
+            public void activatePage(Object page) {
+                setActivePage(((Integer) page).intValue());
+            }
+
+            @Override
+            public int getCurrentPageIndex() {
+                return getActivePage();
+            }
+        };*/
+        /* TIZEN } */
+    }
+
+    /**
+     * Initialize the MultiPageEditorPart to use the sub-tab switching commands.
+     *
+     * @since 3.5
+     */
+    private void initializeSubTabSwitching() {
+        IHandlerService service = getSite().getService(IHandlerService.class);
+        service.activateHandler(COMMAND_NEXT_SUB_TAB, new AbstractHandler() {
+            /**
+             * {@inheritDoc}
+             * 
+             * @throws ExecutionException
+             *             if an exception occurred during execution
+             */
+            @Override
+            public Object execute(ExecutionEvent event) throws ExecutionException {
+                int n = getPageCount();
+                if (n == 0)
+                    return null;
+
+                int i = getActivePage() + 1;
+                if (i >= n)
+                    i = 0;
+                setActivePage(i);
+                return null;
+            }
+        });
+
+        service.activateHandler(COMMAND_PREVIOUS_SUB_TAB, new AbstractHandler() {
+            /**
+             * {@inheritDoc}
+             * 
+             * @throws ExecutionException
+             *             if an exception occurred during execution
+             */
+            @Override
+            public Object execute(ExecutionEvent event) throws ExecutionException {
+                int n = getPageCount();
+                if (n == 0)
+                    return null;
+
+                int i = getActivePage() - 1;
+                if (i < 0)
+                    i = n - 1;
+                setActivePage(i);
+                return null;
+            }
+        });
+    }
+
+    /**
+     * Creates the parent control for the container returned by {@link #getContainer() }.
+     *
+     * <p>
+     * Subclasses may extend and must call super implementation first.
+     * </p>
+     *
+     * @param parent
+     *            the parent for all of the editors contents.
+     * @return the parent for this editor's container. Must not be <code>null</code>.
+     *
+     * @since 3.2
+     */
+    protected Composite createPageContainer(Composite parent) {
+        return parent;
+    }
+
+    /**
+     * Creates the site for the given nested editor. The <code>MultiPageEditorPart</code>
+     * implementation of this method creates an instance of <code>MultiPageEditorSite</code>.
+     * Subclasses may reimplement to create more specialized sites.
+     *
+     * @param editor
+     *            the nested editor
+     * @return the editor site
+     */
+    protected IEditorSite createSite(IEditorPart editor) {
+        return new MultiPageEditorSite(this, editor);
+    }
+
+    /**
+     * The <code>MultiPageEditorPart</code> implementation of this <code>IWorkbenchPart</code>
+     * method disposes all nested editors. Subclasses may extend.
+     */
+    @Override
+    public void dispose() {
+        deactivateSite(true, false);
+
+        pageChangeListeners.clear();
+        for (int i = 0; i < nestedEditors.size(); ++i) {
+            IEditorPart editor = (IEditorPart) nestedEditors.get(i);
+            disposePart(editor);
+        }
+        nestedEditors.clear();
+        if (pageContainerSite instanceof IDisposable) {
+            ((IDisposable) pageContainerSite).dispose();
+            pageContainerSite = null;
+        }
+        for (int i = 0; i < pageSites.size(); i++) {
+            IServiceLocator sl = (IServiceLocator) pageSites.get(i);
+            if (sl instanceof IDisposable) {
+                ((IDisposable) sl).dispose();
+            }
+        }
+        pageSites.clear();
+        /* TIZEN: add new UI: dispose page control{ */
+        for(int i = 0; i < pageControls.size(); i++) {
+            Control control = pageControls.get(i);
+            if(control == null || control.isDisposed()) {
+                continue;
+            }
+            
+            control.dispose();
+        }
+        pageControls.clear();
+        /* TIZEN } */
+        super.dispose();
+    }
+
+    /**
+     * Returns the active nested editor if there is one.
+     * <p>
+     * Subclasses should not override this method
+     * </p>
+     *
+     * @nooverride
+     * @return the active nested editor, or <code>null</code> if none
+     */
+    protected IEditorPart getActiveEditor() {
+        int index = getActivePage();
+        if (index != -1) {
+            return getEditor(index);
+        }
+        return null;
+    }
+
+    /**
+     * Returns the index of the currently active page, or -1 if there is no active page.
+     * <p>
+     * Subclasses should not override this method
+     * </p>
+     *
+     * @nooverride
+     *
+     * @return the index of the active page, or -1 if there is no active page
+     * @since 3.5
+     */
+    /* TIZEN: add new UI: replace implementation for active page{ */
+    public int getActivePage() {
+        /*CTabFolder tabFolder = getTabFolder();
+        if (tabFolder != null && !tabFolder.isDisposed()) {
+            return tabFolder.getSelectionIndex();
+        }
+        return -1;*/
+        
+        int result = -1;
+        Composite container = getContainer();
+        if (container == null || container.isDisposed()) {
+            return result;
+        }
+        Layout layout = container.getLayout();
+        if (layout instanceof StackLayout) {
+            StackLayout stackLayout = (StackLayout) layout;
+            return getActivePage(stackLayout.topControl);
+        }
+
+        return result;
+    }
+
+
+    private int getActivePage(Control control) {
+        if (control == null) {
+            return -1;
+        }
+        for (int i = 0; i < pageControls.size(); i++) {
+            if (pageControls.get(i).equals(control)) {
+                return i;
+            }
+        }
+        return -1;
+    }
+    /* TIZEN } */
+
+    /**
+     * Returns the composite control containing this multi-page editor's pages. This should be used
+     * as the parent when creating controls for the individual pages. That is, when calling
+     * <code>addPage(Control)</code>, the passed control should be a child of this container.
+     * <p>
+     * Warning: Clients should not assume that the container is any particular subclass of
+     * Composite. The actual class used may change in order to improve the look and feel of
+     * multi-page editors. Any code making assumptions on the particular subclass would thus be
+     * broken.
+     * </p>
+     * <p>
+     * Subclasses should not override this method
+     * </p>
+     *
+     * @return the composite, or <code>null</code> if <code>createPartControl</code> has not been
+     *         called yet
+     */
+    protected Composite getContainer() {
+        return container;
+    }
+
+    /**
+     * Returns the control for the given page index, or <code>null</code> if no control has been set
+     * for the page. The page index must be valid.
+     * <p>
+     * Subclasses should not override this method
+     * </p>
+     *
+     * @param pageIndex
+     *            the index of the page
+     * @return the control for the specified page, or <code>null</code> if none has been set
+     */
+    /* TIZEN: add new UI: replace implementation to get page control{ */
+    protected Control getControl(int pageIndex) {
+//        return getItem(pageIndex).getControl();
+        if (pageIndex < 0 || pageIndex > pageControls.size()) {
+            return null;
+        }
+        return pageControls.get(pageIndex);
+    }
+    /* TIZEN } */
+
+    /**
+     * Returns the editor for the given page index. The page index must be valid.
+     *
+     * @param pageIndex
+     *            the index of the page
+     * @return the editor for the specified page, or <code>null</code> if the specified page was not
+     *         created with <code>addPage(IEditorPart,IEditorInput)</code>
+     */
+    /* TIZEN: add new UI: replace implementation to get Editor{ */
+    protected IEditorPart getEditor(int pageIndex) {
+        /*Item item = getItem(pageIndex);
+        if (item != null) {
+            Object data = item.getData();
+            if (data instanceof IEditorPart) {
+                return (IEditorPart) data;
+            }
+        }
+        return null;*/
+        Control control = getControl(pageIndex);
+        if (control != null) {
+            Object data = control.getData();
+            if (data instanceof IEditorPart) {
+                return (IEditorPart) data;
+            }
+        }
+        return null;
+    }
+    /* TIZEN } */
+
+    /**
+     * Returns the service locator for the given page index. This method can be used to create
+     * service locators for pages that are just controls. The page index must be valid.
+     * <p>
+     * This will return the editor site service locator for an editor, and create one for a page
+     * that is just a control.
+     * </p>
+     *
+     * @param pageIndex
+     *            the index of the page
+     * @return the editor for the specified page, or <code>null</code> if the specified page was not
+     *         created with <code>addPage(IEditorPart,IEditorInput)</code>
+     * @since 3.4
+     */
+    protected final IServiceLocator getPageSite(int pageIndex) {
+        if (pageIndex == PAGE_CONTAINER_SITE) {
+            return getPageContainerSite();
+        }
+
+        Control control = getControl(pageIndex);
+        if (control != null) {
+            Object data = control.getData();
+            if (data instanceof IEditorPart) {
+                return ((IEditorPart) data).getSite();
+            } else if (data instanceof IServiceLocator) {
+                return (IServiceLocator) data;
+            } else if (data == null) {
+                IServiceLocatorCreator slc = getSite()
+                        .getService(IServiceLocatorCreator.class);
+                IServiceLocator sl = slc.createServiceLocator(getSite(), null, new IDisposable() {
+                    @Override
+                    public void dispose() {
+                        close();
+                    }
+                });
+                control.setData(sl);
+                pageSites.add(sl);
+                return sl;
+            }
+        }
+        return null;
+    }
+
+    void close() {
+        // 3.x implementation closes the editor when the ISL is disposed
+        PartSite partSite = (PartSite) getSite();
+        MPart model = partSite.getModel();
+        Widget widget = (Widget) model.getWidget();
+        if (widget != null && !widget.isDisposed()) {
+            getSite().getPage().closeEditor(MultiPageEditorPart.this, true);
+        }
+    }
+
+    /**
+     * @return A site that can be used with a header.
+     * @since 3.4
+     * @see #createPageContainer(Composite)
+     * @see #PAGE_CONTAINER_SITE
+     * @see #getPageSite(int)
+     */
+    private IServiceLocator getPageContainerSite() {
+        if (pageContainerSite == null) {
+            IServiceLocatorCreator slc = getSite()
+                    .getService(IServiceLocatorCreator.class);
+            pageContainerSite = slc.createServiceLocator(getSite(), null, new IDisposable() {
+                @Override
+                public void dispose() {
+                    close();
+                }
+            });
+        }
+        return pageContainerSite;
+    }
+
+    /**
+     * Returns the number of pages in this multi-page editor.
+     *
+     * @return the number of pages
+     */
+    /* TIZEN: add new UI: replace implementation to get page count{ */
+    protected int getPageCount() {
+        /*CTabFolder folder = getTabFolder();
+        // May not have been created yet, or may have been disposed.
+        if (folder != null && !folder.isDisposed()) {
+            return folder.getItemCount();
+        }
+        return 0;*/
+        
+        if (pageControls == null) {
+            return 0;
+        }
+
+        return pageControls.size();
+    }
+    /* TIZEN } */
+    
+    /* TIZEN: add new UI: comment out unnecessary source code { */
+    /**
+     * Returns the image for the page with the given index, or <code>null</code>
+     * if no image has been set for the page. The page index must be valid.
+     *
+     * @param pageIndex
+     *            the index of the page
+     * @return the image, or <code>null</code> if none
+     */
+//    protected Image getPageImage(int pageIndex) {
+//        return getItem(pageIndex).getImage();
+//    }
+
+    /**
+     * Returns the text label for the page with the given index. Returns the
+     * empty string if no text label has been set for the page. The page index
+     * must be valid.
+     *
+     * @param pageIndex
+     *            the index of the page
+     * @return the text label for the page
+     */
+//    protected String getPageText(int pageIndex) {
+//        return getItem(pageIndex).getText();
+//    }
+
+    /**
+     * Returns the tab folder containing this multi-page editor's pages.
+     *
+     * @return the tab folder, or <code>null</code> if
+     *         <code>createPartControl</code> has not been called yet
+     */
+//    private CTabFolder getTabFolder() {
+//        return container;
+//    }
+    /* TIZEN } */
+    
+    /**
+     * Handles a property change notification from a nested editor. The default implementation
+     * simply forwards the change to listeners on this multi-page editor by calling
+     * <code>firePropertyChange</code> with the same property id. For example, if the dirty state of
+     * a nested editor changes (property id <code>IEditorPart.PROP_DIRTY</code>), this method
+     * handles it by firing a property change event for <code>IEditorPart.PROP_DIRTY</code> to
+     * property listeners on this multi-page editor.
+     * <p>
+     * Subclasses may extend or reimplement this method.
+     * </p>
+     *
+     * @param propertyId
+     *            the id of the property that changed
+     */
+    protected void handlePropertyChange(int propertyId) {
+        firePropertyChange(propertyId);
+    }
+
+    /**
+     * The <code>MultiPageEditorPart</code> implementation of this <code>IEditorPart</code> method
+     * sets its site to the given site, its input to the given input, and the site's selection
+     * provider to a <code>MultiPageSelectionProvider</code>. Subclasses may extend this method.
+     *
+     * @param site
+     *            The site for which this part is being created; must not be <code>null</code>.
+     * @param input
+     *            The input on which this editor should be created; must not be <code>null</code>.
+     * @throws PartInitException
+     *             If the initialization of the part fails -- currently never.
+     */
+    @Override
+    public void init(IEditorSite site, IEditorInput input)
+            throws PartInitException {
+        setSite(site);
+        setInput(input);
+        site.setSelectionProvider(new MultiPageSelectionProvider(this));
+    }
+
+    /**
+     * The <code>MultiPageEditorPart</code> implementation of this <code>IEditorPart</code> method
+     * returns whether the contents of any of this multi-page editor's nested editors have changed
+     * since the last save. Pages created with <code>addPage(Control)</code> are ignored.
+     * <p>
+     * Subclasses may extend or reimplement this method.
+     * </p>
+     *
+     * @return <code>true</code> if any of the nested editors are dirty; <code>false</code>
+     *         otherwise.
+     */
+    @Override
+    public boolean isDirty() {
+        // use nestedEditors to avoid SWT requests; see bug 12996
+        for (Iterator i = nestedEditors.iterator(); i.hasNext();) {
+            IEditorPart editor = (IEditorPart) i.next();
+            if (editor.isDirty()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Notifies this multi-page editor that the page with the given id has been activated. This
+     * method is called when the user selects a different tab.
+     * <p>
+     * The <code>MultiPageEditorPart</code> implementation of this method sets focus to the new
+     * page, and notifies the action bar contributor (if there is one). This checks whether the
+     * action bar contributor is an instance of <code>MultiPageEditorActionBarContributor</code>,
+     * and, if so, calls <code>setActivePage</code> with the active nested editor. This also fires a
+     * selection change event if required.
+     * </p>
+     * <p>
+     * Subclasses may extend this method.
+     * </p>
+     *
+     * @param newPageIndex
+     *            the index of the activated page
+     */
+    protected void pageChange(int newPageIndex) {
+        deactivateSite(false, false);
+
+        IPartService partService = getSite().getService(
+                                                        IPartService.class);
+        if (partService.getActivePart() == this) {
+            setFocus();
+        }
+
+        IEditorPart activeEditor = getEditor(newPageIndex);
+
+        IEditorActionBarContributor contributor = getEditorSite()
+                .getActionBarContributor();
+        if (contributor != null
+                && contributor instanceof MultiPageEditorActionBarContributor) {
+            ((MultiPageEditorActionBarContributor) contributor)
+                    .setActivePage(activeEditor);
+        }
+
+        if (activeEditor != null) {
+            ISelectionProvider selectionProvider = activeEditor.getSite()
+                    .getSelectionProvider();
+            if (selectionProvider != null) {
+                ISelectionProvider outerProvider = getSite()
+                        .getSelectionProvider();
+                if (outerProvider instanceof MultiPageSelectionProvider) {
+                    SelectionChangedEvent event = new SelectionChangedEvent(
+                                                                            selectionProvider, selectionProvider.getSelection());
+
+                    MultiPageSelectionProvider provider = (MultiPageSelectionProvider) outerProvider;
+                    provider.fireSelectionChanged(event);
+                    provider.firePostSelectionChanged(event);
+                } else {
+                    if (Policy.DEBUG_MPE) {
+                        Tracing.printTrace(TRACING_COMPONENT,
+                                           "MultiPageEditorPart " + getTitle() //$NON-NLS-1$
+                                                   + " did not propogate selection for " //$NON-NLS-1$
+                                                   + activeEditor.getTitle());
+                    }
+                }
+            }
+        }
+
+        activateSite();
+        Object selectedPage = getSelectedPage();
+        if (selectedPage != null) {
+            firePageChanged(new PageChangedEvent(this, selectedPage));
+        }
+    }
+
+    /**
+     * This method can be used by implementors of
+     * {@link MultiPageEditorPart#createPageContainer(Composite)} to deactivate the active inner
+     * editor services while their header has focus. A deactivateSite() must have a matching call to
+     * activateSite() when appropriate.
+     * <p>
+     * An new inner editor will have its site activated on a
+     * {@link MultiPageEditorPart#pageChange(int)}.
+     * </p>
+     * <p>
+     * <b>Note:</b> This API is evolving in 3.4 and this might not be its final form.
+     * </p>
+     *
+     * @param immediate
+     *            immediately deactivate the legacy keybinding service
+     * @param containerSiteActive
+     *            Leave the page container site active.
+     * @since 3.4
+     * @see #activateSite()
+     * @see #createPageContainer(Composite)
+     * @see #getPageSite(int)
+     * @see #PAGE_CONTAINER_SITE
+     */
+    protected final void deactivateSite(boolean immediate,
+                                        boolean containerSiteActive) {
+        // Deactivate the nested services from the last active service locator.
+        if (activeServiceLocator != null) {
+            activeServiceLocator.deactivate();
+            activeServiceLocator = null;
+        }
+
+        final int pageIndex = getActivePage();
+        final IKeyBindingService service = getSite().getKeyBindingService();
+        if (pageIndex < 0 || pageIndex >= getPageCount() || immediate) {
+            // There is no selected page, so deactivate the active service.
+            if (service instanceof INestableKeyBindingService) {
+                final INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
+                nestableService.activateKeyBindingService(null);
+            } else {
+                WorkbenchPlugin
+                        .log("MultiPageEditorPart.deactivateSite()   Parent key binding service was not an instance of INestableKeyBindingService.  It was an instance of " //$NON-NLS-1$
+                                + service.getClass().getName() + " instead."); //$NON-NLS-1$
+            }
+        }
+
+        if (containerSiteActive) {
+            IServiceLocator containerSite = getPageContainerSite();
+            if (containerSite instanceof INestable) {
+                activeServiceLocator = (INestable) containerSite;
+                activeServiceLocator.activate();
+            }
+        }
+    }
+
+    /**
+     * This method can be used by implementors of {@link #createPageContainer(Composite)} to
+     * activate the active inner editor services when their header loses focus.
+     * <p>
+     * An new inner editor will have its site activated on a {@link #pageChange(int)}.
+     * </p>
+     * <p>
+     * <b>Note:</b> This API is evolving in 3.4 and this might not be its final form.
+     * </p>
+     *
+     * @since 3.4
+     * @see #deactivateSite(boolean,boolean)
+     * @see #createPageContainer(Composite)
+     * @see #getPageSite(int)
+     */
+    protected final void activateSite() {
+        if (activeServiceLocator != null) {
+            activeServiceLocator.deactivate();
+            activeServiceLocator = null;
+        }
+
+        final IKeyBindingService service = getSite().getKeyBindingService();
+        final int pageIndex = getActivePage();
+        final IEditorPart editor = getEditor(pageIndex);
+
+        if (editor != null) {
+            // active the service for this inner editor
+            if (service instanceof INestableKeyBindingService) {
+                final INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
+                nestableService.activateKeyBindingService(editor
+                        .getEditorSite());
+
+            } else {
+                WorkbenchPlugin
+                        .log("MultiPageEditorPart.activateSite()   Parent key binding service was not an instance of INestableKeyBindingService.  It was an instance of " //$NON-NLS-1$
+                                + service.getClass().getName() + " instead."); //$NON-NLS-1$
+            }
+            // Activate the services for the new service locator.
+            final IServiceLocator serviceLocator = editor.getEditorSite();
+            if (serviceLocator instanceof INestable) {
+                activeServiceLocator = (INestable) serviceLocator;
+                activeServiceLocator.activate();
+            }
+
+        } else {
+            // There is no selected editor, so deactivate the active service.
+            if (service instanceof INestableKeyBindingService) {
+                final INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
+                nestableService.activateKeyBindingService(null);
+            } else {
+                WorkbenchPlugin
+                        .log("MultiPageEditorPart.activateSite()   Parent key binding service was not an instance of INestableKeyBindingService.  It was an instance of " //$NON-NLS-1$
+                                + service.getClass().getName() + " instead."); //$NON-NLS-1$
+            }
+
+            Control control = getControl(pageIndex);
+            if (control != null && control.getData() instanceof INestable) {
+                activeServiceLocator = (INestable) control.getData();
+                activeServiceLocator.activate();
+            }
+        }
+    }
+
+    /**
+     * Disposes the given part and its site.
+     *
+     * @param part
+     *            The part to dispose; must not be <code>null</code>.
+     */
+    private void disposePart(final IWorkbenchPart part) {
+        SafeRunner.run(new ISafeRunnable() {
+            @Override
+            public void run() {
+                IWorkbenchPartSite partSite = part.getSite();
+                part.dispose();
+                if (partSite instanceof MultiPageEditorSite) {
+                    ((MultiPageEditorSite) partSite).dispose();
+                }
+            }
+
+            @Override
+            public void handleException(Throwable e) {
+                // Exception has already being logged by Core. Do nothing.
+            }
+        });
+    }
+
+    /**
+     * Removes the page with the given index from this multi-page editor. The controls for the page
+     * are disposed of; if the page has an editor, it is disposed of too. The page index must be
+     * valid.
+     *
+     * @param pageIndex
+     *            the index of the page
+     * @see MultiPageEditorPart#addPage(Control)
+     * @see MultiPageEditorPart#addPage(IEditorPart, IEditorInput)
+     */
+    public void removePage(int pageIndex) {
+        Assert.isTrue(pageIndex >= 0 && pageIndex < getPageCount());
+        // get editor (if any) before disposing item
+        IEditorPart editor = getEditor(pageIndex);
+
+        // get control for the item if it's not an editor
+        Control pageControl = getControl(pageIndex);
+        IServiceLocator pageLocator = null;
+        if (pageControl != null) {
+            if (pageControl.getData() instanceof IServiceLocator) {
+                pageLocator = (IServiceLocator) pageControl.getData();
+            }
+            pageControl.dispose();
+        }
+
+        removeControl(pageIndex);
+
+        // dispose editor (if any)
+        if (editor != null) {
+            nestedEditors.remove(editor);
+            disposePart(editor);
+        }
+        if (pageLocator != null) {
+            pageSites.remove(pageLocator);
+            if (pageLocator instanceof IDisposable) {
+                ((IDisposable) pageLocator).dispose();
+            }
+        }
+    }
+
+    /**
+     * Sets the currently active page.
+     *
+     * @param pageIndex
+     *            the index of the page to be activated; the index must be valid
+     */
+    /* TIZEN: add new UI: replace implementation to set active page{ */
+    protected void setActivePage(int pageIndex) {
+//        Assert.isTrue(pageIndex >= 0 && pageIndex < getPageCount());
+//        getTabFolder().setSelection(pageIndex);
+//        pageChange(pageIndex);
+        if (pageIndex > pageControls.size()) {
+            return;
+        }
+
+        Composite container = getContainer();
+        if (container == null || container.isDisposed()) {
+            return;
+        }
+
+        Layout layout = container.getLayout();
+        if (layout instanceof StackLayout) {
+            StackLayout stackLayout = (StackLayout) layout;
+            stackLayout.topControl = pageControls.get(pageIndex);
+            container.layout();
+        }
+        pageChange(pageIndex);
+    }
+    /* TIZEN } */
+
+    /**
+     * The <code>MultiPageEditor</code> implementation of this <code>IWorkbenchPart</code> method
+     * sets focus on the active nested editor, if there is one.
+     * <p>
+     * Subclasses may extend or reimplement.
+     * </p>
+     */
+    @Override
+    public void setFocus() {
+        setFocus(getActivePage());
+    }
+
+    /**
+     * Sets focus to the control for the given page. If the page has an editor, this calls its
+     * <code>setFocus()</code> method. Otherwise, this calls <code>setFocus</code> on the control
+     * for the page.
+     *
+     * @param pageIndex
+     *            the index of the page
+     */
+    private void setFocus(int pageIndex) {
+        if (pageIndex < 0 || pageIndex >= getPageCount()) {
+            // page index out of bounds, don't set focus.
+            return;
+        }
+        final IEditorPart editor = getEditor(pageIndex);
+        if (editor != null) {
+            editor.setFocus();
+
+        } else {
+            // Give the page's control focus.
+            final Control control = getControl(pageIndex);
+            if (control != null) {
+                control.setFocus();
+            }
+        }
+    }
+    
+    /* TIZEN: add new UI: comment out unnecessary source code { */
+    /**
+     * Sets the image for the page with the given index, or <code>null</code>
+     * to clear the image for the page. The page index must be valid.
+     *
+     * @param pageIndex
+     *            the index of the page
+     * @param image
+     *            the image, or <code>null</code>
+     */
+//    protected void setPageImage(int pageIndex, Image image) {
+//        getItem(pageIndex).setImage(image);
+//    }
+
+    /**
+     * Sets the text label for the page with the given index. The page index
+     * must be valid. The text label must not be null.
+     *
+     * @param pageIndex
+     *            the index of the page
+     * @param text
+     *            the text label
+     */
+//    protected void setPageText(int pageIndex, String text) {
+//        getItem(pageIndex).setText(text);
+//    }
+    /* TIZEN } */
+    
+    /**
+     * If there is an adapter registered against the subclass of MultiPageEditorPart return that.
+     * Otherwise, delegate to the internal editor.
+     *
+     * @see org.eclipse.ui.part.WorkbenchPart#getAdapter(java.lang.Class)
+     */
+    @Override
+    public <T> T getAdapter(Class<T> adapter) {
+        T result = super.getAdapter(adapter);
+        // restrict delegating to the UI thread for bug 144851
+        if (result == null && Display.getCurrent() != null) {
+            IEditorPart innerEditor = getActiveEditor();
+            // see bug 138823 - prevent some subclasses from causing
+            // an infinite loop
+            if (innerEditor != null && innerEditor != this) {
+                result = Util.getAdapter(innerEditor, adapter);
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Find the editors contained in this multi-page editor whose editor input match the provided
+     * input.
+     * 
+     * @param input
+     *            the editor input
+     * @return the editors contained in this multi-page editor whose editor input match the provided
+     *         input
+     * @since 3.3
+     */
+    public final IEditorPart[] findEditors(IEditorInput input) {
+        List result = new ArrayList();
+        int count = getPageCount();
+        for (int i = 0; i < count; i++) {
+            IEditorPart editor = getEditor(i);
+            if (editor != null
+                    && editor.getEditorInput() != null
+                    && editor.getEditorInput().equals(input)) {
+                result.add(editor);
+            }
+        }
+        return (IEditorPart[]) result.toArray(new IEditorPart[result.size()]);
+    }
+
+    /**
+     * Set the active page of this multi-page editor to the page that contains the given editor
+     * part. This method has no effect of the given editor part is not contained in this multi-page
+     * editor.
+     * 
+     * @param editorPart
+     *            the editor part
+     * @since 3.3
+     */
+    public final void setActiveEditor(IEditorPart editorPart) {
+        int count = getPageCount();
+        for (int i = 0; i < count; i++) {
+            IEditorPart editor = getEditor(i);
+            if (editor == editorPart) {
+                setActivePage(i);
+                break;
+            }
+        }
+    }
+
+    /**
+     * Returns the selected page for the current active page index, either the IEditorPart for
+     * editors or the Control for other pages.
+     * <p>
+     * <b>Note:</b> clients may override this method to return a page appropriate for their editors.
+     * Maybe be <code>null</code>.
+     * </p>
+     *
+     * @return The IEditorPart or Control representing the current active page, or <code>null</code>
+     *         if there are no active pages.
+     * @since 3.5
+     * @see #getActivePage()
+     */
+    @Override
+    public Object getSelectedPage() {
+        int index = getActivePage();
+        if (index == -1) {
+            return null;
+        }
+        IEditorPart editor = getEditor(index);
+        if (editor != null) {
+            return editor;
+        }
+        return getControl(index);
+    }
+
+    /**
+     * Add the page change listener to be notified when the page changes. The newly selected page
+     * will be the Object returned from {@link #getSelectedPage()}. In the default case, this will
+     * be the active page Control, IEditorPart, or <code>null</code>.
+     * <p>
+     * This method has no effect if the listener has already been added.
+     * </p>
+     *
+     * @nooverride
+     *
+     * @since 3.5
+     */
+    @Override
+    public void addPageChangedListener(IPageChangedListener listener) {
+        pageChangeListeners.add(listener);
+    }
+
+    /**
+     * Remove the page change listener.
+     * <p>
+     * This method has no effect if the listener is not in the list.
+     * </p>
+     *
+     * @nooverride
+     *
+     * @since 3.5
+     */
+    @Override
+    public void removePageChangedListener(IPageChangedListener listener) {
+        pageChangeListeners.remove(listener);
+    }
+
+    private void firePageChanged(final PageChangedEvent event) {
+        Object[] listeners = pageChangeListeners.getListeners();
+        for (int i = 0; i < listeners.length; ++i) {
+            final IPageChangedListener l = (IPageChangedListener) listeners[i];
+            SafeRunnable.run(new SafeRunnable() {
+                @Override
+                public void run() {
+                    l.pageChanged(event);
+                }
+            });
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MultiPageEditorSite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MultiPageEditorSite.java
new file mode 100644 (file)
index 0000000..ecf5713
--- /dev/null
@@ -0,0 +1,619 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2017-10-10 Seongwon Shim sw83.shim@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   1) update package name
+ *   2) comment out compile error code
+ *      - initializeDefaultServices : comment out compile error code   
+ *******************************************************************************/
+package org.tizen.efluibuilder.ui.editor;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.e4.core.contexts.ContextFunction;
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorActionBarContributor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IKeyBindingService;
+import org.eclipse.ui.INestableKeyBindingService;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.contexts.IContextService;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.internal.KeyBindingService;
+import org.eclipse.ui.internal.PartSite;
+import org.eclipse.ui.internal.PopupMenuExtender;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.contexts.NestableContextService;
+import org.eclipse.ui.internal.handlers.LegacyHandlerService;
+import org.eclipse.ui.internal.services.INestable;
+import org.eclipse.ui.internal.services.IServiceLocatorCreator;
+import org.eclipse.ui.internal.services.IWorkbenchLocationService;
+import org.eclipse.ui.internal.services.ServiceLocator;
+import org.eclipse.ui.internal.services.WorkbenchLocationService;
+import org.eclipse.ui.services.IDisposable;
+import org.eclipse.ui.services.IServiceScopes;
+
+/**
+ * Site for a nested editor within a multi-page editor. Selection is handled by
+ * forwarding the event to the multi-page editor's selection listeners; most
+ * other methods are forwarded to the multi-page editor's site.
+ * <p>
+ * The base implementation of <code>MultiPageEditor.createSite</code> creates
+ * an instance of this class. This class may be instantiated or subclassed.
+ * </p>
+ */
+public class MultiPageEditorSite implements IEditorSite, INestable {
+
+       /**
+        * The nested editor.
+        */
+       private IEditorPart editor;
+
+       /**
+        * The list of popup menu extenders; <code>null</code> if none registered.
+        */
+       private ArrayList menuExtenders;
+
+       /**
+        * The multi-page editor.
+        */
+       private MultiPageEditorPart multiPageEditor;
+
+       /**
+        * The post selection changed listener.
+        */
+       private ISelectionChangedListener postSelectionChangedListener = null;
+
+       /**
+        * The selection change listener, initialized lazily; <code>null</code> if
+        * not yet created.
+        */
+       private ISelectionChangedListener selectionChangedListener = null;
+
+       /**
+        * The selection provider; <code>null</code> if none.
+        *
+        * @see MultiPageEditorSite#setSelectionProvider(ISelectionProvider)
+        */
+       private ISelectionProvider selectionProvider = null;
+
+       /**
+        * The cached copy of the key binding service specific to this multi-page
+        * editor site. This value is <code>null</code> if it is not yet
+        * initialized.
+        */
+       private IKeyBindingService service = null;
+
+       /**
+        * The local service locator for this multi-page editor site. This value is
+        * never <code>null</code>.
+        */
+       private final ServiceLocator serviceLocator;
+
+       private NestableContextService contextService;
+
+       private IEclipseContext context;
+
+       private boolean active = false;
+
+       /**
+        * Creates a site for the given editor nested within the given multi-page
+        * editor.
+        *
+        * @param multiPageEditor
+        *            the multi-page editor
+        * @param editor
+        *            the nested editor
+        */
+       public MultiPageEditorSite(MultiPageEditorPart multiPageEditor,
+                       IEditorPart editor) {
+               Assert.isNotNull(multiPageEditor);
+               Assert.isNotNull(editor);
+               this.multiPageEditor = multiPageEditor;
+               this.editor = editor;
+
+               PartSite site = (PartSite) multiPageEditor.getSite();
+
+               IServiceLocatorCreator slc = (IServiceLocatorCreator) site
+                               .getService(IServiceLocatorCreator.class);
+               Assert.isNotNull(slc);
+               context = site.getModel().getContext().createChild("MultiPageEditorSite"); //$NON-NLS-1$
+               serviceLocator = (ServiceLocator) slc.createServiceLocator(
+                               multiPageEditor.getSite(), null, new IDisposable(){
+                                       @Override
+                                       public void dispose() {
+                                               getMultiPageEditor().close();
+                                       }
+                               }, context);
+
+               initializeDefaultServices();
+       }
+
+       /**
+        * Initialize the slave services for this site.
+        */
+       private void initializeDefaultServices() {
+               serviceLocator.registerService(IWorkbenchLocationService.class,
+                               new WorkbenchLocationService(IServiceScopes.MPESITE_SCOPE,
+                                               getWorkbenchWindow().getWorkbench(),
+                                               getWorkbenchWindow(), getMultiPageEditor().getSite(),
+                                               this, null, 3));
+//             serviceLocator.registerService(IMultiPageEditorSiteHolder.class,
+//                             new IMultiPageEditorSiteHolder() {
+//                                     @Override
+//                                     public MultiPageEditorSite getSite() {
+//                                             return MultiPageEditorSite.this;
+//                                     }
+//                             });
+
+               context.set(IContextService.class.getName(), new ContextFunction() {
+                       @Override
+                       public Object compute(IEclipseContext ctxt, String contextKey) {
+                               if (contextService == null) {
+//                                     contextService = new NestableContextService(ctxt.getParent().get(
+//                                                     IContextService.class), new ActivePartExpression(multiPageEditor));
+                               }
+                               return contextService;
+                       }
+               });
+
+               // create a local handler service so that when this page
+               // activates/deactivates, its handlers will also be taken into/out of
+               // consideration during handler lookups
+               IHandlerService handlerService = new LegacyHandlerService(context);
+               context.set(IHandlerService.class, handlerService);
+       }
+
+       /**
+        * Notifies the multi page editor service that the component within which it
+        * exists has become active.
+        *
+        * @since 3.2
+        */
+       @Override
+       public final void activate() {
+               active = true;
+               context.activate();
+               serviceLocator.activate();
+
+               if (contextService != null) {
+                       contextService.activate();
+               }
+       }
+
+       /**
+        * Notifies the multi page editor service that the component within which it
+        * exists has been deactived.
+        *
+        * @since 3.2
+        */
+       @Override
+       public final void deactivate() {
+               active = false;
+               if (contextService != null) {
+                       contextService.deactivate();
+               }
+
+               serviceLocator.deactivate();
+               context.deactivate();
+       }
+
+       /**
+        * Dispose the contributions.
+        */
+       public void dispose() {
+               if (menuExtenders != null) {
+                       for (int i = 0; i < menuExtenders.size(); i++) {
+                               ((PopupMenuExtender) menuExtenders.get(i)).dispose();
+                       }
+                       menuExtenders = null;
+               }
+
+               // Remove myself from the list of nested key binding services.
+               if (service != null) {
+                       IKeyBindingService parentService = getMultiPageEditor().getEditorSite()
+                                       .getKeyBindingService();
+                       if (parentService instanceof INestableKeyBindingService) {
+                               INestableKeyBindingService nestableParent = (INestableKeyBindingService) parentService;
+                               nestableParent.removeKeyBindingService(this);
+                       }
+                       if (service instanceof KeyBindingService) {
+                               ((KeyBindingService) service).dispose();
+                       }
+                       service = null;
+               }
+
+               if (contextService != null) {
+                       contextService.dispose();
+               }
+
+               if (serviceLocator != null) {
+                       serviceLocator.dispose();
+               }
+               context.dispose();
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IEditorSite</code> method returns <code>null</code>, since
+        * nested editors do not have their own action bar contributor.
+        *
+        * @return <code>null</code>
+        */
+       @Override
+       public IEditorActionBarContributor getActionBarContributor() {
+               return null;
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IEditorSite</code> method forwards to the multi-page editor to
+        * return the action bars.
+        *
+        * @return The action bars from the parent multi-page editor.
+        */
+       @Override
+       public IActionBars getActionBars() {
+               return multiPageEditor.getEditorSite().getActionBars();
+       }
+
+       @Override
+       public Object getAdapter(Class adapter) {
+               return null;
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IWorkbenchPartSite</code> method forwards to the multi-page
+        * editor to return the decorator manager.
+        *
+        * @return The decorator from the workbench window.
+        * @deprecated use IWorkbench.getDecoratorManager()
+        */
+       @Deprecated
+       public ILabelDecorator getDecoratorManager() {
+               return getWorkbenchWindow().getWorkbench().getDecoratorManager()
+                               .getLabelDecorator();
+       }
+
+       /**
+        * Returns the nested editor.
+        *
+        * @return the nested editor
+        */
+       public IEditorPart getEditor() {
+               return editor;
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IWorkbenchPartSite</code> method returns an empty string since
+        * the nested editor is not created from the registry.
+        *
+        * @return An empty string.
+        */
+       @Override
+       public String getId() {
+               return ""; //$NON-NLS-1$
+       }
+
+       @Override
+       public IKeyBindingService getKeyBindingService() {
+               if (service == null) {
+                       service = getMultiPageEditor().getEditorSite()
+                                       .getKeyBindingService();
+                       if (service instanceof INestableKeyBindingService) {
+                               INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
+                               service = nestableService.getKeyBindingService(this);
+
+                       } else {
+                               /*
+                                * This is an internal reference, and should not be copied by
+                                * client code. If you are thinking of copying this, DON'T DO
+                                * IT.
+                                */
+                               WorkbenchPlugin
+                                               .log("MultiPageEditorSite.getKeyBindingService()   Parent key binding service was not an instance of INestableKeyBindingService.  It was an instance of " + service.getClass().getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$
+                       }
+               }
+               return service;
+       }
+
+       /**
+        * Returns the multi-page editor.
+        *
+        * @return the multi-page editor
+        */
+       public MultiPageEditorPart getMultiPageEditor() {
+               return multiPageEditor;
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IWorkbenchPartSite</code> method forwards to the multi-page
+        * editor to return the workbench page.
+        *
+        * @return The workbench page in which this editor site resides.
+        */
+       @Override
+       public IWorkbenchPage getPage() {
+               return getMultiPageEditor().getSite().getPage();
+       }
+
+       @Override
+       public IWorkbenchPart getPart() {
+               return editor;
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IWorkbenchPartSite</code> method returns an empty string since
+        * the nested editor is not created from the registry.
+        *
+        * @return An empty string.
+        */
+       @Override
+       public String getPluginId() {
+               return ""; //$NON-NLS-1$
+       }
+
+       /**
+        * Returns the post selection change listener which listens to the nested
+        * editor's selection changes.
+        *
+        * @return the post selection change listener.
+        */
+       private ISelectionChangedListener getPostSelectionChangedListener() {
+               if (postSelectionChangedListener == null) {
+                       postSelectionChangedListener = new ISelectionChangedListener() {
+                               @Override
+                               public void selectionChanged(SelectionChangedEvent event) {
+                                       MultiPageEditorSite.this.handlePostSelectionChanged(event);
+                               }
+                       };
+               }
+               return postSelectionChangedListener;
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IWorkbenchPartSite</code> method returns an empty string since
+        * the nested editor is not created from the registry.
+        *
+        * @return An empty string.
+        */
+       @Override
+       public String getRegisteredName() {
+               return ""; //$NON-NLS-1$
+       }
+
+       /**
+        * Returns the selection changed listener which listens to the nested
+        * editor's selection changes, and calls <code>handleSelectionChanged</code>.
+        *
+        * @return the selection changed listener
+        */
+       private ISelectionChangedListener getSelectionChangedListener() {
+               if (selectionChangedListener == null) {
+                       selectionChangedListener = new ISelectionChangedListener() {
+                               @Override
+                               public void selectionChanged(SelectionChangedEvent event) {
+                                       MultiPageEditorSite.this.handleSelectionChanged(event);
+                               }
+                       };
+               }
+               return selectionChangedListener;
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IWorkbenchPartSite</code> method returns the selection provider
+        * set by <code>setSelectionProvider</code>.
+        *
+        * @return The current selection provider.
+        */
+       @Override
+       public ISelectionProvider getSelectionProvider() {
+               return selectionProvider;
+       }
+
+       @Override
+       public final Object getService(final Class key) {
+               Object service = serviceLocator.getService(key);
+               if (active && service instanceof INestable) {
+                       // services need to know that it is currently in an active state
+                       ((INestable) service).activate();
+               }
+               return service;
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IWorkbenchPartSite</code> method forwards to the multi-page
+        * editor to return the shell.
+        *
+        * @return The shell in which this editor site resides.
+        */
+       @Override
+       public Shell getShell() {
+               return getMultiPageEditor().getSite().getShell();
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IWorkbenchPartSite</code> method forwards to the multi-page
+        * editor to return the workbench window.
+        *
+        * @return The workbench window in which this editor site resides.
+        */
+       @Override
+       public IWorkbenchWindow getWorkbenchWindow() {
+               return getMultiPageEditor().getSite().getWorkbenchWindow();
+       }
+
+       /**
+        * Handles a post selection changed even from the nexted editor.
+        * <p>
+        * Subclasses may extend or reimplement this method
+        *
+        * @param event  the event
+        *
+        * @since 3.2
+        */
+       protected void handlePostSelectionChanged(SelectionChangedEvent event) {
+               ISelectionProvider parentProvider = getMultiPageEditor().getSite()
+                               .getSelectionProvider();
+               if (parentProvider instanceof MultiPageSelectionProvider) {
+                       SelectionChangedEvent newEvent = new SelectionChangedEvent(
+                                       parentProvider, event.getSelection());
+                       MultiPageSelectionProvider prov = (MultiPageSelectionProvider) parentProvider;
+                       prov.firePostSelectionChanged(newEvent);
+               }
+       }
+
+       /**
+        * Handles a selection changed event from the nested editor. The default
+        * implementation gets the selection provider from the multi-page editor's
+        * site, and calls <code>fireSelectionChanged</code> on it (only if it is
+        * an instance of <code>MultiPageSelectionProvider</code>), passing a new
+        * event object.
+        * <p>
+        * Subclasses may extend or reimplement this method.
+        * </p>
+        *
+        * @param event
+        *            the event
+        */
+       protected void handleSelectionChanged(SelectionChangedEvent event) {
+               ISelectionProvider parentProvider = getMultiPageEditor().getSite()
+                               .getSelectionProvider();
+               if (parentProvider instanceof MultiPageSelectionProvider) {
+                       SelectionChangedEvent newEvent = new SelectionChangedEvent(
+                                       parentProvider, event.getSelection());
+                       MultiPageSelectionProvider prov = (MultiPageSelectionProvider) parentProvider;
+                       prov.fireSelectionChanged(newEvent);
+               }
+       }
+
+       @Override
+       public final boolean hasService(final Class key) {
+               return serviceLocator.hasService(key);
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IWorkbenchPartSite</code> method forwards to the multi-page
+        * editor for registration.
+        *
+        * @param menuManager
+        *            The menu manager
+        * @param selProvider
+        *            The selection provider.
+        */
+       @Override
+       public void registerContextMenu(MenuManager menuManager,
+                       ISelectionProvider selProvider) {
+               getMultiPageEditor().getSite().registerContextMenu(menuManager,
+                               selProvider);
+       }
+
+       @Override
+       public final void registerContextMenu(final MenuManager menuManager,
+                       final ISelectionProvider selectionProvider,
+                       final boolean includeEditorInput) {
+               registerContextMenu(getId(), menuManager, selectionProvider,
+                               includeEditorInput);
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IWorkbenchPartSite</code> method forwards to the multi-page
+        * editor for registration.
+        *
+        * @param menuID
+        *            The identifier for the menu.
+        * @param menuMgr
+        *            The menu manager
+        * @param selProvider
+        *            The selection provider.
+        */
+       @Override
+       public void registerContextMenu(String menuID, MenuManager menuMgr,
+                       ISelectionProvider selProvider) {
+               if (menuExtenders == null) {
+                       menuExtenders = new ArrayList(1);
+               }
+               PartSite.registerContextMenu(menuID, menuMgr, selProvider, true, editor, context,
+                               menuExtenders);
+       }
+
+       @Override
+       public final void registerContextMenu(final String menuId,
+                       final MenuManager menuManager,
+                       final ISelectionProvider selectionProvider,
+                       final boolean includeEditorInput) {
+               if (menuExtenders == null) {
+                       menuExtenders = new ArrayList(1);
+               }
+               PartSite.registerContextMenu(menuId, menuManager, selectionProvider, includeEditorInput,
+                               editor, context, menuExtenders);
+       }
+
+       /**
+        * The <code>MultiPageEditorSite</code> implementation of this
+        * <code>IWorkbenchPartSite</code> method remembers the selection
+        * provider, and also hooks a listener on it, which calls
+        * <code>handleSelectionChanged</code> when a selection changed event
+        * occurs.
+        *
+        * @param provider
+        *            The selection provider.
+        * @see MultiPageEditorSite#handleSelectionChanged(SelectionChangedEvent)
+        */
+       @Override
+       public void setSelectionProvider(ISelectionProvider provider) {
+               ISelectionProvider oldSelectionProvider = selectionProvider;
+               selectionProvider = provider;
+               if (oldSelectionProvider != null) {
+                       oldSelectionProvider
+                                       .removeSelectionChangedListener(getSelectionChangedListener());
+                       if (oldSelectionProvider instanceof IPostSelectionProvider) {
+                               ((IPostSelectionProvider) oldSelectionProvider)
+                                               .removePostSelectionChangedListener(getPostSelectionChangedListener());
+                       } else {
+                               oldSelectionProvider
+                                               .removeSelectionChangedListener(getPostSelectionChangedListener());
+                       }
+               }
+               if (selectionProvider != null) {
+                       selectionProvider
+                                       .addSelectionChangedListener(getSelectionChangedListener());
+                       if (selectionProvider instanceof IPostSelectionProvider) {
+                               ((IPostSelectionProvider) selectionProvider)
+                                               .addPostSelectionChangedListener(getPostSelectionChangedListener());
+                       } else {
+                               selectionProvider.addSelectionChangedListener(getPostSelectionChangedListener());
+                       }
+               }
+       }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MultiPageSelectionProvider.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/MultiPageSelectionProvider.java
new file mode 100644 (file)
index 0000000..c8ae3db
--- /dev/null
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.tizen.efluibuilder.ui.editor;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IEditorPart;
+
+/**
+ * Manages the current selection in a multi-page editor by tracking the active
+ * nested editor within the multi-page editor. When the selection changes,
+ * notifications are sent to all registered listeners.
+ * <p>
+ * This class may be instantiated; it is not intended to be subclassed.
+ * The base implementation of <code>MultiPageEditor.init</code> creates
+ * an instance of this class.
+ * </p>
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class MultiPageSelectionProvider implements IPostSelectionProvider {
+
+    /**
+     * Registered selection changed listeners (element type:
+     * <code>ISelectionChangedListener</code>).
+     */
+    private ListenerList listeners = new ListenerList();
+
+    /**
+     * Registered post selection changed listeners.
+     */
+    private ListenerList postListeners = new ListenerList();
+
+    /**
+     * The multi-page editor.
+     */
+    private MultiPageEditorPart multiPageEditor;
+
+    /**
+     * Creates a selection provider for the given multi-page editor.
+     *
+     * @param multiPageEditor the multi-page editor
+     */
+    public MultiPageSelectionProvider(MultiPageEditorPart multiPageEditor) {
+        Assert.isNotNull(multiPageEditor);
+        this.multiPageEditor = multiPageEditor;
+    }
+
+    @Override
+       public void addSelectionChangedListener(ISelectionChangedListener listener) {
+        listeners.add(listener);
+    }
+
+    /**
+     * Adds a listener for post selection changes in this multi page selection provider.
+     *
+     * @param listener a selection changed listener
+     * @since 3.2
+     */
+    @Override
+       public void addPostSelectionChangedListener(ISelectionChangedListener listener) {
+       postListeners.add(listener);
+       }
+
+       /**
+     * Notifies all registered selection changed listeners that the editor's
+     * selection has changed. Only listeners registered at the time this method is
+     * called are notified.
+     *
+     * @param event the selection changed event
+     */
+    public void fireSelectionChanged(final SelectionChangedEvent event) {
+        Object[] listeners = this.listeners.getListeners();
+        fireEventChange(event, listeners);
+    }
+
+    /**
+     * Notifies all post selection changed listeners that the editor's
+     * selection has changed.
+     *
+     * @param event the event to propogate.
+     * @since 3.2
+     */
+    public void firePostSelectionChanged(final SelectionChangedEvent event) {
+               Object[] listeners = postListeners.getListeners();
+               fireEventChange(event, listeners);
+       }
+
+       private void fireEventChange(final SelectionChangedEvent event, Object[] listeners) {
+               for (int i = 0; i < listeners.length; ++i) {
+            final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
+            SafeRunner.run(new SafeRunnable() {
+                @Override
+                               public void run() {
+                    l.selectionChanged(event);
+                }
+            });
+        }
+       }
+
+    /**
+        * Returns the multi-page editor.
+        * @return the multi-page editor.
+        */
+    public MultiPageEditorPart getMultiPageEditor() {
+        return multiPageEditor;
+    }
+
+    @Override
+       public ISelection getSelection() {
+        IEditorPart activeEditor = multiPageEditor.getActiveEditor();
+        if (activeEditor != null) {
+            ISelectionProvider selectionProvider = activeEditor.getSite()
+                    .getSelectionProvider();
+            if (selectionProvider != null) {
+                               return selectionProvider.getSelection();
+                       }
+        }
+        return StructuredSelection.EMPTY;
+    }
+
+    /* (non-JavaDoc)
+     * Method declaed on <code>ISelectionProvider</code>.
+     */
+    @Override
+       public void removeSelectionChangedListener(
+            ISelectionChangedListener listener) {
+        listeners.remove(listener);
+    }
+
+    /**
+     * Removes a listener for post selection changes in this multi page selection provider.
+     *
+     * @param listener a selection changed listener
+     * @since 3.2
+     */
+    @Override
+       public void removePostSelectionChangedListener(ISelectionChangedListener listener) {
+       postListeners.remove(listener);
+       }
+
+    @Override
+       public void setSelection(ISelection selection) {
+        IEditorPart activeEditor = multiPageEditor.getActiveEditor();
+        if (activeEditor != null) {
+            ISelectionProvider selectionProvider = activeEditor.getSite()
+                    .getSelectionProvider();
+            if (selectionProvider != null) {
+                               selectionProvider.setSelection(selection);
+                       }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ZoomUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ZoomUtil.java
new file mode 100644 (file)
index 0000000..68b3258
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor;
+
+public class ZoomUtil {
+    // ratio
+    public static double[] zoomLevels = new double[] {
+            0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0,
+            1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0
+    };
+    public static float DEFAULT_ZOOM = 1.0f;
+    public static float MIN_ZOOM = (float) zoomLevels[0];
+    public static float MAX_ZOOM = (float) zoomLevels[zoomLevels.length - 1];
+
+    // percent
+    public static int ZOOM_INCREMENT = 10;
+    public static int MIN_ZOOM_PERCENT = (int) (MIN_ZOOM * 100);
+    public static int MAX_ZOOM_PERCENT = (int) (MAX_ZOOM * 100);
+
+    private static float floatFrom(String percent) {
+        return Float.parseFloat(percent) / 100;
+    }
+
+    public static boolean isInZoomRange(String zoom) {
+        float value = floatFrom(zoom);
+        return MIN_ZOOM <= value && value <= MAX_ZOOM;
+    }
+
+    public static boolean isGTMaxZoom(float zoom) {
+        return MAX_ZOOM <= zoom;
+    }
+
+    public static boolean isGTMaxZoom(String zoom) {
+        return isGTMaxZoom(floatFrom(zoom));
+    }
+
+    public static boolean isLTMinZoom(float zoom) {
+        return zoom <= MIN_ZOOM;
+    }
+
+    public static boolean isLTMinZoom(String zoom) {
+        return isLTMinZoom(floatFrom(zoom));
+    }
+
+    public static String getMinZoom() {
+        return Integer.toString(MIN_ZOOM_PERCENT);
+    }
+
+    public static String getMaxZoom() {
+        return Integer.toString(MAX_ZOOM_PERCENT);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/AbstractEditorAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/AbstractEditorAction.java
new file mode 100644 (file)
index 0000000..941c053
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.action;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditor;
+
+
+public abstract class AbstractEditorAction extends SelectionAction {
+    protected static Logger logger = LoggerFactory.getLogger(AbstractEditorAction.class);
+
+    public AbstractEditorAction(IWorkbenchPart part) {
+        super(part);
+    }
+
+    protected void refreshPalette() {
+        IWorkbench workbench = PlatformUI.getWorkbench();
+        if (workbench == null) {
+            return;
+        }
+        IWorkbenchWindow ww = workbench.getActiveWorkbenchWindow();
+        if (ww == null) {
+            return;
+        }
+
+        IWorkbenchPage wp = ww.getActivePage();
+        if (wp == null) {
+            return;
+        }
+
+        IEditorReference[] editors = wp.getEditorReferences();
+        if (editors.length <= 0) {
+            return;
+        }
+
+        for (IEditorReference editor : editors) {
+            IEditorPart editorPart = editor.getEditor(true);
+            if (!(editorPart instanceof CombineEditorPart)) {
+                continue;
+            }
+            // Refresh all palettes of opened NUIB editors
+            CombineEditorPart combineEditor = (CombineEditorPart) editorPart;
+            DesignEditor designEditor = combineEditor.getDesignEditor();
+            designEditor.refreshPalette();
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/AbstractPaletteAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/AbstractPaletteAction.java
new file mode 100644 (file)
index 0000000..a80a720
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.action;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.gef.dnd.model.SnippetTemplate;
+import org.tizen.efluibuilder.model.snippet.ISnippet;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.CombinedTemplateCreationEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+
+
+public abstract class AbstractPaletteAction extends AbstractEditorAction {
+    public AbstractPaletteAction(PaletteViewer paletteViewer) {
+        super(null);
+        this.setSelectionProvider(paletteViewer);
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        // empty selection
+        List<?> selectedObjects = getSelectedObjects();
+        if (selectedObjects.isEmpty()) {
+            return false;
+        }
+
+        // if selection is not snippet
+        ISnippet snippet = getSelectedSnippet();
+        if (snippet == null) {
+            return false;
+        }
+
+        return true;
+    }
+
+    protected ISnippet getSelectedSnippet() {
+        ISelection selection = getSelection();
+        Assert.isTrue(selection instanceof StructuredSelection, selection.getClass().getName());
+        StructuredSelection ss = (StructuredSelection) selection;
+        Object object = ss.getFirstElement();
+
+        if (!(object instanceof EditPart)) {
+            return null;
+        }
+
+        EditPart editPart = (EditPart) object;
+        Object model = editPart.getModel();
+        if (!(model instanceof CombinedTemplateCreationEntry)) {
+            return null;
+        }
+
+        CombinedTemplateCreationEntry entry = (CombinedTemplateCreationEntry) model;
+        Object template = entry.getTemplate();
+        if (!(template instanceof SnippetTemplate)) {
+            return null;
+        }
+
+        SnippetTemplate snippetTemplate = (SnippetTemplate) template;
+        ISnippet snippet = snippetTemplate.getSnippet();
+        return snippet;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/DeleteSnippetAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/DeleteSnippetAction.java
new file mode 100644 (file)
index 0000000..0fb89c0
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.action;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
+import org.tizen.efluibuilder.model.snippet.ISnippet;
+import org.tizen.efluibuilder.model.snippet.ISnippetManager;
+import org.tizen.efluibuilder.model.snippet.SnippetManager;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+
+
+public final class DeleteSnippetAction extends AbstractPaletteAction {
+
+    public DeleteSnippetAction(PaletteViewer viewer) {
+        super(viewer);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.Action#run()
+     */
+    @Override
+    public void run() {
+        MessageBox msgBox = new MessageBox(Display.getDefault().getActiveShell(), SWT.YES | SWT.NO | SWT.ICON_QUESTION);
+        msgBox.setMessage("Do you really want to delete this snippet? \nDeleted snippet can not be restored.");
+        int result = msgBox.open();
+        if (result == SWT.YES) {
+            ISnippet snippet = getSelectedSnippet();
+            ISnippetManager manager = SnippetManager.getDefault();
+            if (snippet != null) {
+                manager.remove(snippet);
+            }
+        }
+
+        refreshPalette();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/ExportSnippetAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/ExportSnippetAction.java
new file mode 100644 (file)
index 0000000..5de028a
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.action;
+
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.editor.Messages;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+
+
+public final class ExportSnippetAction extends AbstractPaletteAction {
+
+    public ExportSnippetAction(PaletteViewer viewer) {
+        super(viewer);
+        setId(ActionConstants.EXPORT_SNIPPET);
+        setText(Messages.ACTION_EXPORT_SNIPPET);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.ui.actions.WorkbenchPartAction#calculateEnabled()
+     */
+    @Override
+    protected boolean calculateEnabled() {
+        return true;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.Action#run()
+     */
+    @Override
+    public void run() {
+        // ExportWizard wizard = new ExportWizard();
+        // IWorkbench workbench = PlatformUI.getWorkbench();
+        // Shell shell = workbench.getActiveWorkbenchWindow().getShell();
+        // WizardDialog dialog = new WizardDialog(shell, wizard);
+        // dialog.open();
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/ImportSnippetAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/ImportSnippetAction.java
new file mode 100644 (file)
index 0000000..844420c
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.action;
+
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.editor.Messages;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+
+
+public final class ImportSnippetAction extends AbstractPaletteAction {
+
+    public ImportSnippetAction(PaletteViewer viewer) {
+        super(viewer);
+        setId(ActionConstants.IMPORT_SNIPPET);
+        setText(Messages.ACTION_IMPORT_SNIPPET);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.ui.actions.WorkbenchPartAction#calculateEnabled()
+     */
+    @Override
+    protected boolean calculateEnabled() {
+        return true;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.Action#run()
+     */
+    @Override
+    public void run() {
+        // ImportWizard wizard = new ImportWizard();
+        // IWorkbench workbench = PlatformUI.getWorkbench();
+        // Shell shell = workbench.getActiveWorkbenchWindow().getShell();
+        // WizardDialog dialog = new WizardDialog(shell, wizard);
+        // dialog.open();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/NewSnippetAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/action/NewSnippetAction.java
new file mode 100644 (file)
index 0000000..ea609c5
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.action;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPart;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.editor.Messages;
+import org.tizen.efluibuilder.ui.wizard.snippet.NewSnippetDialogPage;
+
+
+public final class NewSnippetAction extends AbstractEditorAction {
+    protected static Logger logger = LoggerFactory.getLogger(AbstractPaletteAction.class);
+
+    public NewSnippetAction(IWorkbenchPart part) {
+        super(part);
+        setId(ActionConstants.NEW_SNIPPET);
+        setText(Messages.ACTION_NEW_SNIPPET);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.ui.actions.WorkbenchPartAction#calculateEnabled()
+     */
+    @Override
+    protected boolean calculateEnabled() {
+        List<?> selectedObjects = getSelectedObjects();
+        if (selectedObjects == null || selectedObjects.isEmpty()) {
+            return false;
+        }
+
+        if (selectedObjects.size() != 1) {
+            return false;
+        }
+
+        for (Object object : selectedObjects) {
+            if (!(object instanceof EditPart)) {
+                return false;
+            }
+            EditPart editpart = (EditPart) object;
+            Object model = editpart.getModel();
+            if (!(model instanceof Part)) {
+                return false;
+            }
+            Part part = (Part) model;
+            if (part.getType() != PartType.COMPONENT) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.action.Action#run()
+     */
+    @Override
+    public void run() {
+        List<?> selectedObjects = getSelectedObjects();
+        Object object = selectedObjects.get(0);
+        if (!(object instanceof EditPart)) {
+            return;
+        }
+        EditPart editpart = (EditPart) object;
+        Object model = editpart.getModel();
+
+        Shell shell = Display.getDefault().getActiveShell();
+        NewSnippetDialogPage dialog = new NewSnippetDialogPage(shell);
+        dialog.setModel(model);
+        int result = dialog.open();
+        if (result == Dialog.OK) {
+            refreshPalette();
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditCommandStack.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditCommandStack.java
new file mode 100644 (file)
index 0000000..341cbf9
--- /dev/null
@@ -0,0 +1,230 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.designeditor;
+
+import java.util.List;
+
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.model.command.EMFCommandAdapter;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartObserver;
+import org.tizen.efluibuilder.ui.editor.texteditor.TextEditor;
+import org.tizen.efluibuilder.ui.view.databinding.model.command.ConfigureDataModelCommand;
+import org.tizen.efluibuilder.ui.view.databinding.model.command.ConfigureDataSourceCommand;
+import org.tizen.efluibuilder.ui.view.databinding.model.command.DataBindingCommandAdapter;
+import org.tizen.efluibuilder.utility.DOMUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+
+
+public class DesignEditCommandStack extends CommandStack {
+
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
+    public static final String KEY_PART_COMMAND = "PART_COMMAND";
+
+    private IStructuredTextUndoManager undoManager;
+    private StructuredTextViewer textViewer;
+
+    private Part documentPart = null;
+    private Part dataBindingPart = null;
+
+    public DesignEditCommandStack(TextEditor textEditor, Part documentPart, Part dataBindingPart) {
+        super();
+
+        // UndoManager must not be null
+        Assert.notNull(textEditor);
+        // CommandStack of UndoManager must be BasicCommandStack
+        Assert.isTrue(textEditor.getModel().getUndoManager().getCommandStack() instanceof BasicCommandStack);
+        this.undoManager = textEditor.getModel().getUndoManager();
+        this.textViewer = textEditor.getTextViewer();
+
+        this.documentPart = documentPart;
+        this.dataBindingPart = dataBindingPart;
+    }
+
+    @Override
+    public void execute(Command command) {
+        execute(command, PartObserver.MESSAGE_GEF_EXECUTE);
+    }
+
+    private void executeSuperWithoutStack(Command command) {
+        if ((command == null) || (!(command.canExecute()))) {
+            return;
+        }
+
+        notifyListeners(command, PRE_EXECUTE);
+        try {
+            command.execute();
+            notifyListeners();
+        } finally {
+            notifyListeners(command, POST_EXECUTE);
+        }
+    }
+
+    public void execute(Command command, String sender) {
+        try {
+            if (documentPart == null || executeDataBindingCommand(command)) {
+                return;
+            }
+            setPartCommandMode(DOMUtil.getDocument(documentPart.getElement()), true);
+            this.undoManager.beginRecording(this, KEY_PART_COMMAND);
+            try {
+                executeSuperWithoutStack(command);
+                if (textViewer.canDoOperation(StructuredTextViewer.FORMAT_DOCUMENT)) {
+                    textViewer.doOperation(StructuredTextViewer.FORMAT_DOCUMENT);
+                }
+            } finally {
+                this.undoManager.endRecording(this);
+                setPartCommandMode(DOMUtil.getDocument(documentPart.getElement()), false);
+            }
+
+            documentPart.getOwnerDocumentPart().notifyObservers(sender);
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Exception e) {
+            // prevent silent exception
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public void undo() {
+        try {
+            // delegate to XML editor
+            org.eclipse.emf.common.command.Command undoCommand = undoManager.getUndoCommand();
+            String commandKind = undoCommand != null ? undoCommand.getLabel() : null;
+            boolean isGEFCommand = (commandKind != null) && (commandKind.equals(KEY_PART_COMMAND));
+            if (isGEFCommand) {
+                setPartCommandMode(DOMUtil.getDocument(documentPart.getElement()), true);
+            }
+            this.undoManager.undo();
+            if (isGEFCommand) {
+                setPartCommandMode(DOMUtil.getDocument(documentPart.getElement()), false);
+                documentPart.getOwnerDocumentPart().notifyObservers(PartObserver.MESSAGE_GEF_UNDO);
+            }
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Exception e) {
+            // prevent silent exception
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public void redo() {
+        try {
+            // delegate to XML editor
+            org.eclipse.emf.common.command.Command redoCommand = undoManager.getRedoCommand();
+            String commandKind = redoCommand != null ? redoCommand.getLabel() : null;
+            boolean isGEFCommand = (commandKind != null) && (commandKind.equals(KEY_PART_COMMAND));
+            if (isGEFCommand) {
+                setPartCommandMode(DOMUtil.getDocument(documentPart.getElement()), true);
+            }
+            undoManager.redo();
+            if (isGEFCommand) {
+                setPartCommandMode(DOMUtil.getDocument(documentPart.getElement()), false);
+                documentPart.getOwnerDocumentPart().notifyObservers(PartObserver.MESSAGE_GEF_REDO);
+            }
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Exception e) {
+            // prevent silent exception
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public boolean canRedo() {
+        // delegate to XML editor
+        return this.undoManager.getCommandStack().canRedo();
+    }
+
+    @Override
+    public boolean canUndo() {
+        // delegate to XML editor
+        return this.undoManager.getCommandStack().canUndo();
+    }
+
+    public static void setPartCommandMode(Node node, boolean mode) {
+        Document document = DOMUtil.getDocument(node);
+        if (document != null) {
+            document.setUserData(KEY_PART_COMMAND, mode, null);
+        }
+    }
+
+    public static boolean isPartCommandMode(Node node) {
+        Document document = DOMUtil.getDocument(node);
+        if (document != null) {
+            Object userData = document.getUserData(KEY_PART_COMMAND);
+            if (userData instanceof Boolean) {
+                return (Boolean) userData;
+            }
+        }
+
+        return false;
+    }
+
+    private boolean executeDataBindingCommand(Command command) {
+        DataBindingCommandAdapter dataBindingCommand = new DataBindingCommandAdapter(dataBindingPart, this);
+        if (command instanceof ConfigureDataModelCommand || command instanceof ConfigureDataSourceCommand) {
+            EMFCommandAdapter emfCmd = new EMFCommandAdapter(command);
+            dataBindingCommand.append(emfCmd);
+            undoManager.getCommandStack().execute(dataBindingCommand);
+            return true;
+        }
+        if (command instanceof CompoundCommand) {
+            List<Command> commands = ((CompoundCommand) command).getCommands();
+            for (Command cmd : commands) {
+                if (cmd instanceof ConfigureDataModelCommand || cmd instanceof ConfigureDataSourceCommand) {
+                    EMFCommandAdapter emfCmd = new EMFCommandAdapter(cmd);
+                    dataBindingCommand.append(emfCmd);
+                }
+            }
+            if (dataBindingCommand.isEmpty() == false) {
+                undoManager.getCommandStack().execute(dataBindingCommand);
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private static class DummyCommand extends Command {
+        final static DummyCommand INSTANCE = new DummyCommand();
+    }
+
+    public void makeDirtyByForce() {
+        // flush CommandStack to maintain always only one DummyCommand in CommandStack.
+        this.flush();
+        super.execute(DummyCommand.INSTANCE);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditor.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditor.java
new file mode 100644 (file)
index 0000000..ea13be3
--- /dev/null
@@ -0,0 +1,560 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.designeditor;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.gef.DefaultEditDomain;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.MouseWheelHandler;
+import org.eclipse.gef.SnapToGeometry;
+import org.eclipse.gef.SnapToGrid;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.editparts.ZoomManager;
+import org.eclipse.gef.rulers.RulerProvider;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.gef.ui.actions.RedoAction;
+import org.eclipse.gef.ui.actions.ToggleGridAction;
+import org.eclipse.gef.ui.actions.ToggleRulerVisibilityAction;
+import org.eclipse.gef.ui.actions.ToggleSnapToGeometryAction;
+import org.eclipse.gef.ui.actions.UndoAction;
+import org.eclipse.gef.ui.parts.GraphicalEditor;
+import org.eclipse.gef.ui.parts.SelectionSynchronizer;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.tizen.common.util.cache.ColorCache;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.BuilderPlugin;
+import org.tizen.efluibuilder.gef.actions.AddEmptyViewAction;
+import org.tizen.efluibuilder.gef.actions.AlignPartActionBottom;
+import org.tizen.efluibuilder.gef.actions.AlignPartActionHCenter;
+import org.tizen.efluibuilder.gef.actions.AlignPartActionHDistribute;
+import org.tizen.efluibuilder.gef.actions.AlignPartActionLeft;
+import org.tizen.efluibuilder.gef.actions.AlignPartActionRight;
+import org.tizen.efluibuilder.gef.actions.AlignPartActionTop;
+import org.tizen.efluibuilder.gef.actions.AlignPartActionVCenter;
+import org.tizen.efluibuilder.gef.actions.AlignPartActionVDistribute;
+import org.tizen.efluibuilder.gef.actions.StoryboardAutoLayoutAction;
+import org.tizen.efluibuilder.gef.actions.CopyPartAction;
+import org.tizen.efluibuilder.gef.actions.CutPartAction;
+import org.tizen.efluibuilder.gef.actions.DeletePartAction;
+import org.tizen.efluibuilder.gef.actions.MatchSizeAction;
+import org.tizen.efluibuilder.gef.actions.MoveAbsolutePartAction;
+import org.tizen.efluibuilder.gef.actions.PartAction;
+import org.tizen.efluibuilder.gef.actions.PastePartAction;
+import org.tizen.efluibuilder.gef.actions.PastePartColorAction;
+import org.tizen.efluibuilder.gef.actions.SelectChildPartAction;
+import org.tizen.efluibuilder.gef.actions.SelectNextSiblingPartAction;
+import org.tizen.efluibuilder.gef.actions.SelectParentPartAction;
+import org.tizen.efluibuilder.gef.actions.SelectPreviousSiblingPartAction;
+import org.tizen.efluibuilder.gef.actions.SetStartupViewAction;
+import org.tizen.efluibuilder.gef.actions.ZorderBackAction;
+import org.tizen.efluibuilder.gef.actions.ZorderBackwardAction;
+import org.tizen.efluibuilder.gef.actions.ZorderFrontAction;
+import org.tizen.efluibuilder.gef.actions.ZorderFrontwardAction;
+import org.tizen.efluibuilder.gef.dnd.model.ComponentTemplate;
+import org.tizen.efluibuilder.gef.dnd.model.SnippetTemplate;
+import org.tizen.efluibuilder.gef.editparts.DesignRootEditPart;
+import org.tizen.efluibuilder.gef.tools.DesignCreationTool;
+import org.tizen.efluibuilder.gef.tools.DesignEditDomain;
+import org.tizen.efluibuilder.gef.tools.DesignSelectionTool;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.descriptors.WidgetDescriptor;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.snippet.ISnippet;
+import org.tizen.efluibuilder.model.snippet.ISnippetManager;
+import org.tizen.efluibuilder.model.snippet.SnippetManager;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.editor.KeyHandler;
+import org.tizen.efluibuilder.ui.editor.Messages;
+import org.tizen.efluibuilder.ui.editor.MouseWheelZoomHandler;
+import org.tizen.efluibuilder.ui.editor.action.NewSnippetAction;
+import org.tizen.efluibuilder.ui.editor.dnd.listener.TemplateTransferDropTargetListener2;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.CombinedTemplateCreationEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteDrawer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteRoot;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ruler.DesignEditorRulerComposite;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.DefaultPaletteViewerPreferences;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.FlyoutPaletteComposite;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.FlyoutPaletteComposite.FlyoutPreferences;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerPreferences;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerProvider;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.TizenEditDomain;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.views.palette.PalettePage;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.views.palette.PaletteViewerPage;
+import org.tizen.efluibuilder.ui.editor.palette.DesignEditorPaletteViewerProvider;
+import org.tizen.efluibuilder.ui.editor.palette.PaletteConstants;
+import org.tizen.efluibuilder.ui.editor.palette.PaletteConstants.CATEGORY_ICON;
+import org.tizen.efluibuilder.ui.editor.ruler.DesignerRuler;
+import org.tizen.efluibuilder.ui.editor.ruler.DesignerRulerProvider;
+import org.tizen.efluibuilder.ui.editor.texteditor.TextEditor;
+import org.tizen.efluibuilder.ui.views.outline.actions.OutlineCreateTemplateAction;
+import org.tizen.efluibuilder.ui.views.outline.actions.OutlineNewViewCtxPopupAction;
+import org.tizen.efluibuilder.ui.views.outline.actions.OutlineNewViewPopupAction;
+import org.tizen.efluibuilder.ui.views.outline.actions.OutlineNewViewTemplateAction;
+import org.tizen.efluibuilder.utility.ResourceUtil;
+
+import edjResourceSyncManager.EdjResourceSyncManager;
+import graphicalDataManager.GraphicalDataManager;
+
+
+public class DesignEditor extends GraphicalEditor implements ISelectionChangedListener {
+    private static final int PALETTE_WIDTH = 222; // advux
+    private static final RGB CANVAS_BG_COLOR = new RGB(0xdc, 0xdc, 0xdc);
+
+    private DesignViewer designerViewer = new DesignViewer();
+
+    private DesignEditorRulerComposite rulerComp = null;
+
+    private PaletteViewerProvider paletteViewerProvider = null;
+    private Composite splitter = null;
+
+    private SelectionSynchronizer selectionSynchronizer = null;
+    private Part documentPart = null;
+
+    public void initContents(Part documentPart, Part dataBindingPart, SelectionSynchronizer selectionSynchronizer,
+                             GraphicalDataManager graphicalDataManager,
+                             EdjResourceSyncManager edjResSyncMgr,
+                             CombineEditorPart editor,
+                             TextEditor textEditor) {
+        this.documentPart = documentPart;
+        this.selectionSynchronizer = selectionSynchronizer;
+        ((TizenEditDomain) getEditDomain()).setPaletteRoot(createPaletteRoot());
+        getEditDomain().setCommandStack(new DesignEditCommandStack(textEditor, documentPart, dataBindingPart));
+        getEditDomain().getCommandStack().addCommandStackListener(this);
+
+        hookGraphicalViewer();
+        designerViewer.initContents(documentPart, getEditorInput(), graphicalDataManager, edjResSyncMgr, editor);
+        designerViewer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.MOD1), MouseWheelZoomHandler.SINGLETON);
+
+    }
+
+    @Override
+    protected void setInput(IEditorInput input) {
+        super.setInput(input);
+        DesignEditDomain editDomain = new DesignEditDomain(this);
+        editDomain.setDefaultTool(new DesignSelectionTool());
+        setEditDomain(editDomain);
+    }
+
+    private FlyoutPreferences setupFlyoutPreference() {
+        FlyoutPreferences flyoutPreferences = new FlyoutPaletteComposite.FlyoutPreferences() {
+            @Override
+            public int getDockLocation() {
+                return getPreferenceStore().getInt(BuilderConstants.PROPERTY_DOCK_LOCATION);
+            }
+
+            @Override
+            public int getPaletteState() {
+                return getPreferenceStore().getInt(BuilderConstants.PROPERTY_STATE);
+            }
+
+            @Override
+            public int getPaletteWidth() {
+                return getPreferenceStore().getInt(BuilderConstants.PROPERTY_PALETTE_WIDTH);
+            }
+
+            private IPreferenceStore getPreferenceStore() {
+                return BuilderPlugin.getDefault().getPreferenceStore();
+            }
+
+            @Override
+            public void setDockLocation(int location) {
+                getPreferenceStore().setValue(BuilderConstants.PROPERTY_DOCK_LOCATION, location);
+            }
+
+            @Override
+            public void setPaletteState(int state) {
+                getPreferenceStore().setValue(BuilderConstants.PROPERTY_STATE, state);
+            }
+
+            @Override
+            public void setPaletteWidth(int width) {
+                getPreferenceStore().setValue(BuilderConstants.PROPERTY_PALETTE_WIDTH, width);
+            }
+
+        };
+        flyoutPreferences.setDockLocation(PositionConstants.EAST); // advux: palette position
+        flyoutPreferences.setPaletteState(FlyoutPaletteComposite.STATE_PINNED_OPEN);
+        flyoutPreferences.setPaletteWidth(PALETTE_WIDTH); // advux
+
+        return flyoutPreferences;
+    }
+
+    @Override
+    public void createPartControl(Composite parent) {
+        DefaultPaletteViewerPreferences preferences = new DefaultPaletteViewerPreferences();
+        preferences.setLayoutSetting(PaletteViewerPreferences.LAYOUT_COLUMNS);
+        preferences.setUseLargeIcons(PaletteViewerPreferences.LAYOUT_COLUMNS, false);
+        PaletteViewer paletteViewer = ((TizenEditDomain) getEditDomain()).getTizenPaletteViewer(); // advux
+        if (paletteViewer != null) {
+            paletteViewer.setPaletteViewerPreferences(preferences);
+        }
+
+        if (splitter == null) {
+            FlyoutPreferences flyoutPreferences = setupFlyoutPreference();
+            paletteViewerProvider = new DesignEditorPaletteViewerProvider(getEditDomain()); // advux
+            splitter =
+                    new FlyoutPaletteComposite(parent, SWT.NONE, getSite().getPage(), paletteViewerProvider,
+                                               flyoutPreferences); // advux
+        }
+        if (rulerComp == null) {
+            rulerComp = new DesignEditorRulerComposite(splitter, SWT.NONE);
+        }
+
+        super.createPartControl(splitter);
+        ((FlyoutPaletteComposite) splitter).setGraphicalControl(rulerComp);
+    }
+
+    @Override
+    protected void createGraphicalViewer(Composite parent) {
+        designerViewer.addSelectionChangedListener(this);
+        designerViewer.setDesignerKeyHandler(new KeyHandler(getActionRegistry()));
+
+        rulerComp = new DesignEditorRulerComposite(parent, SWT.NONE);
+        designerViewer.createControl(rulerComp);
+        setGraphicalViewer(designerViewer);
+        configureGraphicalViewer();
+        initializeGraphicalViewer();
+        rulerComp.setGraphicalViewer(designerViewer);
+
+        // rulerComp.addListener(SWT.Resize, this);
+    }
+
+    @Override
+    protected void initializeGraphicalViewer() {
+    }
+
+    @Override
+    protected void configureGraphicalViewer() {
+        super.configureGraphicalViewer();
+        GraphicalViewer viewer = getGraphicalViewer();
+        configureRuler(viewer);
+        configureGeometry(viewer);
+        configureGrid(viewer);
+        getGraphicalViewer().setContextMenu(new DesignEditorContextMenu(this, getActionRegistry()));
+        viewer.getControl().setBackground(ColorCache.getColorFromRGB(CANVAS_BG_COLOR));
+    }
+
+    private PaletteRoot createPaletteRoot() {
+        PaletteRoot root = new PaletteRoot();
+
+        // create widget group
+        createComponentGroup(root, PaletteDrawer.INITIAL_STATE_OPEN);
+
+        // create snippet group
+        createSnippetGroup(root, PaletteDrawer.INITIAL_STATE_OPEN);
+        return root;
+    }
+
+    private String getCategoryTitle(String name, int totalNum) {
+        return name + " (" + totalNum + ")";
+    }
+
+    private void createComponentGroup(PaletteRoot root, int style) {
+        ComponentDescriptor componentDescriptor = ((DocumentPart) documentPart).getComponentDescriptor();
+        Collection<String> categories = componentDescriptor.getWidgetCategories();
+        for (String category : categories) {
+            // create drawer
+            PaletteDrawer drawer = new PaletteDrawer(category, null);
+            drawer.setDescription(category);
+            drawer.setInitialState(style);
+
+            List<WidgetDescriptor> descriptors = componentDescriptor.getWidgetDescriptorsOfCategory(category);
+            if (!category.equals(PaletteConstants.CATEGORY_NAME_UI_VIEWS)) {
+                Collections.sort(descriptors); // new UI: ascend sort
+            }
+
+            int size = descriptors.size();
+            for (int i = 0; i < size; i++) {
+                WidgetDescriptor desc = descriptors.get(i);
+                if (desc.isPaletteVisible()) {
+                    String name = desc.getDisplayName();
+                    if (name.equals("View")) { //$NON-NLS-1$
+                        name = "Empty"; //$NON-NLS-1$
+                    }
+                    String id = desc.getDescriptorId();
+                    String description = desc.getDescription();
+                    ImageDescriptor smallIcon = ResourceUtil.getImageDescriptor(BuilderPlugin.PLUGIN_ID, BuilderConstants.ICON_DIR + desc.getSmallIcon());
+                    ComponentTemplate template = new ComponentTemplate((DocumentPart) documentPart, id);
+                    CombinedTemplateCreationEntry entry = new DesignEditorCombinedTemplateCreationEntry(name, description, template, template.getFactory(),
+                                                                                                        smallIcon, smallIcon, desc.getSmallIcon());
+                    entry.setToolClass(DesignCreationTool.class);
+                    drawer.add(entry);
+                }
+            }
+            if (PaletteConstants.CATEGORY_ICON.get(category) != null) {
+                drawer.setSmallIcon(PaletteConstants.CATEGORY_ICON.get(category).getImageDescriptor(false));
+            }
+
+            drawer.setLabel(getCategoryTitle(category, drawer.getChildren().size()));
+
+            root.add(drawer);
+        }
+    }
+
+    private void createSnippetGroup(PaletteRoot root, int style) {
+        // add snippets
+        ISnippetManager snippetManager = SnippetManager.getDefault();
+        List<ISnippet> snippets = snippetManager.getSnippets();
+
+        Collections.sort(snippets); // new UI: ascend sort
+
+        PaletteDrawer snippetDrawer = new PaletteDrawer(Messages.PALETTE_GROUP_SNIPPET, null);
+        snippetDrawer.setDescription(Messages.PALETTE_GROUP_SNIPPET);
+        snippetDrawer.setInitialState(style);
+
+        for (ISnippet snippet : snippets) {
+            String name = snippet.getName();
+            String description = snippet.getDescription();
+            SnippetTemplate template = new SnippetTemplate(snippet, (DocumentPart) documentPart);
+            ImageDescriptor smallIcon = snippet.getSmallIcon();
+
+            CombinedTemplateCreationEntry entry = new DesignEditorCombinedTemplateCreationEntry(name, description, template, template.getFactory(), smallIcon,
+                                                                                                smallIcon, snippet.getSmallIconPath());
+
+            entry.setToolClass(DesignCreationTool.class);
+            snippetDrawer.add(entry);
+        }
+        CATEGORY_ICON categoryIcon = PaletteConstants.CATEGORY_ICON.get(Messages.PALETTE_GROUP_SNIPPET);
+        if (categoryIcon != null) {
+            snippetDrawer.setSmallIcon(categoryIcon.getImageDescriptor(false));
+        }
+        snippetDrawer.setLabel(getCategoryTitle(Messages.PALETTE_GROUP_SNIPPET, snippetDrawer.getChildren().size()));
+
+        root.add(snippetDrawer);
+    }
+
+    public void addTemplateTransferDropTargetListener2(TemplateTransferDropTargetListener2 listener) {
+        designerViewer.addTemplateTransferDropTargetListener2(listener);
+    }
+
+    public void removeTemplateTransferDropTargetListener2(TemplateTransferDropTargetListener2 listener) {
+        designerViewer.removeTemplateTransferDropTargetListener2(listener);
+    }
+
+    public DefaultEditDomain getEditDomain() {
+        return super.getEditDomain();
+    }
+
+    public ActionRegistry getActions() {
+        return getActionRegistry();
+    }
+
+    @SuppressWarnings("unchecked")
+    private void registerOutlineActions(IAction action) {
+        ActionRegistry actionRegistry = getActionRegistry();
+        actionRegistry.registerAction(action);
+        getSelectionActions().add(action.getId());
+    }
+
+    @Override
+    protected void createActions() {
+        if (designerViewer == null) {
+            return;
+        }
+
+        final int moveDist = MoveAbsolutePartAction.MOVE_DIST;
+        final boolean moveOverflow = false;
+        final boolean movePixelBase = false;
+
+        IAction pastePartAction = new PastePartAction(this, designerViewer.getRootEditPart());
+        IAction[] actions = { new UndoAction(this), new RedoAction(this), new DeletePartAction(this, designerViewer.getRootEditPart()),
+
+                // == Outline
+                // new OutlineRenameAction(this),
+                new AddEmptyViewAction(this, designerViewer.getRootEditPart()), new OutlineNewViewTemplateAction(designerViewer, this),
+                new OutlineNewViewPopupAction(this), new OutlineNewViewCtxPopupAction(this), new OutlineCreateTemplateAction(this),
+                new SetStartupViewAction(this, designerViewer.getRootEditPart()),
+
+                new CopyPartAction(this, designerViewer.getRootEditPart(), (PartAction) pastePartAction),
+                new CutPartAction(this, designerViewer.getRootEditPart(), (PartAction) pastePartAction), pastePartAction,
+                new PastePartColorAction(this, designerViewer.getRootEditPart()),
+
+                new MoveAbsolutePartAction(this, PositionConstants.LEFT, moveDist, designerViewer.getRootEditPart(), moveOverflow, movePixelBase),
+                new MoveAbsolutePartAction(this, PositionConstants.RIGHT, moveDist, designerViewer.getRootEditPart(), moveOverflow, movePixelBase),
+                new MoveAbsolutePartAction(this, PositionConstants.TOP, moveDist, designerViewer.getRootEditPart(), moveOverflow, movePixelBase),
+                new MoveAbsolutePartAction(this, PositionConstants.BOTTOM, moveDist, designerViewer.getRootEditPart(), moveOverflow, movePixelBase),
+
+                new NewSnippetAction(this),
+
+                new AlignPartActionLeft(this, designerViewer.getRootEditPart()), new AlignPartActionTop(this, designerViewer.getRootEditPart()),
+                new AlignPartActionRight(this, designerViewer.getRootEditPart()), new AlignPartActionBottom(this, designerViewer.getRootEditPart()),
+                new AlignPartActionHCenter(this, designerViewer.getRootEditPart()), new AlignPartActionVCenter(this, designerViewer.getRootEditPart()),
+                new AlignPartActionHDistribute(this, designerViewer.getRootEditPart()), new AlignPartActionVDistribute(this, designerViewer.getRootEditPart()),
+
+                new SelectParentPartAction(this, designerViewer.getRootEditPart()), new SelectChildPartAction(this, designerViewer.getRootEditPart()),
+                new SelectPreviousSiblingPartAction(this, designerViewer.getRootEditPart()),
+                new SelectNextSiblingPartAction(this, designerViewer.getRootEditPart()),
+                new MatchSizeAction(this, designerViewer.getRootEditPart(), MatchSizeAction.TYPE_WIDTH),
+                new MatchSizeAction(this, designerViewer.getRootEditPart(), MatchSizeAction.TYPE_HEIGHT),
+
+                // zorder
+                new ZorderBackAction(this, designerViewer.getRootEditPart()), new ZorderBackwardAction(this, designerViewer.getRootEditPart()),
+                new ZorderFrontAction(this, designerViewer.getRootEditPart()), new ZorderFrontwardAction(this, designerViewer.getRootEditPart()),
+
+                // storyboard
+                new StoryboardAutoLayoutAction(this, designerViewer.getRootEditPart()),
+        };
+
+        for (IAction action : actions) {
+            registerOutlineActions(action);
+        }
+
+    }
+
+    @Override
+    public void commandStackChanged(EventObject event) {
+        super.commandStackChanged(event);
+        firePropertyChange(IEditorPart.PROP_DIRTY);
+        updateActions(getSelectionActions());
+    }
+
+    private void configureRuler(GraphicalViewer viewer) {
+        if (viewer != null) {
+            viewer.setProperty(RulerProvider.PROPERTY_VERTICAL_RULER, new DesignerRulerProvider(new DesignerRuler(false)));
+            viewer.setProperty(RulerProvider.PROPERTY_HORIZONTAL_RULER, new DesignerRulerProvider(new DesignerRuler(true)));
+            viewer.setProperty(RulerProvider.PROPERTY_RULER_VISIBILITY, false);
+
+            IAction action = new ToggleRulerVisibilityAction(viewer);
+            getActionRegistry().registerAction(action);
+        }
+    }
+
+    private void configureGeometry(GraphicalViewer viewer) {
+        if (viewer != null) {
+            viewer.setProperty(SnapToGeometry.PROPERTY_SNAP_ENABLED, false);
+            IAction action = new ToggleSnapToGeometryAction(viewer);
+            getActionRegistry().registerAction(action);
+        }
+    }
+
+    private void configureGrid(GraphicalViewer viewer) {
+        if (viewer != null) {
+            viewer.setProperty(SnapToGrid.PROPERTY_GRID_ENABLED, true);
+            viewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, false);
+
+            IAction action = new ToggleGridAction(viewer);
+            getActionRegistry().registerAction(action);
+        }
+    }
+
+    @Override
+    @SuppressWarnings("rawtypes")
+    public Object getAdapter(Class type) {
+
+        if (null == type) {
+            return null;
+        }
+        // CommandStack
+        if (type.equals(CommandStack.class)) {
+            return getCommandStack();
+        }
+
+        if (type == PalettePage.class) {
+            return new PaletteViewerPage(paletteViewerProvider);
+        }
+
+        if (type == ZoomManager.class) {
+            return ((DesignRootEditPart) getGraphicalViewer().getRootEditPart()).getZoomManager();
+        }
+
+        return super.getAdapter(type);
+    }
+
+    @Override
+    public SelectionSynchronizer getSelectionSynchronizer() {
+        return selectionSynchronizer;
+    }
+
+    @Override
+    public boolean isSaveAsAllowed() {
+        return false;
+    }
+
+    @Override
+    public void setFocus() {
+        if (getGraphicalViewer() != null) {
+            getGraphicalViewer().getControl().setFocus();
+        }
+    }
+
+    @Override
+    public void selectionChanged(SelectionChangedEvent arg0) {
+        updateActions(getSelectionActions());
+    }
+
+    @Override
+    public void doSave(IProgressMonitor arg0) {
+    }
+
+    public DesignViewer getViewer() {
+        return designerViewer;
+    }
+
+    public void refreshPalette() {
+        PaletteRoot root = ((TizenEditDomain) getEditDomain()).getTizenPaletteViewer().getPaletteRoot();
+
+        // remove snippets in palette
+        List<?> palettes = root.getChildren();
+        for (int i = 0; i < palettes.size(); i++) {
+            if (palettes.get(i) instanceof PaletteDrawer) {
+                PaletteDrawer palette = (PaletteDrawer) palettes.get(i);
+                if (palette.getLabel().startsWith(Messages.PALETTE_GROUP_SNIPPET)) {
+                    palettes.remove(i);
+                    break;
+                }
+            }
+        }
+
+        createSnippetGroup(root, PaletteDrawer.INITIAL_STATE_OPEN);
+    }
+
+    public void setGraphicalViewer(GraphicalViewer viewer) {
+        super.setGraphicalViewer(viewer);
+
+        getSite().setSelectionProvider(viewer);
+    }
+
+    public void refreshActions() {
+        updateActions(getSelectionActions());
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorActionBarContributor.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorActionBarContributor.java
new file mode 100644 (file)
index 0000000..50be90d
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.designeditor;
+
+import org.eclipse.gef.ui.actions.ActionBarContributor;
+import org.eclipse.gef.ui.actions.DeleteRetargetAction;
+import org.eclipse.gef.ui.actions.MatchHeightRetargetAction;
+import org.eclipse.gef.ui.actions.MatchWidthRetargetAction;
+import org.eclipse.gef.ui.actions.RedoRetargetAction;
+import org.eclipse.gef.ui.actions.UndoRetargetAction;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.RetargetAction;
+import org.tizen.efluibuilder.gef.actions.AlignPartAction;
+import org.tizen.efluibuilder.gef.actions.AlignPartRetargetAction;
+import org.tizen.efluibuilder.gef.actions.Messages;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class DesignEditorActionBarContributor extends ActionBarContributor {
+
+    public DesignEditorActionBarContributor() {
+    }
+
+    @Override
+    protected void buildActions() {
+
+        addRetargetAction(new UndoRetargetAction());
+        addRetargetAction(new RedoRetargetAction());
+        addRetargetAction(new DeleteRetargetAction());
+
+        IWorkbenchWindow window = getPage().getWorkbenchWindow();
+        addRetargetAction((RetargetAction) ActionFactory.CUT.create(window));
+        addRetargetAction((RetargetAction) ActionFactory.COPY.create(window));
+        addRetargetAction((RetargetAction) ActionFactory.PASTE.create(window));
+
+        // addRetargetAction(new AlignmentRetargetAction(PositionConstants.LEFT));
+        // addRetargetAction(new AlignmentRetargetAction(PositionConstants.CENTER));
+        // addRetargetAction(new AlignmentRetargetAction(PositionConstants.RIGHT));
+        // addRetargetAction(new AlignmentRetargetAction(PositionConstants.TOP));
+        // addRetargetAction(new AlignmentRetargetAction(PositionConstants.MIDDLE));
+        // addRetargetAction(new AlignmentRetargetAction(PositionConstants.BOTTOM));
+
+        addRetargetAction(new AlignPartRetargetAction(AlignPartAction.TYPE_LEFT));
+        addRetargetAction(new AlignPartRetargetAction(AlignPartAction.TYPE_HORIZONTAL_CENTER));
+        addRetargetAction(new AlignPartRetargetAction(AlignPartAction.TYPE_RIGHT));
+
+        addRetargetAction(new AlignPartRetargetAction(AlignPartAction.TYPE_TOP));
+        addRetargetAction(new AlignPartRetargetAction(AlignPartAction.TYPE_VERTICAL_CENTER));
+        addRetargetAction(new AlignPartRetargetAction(AlignPartAction.TYPE_BOTTOM));
+
+        addRetargetAction(new AlignPartRetargetAction(AlignPartAction.TYPE_DISTRIBUTE_HORIZONTAL_SPACING));
+        addRetargetAction(new AlignPartRetargetAction(AlignPartAction.TYPE_DISTRIBUTE_VERTICAL_SPACING));
+
+        MatchWidthRetargetAction matchWidthRetargetAction = new MatchWidthRetargetAction();
+        matchWidthRetargetAction.setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_WIDTH_NOR));
+        matchWidthRetargetAction.setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_WIDTH_DIM));
+        matchWidthRetargetAction.setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_WIDTH_MV));
+        matchWidthRetargetAction.setToolTipText(Messages.ACTION_MATCH_WIDTH);
+        addRetargetAction(matchWidthRetargetAction);
+
+        MatchHeightRetargetAction matchHeightRetargetAction = new MatchHeightRetargetAction();
+        matchHeightRetargetAction.setImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_HEIGHT_NOR));
+        matchHeightRetargetAction.setDisabledImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_HEIGHT_DIM));
+        matchHeightRetargetAction.setHoverImageDescriptor(ImageResources.getImageDescriptor(ImageResources.TOOLBAR_ALIGN_HEIGHT_MV));
+        matchHeightRetargetAction.setToolTipText(Messages.ACTION_MATCH_HEIGHT);
+        addRetargetAction(matchHeightRetargetAction);
+    }
+
+    @Override
+    public void contributeToMenu(IMenuManager menuManager) {
+        super.contributeToMenu(menuManager);
+
+        // MenuManager viewMenu = new MenuManager("View");
+        // viewMenu.add(getAction(GEFActionConstants.TOGGLE_RULER_VISIBILITY));
+        // viewMenu.add(getAction(GEFActionConstants.TOGGLE_SNAP_TO_GEOMETRY));
+        // viewMenu.add(getAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY));
+        // menuManager.add(viewMenu);
+    }
+
+    @Override
+    public void contributeToToolBar(IToolBarManager toolBarManager) {
+        super.contributeToToolBar(toolBarManager);
+
+        // addActionsToToolBar(toolBarManager);
+    }
+
+    private void addActionsToToolBar(IToolBarManager toolBarManager) {
+        Object[] actionIds = {
+                // ActionFactory.UNDO.getId(),
+                // ActionFactory.REDO.getId(),
+                // new Separator(),
+                // ActionFactory.CUT.getId(),
+                // ActionFactory.COPY.getId(),
+                // ActionFactory.PASTE.getId(),
+                // new Separator(),
+                // ActionFactory.DELETE.getId(),
+                new Separator(), ActionConstants.ALIGN_LEFT, ActionConstants.ALIGN_HORIZONTAL_CENTER, ActionConstants.ALIGN_RIGHT, new Separator(),
+                ActionConstants.ALIGN_TOP, ActionConstants.ALIGN_VERTICAL_CENTER, ActionConstants.ALIGN_BOTTOM,
+                // new Separator(),
+                // ActionConstants.ALIGN_DISTRIBUTE_HORIZONTAL_SPACING,
+                // ActionConstants.ALIGN_DISTRIBUTE_VERTICAL_SPACING,
+                new Separator(), ActionConstants.MATCH_WIDTH, ActionConstants.MATCH_HEIGHT, };
+
+        for (Object actionObj : actionIds) {
+            if (actionObj instanceof String) {
+                IAction action = getAction((String) actionObj);
+                toolBarManager.add(action);
+            } else if (actionObj instanceof IContributionItem) {
+                toolBarManager.add((IContributionItem) actionObj);
+            } else {
+                throw new IllegalArgumentException("Not matched actions");
+            }
+        }
+    }
+
+    public void contributeToCustomToolBar(IToolBarManager toolBarManager) {
+        buildActions();
+        addActionsToToolBar(toolBarManager);
+    }
+
+    @Override
+    protected void declareGlobalActionKeys() {
+    }
+
+    @Override
+    public void setActiveEditor(IEditorPart editor) {
+        if (editor instanceof CombineEditorPart) {
+            if (((CombineEditorPart) editor).getActivePage() == CombineEditorPart.DESIGN_TAB) {
+                super.setActiveEditor(editor);
+            }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorCombinedTemplateCreationEntry.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorCombinedTemplateCreationEntry.java
new file mode 100644 (file)
index 0000000..f17be99
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.designeditor;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.gef.requests.CreationFactory;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.BuilderPlugin;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.CombinedTemplateCreationEntry;
+
+
+public class DesignEditorCombinedTemplateCreationEntry extends CombinedTemplateCreationEntry {
+
+    public enum State {
+        NORMAL("nor"), SELECT("sel"), MOUSEOVER("mv");
+
+        String value;
+
+        State(String value) {
+            this.value = value;
+        }
+
+        public String get() {
+            return this.value;
+        }
+    }
+
+    private State currentState = State.NORMAL;
+    private ImageDescriptor selectImageDescriptor = null;
+    private ImageDescriptor mouseOverImageDescriptor = null;
+
+    private final Pattern pattern = Pattern.compile("(.*)nor(.*)");
+    private String iconSmallPath;
+
+    public DesignEditorCombinedTemplateCreationEntry(String label, String shortDesc, Object template, CreationFactory factory, ImageDescriptor iconSmall,
+            ImageDescriptor iconLarge, String iconSmallPath) {
+        super(label, shortDesc, template, factory, iconSmall, iconLarge);
+
+        this.iconSmallPath = iconSmallPath;
+    }
+
+    @Override
+    public ImageDescriptor getSmallIcon() {
+        String path = getSelectedIconPath();
+
+        switch (currentState) {
+            case SELECT:
+                if (selectImageDescriptor == null) {
+                    selectImageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID, path);
+                }
+                return selectImageDescriptor;
+            case MOUSEOVER:
+                if (mouseOverImageDescriptor == null) {
+                    mouseOverImageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID, path);
+                }
+                return mouseOverImageDescriptor;
+            default:
+                return super.getSmallIcon();
+        }
+    }
+
+    private String getSelectedIconPath() {
+        Matcher matcher = this.pattern.matcher(this.iconSmallPath);
+        if (matcher.matches()) {
+            String prefix = matcher.group(1);
+            String postfix = matcher.group(2);
+
+            return BuilderConstants.ICON_DIR + prefix + currentState.get() + postfix;
+        }
+
+        return null;
+    }
+
+    public void setIconMode(State state) {
+        currentState = state;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorContextMenu.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorContextMenu.java
new file mode 100644 (file)
index 0000000..5a70f8b
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.designeditor;
+
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+import org.tizen.efluibuilder.ui.contextmenu.CommonContextMenu;
+
+
+public class DesignEditorContextMenu extends CommonContextMenu {
+
+    private DesignEditor editor = null;
+    public DesignEditorContextMenu(DesignEditor editor, ActionRegistry registry) {        
+        super(editor.getViewer(), registry);
+        this.editor = editor;
+    }
+
+    @Override
+    public void buildContextMenu(IMenuManager menu) {
+        editor.refreshActions();
+        addUndoContextMenu(menu);
+        addNewContextMenu(menu);
+        addEditContextMenu(menu);
+        addAlignContextMenu(menu);
+        addZOrderContextMenu(menu);
+        addSelectionSpecificMenu(menu);        
+        return;
+    }
+
+    private void addSelectionSpecificMenu(IMenuManager menu) {
+        EditPartSet partSet = getSelectedPartSet();
+        if (partSet.type == EditPartSet.TYPE_VIEW || partSet.type == EditPartSet.TYPE_EMPTY) {
+            addViewSpecificContextMenu(menu);
+        } else if (partSet.type == EditPartSet.TYPE_COMPONENT && partSet.components.size() == 1) {
+            DesignEditorContextMenuItemManager mgr = new DesignEditorContextMenuItemManager((DesignViewer) getViewer(), (Part) partSet.components.get(0).getModel());
+            mgr.addCreateConnectionMenu(menu, partSet.components);
+        }
+    }
+
+    private void addZOrderContextMenu(IMenuManager menu) {
+        menu.add(new Separator(ActionConstants.GROUP_ZORDER));
+        appendAction(ActionConstants.ZORDER_BACK, menu, ActionConstants.GROUP_ZORDER);
+        appendAction(ActionConstants.ZORDER_BACKWARD, menu, ActionConstants.GROUP_ZORDER);
+        appendAction(ActionConstants.ZORDER_FRONT, menu, ActionConstants.GROUP_ZORDER);
+        appendAction(ActionConstants.ZORDER_FRONTWARD, menu, ActionConstants.GROUP_ZORDER);
+
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorContextMenuItemManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorContextMenuItemManager.java
new file mode 100644 (file)
index 0000000..eb65a39
--- /dev/null
@@ -0,0 +1,206 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.designeditor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.efluibuilder.gef.viewer.ConnectionCreater;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.descriptors.EventDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+
+
+public class DesignEditorContextMenuItemManager {
+    
+    private static class TargetViewDialog extends Dialog {
+        
+        private int WIDTH = 350;
+        private int HEIGHT = 160;
+        private List<Part> viewList;
+        private DesignViewer viewer;
+        private Part source;
+        private String eventName;
+        private Combo viewCombo;
+
+        public TargetViewDialog(DesignViewer viewer, List<Part> viewList, Part source, String eventName) {
+            super(viewer.getControl().getShell());
+            this.viewer = viewer;
+            this.source = source;
+            this.eventName = eventName;
+            this.viewList = viewList;
+        }
+
+        private void setComboContents(Combo combo) {
+            String[] contents = new String[viewList.size()];
+            for (int i = 0; i < viewList.size(); i++) {
+                contents[i] = viewList.get(i).getPropertyValue(LayoutSchemaConstants.ID);
+            }
+            combo.setItems(contents);
+            combo.select(0);
+        }
+
+        @Override
+        protected Control createDialogArea(Composite parent) {
+            Composite parentComposite = (Composite) super.createDialogArea(parent);
+            Composite contentComposite = new Composite(parentComposite, SWT.NONE);
+            contentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+            GridLayout layout = new GridLayout(2, false);
+            contentComposite.setLayout(layout);
+            Label label = new Label(contentComposite, SWT.NONE);
+            label.setText(Messages.SET_TARGET_VIEW_DIALOG_TITLE);
+            viewCombo = new Combo(contentComposite, SWT.NONE);
+            GridData data = new GridData();
+            data.grabExcessHorizontalSpace = true;
+            data.horizontalAlignment = GridData.FILL;
+            viewCombo.setLayoutData(data);
+            setComboContents(viewCombo);
+            return parentComposite;
+        }
+
+        @Override
+        protected void configureShell(Shell newShell) {
+            super.configureShell(newShell);
+            newShell.setText(Messages.SET_TARGET_VIEW_DIALOG_TITLE);
+        }
+
+        @Override
+        protected void okPressed() {
+            ConnectionCreater.createConnection(viewer, source, viewList.get(viewCombo.getSelectionIndex()), eventName);
+            super.okPressed();
+        }
+
+        @Override
+        protected Point getInitialSize() {
+            return new Point(WIDTH, HEIGHT);
+        }
+    }
+
+    private class MenuContributionItem extends ContributionItem {
+        private Part model;
+
+        public MenuContributionItem(Part model) {
+            this.model = model;
+        }
+
+        private SelectionListener createTransitionEventSelectedListener(final String eventName) {
+            return new SelectionListener() {
+                @Override
+                public void widgetSelected(SelectionEvent arg0) {
+                    List<Part> targetViewList = getTargetViewList(((ComponentPart) model).getOwnerViewPart().getPropertyValue(LayoutSchemaConstants.ID));
+                    if (targetViewList.size() > 0) {
+                        TargetViewDialog dialog = new TargetViewDialog(viewer, targetViewList,
+                                                                       model, eventName);
+                        dialog.open();
+                    }
+                }
+
+                @Override
+                public void widgetDefaultSelected(SelectionEvent arg0) {
+                }
+            };
+        }
+
+        @Override
+        public void fill(Menu menu, int index) {
+            boolean binded = false;
+            MenuItem menuItem = null;
+            ComponentDescriptor componentDescriptor = model.getOwnerDocumentPart().getComponentDescriptor();
+            for (final EventDescriptor descriptor : componentDescriptor.getWidgetDescriptor(model.getDescriptorId()).getEventDescriptors()) {
+                binded = false;
+
+                for (EventPart sourcePartEvent : ((ComponentPart) model).getEventParts()) {
+                    if (descriptor.getEventDisplayName().equals(sourcePartEvent.getPropertyValue(LayoutSchemaConstants.EVENT_SIGNAL))) {
+                        binded = true;
+                        break;
+                    }
+                }
+                menuItem = new MenuItem(menu, SWT.POP_UP);
+                menuItem.setText(descriptor.getEventDisplayName());
+                menuItem.addSelectionListener(createTransitionEventSelectedListener(descriptor.getEventDisplayName()));
+                menuItem.setEnabled(!binded);
+            }
+        }
+    }
+
+    private DesignViewer viewer = null;
+    private Part documentPart = null;
+
+    public DesignEditorContextMenuItemManager(DesignViewer viewer, Part sourcePart) {
+        this.viewer = viewer;
+        this.documentPart = sourcePart.getOwnerDocumentPart();
+    }
+
+    private List<Part> getTargetViewList(String currViewName) {
+        List<Part> targetViewList = new ArrayList<Part>();
+        Part viewsPart = PartUtil.findViewsPart(documentPart);
+        for (Part viewPart : viewsPart.getChildren()) {
+            if (currViewName.equals(viewPart.getPropertyValue(LayoutSchemaConstants.ID))) {
+                continue;
+            }
+            targetViewList.add(viewPart);
+        }
+        return targetViewList;
+    }
+
+    public void addCreateConnectionMenu(IMenuManager menuMgr, List<EditPart> selectedEditParts) {
+        if (selectedEditParts.size() == 1) {
+            EditPart editPart = selectedEditParts.get(0);
+            Part model = (Part) editPart.getModel();
+            ComponentDescriptor componentDescriptor = model.getOwnerDocumentPart().getComponentDescriptor();
+            List<EventDescriptor> listEvents = componentDescriptor.getWidgetDescriptor(model.getDescriptorId()).getEventDescriptors();
+            if (!listEvents.isEmpty()) {
+                menuMgr.add(new Separator());
+                MenuManager subMenuMgr = new MenuManager(Messages.CREATE_CONNECTION_MENU_NAME, null, Messages.CREATE_CONNECTION_MENU_NAME);
+                subMenuMgr.add(new MenuContributionItem(model));
+                menuMgr.add(subMenuMgr);
+            }
+        }
+    }
+  
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorException.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorException.java
new file mode 100644 (file)
index 0000000..6b762ec
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.designeditor;
+
+public final class DesignEditorException extends RuntimeException {
+
+    private static final long serialVersionUID = -5758363921548681956L;
+
+    public DesignEditorException(String message) {
+        super(message);
+    }
+
+    public DesignEditorException(String message, Throwable e) {
+        super(message, e);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorLayout.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/DesignEditorLayout.java
new file mode 100644 (file)
index 0000000..b736fd8
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.designeditor;
+
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Layout;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+public class DesignEditorLayout extends Layout {
+    private Composite menPart;
+    private Composite tabPart;
+
+    public DesignEditorLayout(Composite menu, Composite tabFolder) {
+        this.menPart = menu;
+        this.tabPart = tabFolder;
+    }
+
+    @Override
+    protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
+        return null;
+    }
+
+    @Override
+    protected void layout(Composite composite, boolean flushCache) {
+        Rectangle parentRect = composite.getBounds();
+        int MENU_HEIGHT = 0;
+
+        CTabItem item = ((CTabFolder) tabPart).getSelection();
+        if (item != null && !item.getText().equals(BuilderMessages.TABTEXTTEXTEDITOR)) {
+            if (PlatformUtil.getOS().equals(PlatformUtil.OS_LINUX)) {
+                MENU_HEIGHT = 30;
+            } else {
+                MENU_HEIGHT = 23;
+            }
+        }
+        int min_height = MENU_HEIGHT;
+        int design_height = parentRect.height;
+
+        if (parentRect.height > min_height) {
+            design_height -= min_height;
+        } else {
+            design_height = 0;
+        }
+
+        menPart.setBounds(0, 0, parentRect.width, MENU_HEIGHT);
+        tabPart.setBounds(0, MENU_HEIGHT, parentRect.width, design_height);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/Messages.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/Messages.java
new file mode 100644 (file)
index 0000000..de449d6
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.designeditor;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public final class Messages {
+    private static final String BUNDLE_NAME = Messages.class.getName();
+   
+    public static String SET_TARGET_VIEW_DIALOG_TITLE;
+    public static String CREATE_CONNECTION_MENU_NAME;
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/Messages.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/designeditor/Messages.properties
new file mode 100644 (file)
index 0000000..84cc40e
--- /dev/null
@@ -0,0 +1,3 @@
+# Messages
+SET_TARGET_VIEW_DIALOG_TITLE=Target View
+CREATE_CONNECTION_MENU_NAME=Create Connections
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/DesignEditorDropTargetListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/DesignEditorDropTargetListener.java
new file mode 100644 (file)
index 0000000..19f0b2b
--- /dev/null
@@ -0,0 +1,209 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.dnd.listener;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.dnd.TemplateTransfer;
+import org.eclipse.gef.dnd.TemplateTransferDropTargetListener;
+import org.eclipse.gef.requests.CreationFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.gef.dnd.model.DataBindingTemplate;
+import org.tizen.efluibuilder.gef.dnd.model.ITemplate;
+import org.tizen.efluibuilder.gef.dnd.model.RMResourceTemplate;
+import org.tizen.efluibuilder.gef.requests.DesignCreateRequest;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.mscreen.configurator.MscreenMessage;
+import org.tizen.efluibuilder.utility.IDEUtil;
+
+
+public class DesignEditorDropTargetListener extends TemplateTransferDropTargetListener {
+    private TemplateTransferDropTargetManager eventManager = new TemplateTransferDropTargetManager();
+    private DesignCreateRequest request = null;
+    private static Logger logger = LoggerFactory.getLogger(DesignEditorDropTargetListener.class);
+
+    public DesignEditorDropTargetListener(DesignViewer viewer) {
+        super(viewer);
+    }
+
+    public void addTemplateTransferDropTargetListener2(TemplateTransferDropTargetListener2 listener) {
+        eventManager.addTemplateTransferDropTargetListener2(listener);
+    }
+
+    public void removeTemplateTransferDropTargetListener2(TemplateTransferDropTargetListener2 listener) {
+        eventManager.removeTemplateTransferDropTargetListener2(listener);
+    }
+
+    private boolean isRequestByRM(Object eventData) {
+        if ((eventData != null) && (eventData instanceof String)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    protected Request createTargetRequest() {
+        if (request == null) {
+            request = new DesignCreateRequest();
+            request.getExtendedData().clear();
+        }
+
+        request.setCreateRequestType(DesignCreateRequest.TYPE_DEFAULT);
+
+        // for D&D, by SBC
+        boolean isTemplateTransfer = TemplateTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType);
+        boolean isFileTransfer = FileTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType);
+
+        if (isTemplateTransfer) {
+            // coding
+            if (isRequestByRM(getCurrentEvent().data)) {
+                String dropResKey = (String) getCurrentEvent().data;
+                logger.debug("is_support--isTemplateTransfer:{}", isTemplateTransfer);
+                logger.debug("dropResKey:{}", dropResKey);
+
+                RMResourceTemplate rmResourceTemplate = new RMResourceTemplate(dropResKey, true);
+                if (rmResourceTemplate.isValidRMResource()) {
+                    request.setFactory(getFactory(rmResourceTemplate)); // RM request
+                    request.setCreateRequestType(DesignCreateRequest.TYPE_TEMPLATE);
+                    return request;
+                } else {
+                    getCurrentEvent().data = null;
+                    return request;
+                }
+            }
+        } else if (isFileTransfer) {
+            if (getCurrentEvent().data != null) {
+                String[] dndFiles = (String[]) getCurrentEvent().data;
+
+                logger.debug("is_support--isFileTransfer:{}" + isFileTransfer);
+                logger.debug("dndFiles:{}", dndFiles[0]);
+
+                RMResourceTemplate rmResourceTemplate = new RMResourceTemplate(dndFiles[0], false);
+                if (rmResourceTemplate.isCurrentProjectResource()) {
+                    request.setFactory(getFactory(rmResourceTemplate)); // FileBrowser request
+                    request.setCreateRequestType(DesignCreateRequest.TYPE_FILE);
+                    return request;
+                } else {
+                    getCurrentEvent().data = null;
+                    return request;
+                }
+            }
+        }
+        // Widget Palette (Widget/Container)
+        if (getFactory(TemplateTransfer.getInstance().getTemplate()) != null) {
+            request.setFactory(getFactory(TemplateTransfer.getInstance().getTemplate()));
+            if(TemplateTransfer.getInstance().getTemplate() instanceof DataBindingTemplate){
+                request.setCreateRequestType(DesignCreateRequest.TYPE_DATABINDING_TEMPLATE);
+            } else{
+                request.setCreateRequestType(DesignCreateRequest.TYPE_PALETTE);
+            }
+        }
+        return request;
+    }
+
+    @Override
+    protected void handleDragOver() {
+        updateTargetRequest();
+        updateTargetEditPart();
+        if (getCreateRequest() instanceof DesignCreateRequest &&
+                DesignCreateRequest.TYPE_PALETTE.equals(((DesignCreateRequest) getCreateRequest()).getCreateType())) {
+            showTargetFeedback();
+        }
+    }
+
+    @Override
+    public CreationFactory getFactory(Object template) {
+        if (!(template instanceof ITemplate)) {
+            return null;
+        }
+        ITemplate iTemplate = (ITemplate) template;
+        return iTemplate.getFactory();
+    }
+
+    // if command is not executable, change target to parent,
+    private void updateTargetSpecificContainer() {
+        EditPart target = getTargetEditPart();
+        while (target != null && target.getParent() != null) {
+            if ((getCommand() != null) && (getCommand().canExecute() == true)) {
+                break;
+            } else {
+                target = target.getParent();
+                setTargetEditPart(target);
+            }
+        }
+    }
+
+    @Override
+    protected void updateTargetEditPart() {
+        super.updateTargetEditPart();
+        if (getCreateRequest() instanceof DesignCreateRequest &&
+                DesignCreateRequest.TYPE_PALETTE.equals(((DesignCreateRequest) getCreateRequest()).getCreateType())) {
+            updateTargetSpecificContainer();
+        }
+    }
+
+    @Override
+    protected void handleDrop() {
+        try {
+            preDrop();
+            super.handleDrop();
+            postDrop();
+
+            this.request = null; // Initialize
+        } catch (IllegalArgumentException ex) {
+            Shell shell = Display.getDefault().getActiveShell();
+            if (shell == null) {
+                shell = IDEUtil.getRealCurrentActiveShell();
+            }
+            showErrMessageBoxInvalidProject(shell);
+        } finally {
+            this.request = null; // Initialize
+        }
+    }
+
+    private void showErrMessageBoxInvalidProject(Shell shell) {
+        if (shell != null) {
+            MessageBox msgBox = new MessageBox(shell, SWT.OK | SWT.ICON_WARNING);
+            msgBox.setText(MscreenMessage.RM_DND_ERR_TITLE_INVALID_PROJECT);
+            msgBox.setMessage(MscreenMessage.RM_DND_MSG_TITLE_INVALID_PROJECT);
+            msgBox.open();
+        }
+    }
+
+    protected void preDrop() {
+        eventManager.preDrop(getCurrentEvent());
+    }
+
+    protected void postDrop() {
+        eventManager.postDrop(getCurrentEvent());
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/OutlineDropTargetListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/OutlineDropTargetListener.java
new file mode 100644 (file)
index 0000000..51fdb4c
--- /dev/null
@@ -0,0 +1,199 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.dnd.listener;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.TreeEditPart;
+import org.eclipse.gef.dnd.AbstractTransferDropTargetListener;
+import org.eclipse.gef.dnd.TemplateTransfer;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gef.requests.CreationFactory;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+
+
+public class OutlineDropTargetListener extends AbstractTransferDropTargetListener {
+
+    public OutlineDropTargetListener(EditPartViewer outlinePageViewer) {
+        super(outlinePageViewer, TemplateTransfer.getInstance());
+    }
+
+    public CreationFactory getFactory(Object template) {
+        return null;
+    }
+
+    @Override
+    protected Request createTargetRequest() {
+        if (TemplateTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            CreateRequest request = new CreateRequest();
+            request.setFactory(getFactory(TemplateTransfer.getInstance().getTemplate()));
+            return request;
+        } else {
+            return null;
+        }
+    }
+
+    protected final CreateRequest getCreateRequest() {
+        return ((CreateRequest) getTargetRequest());
+    }
+
+    @Override
+    protected void handleDragOperationChanged() {
+        if (TemplateTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            getCurrentEvent().detail = DND.DROP_COPY;
+            super.handleDragOperationChanged();
+        }
+    }
+
+    @Override
+    protected void handleDragOver() {
+        if (TemplateTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            Part target = null;
+            Request request = getTargetRequest();
+            Part part = null;
+            TreeItem treeItem = null;
+            TreeEditPart treeEditPart = null;
+            Rectangle rect = null;
+            Point point = null;
+
+            if (getTargetEditPart() == null) {
+                return;
+            }
+
+            point = ((CreateRequest) request).getLocation();
+
+            treeEditPart = (TreeEditPart) getTargetEditPart().getViewer().findObjectAt(point);
+
+            target = (Part) treeEditPart.getModel();
+            part = (Part) getTargetEditPart().getModel();
+            getCurrentEvent().detail = DND.DROP_COPY;
+
+            if (target != null) {
+                Part newPart = null;
+                try {
+                    Object object = ((CreateRequest) request).getNewObject();
+                    if (object instanceof Part) {
+                        newPart = (Part) object;
+                    }
+                } catch (IllegalArgumentException e) {
+                    return;
+                }
+
+                if (newPart != null) {
+                    ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+                    if ((target.equals(part)) && (componentDescriptor.canHaveChild((ComponentPart) target, (ComponentPart) newPart))) {
+                        getCurrentEvent().feedback = DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND | DND.FEEDBACK_SELECT;
+                    } else if ((target.equals(part)) || (!componentDescriptor.canHaveChild((ComponentPart) target, (ComponentPart) newPart))
+                            || (target.getParent().equals(((ComponentPart) target).getOwnerViewPart()))
+                            || (target.equals(((ComponentPart) target).getOwnerViewPart()))) {
+                        getCurrentEvent().detail = DND.DROP_NONE;
+                        getCurrentEvent().feedback = DND.FEEDBACK_NONE;
+                    } else if (treeEditPart.getWidget() instanceof TreeItem) {
+                        treeItem = (TreeItem) treeEditPart.getWidget();
+                        rect = treeItem.getBounds();
+                        if (isNextPosion(rect, point)) {
+                            getCurrentEvent().feedback = DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND | DND.FEEDBACK_INSERT_AFTER;
+                        } else {
+                            getCurrentEvent().feedback = DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND | DND.FEEDBACK_INSERT_BEFORE;
+                        }
+                    } else {
+                        getCurrentEvent().feedback = DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND | DND.FEEDBACK_INSERT_BEFORE;
+                    }
+                }
+            } else {
+                getCurrentEvent().detail = DND.DROP_NONE;
+                getCurrentEvent().feedback = DND.FEEDBACK_NONE;
+            }
+            super.handleDragOver();
+        }
+    }
+
+    private boolean isNextPosion(Rectangle rect, Point point) {
+        Rectangle temp = rect;
+        temp.y = rect.y + (rect.height / 2);
+        temp.height = rect.height / 2;
+
+        if (temp.contains(point.x, point.y)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    protected void handleDrop() {
+        if (TemplateTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+
+            Request request = getTargetRequest();
+            Part source = null;
+            try {
+                source = (Part) ((CreateRequest) request).getNewObject();
+            } catch (IllegalArgumentException e) {
+                // selectAddedObject();
+                return;
+            }
+
+            if (source != null) {
+                EditPart ep = (EditPart) getViewer().getEditPartRegistry().get(source.getUniqueId());
+                if (ep != null) {
+                    getViewer().select(ep);
+                }
+            }
+            super.handleDrop();
+            selectAddedObject();
+        }
+
+    }
+
+    private void selectAddedObject() {
+        Object model = getCreateRequest().getNewObject();
+        if (model == null) {
+            return;
+        }
+        EditPartViewer viewer = getViewer();
+        viewer.getControl().forceFocus();
+        Object editpart = viewer.getEditPartRegistry().get(model);
+        if (editpart instanceof EditPart) {
+            // Force a layout first.
+            getViewer().flush();
+            viewer.select((EditPart) editpart);
+        }
+    }
+
+    @Override
+    protected void updateTargetRequest() {
+        if (TemplateTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            CreateRequest request = getCreateRequest();
+            request.setLocation(getDropLocation());
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/TemplateTransferDropTargetListener2.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/TemplateTransferDropTargetListener2.java
new file mode 100644 (file)
index 0000000..0f14875
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.dnd.listener;
+
+import org.eclipse.swt.dnd.DropTargetEvent;
+
+
+public interface TemplateTransferDropTargetListener2 {
+    public void preDrop(DropTargetEvent event);
+
+    public void postDrop(DropTargetEvent event);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/TemplateTransferDropTargetManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/dnd/listener/TemplateTransferDropTargetManager.java
new file mode 100644 (file)
index 0000000..52fd1e3
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.dnd.listener;
+
+import org.eclipse.core.commands.common.EventManager;
+import org.eclipse.swt.dnd.DropTargetEvent;
+
+
+public class TemplateTransferDropTargetManager extends EventManager {
+    public void addTemplateTransferDropTargetListener2(TemplateTransferDropTargetListener2 listener) {
+        addListenerObject(listener);
+    }
+
+    public void removeTemplateTransferDropTargetListener2(TemplateTransferDropTargetListener2 listener) {
+        removeListenerObject(listener);
+    }
+
+    public void preDrop(DropTargetEvent event) {
+        Object[] listeners = getListeners();
+        for (int i = 0; i < listeners.length; ++i) {
+            TemplateTransferDropTargetListener2 l = (TemplateTransferDropTargetListener2) listeners[i];
+            l.preDrop(event);
+        }
+    }
+
+    public void postDrop(DropTargetEvent event) {
+        Object[] listeners = getListeners();
+        for (int i = 0; i < listeners.length; ++i) {
+            TemplateTransferDropTargetListener2 l = (TemplateTransferDropTargetListener2) listeners[i];
+            l.postDrop(event);
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/dnd/TemplateTransferDragSourceListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/dnd/TemplateTransferDragSourceListener.java
new file mode 100644 (file)
index 0000000..da8b196
--- /dev/null
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.dnd;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.dnd.AbstractTransferDragSourceListener;
+import org.eclipse.gef.dnd.TemplateTransfer;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.Transfer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.CombinedTemplateCreationEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteTemplateEntry;
+
+
+/**
+ * Allows a single {@link PaletteTemplateEntry PaletteTemplateEntry} to be dragged from an
+ * EditPartViewer. The PaletteTemplateEntry's <i>template</i> object is the data that is being
+ * transfered to the <code>DropTarget</code>.
+ * 
+ * @since 2.1
+ * @author Eric Bordeau
+ */
+public class TemplateTransferDragSourceListener extends
+        AbstractTransferDragSourceListener {
+
+    /**
+     * @deprecated Use the constructor without the transfer specified.
+     * @param viewer
+     *            viewer
+     * @param xfer
+     *            xfer
+     */
+    public TemplateTransferDragSourceListener(EditPartViewer viewer,
+            Transfer xfer) {
+        super(viewer, xfer);
+    }
+
+    /**
+     * Constructs a new listener for the specified EditPartViewer. The provided Viewer should be one
+     * that is displaying a Palette. The TemplateTransferDragSourceListener will only be enabled
+     * when a single EditPart is selected, and the EditPart's model is a
+     * {@link PaletteTemplateEntry}.
+     * 
+     * @param viewer
+     *            the EditPartViewer that is the drag source
+     */
+    public TemplateTransferDragSourceListener(EditPartViewer viewer) {
+        super(viewer, TemplateTransfer.getInstance());
+    }
+
+    /**
+     * @see AbstractTransferDragSourceListener#dragFinished(DragSourceEvent)
+     */
+    public void dragFinished(DragSourceEvent event) {
+        TemplateTransfer.getInstance().setTemplate(null);
+    }
+
+    /**
+     * Get the <i>template</i> from the selected {@link PaletteTemplateEntry} and sets it as the
+     * event data to be dropped.
+     * 
+     * @param event
+     *            the DragSourceEvent
+     */
+    public void dragSetData(DragSourceEvent event) {
+        event.data = getTemplate();
+    }
+
+    /**
+     * Cancels the drag if the selected item does not represent a PaletteTemplateEntry.
+     * 
+     * @see org.eclipse.swt.dnd.DragSourceListener#dragStart(DragSourceEvent)
+     */
+    public void dragStart(DragSourceEvent event) {
+        Object template = getTemplate();
+        if (template == null)
+            event.doit = false;
+        TemplateTransfer.getInstance().setTemplate(template);
+    }
+
+    /**
+     * A helper method that returns <code>null</code> or the <i>template</i> Object from the
+     * currently selected EditPart.
+     * 
+     * @return the template
+     */
+    protected Object getTemplate() {
+        List selection = getViewer().getSelectedEditParts();
+        if (selection.size() == 1) {
+            EditPart editpart = (EditPart) getViewer().getSelectedEditParts()
+                    .get(0);
+            Object model = editpart.getModel();
+            if (model instanceof PaletteTemplateEntry)
+                return ((PaletteTemplateEntry) model).getTemplate();
+            if (model instanceof CombinedTemplateCreationEntry)
+                return ((CombinedTemplateCreationEntry) model).getTemplate();
+        }
+        return null;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/PaletteColorUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/PaletteColorUtil.java
new file mode 100644 (file)
index 0000000..ea2d708
--- /dev/null
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.FigureUtilities;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * A class to keep miscellaneous palette color utilities.
+ * 
+ * @author crevells
+ * @since 3.4
+ */
+public class PaletteColorUtil {
+
+    public static final Color WIDGET_BACKGROUND = ColorConstants.button;
+
+    public static final Color WIDGET_NORMAL_SHADOW = ColorConstants.buttonDarker;
+
+    public static final Color WIDGET_DARK_SHADOW = ColorConstants.buttonDarkest;
+
+    public static final Color WIDGET_LIST_BACKGROUND = ColorConstants.listBackground;
+
+    public static final Color INFO_FOREGROUND = ColorConstants.tooltipForeground;
+
+    public static final Color ARROW_HOVER = new Color(null, 229, 229, 219);
+
+    private static final Color HOVER_COLOR = new Color(null, 252, 228, 179);
+
+    private static final Color SELECTED_COLOR = new Color(null, 207, 227, 250);
+
+    private static final Color HOVER_COLOR_HICONTRAST = new Color(null, 0, 128,
+                                                                  0);
+
+    private static final Color SELECTED_COLOR_HICONTRAST = new Color(null, 128,
+                                                                     0, 128);
+
+    public static final Color WIDGET_BACKGROUND_LIST_BACKGROUND_40 = FigureUtilities
+            .mixColors(PaletteColorUtil.WIDGET_BACKGROUND,
+                       PaletteColorUtil.WIDGET_LIST_BACKGROUND, 0.4);
+
+    public static final Color WIDGET_BACKGROUND_LIST_BACKGROUND_60 = FigureUtilities
+            .mixColors(PaletteColorUtil.WIDGET_BACKGROUND,
+                       PaletteColorUtil.WIDGET_LIST_BACKGROUND, 0.6);
+
+    public static final Color WIDGET_BACKGROUND_LIST_BACKGROUND_85 = FigureUtilities
+            .mixColors(PaletteColorUtil.WIDGET_BACKGROUND,
+                       PaletteColorUtil.WIDGET_LIST_BACKGROUND, 0.85);
+
+    public static final Color WIDGET_BACKGROUND_LIST_BACKGROUND_90 = FigureUtilities
+            .mixColors(PaletteColorUtil.WIDGET_BACKGROUND,
+                       PaletteColorUtil.WIDGET_LIST_BACKGROUND, 0.9);
+
+    public static final Color WIDGET_BACKGROUND_NORMAL_SHADOW_40 = FigureUtilities
+            .mixColors(PaletteColorUtil.WIDGET_BACKGROUND,
+                       PaletteColorUtil.WIDGET_NORMAL_SHADOW, 0.4);
+
+    public static final Color WIDGET_BACKGROUND_NORMAL_SHADOW_45 = FigureUtilities
+            .mixColors(PaletteColorUtil.WIDGET_BACKGROUND,
+                       PaletteColorUtil.WIDGET_NORMAL_SHADOW, 0.45);
+
+    public static final Color WIDGET_BACKGROUND_NORMAL_SHADOW_65 = FigureUtilities
+            .mixColors(PaletteColorUtil.WIDGET_BACKGROUND,
+                       PaletteColorUtil.WIDGET_NORMAL_SHADOW, 0.65);
+
+    public static final Color WIDGET_BACKGROUND_NORMAL_SHADOW_70 = FigureUtilities
+            .mixColors(PaletteColorUtil.WIDGET_BACKGROUND,
+                       PaletteColorUtil.WIDGET_NORMAL_SHADOW, 0.7);
+
+    public static final Color WIDGET_BACKGROUND_NORMAL_SHADOW_80 = FigureUtilities
+            .mixColors(PaletteColorUtil.WIDGET_BACKGROUND,
+                       PaletteColorUtil.WIDGET_NORMAL_SHADOW, 0.8);
+
+    public static final Color WIDGET_BACKGROUND_NORMAL_SHADOW_90 = FigureUtilities
+            .mixColors(PaletteColorUtil.WIDGET_BACKGROUND,
+                       PaletteColorUtil.WIDGET_NORMAL_SHADOW, 0.9);
+
+    public static final Color WIDGET_BACKGROUND_NORMAL_SHADOW_95 = FigureUtilities
+            .mixColors(PaletteColorUtil.WIDGET_BACKGROUND,
+                       PaletteColorUtil.WIDGET_NORMAL_SHADOW, 0.95);
+
+    /**
+     * Gets the color to be used when hovering over palette items. The color differs in high
+     * contrast mode.
+     * 
+     * @return the hover color
+     * @since 3.4
+     */
+    public static Color getHoverColor() {
+        Display display = Display.getCurrent();
+        if (display == null) {
+            display = Display.getDefault();
+        }
+        if (display.getHighContrast()) {
+            return HOVER_COLOR_HICONTRAST;
+        }
+        return HOVER_COLOR;
+    }
+
+    /**
+     * Gets the color to be used when selecting palette items. The color differs in high contrast
+     * mode.
+     * 
+     * @return the selected color
+     * @since 3.4
+     */
+    public static Color getSelectedColor() {
+        Display display = Display.getCurrent();
+        if (display == null) {
+            display = Display.getDefault();
+        }
+        if (display.getHighContrast()) {
+            return SELECTED_COLOR_HICONTRAST;
+        }
+        return SELECTED_COLOR;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/PaletteSelectionTool.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/PaletteSelectionTool.java
new file mode 100644 (file)
index 0000000..3464b09
--- /dev/null
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette;
+
+import org.eclipse.gef.tools.SelectionTool;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+
+
+/**
+ * Selection Tool to be used in the Palette.
+ */
+public class PaletteSelectionTool extends SelectionTool {
+
+    private PaletteViewer getPaletteViewer() {
+        return (PaletteViewer) getCurrentViewer();
+    }
+
+    private boolean handleAbort(KeyEvent e) {
+        if (e.keyCode == SWT.ESC) {
+            return (getPaletteViewer().getPaletteRoot().getDefaultEntry() != null);
+        }
+        return false;
+    }
+
+    protected boolean handleKeyDown(KeyEvent e) {
+        if (handleAbort(e)) {
+            loadDefaultTool();
+            return true;
+        }
+        return super.handleKeyDown(e);
+    }
+
+    private void loadDefaultTool() {
+        getPaletteViewer().setActiveTool(
+                                         getPaletteViewer().getPaletteRoot().getDefaultEntry());
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/ToolbarDropdownContributionItem.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/ToolbarDropdownContributionItem.java
new file mode 100644 (file)
index 0000000..7f6112d
--- /dev/null
@@ -0,0 +1,719 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionManagerOverrides;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.swt.widgets.Widget;
+
+
+/**
+ * A contribution item which delegates to an action.
+ * <p>
+ * This class may be instantiated; it is not intended to be subclassed.
+ * </p>
+ */
+public class ToolbarDropdownContributionItem extends ContributionItem {
+
+    private static ImageCache globalImageCache;
+
+    /**
+     * The action.
+     */
+    private IAction action;
+
+    /**
+     * The widget created for this item; <code>null</code> before creation and after disposal.
+     */
+    private Widget widget = null;
+
+    /**
+     * Nested class handles notification from SWT widget and from Action, to avoid polluting
+     * ToolbarDropdownContributionItem with public listener methods.
+     */
+    private class ActionListener implements Listener, IPropertyChangeListener {
+        public void handleEvent(Event event) {
+            ToolbarDropdownContributionItem.this.handleWidgetEvent(event);
+        }
+
+        public void propertyChange(PropertyChangeEvent event) {
+            ToolbarDropdownContributionItem.this.actionPropertyChange(event);
+        }
+    }
+
+    private ActionListener listener = new ActionListener();
+
+    private static class ImageCache {
+        /** Map from ImageDescriptor to Entry */
+        private Map entries = new HashMap(11);
+        private Image missingImage;
+
+        private static class Entry {
+            protected Image image;
+            protected Image grayImage;
+
+            void dispose() {
+                if (image != null) {
+                    image.dispose();
+                    image = null;
+                }
+                if (grayImage != null) {
+                    grayImage.dispose();
+                    grayImage = null;
+                }
+            }
+        }
+
+        Entry getEntry(ImageDescriptor desc) {
+            Entry entry = (Entry) entries.get(desc);
+            if (entry == null) {
+                entry = new Entry();
+                entries.put(desc, entry);
+            }
+            return entry;
+        }
+
+        Image getImage(ImageDescriptor desc) {
+            if (desc == null) {
+                return null;
+            }
+            Entry entry = getEntry(desc);
+            if (entry.image == null) {
+                entry.image = desc.createImage();
+            }
+            return entry.image;
+        }
+
+        Image getGrayImage(ImageDescriptor desc) {
+            if (desc == null) {
+                return null;
+            }
+            Entry entry = getEntry(desc);
+            if (entry.grayImage == null) {
+                Image image = getImage(desc);
+                if (image != null) {
+                    entry.grayImage = new Image(null, image, SWT.IMAGE_GRAY);
+                }
+            }
+            return entry.grayImage;
+        }
+
+        Image getMissingImage() {
+            if (missingImage == null) {
+                missingImage = getImage(ImageDescriptor
+                        .getMissingImageDescriptor());
+            }
+            return missingImage;
+        }
+
+        void dispose() {
+            for (Iterator i = entries.values().iterator(); i.hasNext();) {
+                Entry entry = (Entry) i.next();
+                entry.dispose();
+            }
+            entries.clear();
+        }
+    }
+
+    /**
+     * Creates a new contribution item from the given action. The id of the action is used as the id
+     * of the item.
+     * 
+     * @param action
+     *            the action
+     */
+    public ToolbarDropdownContributionItem(IAction action) {
+        super(action.getId());
+        this.action = action;
+    }
+
+    /**
+     * Handles a property change event on the action (forwarded by nested listener).
+     */
+    private void actionPropertyChange(final PropertyChangeEvent e) {
+        // This code should be removed. Avoid using free asyncExec
+
+        if (isVisible() && widget != null) {
+            Display display = widget.getDisplay();
+            if (display.getThread() == Thread.currentThread()) {
+                update(e.getProperty());
+            } else {
+                display.asyncExec(new Runnable() {
+                    public void run() {
+                        update(e.getProperty());
+                    }
+                });
+            }
+
+        }
+    }
+
+    /**
+     * Checks whether the given menu item belongs to a context menu (the one that pops up if the
+     * user presses the right mouse button).
+     */
+    private static boolean belongsToContextMenu(MenuItem item) {
+        Menu menu = item.getParent();
+        if (menu == null)
+            return false;
+        while (menu.getParentMenu() != null)
+            menu = menu.getParentMenu();
+        return (menu.getStyle() & SWT.BAR) == 0;
+    }
+
+    /**
+     * Compares this action contribution item with another object. Two action contribution items are
+     * equal if they refer to the identical Action.
+     */
+    public boolean equals(Object o) {
+        if (!(o instanceof ToolbarDropdownContributionItem)) {
+            return false;
+        }
+        return action.equals(((ToolbarDropdownContributionItem) o).action);
+    }
+
+    /**
+     * The <code>ToolbarDropdownContributionItem</code> implementation of this
+     * <code>IContributionItem</code> method creates a SWT Button for the action. If the action's
+     * checked property has been set, a toggle button is created and primed to the value of the
+     * checked property.
+     */
+    public void fill(Composite parent) {
+        if (widget == null && parent != null) {
+            int flags = SWT.PUSH;
+
+            if (action != null) {
+                if (action.getStyle() == IAction.AS_CHECK_BOX)
+                    flags = SWT.TOGGLE;
+                Button b = new Button(parent, flags);
+                b.setData(this);
+                b.addListener(SWT.Dispose, listener);
+                // Don't hook a dispose listener on the parent
+                b.addListener(SWT.Selection, listener);
+                if (action.getHelpListener() != null)
+                    b.addHelpListener(action.getHelpListener());
+                widget = b;
+
+                update(null);
+
+                action.addPropertyChangeListener(listener);
+            }
+        }
+    }
+
+    /**
+     * The <code>ToolbarDropdownContributionItem</code> implementation of this
+     * <code>IContributionItem</code> method creates a SWT MenuItem for the action. If the action's
+     * checked property has been set, a toggle button is created and primed to the value of the
+     * checked property. If the action's menu creator property has been set, a cascading submenu is
+     * created.
+     */
+    public void fill(Menu parent, int index) {
+        if (widget == null && parent != null) {
+            int flags = SWT.PUSH;
+            Menu subMenu = null;
+
+            if (action != null) {
+                int style = action.getStyle();
+                if (style == IAction.AS_CHECK_BOX)
+                    flags = SWT.CHECK;
+                else if (style == IAction.AS_DROP_DOWN_MENU) {
+                    IMenuCreator mc = action.getMenuCreator();
+                    subMenu = mc.getMenu(parent);
+                    flags = SWT.CASCADE;
+                }
+            }
+
+            MenuItem mi = null;
+            if (index >= 0)
+                mi = new MenuItem(parent, flags, index);
+            else
+                mi = new MenuItem(parent, flags);
+            widget = mi;
+
+            mi.setData(this);
+            mi.addListener(SWT.Arm, listener);
+            mi.addListener(SWT.Dispose, listener);
+            mi.addListener(SWT.Selection, listener);
+            if (action != null && action.getHelpListener() != null)
+                mi.addHelpListener(action.getHelpListener());
+
+            if (subMenu != null)
+                mi.setMenu(subMenu);
+
+            update(null);
+
+            if (action != null) {
+                action.addPropertyChangeListener(listener);
+            }
+        }
+    }
+
+    /**
+     * The <code>ToolbarDropdownContributionItem</code> implementation of this
+     * <code>IContributionItem</code> method creates a SWT ToolItem for the action. If the action's
+     * checked property has been set, a toggle button is created and primed to the value of the
+     * checked property. If the action's menu creator property has been set, a drop-down tool item
+     * is created.
+     */
+    public void fill(ToolBar parent, int index) {
+        if (widget == null && parent != null) {
+            int flags = SWT.PUSH;
+
+            if (action != null) {
+                int style = action.getStyle();
+                if (style == IAction.AS_CHECK_BOX)
+                    flags = SWT.CHECK;
+                else if (style == IAction.AS_DROP_DOWN_MENU)
+                    flags = SWT.DROP_DOWN;
+            }
+
+            ToolItem ti = null;
+            if (index >= 0)
+                ti = new ToolItem(parent, flags, index);
+            else
+                ti = new ToolItem(parent, flags);
+            ti.setData(this);
+            ti.addListener(SWT.Selection, listener);
+            ti.addListener(SWT.Dispose, listener);
+
+            widget = ti;
+
+            update(null);
+
+            action.addPropertyChangeListener(listener);
+        }
+    }
+
+    /**
+     * Returns the action associated with this contribution item.
+     * 
+     * @return the action
+     */
+    public IAction getAction() {
+        return action;
+    }
+
+    /**
+     * Returns the image cache. The cache is global, and is shared by all action contribution items.
+     * This has the disadvantage that once an image is allocated, it is never freed until the
+     * display is disposed. However, it has the advantage that the same image in different
+     * contribution managers is only ever created once.
+     */
+    private ImageCache getImageCache() {
+        ImageCache cache = globalImageCache;
+        if (cache == null) {
+            globalImageCache = cache = new ImageCache();
+            Display display = Display.getDefault();
+            if (display != null) {
+                display.disposeExec(new Runnable() {
+                    public void run() {
+                        if (globalImageCache != null) {
+                            globalImageCache.dispose();
+                            globalImageCache = null;
+                        }
+                    }
+                });
+            }
+        }
+        return cache;
+    }
+
+    /**
+     * Handles a widget arm event.
+     */
+    private void handleWidgetArm(Event e) {
+        /*
+         * String description= null; if (fAction instanceof Action) // getDescription should go into
+         * IAction description= ((Action)fAction).getDescription(); if (description != null)
+         * ApplicationWindow.showDescription(e.widget, description); else
+         * ApplicationWindow.resetDescription(e.widget);
+         */
+    }
+
+    /**
+     * Handles a widget dispose event for the widget corresponding to this item.
+     */
+    private void handleWidgetDispose(Event e) {
+        if (e.widget == widget) {
+            // the item is being disposed
+            if (action.getStyle() == IAction.AS_DROP_DOWN_MENU) {
+                action.getMenuCreator().dispose();
+            }
+            action.removePropertyChangeListener(listener);
+            widget = null;
+        }
+    }
+
+    /**
+     * Handles an event from the widget (forwarded from nested listener).
+     */
+    private void handleWidgetEvent(Event e) {
+        switch (e.type) {
+            case SWT.Arm:
+                handleWidgetArm(e);
+                break;
+            case SWT.Dispose:
+                handleWidgetDispose(e);
+                break;
+            case SWT.Selection:
+                handleWidgetSelection(e);
+                break;
+        }
+    }
+
+    /**
+     * Handles a widget selection event.
+     */
+    private void handleWidgetSelection(Event e) {
+        Widget item = e.widget;
+        if (item != null) {
+
+            int style = item.getStyle();
+
+            if ((style & (SWT.TOGGLE | SWT.CHECK)) != 0) {
+                if (action.getStyle() == IAction.AS_CHECK_BOX) {
+                    action.setChecked(!action.isChecked());
+                }
+
+            } else if ((style & SWT.DROP_DOWN) != 0) {
+                /*
+                 * Added by Pratik Shah Do this regardless of whether the down arrow button on the
+                 * side was clicked, or the main button itself
+                 */
+                if (action.getStyle() == IAction.AS_DROP_DOWN_MENU) {
+                    IMenuCreator mc = action.getMenuCreator();
+                    ToolItem ti = (ToolItem) item;
+                    // we create the menu as a sub-menu of "dummy" so that we
+                    // can use
+                    // it in a cascading menu too.
+                    // If created on a SWT control we would get an SWT error...
+                    // Menu dummy= new Menu(ti.getParent());
+                    // Menu m= mc.getMenu(dummy);
+                    // dummy.dispose();
+
+                    Menu m = mc.getMenu(ti.getParent());
+                    if (m != null) {
+                        // position the menu below the drop down item
+                        Rectangle b = ti.getBounds();
+                        Point p = ti.getParent().toDisplay(
+                                                           new Point(b.x, b.y + b.height));
+                        m.setLocation(p.x, p.y); // waiting for SWT 0.42
+                        m.setVisible(true);
+                        return; // we don't fire the action
+                    }
+                }
+            }
+
+            // Ensure action is enabled first.
+            // See 1GAN3M6: ITPUI:WINNT - Any IAction in the workbench can be
+            // executed
+            // while disabled.
+            if (action.isEnabled()) {
+                action.runWithEvent(e);
+            }
+        }
+    }
+
+    /*
+     * (non-Javadoc) Method declared on Object.
+     */
+    public int hashCode() {
+        return action.hashCode();
+    }
+
+    /*
+     * (non-Javadoc) Method declared on IContributionItem.
+     */
+    public boolean isEnabled() {
+        return action != null && action.isEnabled();
+    }
+
+    /**
+     * The action item implementation of this <code>IContributionItem</code> method returns
+     * <code>true</code> for menu items and <code>false</code> for everything else.
+     */
+    public boolean isDynamic() {
+        if (widget instanceof MenuItem) {
+            // Optimization. Only recreate the item is the check style has
+            // changed.
+            boolean itemIsCheck = (widget.getStyle() & SWT.CHECK) != 0;
+            boolean actionIsCheck = getAction() != null
+                    && getAction().getStyle() == IAction.AS_CHECK_BOX;
+            return itemIsCheck != actionIsCheck;
+        }
+        return false;
+    }
+
+    /**
+     * Returns <code>true</code> if this item is allowed to enable, <code>false</code> otherwise.
+     * 
+     * @return if this item is allowed to be enabled
+     * @since 2.0
+     */
+    protected boolean isEnabledAllowed() {
+        if (getParent() == null)
+            return true;
+        Boolean value = getParent().getOverrides().getEnabled(this);
+        return (value == null) ? true : value.booleanValue();
+    }
+
+    /**
+     * The action item implementation of this <code>IContributionItem</code> method calls
+     * <code>update(null)</code>.
+     */
+    public final void update() {
+        update(null);
+    }
+
+    /**
+     * Synchronizes the UI with the given property.
+     * 
+     * @param propertyName
+     *            the name of the property, or <code>null</code> meaning all applicable properties
+     */
+    public void update(String propertyName) {
+        if (widget != null) {
+
+            // determine what to do
+            boolean textChanged = propertyName == null
+                    || propertyName.equals(Action.TEXT);
+            boolean imageChanged = propertyName == null
+                    || propertyName.equals(Action.IMAGE);
+            boolean tooltipTextChanged = propertyName == null
+                    || propertyName.equals(Action.TOOL_TIP_TEXT);
+            boolean enableStateChanged = propertyName == null
+                    || propertyName.equals(Action.ENABLED)
+                    || propertyName
+                            .equals(IContributionManagerOverrides.P_ENABLED);
+            boolean checkChanged = (action.getStyle() == IAction.AS_CHECK_BOX)
+                    && (propertyName == null || propertyName
+                            .equals(Action.CHECKED));
+
+            if (widget instanceof ToolItem) {
+                ToolItem ti = (ToolItem) widget;
+                if (imageChanged) {
+                    updateImages(true);
+                }
+                if (tooltipTextChanged)
+                    ti.setToolTipText(action.getToolTipText());
+
+                if (enableStateChanged) {
+                    boolean shouldBeEnabled = action.isEnabled()
+                            && isEnabledAllowed();
+                    if (ti.getEnabled() != shouldBeEnabled)
+                        ti.setEnabled(shouldBeEnabled);
+                }
+
+                if (checkChanged) {
+                    boolean bv = action.isChecked();
+                    if (ti.getSelection() != bv)
+                        ti.setSelection(bv);
+                }
+                return;
+            }
+
+            if (widget instanceof MenuItem) {
+                MenuItem mi = (MenuItem) widget;
+                boolean isContextMenu = belongsToContextMenu(mi);
+
+                // We only install an accelerator if the menu item doesn't
+                // belong to a context menu (right mouse button menu).
+                if (textChanged) {
+                    if (isContextMenu) {
+                        String text = action.getText();
+                        if (text != null) {
+                            text = Action.removeAcceleratorText(text);
+                            mi.setText(text);
+                        }
+                    } else {
+                        String text = null;
+                        IContributionManagerOverrides overrides = null;
+                        if (getParent() != null)
+                            overrides = getParent().getOverrides();
+                        if (overrides != null)
+                            text = getParent().getOverrides().getText(this);
+                        if (text == null)
+                            text = action.getText();
+                        if (text != null) {
+                            String label = Action.removeAcceleratorText(text);
+                            String accText = null;
+                            Integer acc = null;
+                            if (overrides != null) {
+                                accText = overrides.getAcceleratorText(this);
+                                acc = overrides.getAccelerator(this);
+                            }
+                            if ((accText == null)
+                                    && (label.length() + 1 < text.length()))
+                                accText = text.substring(label.length() + 1);
+                            if (acc == null)
+                                acc = new Integer(action.getAccelerator());
+                            if (acc.intValue() >= 0)
+                                mi.setAccelerator(acc.intValue());
+                            if (accText == null)
+                                mi.setText(label);
+                            else
+                                mi.setText(label + '\t' + accText);
+                        }
+                    }
+                }
+                if (imageChanged) {
+                    updateImages(false);
+                }
+                if (enableStateChanged) {
+                    boolean shouldBeEnabled = action.isEnabled()
+                            && isEnabledAllowed();
+                    if (mi.getEnabled() != shouldBeEnabled)
+                        mi.setEnabled(shouldBeEnabled);
+                }
+
+                if (checkChanged) {
+                    boolean bv = action.isChecked();
+                    if (mi.getSelection() != bv)
+                        mi.setSelection(bv);
+                }
+                return;
+            }
+
+            if (widget instanceof Button) {
+                Button button = (Button) widget;
+                if (imageChanged) {
+                    if (updateImages(false)) {
+                        // don't update text if it has an image
+                        textChanged = false;
+                    }
+                }
+                if (textChanged) {
+                    String text = action.getText();
+                    if (text != null)
+                        button.setText(text);
+                }
+                if (tooltipTextChanged)
+                    button.setToolTipText(action.getToolTipText());
+
+                if (enableStateChanged) {
+                    boolean shouldBeEnabled = action.isEnabled()
+                            && isEnabledAllowed();
+                    if (button.getEnabled() != shouldBeEnabled)
+                        button.setEnabled(shouldBeEnabled);
+                }
+
+                if (checkChanged) {
+                    boolean bv = action.isChecked();
+                    if (button.getSelection() != bv)
+                        button.setSelection(bv);
+                }
+                return;
+            }
+        }
+    }
+
+    /**
+     * Updates the images for this action.
+     * 
+     * @param forceImage
+     *            <code>true</code> if some form of image is compulsory, and <code>false</code> if
+     *            it is acceptable for this item to have no image
+     * @return <code>true</code> if there are images for this action, <code>false</code> if not
+     */
+    private boolean updateImages(boolean forceImage) {
+
+        ImageCache cache = getImageCache();
+
+        if (widget instanceof ToolItem) {
+            Image image = cache.getImage(action.getImageDescriptor());
+            Image hoverImage = cache.getImage(action.getHoverImageDescriptor());
+            Image disabledImage = cache.getImage(action
+                    .getDisabledImageDescriptor());
+
+            // If there is no regular image, but there is a hover image,
+            // convert the hover image to gray and use it as the regular image.
+            if (image == null && hoverImage != null) {
+                image = cache.getGrayImage(action.getHoverImageDescriptor());
+            } else {
+                // If there is no hover image, use the regular image as the
+                // hover image,
+                // and convert the regular image to gray
+                if (hoverImage == null && image != null) {
+                    hoverImage = image;
+                    image = cache.getGrayImage(action.getImageDescriptor());
+                }
+            }
+
+            // Make sure there is a valid image.
+            if (hoverImage == null && image == null && forceImage) {
+                image = cache.getMissingImage();
+            }
+
+            // performance: more efficient in SWT to set disabled and hot image
+            // before
+            // regular image
+            if (disabledImage != null) {
+                // Set the disabled image if we were able to create one.
+                // Assumes that SWT.ToolItem will use platform's default
+                // behavior to show item when it is disabled and a disabled
+                // image has not been set.
+                ((ToolItem) widget).setDisabledImage(disabledImage);
+            }
+            ((ToolItem) widget).setHotImage(hoverImage);
+            ((ToolItem) widget).setImage(image);
+
+            return image != null;
+        } else if (widget instanceof Item || widget instanceof Button) {
+            // Use hover image if there is one, otherwise use regular image.
+            Image image = cache.getImage(action.getHoverImageDescriptor());
+            if (image == null) {
+                image = cache.getImage(action.getImageDescriptor());
+            }
+            // Make sure there is a valid image.
+            if (image == null && forceImage) {
+                image = cache.getMissingImage();
+            }
+            if (widget instanceof Item) {
+                ((Item) widget).setImage(image);
+            } else if (widget instanceof Button) {
+                ((Button) widget).setImage(image);
+            }
+            return image != null;
+        }
+        return false;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/ColumnsLayout.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/ColumnsLayout.java
new file mode 100644 (file)
index 0000000..e96830c
--- /dev/null
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+
+
+/**
+ * Special FlowLayout to display the palette in the columns view.
+ * 
+ * @author Pratik Shah
+ */
+public class ColumnsLayout extends PaletteContainerFlowLayout {
+
+    private Dimension defaultConstraint = null;
+    private Dimension cachedConstraint = null;
+
+    /**
+     * Constructs a new layout
+     */
+    public ColumnsLayout() {
+        super(true);
+        setMinorSpacing(0);
+        setMajorSpacing(0);
+        setStretchMinorAxis(true);
+        setDefaultConstraint(new Dimension(55, 55));
+    }
+
+    /**
+     * @see org.eclipse.draw2d.FlowLayout#getChildSize(IFigure, int, int)
+     */
+    protected Dimension getChildSize(IFigure child, int wHint, int hHint) {
+        if (!(child instanceof SeparatorEditPart.SeparatorFigure)) {
+            Dimension hints = getMinimumHints(child, wHint, hHint);
+            int numOfColumns = (wHint + majorSpacing)
+                    / (hints.width + majorSpacing);
+            // numOfColumns = Math.min(numOfColumns,
+            // maxChildrenInRowWith(child));
+            if (numOfColumns == 0) {
+                wHint = hints.width;
+            } else {
+                wHint = (wHint - ((numOfColumns - 1) * majorSpacing))
+                        / numOfColumns;
+            }
+            hHint = hints.height;
+        }
+
+        return super.getChildSize(child, wHint, hHint);
+    }
+
+    /*
+     * Returns a dimension which has a width that is the greater of the following two: the default
+     * width (set on defaultConstraint), and the minimum width of the widest child.
+     */
+    private Dimension getMinimumHints(IFigure figure, int wHint, int hHint) {
+        if (cachedConstraint == null) {
+            cachedConstraint = defaultConstraint.getCopy();
+            List children = figure.getParent().getChildren();
+            for (Iterator iter = children.iterator(); iter.hasNext();) {
+                IFigure child = (IFigure) iter.next();
+                Dimension childSize = (child instanceof PinnablePaletteStackFigure) ? ((PinnablePaletteStackFigure) child)
+                        .getHeaderPreferredSize(cachedConstraint.width,
+                                                cachedConstraint.height)
+                        : child
+                                .getPreferredSize(cachedConstraint.width,
+                                                  cachedConstraint.height);
+                cachedConstraint.width = Math.max(cachedConstraint.width,
+                                                  childSize.width);
+            }
+            cachedConstraint.height = hHint;
+        }
+        return cachedConstraint;
+    }
+
+    /**
+     * @see org.eclipse.draw2d.AbstractHintLayout#invalidate()
+     */
+    public void invalidate() {
+        super.invalidate();
+        cachedConstraint = null;
+    }
+
+    /**
+     * For use by the palette
+     * 
+     * @param d
+     *            The constraints to be respected by the children of the figure that has this
+     *            layout; Should not be <code>null</code>.
+     */
+    public void setDefaultConstraint(Dimension d) {
+        defaultConstraint = d;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DetailedLabelFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DetailedLabelFigure.java
new file mode 100644 (file)
index 0000000..be06a96
--- /dev/null
@@ -0,0 +1,364 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *   - add method "getCachedImage" for direct manipulation 
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import java.util.Collection;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.draw2d.Border;
+import org.eclipse.draw2d.BorderLayout;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.FocusEvent;
+import org.eclipse.draw2d.ImageFigure;
+import org.eclipse.draw2d.ImageUtilities;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.text.FlowPage;
+import org.eclipse.draw2d.text.ParagraphTextLayout;
+import org.eclipse.draw2d.text.TextFlow;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.widgets.Display;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteMessages;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerPreferences;
+
+
+/**
+ * A customized figure used to represent entries in the GEF Palette.
+ * 
+ * @author Pratik Shah
+ */
+public class DetailedLabelFigure extends Figure {
+
+    private static final FontCache FONTCACHE = new FontCache();
+    private static final Border PAGE_BORDER = new MarginBorder(0, 1, 0, 1);
+
+    private SelectableImageFigure image;
+    private FlowPage page;
+    private TextFlow nameText, descText;
+    private Font boldFont;
+    private boolean selectionState;
+    private int layoutMode = -1;
+    private Font cachedFont;
+
+    /**
+     * Constructor
+     */
+    public DetailedLabelFigure() {
+        image = new SelectableImageFigure();
+        image.setAlignment(PositionConstants.NORTH);
+        page = new FlowPage();
+        page.setBorder(PAGE_BORDER);
+
+        nameText = new TextFlow();
+        nameText.setLayoutManager(new ParagraphTextLayout(nameText,
+                                                          ParagraphTextLayout.WORD_WRAP_TRUNCATE));
+
+        descText = new TextFlow();
+        descText.setLayoutManager(new ParagraphTextLayout(descText,
+                                                          ParagraphTextLayout.WORD_WRAP_TRUNCATE));
+
+        page.add(nameText);
+        add(image);
+        add(page);
+        BorderLayout layout = new BorderLayout();
+        layout.setHorizontalSpacing(2);
+        layout.setVerticalSpacing(0);
+        setLayoutManager(layout);
+    }
+
+    /*
+     * TIZEN: add new UI: current drag cached image for direct manipulation {
+     */
+    public Image getCachedImage() {
+        return image.getImage();
+    }
+    /* TIZEN } */
+
+    /**
+     * @see org.eclipse.draw2d.Figure#addNotify()
+     */
+    public void addNotify() {
+        super.addNotify();
+        updateFont(layoutMode);
+    }
+
+    /**
+     * Releases any OS resources used by the figure.
+     */
+    protected void dispose() {
+        if (boldFont != null) {
+            nameText.setFont(null);
+            FONTCACHE.checkIn(boldFont);
+            boldFont = null;
+        }
+        if (image != null) {
+            image.disposeShadedImage();
+        }
+    }
+
+    /**
+     * @see org.eclipse.draw2d.IFigure#handleFocusGained(FocusEvent)
+     */
+    public void handleFocusGained(FocusEvent event) {
+        super.handleFocusGained(event);
+        updateImage();
+    }
+
+    /**
+     * @see org.eclipse.draw2d.Figure#handleFocusLost(FocusEvent)
+     */
+    public void handleFocusLost(FocusEvent event) {
+        super.handleFocusLost(event);
+        updateImage();
+    }
+
+    /**
+     * @return whether the name is truncated
+     */
+    public boolean isNameTruncated() {
+        return nameText.isTextTruncated();
+    }
+
+    /**
+     * @return whether this figure is selected or not
+     */
+    public boolean isSelected() {
+        return selectionState;
+    }
+
+    /**
+     * @param s
+     *            The description for this entry
+     */
+    public void setDescription(String s) {
+        String str = ""; //$NON-NLS-1$
+        if (s != null && !s.trim().equals("") //$NON-NLS-1$
+                && !s.trim().equals(nameText.getText().trim())) {
+            str = " " + PaletteMessages.NAME_DESCRIPTION_SEPARATOR //$NON-NLS-1$
+                    + " " + s; //$NON-NLS-1$
+        }
+        if (descText.getText().equals(str)) {
+            return;
+        }
+        descText.setText(str);
+    }
+
+    /**
+     * Sets the icon for this figure
+     * 
+     * @param icon
+     *            The new image
+     */
+    public void setImage(Image icon) {
+        image.setImage(icon);
+    }
+
+    /**
+     * @param layoutMode
+     *            the palette layout (any of the PaletteViewerPreferences.LAYOUT_XXXX options)
+     */
+    public void setLayoutMode(int layoutMode) {
+        updateFont(layoutMode);
+
+        if (layoutMode == this.layoutMode)
+            return;
+
+        this.layoutMode = layoutMode;
+
+        add(page);
+        if (descText.getParent() == page)
+            page.remove(descText);
+
+        BorderLayout layout = (BorderLayout) getLayoutManager();
+        if (layoutMode == PaletteViewerPreferences.LAYOUT_COLUMNS) {
+            page.setHorizontalAligment(PositionConstants.CENTER);
+            layout.setConstraint(image, BorderLayout.TOP);
+            layout.setConstraint(page, BorderLayout.CENTER);
+        } else if (layoutMode == PaletteViewerPreferences.LAYOUT_ICONS) {
+            layout.setConstraint(image, BorderLayout.CENTER);
+            remove(page);
+        } else if (layoutMode == PaletteViewerPreferences.LAYOUT_LIST) {
+            page.setHorizontalAligment(PositionConstants.LEFT);
+            layout.setConstraint(image, BorderLayout.LEFT);
+            layout.setConstraint(page, BorderLayout.CENTER);
+        } else if (layoutMode == PaletteViewerPreferences.LAYOUT_DETAILS) {
+            /*
+             * Fix for Bug# 39130 Earlier, descText was only being added to the page if the
+             * description was not an empty String. Now, it's always added. This fixes the case
+             * mentioned in 39130. The undesirable side-effect is that the descText will be added to
+             * the page even when it's empty. However, that shouldn't affect anything because the
+             * descText will be empty (even in the case where the description is not empty, but is
+             * equal to the name -- see setDescription()).
+             */
+            page.add(descText);
+            page.setHorizontalAligment(PositionConstants.LEFT);
+            layout.setConstraint(image, BorderLayout.LEFT);
+            layout.setConstraint(page, BorderLayout.CENTER);
+        }
+    }
+
+    /**
+     * @param str
+     *            The new name for this entry
+     */
+    public void setName(String str) {
+        if (nameText.getText().equals(str)) {
+            return;
+        }
+        nameText.setText(str);
+    }
+
+    /**
+     * @param state
+     *            <code>true</code> if this entry is to be set as selected
+     */
+    public void setSelected(boolean state) {
+        selectionState = state;
+        updateImage();
+    }
+
+    private void updateImage() {
+        if (isSelected()) {
+            if (hasFocus()) {
+                image.useShadedImage();
+            } else {
+                image.disposeShadedImage();
+            }
+        } else {
+            image.disposeShadedImage();
+        }
+    }
+
+    private void updateFont(int layout) {
+        boolean layoutChanged = (layoutMode != layout);
+        boolean fontChanged = (cachedFont == null || cachedFont != getFont());
+
+        cachedFont = getFont();
+        if (layoutChanged || fontChanged) {
+            if (boldFont != null) {
+                FONTCACHE.checkIn(boldFont);
+                boldFont = null;
+            }
+            if (layout == PaletteViewerPreferences.LAYOUT_DETAILS
+                    && cachedFont != null)
+                boldFont = FONTCACHE.checkOut(cachedFont);
+            nameText.setFont(boldFont);
+        }
+    }
+
+    private static class SelectableImageFigure extends ImageFigure {
+        private Image shadedImage;
+
+        protected void useShadedImage() {
+            disposeShadedImage();
+            if (super.getImage() != null) {
+                ImageData data = ImageUtilities
+                        .createShadedImage(super.getImage(),
+                                           ColorConstants.menuBackgroundSelected);
+                shadedImage = new Image(null, data, data.getTransparencyMask());
+            }
+        }
+
+        protected void disposeShadedImage() {
+            if (shadedImage != null) {
+                shadedImage.dispose();
+                shadedImage = null;
+            }
+        }
+
+        public Image getImage() {
+            if (shadedImage != null)
+                return shadedImage;
+            return super.getImage();
+        }
+
+        public void setImage(Image image) {
+            if (image == super.getImage())
+                return;
+            boolean wasShaded = shadedImage != null;
+            disposeShadedImage();
+            super.setImage(image);
+            if (wasShaded)
+                useShadedImage();
+        }
+    }
+
+    private static class FontCache {
+        private Hashtable table = new Hashtable();
+
+        private static class FontInfo {
+            private Font boldFont;
+            private int refCount;
+        }
+
+        /*
+         * Clients should only check in fonts that they checked out from this cache, and should do
+         * only one check-in per checkout. If the given font is not found, a null pointer exception
+         * will be encountered.
+         */
+        public void checkIn(Font boldFont) {
+            FontInfo info = null;
+            Map.Entry entry = null;
+            Collection values = table.entrySet();
+            for (Iterator iter = values.iterator(); iter.hasNext();) {
+                Map.Entry tempEntry = (Map.Entry) iter.next();
+                FontInfo tempInfo = (FontInfo) tempEntry.getValue();
+                if (tempInfo.boldFont == boldFont) {
+                    info = tempInfo;
+                    entry = tempEntry;
+                    break;
+                }
+            }
+            if ((info == null) || (entry == null)) {
+                return;
+            }
+            info.refCount--;
+            if (info.refCount == 0) {
+                boldFont.dispose();
+                table.remove(entry.getKey());
+            }
+        }
+
+        public Font checkOut(Font font) {
+            FontInfo info = null;
+            FontData key = font.getFontData()[0];
+            Object obj = table.get(key);
+            if (obj != null) {
+                info = (FontInfo) obj;
+            } else {
+                info = new FontInfo();
+                FontData[] boldDatas = font.getFontData();
+                for (int i = 0; i < boldDatas.length; i++) {
+                    boldDatas[i].setStyle(SWT.BOLD);
+                }
+                info.boldFont = new Font(Display.getCurrent(), boldDatas);
+                table.put(key, info);
+            }
+            info.refCount++;
+            return info.boldFont;
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DrawerEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DrawerEditPart.java
new file mode 100644 (file)
index 0000000..f33edfb
--- /dev/null
@@ -0,0 +1,346 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   1) update package name
+ *   2) apply new UI  
+ *      - deactivate: add new UI: Clean up image' resource
+ *      - refreshVisuals: add new UI: Set font size
+ *      - setSelected: add new UI: Image processing for selected state
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.FocusEvent;
+import org.eclipse.draw2d.FocusListener;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RangeModel;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.ExposeHelper;
+import org.eclipse.gef.MouseWheelHelper;
+import org.eclipse.gef.editparts.ViewportExposeHelper;
+import org.eclipse.gef.editparts.ViewportMouseWheelHelper;
+import org.eclipse.gef.internal.InternalImages;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleControlEvent;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IMemento;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.PaletteColorUtil;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteDrawer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteTemplateEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerPreferences;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.IPinnableEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteAnimator;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteEditPart;
+import org.tizen.efluibuilder.ui.editor.palette.PaletteConstants;
+import org.tizen.efluibuilder.ui.editor.palette.PaletteConstants.CATEGORY_ICON;
+import org.tizen.efluibuilder.ui.resources.FontResources;
+
+
+/**
+ * EditPart for a PaletteDrawer
+ * 
+ * @author Pratik Shah
+ */
+public class DrawerEditPart extends PaletteEditPart implements
+        IPinnableEditPart {
+
+    private static final String PROPERTY_EXPANSION_STATE = "expansion"; //$NON-NLS-1$
+    private static final String PROPERTY_PINNED_STATE = "pinned"; //$NON-NLS-1$
+
+    /**
+     * Constructor
+     * 
+     * @param drawer
+     *            The PaletteDrawer that this EditPart is representing
+     */
+    public DrawerEditPart(PaletteDrawer drawer) {
+        super(drawer);
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
+     */
+    public IFigure createFigure() {
+        DrawerFigure fig = new DrawerFigure(getViewer().getControl()) {
+            IFigure buildTooltip() {
+                return createToolTip();
+            }
+        };
+        fig.setExpanded(getDrawer().isInitiallyOpen());
+        fig.setPinned(getDrawer().isInitiallyPinned());
+
+        fig.getCollapseToggle().addFocusListener(new FocusListener.Stub() {
+            public void focusGained(FocusEvent fe) {
+                getViewer().select(DrawerEditPart.this);
+            }
+        });
+
+        fig.getScrollpane().getContents()
+                .addLayoutListener(getPaletteAnimator());
+
+        return fig;
+    }
+
+    /**
+     * @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class)
+     */
+    public Object getAdapter(Class key) {
+        if (key == ExposeHelper.class) {
+            ViewportExposeHelper helper = new ViewportExposeHelper(this);
+            helper.setMinimumFrameCount(6);
+            helper.setMargin(new Insets(PaletteScrollBar.BUTTON_HEIGHT, 0,
+                                        PaletteScrollBar.BUTTON_HEIGHT, 0));
+            return helper;
+        }
+        if (key == MouseWheelHelper.class)
+            return new ViewportMouseWheelHelper(this);
+        return super.getAdapter(key);
+    }
+
+    private PaletteAnimator getPaletteAnimator() {
+        return (PaletteAnimator) getViewer().getEditPartRegistry().get(
+                                                                       PaletteAnimator.class);
+    }
+
+    /**
+     * Convenience method that provides access to the PaletteDrawer that is the model.
+     * 
+     * @return The model PaletteDrawer
+     */
+    public PaletteDrawer getDrawer() {
+        return (PaletteDrawer) getPaletteEntry();
+    }
+
+    /**
+     * Convenience method to get the DrawerFigure for the model drawer.
+     * 
+     * @return The DrawerFigure created in {@link #createFigure()}
+     */
+    public DrawerFigure getDrawerFigure() {
+        return (DrawerFigure) getFigure();
+    }
+
+    /**
+     * @see org.eclipse.gef.GraphicalEditPart#getContentPane()
+     */
+    public IFigure getContentPane() {
+        return getDrawerFigure().getContentPane();
+    }
+
+    public boolean isExpanded() {
+        return getDrawerFigure().isExpanded();
+    }
+
+    public boolean isPinnedOpen() {
+        return getDrawerFigure().isPinnedOpen();
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#nameNeededInToolTip()
+     */
+    protected boolean nameNeededInToolTip() {
+        return false;
+    }
+
+    /**
+     * @return <code>true</code> if the DrawerFigure can be pinned open. This is only true when the
+     *         drawer is expanded and the auto-collapse strategy is
+     *         <code>PaletteViewerPreferences.COLLAPSE_AS_NEEDED</code>.
+     */
+    public boolean canBePinned() {
+        return getDrawerFigure().isPinShowing();
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#createAccessible()
+     */
+    protected AccessibleEditPart createAccessible() {
+        return new AccessibleGraphicalEditPart() {
+            public void getDescription(AccessibleEvent e) {
+                e.result = getPaletteEntry().getDescription();
+            }
+
+            public void getName(AccessibleEvent e) {
+                e.result = getPaletteEntry().getLabel();
+            }
+
+            public void getRole(AccessibleControlEvent e) {
+                e.detail = ACC.ROLE_TREE;
+            }
+
+            public void getState(AccessibleControlEvent e) {
+                super.getState(e);
+                e.detail |= isExpanded() ? ACC.STATE_EXPANDED
+                        : ACC.STATE_COLLAPSED;
+            }
+        };
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
+     */
+    protected void refreshVisuals() {
+        getDrawerFigure().setToolTip(createToolTip());
+
+        ImageDescriptor img = getDrawer().getSmallIcon();
+        if (img == null && getDrawer().showDefaultIcon()) {
+            img = InternalImages.DESC_FOLDER_OPEN;
+        }
+        setImageDescriptor(img);
+
+        getDrawerFigure().setTitle(getPaletteEntry().getLabel());
+        getDrawerFigure().setLayoutMode(getLayoutSetting());
+
+        boolean showPin = getPreferenceSource().getAutoCollapseSetting() == PaletteViewerPreferences.COLLAPSE_AS_NEEDED;
+        getDrawerFigure().showPin(showPin);
+
+        Color background = getDrawer().getDrawerType().equals(
+                                                              PaletteTemplateEntry.PALETTE_TYPE_TEMPLATE) ? PaletteColorUtil.WIDGET_LIST_BACKGROUND
+                                                                      : null;
+        getDrawerFigure().getScrollpane().setBackgroundColor(background);
+
+        /* TIZEN: add new UI: Set font size { */
+        getFigure().setFont(FontResources.PALETTE_CATEGORY_NORMAL);
+        /* TIZEN } */
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractEditPart#register()
+     */
+    protected void register() {
+        super.register();
+        getPaletteAnimator().addDrawer(this);
+        getFigure().addLayoutListener(getPaletteAnimator());
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#restoreState(org.eclipse.ui.IMemento)
+     */
+    public void restoreState(IMemento memento) {
+        setExpanded(new Boolean(memento.getString(PROPERTY_EXPANSION_STATE))
+                .booleanValue());
+        setPinnedOpen(new Boolean(memento.getString(PROPERTY_PINNED_STATE))
+                .booleanValue());
+        RangeModel rModel = getDrawerFigure().getScrollpane().getViewport()
+                .getVerticalRangeModel();
+        rModel.setMinimum(memento.getInteger(RangeModel.PROPERTY_MINIMUM)
+                .intValue());
+        rModel.setMaximum(memento.getInteger(RangeModel.PROPERTY_MAXIMUM)
+                .intValue());
+        rModel.setExtent(memento.getInteger(RangeModel.PROPERTY_EXTENT)
+                .intValue());
+        rModel.setValue(memento.getInteger(RangeModel.PROPERTY_VALUE)
+                .intValue());
+        super.restoreState(memento);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#saveState(org.eclipse.ui.IMemento)
+     */
+    public void saveState(IMemento memento) {
+        memento.putString(PROPERTY_EXPANSION_STATE,
+                          new Boolean(isExpanded()).toString());
+        memento.putString(PROPERTY_PINNED_STATE,
+                          new Boolean(isPinnedOpen()).toString());
+        RangeModel rModel = getDrawerFigure().getScrollpane().getViewport()
+                .getVerticalRangeModel();
+        memento.putInteger(RangeModel.PROPERTY_MINIMUM, rModel.getMinimum());
+        memento.putInteger(RangeModel.PROPERTY_MAXIMUM, rModel.getMaximum());
+        memento.putInteger(RangeModel.PROPERTY_EXTENT, rModel.getExtent());
+        memento.putInteger(RangeModel.PROPERTY_VALUE, rModel.getValue());
+        super.saveState(memento);
+    }
+
+    /**
+     * Sets the expansion state of the DrawerFigure
+     * 
+     * @param expanded
+     *            <code>true</code> if the drawer is expanded; false otherwise.
+     */
+    public void setExpanded(boolean expanded) {
+        getDrawerFigure().setExpanded(expanded);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#setImageInFigure(Image)
+     */
+    protected void setImageInFigure(Image image) {
+        getDrawerFigure().setTitleIcon(image);
+    }
+
+    public void setPinnedOpen(boolean pinned) {
+        getDrawerFigure().setPinned(pinned);
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPart#setSelected(int)
+     */
+    public void setSelected(int value) {
+
+        /* TIZEN: add new UI: Image processing for selected state { */
+        if (this.getSelected() == value) {
+            return;
+        }
+
+        boolean bSelected = value != EditPart.SELECTED_NONE;
+
+        // Image processing for selected state
+        DrawerFigure drawerFigure = getDrawerFigure();
+        drawerFigure.setSelected(bSelected);
+
+        // for the selected category icon
+        PaletteDrawer drawer = getDrawer();
+        ImageDescriptor img = drawer.getSmallIcon();
+        if (img == null && drawer.showDefaultIcon()) {
+            // if no icon
+            img = InternalImages.DESC_FOLDER_OPEN;
+        } else {
+            String category = drawer.getDescription();
+            CATEGORY_ICON icon = PaletteConstants.CATEGORY_ICON.get(category);
+            if (icon != null) {
+
+                img = icon.getImageDescriptor(bSelected);
+            }
+            drawer.setSmallIcon(img);
+
+        }
+        /* TIZEN: add new UI } */
+
+        super.setSelected(value);
+        getDrawerFigure().getCollapseToggle().requestFocus();
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractEditPart#unregister()
+     */
+    protected void unregister() {
+        getPaletteAnimator().removeDrawer(this);
+        super.unregister();
+    }
+
+    /**
+     * deactivate method of the EditPart Dispose created image's resource
+     */
+    @Override
+    public void deactivate() {
+        /* TIZEN: add new UI: Clean up image' resource { */
+        getDrawerFigure().dispose();
+        /* TIZEN: add new UI: Clean up image' resource } */
+        super.deactivate();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DrawerFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DrawerFigure.java
new file mode 100644 (file)
index 0000000..21ce074
--- /dev/null
@@ -0,0 +1,580 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   1) update package name
+ *   2) apply new UI  
+ *      - deactivate: Clean up image' resource
+ *      - CollapseToggle.handleStateChanged: add new UI: apply arrowButton's direction
+ *      - DrawerFigure: add arrowButton and modified always selected the pinFigure
+ *      - getSelected: add new method
+ *      - setSelected: add new method
+ *      - paintToggleGradient: The eclipse source is commented and add Tizen source for new UI
+ *      - setLayoutMode: call arrowButton's setLayout method
+ *      - dispose: add new dispose method
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.Animation;
+import org.eclipse.draw2d.Border;
+import org.eclipse.draw2d.BorderLayout;
+import org.eclipse.draw2d.ButtonModel;
+import org.eclipse.draw2d.ChangeEvent;
+import org.eclipse.draw2d.ChangeListener;
+import org.eclipse.draw2d.Clickable;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.CompoundBorder;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.FigureUtilities;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.LayoutManager;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.MouseEvent;
+import org.eclipse.draw2d.MouseListener;
+import org.eclipse.draw2d.MouseMotionListener;
+import org.eclipse.draw2d.SchemeBorder;
+import org.eclipse.draw2d.ScrollPane;
+import org.eclipse.draw2d.Toggle;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.ui.palette.PaletteViewerPreferences;
+import org.eclipse.gef.ui.palette.editparts.PaletteToolbarLayout;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.PaletteColorUtil;
+import org.tizen.efluibuilder.ui.editor.palette.internal.ArrowButton;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+/**
+ * @author Pratik Shah
+ */
+public class DrawerFigure extends Figure {
+
+    /** Foreground color constant **/
+    protected static final Color FG_COLOR = FigureUtilities.mixColors(
+                                                                      PaletteColorUtil.WIDGET_NORMAL_SHADOW,
+                                                                      PaletteColorUtil.WIDGET_BACKGROUND);
+
+    /** Scrollpane border constant for icon and column layout mode **/
+    protected static final Border SCROLL_PANE_BORDER = new MarginBorder(2, 2,
+                                                                        2, 2);
+    /** Scrollpane border constant for list and details layout mode **/
+    protected static final Border SCROLL_PANE_LIST_BORDER = new MarginBorder(2,
+                                                                             0, 2, 0);
+    /** Title margin border constant **/
+    protected static final Border TITLE_MARGIN_BORDER = new MarginBorder(4, 2,
+                                                                         2, 2);
+    /** Toggle button border constant **/
+    protected static final Border TOGGLE_BUTTON_BORDER = new RaisedBorder();
+    /** Tooltip border constant **/
+    protected static final Border TOOLTIP_BORDER = new CompoundBorder(
+                                                                      new SchemeBorder(SchemeBorder.SCHEMES.RAISED), new MarginBorder(1));
+    private Toggle collapseToggle;
+    private Label drawerLabel, tipLabel;
+
+    private boolean addedScrollpane = false;
+    private int layoutMode = -1;
+    private PinFigure pinFigure;
+    private ScrollPane scrollpane;
+    private boolean showPin = true, skipNextEvent;
+    private EditPartTipHelper tipHelper;
+
+    /* TIZEN: { */
+    private boolean isSelected = false;
+    private ArrowButton arrowButton;
+    /* TIZEN: } */
+
+    /**
+     * This is the figure for the entire drawer label button.
+     */
+    private class CollapseToggle extends Toggle {
+
+        public CollapseToggle(IFigure contents) {
+            super(contents);
+            setSelected(true);
+            setRequestFocusEnabled(true);
+            addChangeListener(new ChangeListener() {
+
+                public void handleStateChanged(ChangeEvent e) {
+                    if (e.getPropertyName().equals(ButtonModel.SELECTED_PROPERTY)) {
+                        Animation.markBegin();
+                        handleExpandStateChanged();
+                        Animation.run(150);
+
+                        /* TIZEN: add new UI: apply arrowButton's direction { */
+                        if (isExpanded()) {
+                            arrowButton.setDirection(ArrowButton.DIRECTION_EXPANDED);
+                        } else {
+                            arrowButton.setDirection(ArrowButton.DIRECTION_COLLAPSED);
+                        }
+                        /* TIZEN: } */
+                    } else if (e.getPropertyName().equals(ButtonModel.MOUSEOVER_PROPERTY)) {
+                        repaint();
+                    }
+                }
+            });
+        }
+
+        public IFigure getToolTip() {
+            return buildTooltip();
+        }
+
+        protected void paintFigure(Graphics g) {
+            super.paintFigure(g);
+            Rectangle r = Rectangle.SINGLETON;
+            r.setBounds(getBounds());
+
+            // draw top border of drawer figure
+            g.setForegroundColor(PaletteColorUtil.WIDGET_NORMAL_SHADOW);
+            g.drawLine(r.getTopLeft(), r.getTopRight());
+            g.setForegroundColor(ColorConstants.white);
+            g.drawLine(r.getTopLeft().getTranslated(0, 1), r.getTopRight()
+                    .getTranslated(0, 1));
+            r.crop(new Insets(2, 0, 0, 0));
+            if (isExpanded()) {
+                g.setForegroundColor(PaletteColorUtil.WIDGET_BACKGROUND_NORMAL_SHADOW_65);
+                g.drawLine(r.getLocation(), r.getTopRight());
+                r.crop(new Insets(1, 0, 0, 0));
+            }
+
+            // draw bottom border of drawer figure
+            if (!isExpanded()) {
+                g.setForegroundColor(ColorConstants.white);
+                g.drawLine(r.getBottomLeft().getTranslated(0, -1), r
+                        .getBottomRight().getTranslated(0, -1));
+                r.crop(new Insets(0, 0, 1, 0));
+            }
+
+            paintToggleGradient(g, r);
+
+        }
+    }
+
+    /**
+     * Constructor
+     * 
+     * @param control
+     *            The Control of the LWS to which this Figure belongs (it is used to display the
+     *            drawer header with an EditPartTipHelper, if the header is not completely visible).
+     *            It can be <code>null</code> (the tip won't be displayed).
+     */
+    public DrawerFigure(final Control control) {
+        /*
+         * A PaletteToolbarLayout is being used here instead of a ToolbarLayout so that the
+         * ScrollPane can be stretched to take up vertical space. This affects selection and
+         * appearance (background color).
+         */
+        setLayoutManager(new PaletteToolbarLayout() {
+            protected boolean isChildGrowing(IFigure child) {
+                int wHint = child.getBounds().width;
+                return child.getPreferredSize(wHint, -1).height != child
+                        .getMinimumSize(wHint, -1).height;
+            }
+        });
+
+        Figure title = new Figure();
+        title.setBorder(TITLE_MARGIN_BORDER);
+        BorderLayout borderLayout = new BorderLayout();
+        borderLayout.setHorizontalSpacing(2);
+        title.setLayoutManager(borderLayout);
+
+        drawerLabel = new Label();
+        drawerLabel.setLabelAlignment(Label.LEFT);
+
+        pinFigure = new PinFigure();
+        title.add(pinFigure, BorderLayout.RIGHT);
+
+        /* TIZEN: Add arrowButton { */
+        arrowButton = new ArrowButton(ArrowButton.DIRECTION_EXPANDED);
+        arrowButton.setPreferredSize(ArrowButton.TRIANGLE_SIZE * 2 + 2, ArrowButton.TRIANGLE_SIZE);
+        title.add(arrowButton, BorderLayout.RIGHT);
+        /* } TIZEN */
+
+        title.add(drawerLabel, BorderLayout.CENTER);
+
+        collapseToggle = new CollapseToggle(title);
+
+        /*
+         * @TODO:Pratik
+         * 
+         * There is a bug here. Right-click on the name pop-up for the header of a drawer figure in
+         * the palette. This will hide the pop-up. Right-click again, this time on the collapse
+         * toggle, to bring up the drawer's context menu. Now, left-click on the collapse toggle.
+         * The context menu will disappear, the name pop-up will re-appear, and the drawer will
+         * collapse/expand. If the drawer was in such a position, that collapsing/expanding it will
+         * cause its header to move, the name pop-up will now be floating over where the collapse
+         * toggle used to be, but is not anymore. To fix this, you can detect the left mouse click
+         * on the collapse toggle and hide the name pop-up then. The problem is that when you click
+         * on the collapseToggle after the context menu has been brought up, it does not fire a
+         * mouse pressed event. The listener below, that is commented out for now, is never
+         * notified.
+         */
+        // collapseToggle.addMouseListener(new MouseListener.Stub(){
+        // public void mousePressed(MouseEvent me) {
+        // System.out.println("AAA");
+        // }
+        // });
+
+        add(collapseToggle);
+        createScrollpane();
+        createHoverHelp(control);
+
+        /* TIZEN: pinFigure is always selected { */
+        pinFigure.setSelected(true);
+        showPin(false);
+        /* } TIZEN */
+    }
+
+    /* TIZEN: category's getSelected method { */
+    public boolean getSelected() {
+        return this.isSelected;
+    }
+    /* } TIZEN */
+
+    /* TIZEN: category's selected method { */
+    public void setSelected(boolean isSelected) {
+        this.isSelected = isSelected;
+    }
+    /* } TIZEN */
+
+    /**
+     * Paints the background gradient on the drawer toggle figure.
+     * 
+     * @param g
+     *            the graphics object
+     * @param rect
+     *            the rectangle which the background gradient should cover
+     */
+    private void paintToggleGradient(Graphics g, Rectangle rect) {
+        /*
+         * ECLIPSE {
+         * 
+         * if (isExpanded()) {
+         * g.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_85);
+         * g.fillRectangle(rect); } else if (collapseToggle.getModel().isMouseOver()) { Color color1
+         * = PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_60; Color color2 =
+         * PaletteColorUtil.WIDGET_BACKGROUND_NORMAL_SHADOW_90; Color color3 =
+         * PaletteColorUtil.WIDGET_BACKGROUND_NORMAL_SHADOW_95; Color color4 =
+         * PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_90;
+         * 
+         * g.setForegroundColor(color1); g.setBackgroundColor(color2); g.fillGradient(rect.x,
+         * rect.y, rect.width, rect.height - 4, true);
+         * 
+         * g.setForegroundColor(color2); g.setBackgroundColor(color3); g.fillGradient(rect.x,
+         * rect.bottom() - 4, rect.width, 2, true);
+         * 
+         * g.setForegroundColor(color3); g.setBackgroundColor(color4); g.fillGradient(rect.x,
+         * rect.bottom() - 2, rect.width, 2, true); } else {
+         * g.setForegroundColor(PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_85);
+         * g.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND_NORMAL_SHADOW_45);
+         * g.fillGradient(rect, true); }
+         * 
+         * } ECLIPSE
+         */
+        /* TIZEN { */
+        g.setForegroundColor(ColorResources.PALETTE_CATEGORY_NORMAL);
+        g.setBackgroundColor(ColorResources.PALETTE_CATEGORY_BACKGROUND);
+        g.fillRectangle(rect);
+        /* } TIZEN */
+
+    }
+
+    private void createHoverHelp(final Control control) {
+        if (control == null) {
+            return;
+        }
+        // If a control was provided, create the tipLabel -- if the text in the
+        // header is
+        // truncated, it will display it as a tooltip.
+        tipLabel = new Label() {
+            /**
+             * @see org.eclipse.draw2d.Figure#getToolTip()
+             */
+            public IFigure getToolTip() {
+                return buildTooltip();
+            }
+
+            protected void paintFigure(Graphics graphics) {
+                Rectangle r = Rectangle.SINGLETON;
+                r.setBounds(getBounds());
+                graphics.pushState();
+                paintToggleGradient(graphics, getBounds());
+                graphics.popState();
+                super.paintFigure(graphics);
+            }
+        };
+        tipLabel.setOpaque(false);
+        tipLabel.setBorder(TOOLTIP_BORDER);
+        collapseToggle.addMouseMotionListener(new MouseMotionListener.Stub() {
+            public void mouseMoved(MouseEvent e) {
+                if (!drawerLabel.getBounds().contains(e.getLocation()))
+                    return;
+                if (skipNextEvent) {
+                    skipNextEvent = false;
+                    return;
+                }
+                if (drawerLabel.isTextTruncated()
+                        && !EditPartTipHelper.isCurrent(tipHelper)) {
+                    tipLabel.setText(drawerLabel.getText());
+                    tipLabel.setIcon(drawerLabel.getIcon());
+                    tipLabel.setFont(drawerLabel.getFont());
+                    tipHelper = new EditPartTipHelper(control);
+                    Rectangle bounds = drawerLabel.getBounds()
+                            .getExpanded(2, 2);
+                    drawerLabel.translateToAbsolute(bounds);
+                    org.eclipse.swt.graphics.Rectangle loc = new org.eclipse.swt.graphics.Rectangle(
+                                                                                                    bounds.x, bounds.y, bounds.width, bounds.height);
+                    loc = Display.getCurrent().map(control, null, loc);
+                    tipHelper.displayToolTipAt(tipLabel, loc.x, loc.y);
+                }
+            }
+        });
+        tipLabel.addMouseListener(new MouseListener.Stub() {
+            public void mousePressed(MouseEvent e) {
+                if (e.button == 1) {
+                    Rectangle original = getCollapseToggle().getBounds()
+                            .getCopy();
+                    getCollapseToggle().requestFocus();
+                    setExpanded(!isExpanded());
+                    // Hide the tip if expanding the drawer causes the collapse
+                    // toggle to move
+                    if (!original.equals(getCollapseToggle().getBounds())) {
+                        tipHelper.hide();
+                    }
+                } else {
+                    tipHelper.hide();
+                    if (e.button == 3) {
+                        skipNextEvent = true;
+                    }
+                }
+            }
+        });
+    }
+
+    private void createScrollpane() {
+        scrollpane = new ScrollPane();
+        scrollpane.getViewport().setContentsTracksWidth(true);
+        scrollpane.setMinimumSize(new Dimension(0, 0));
+        scrollpane.setHorizontalScrollBarVisibility(ScrollPane.NEVER);
+        scrollpane.setVerticalScrollBar(new PaletteScrollBar());
+        scrollpane.getVerticalScrollBar().setStepIncrement(20);
+        scrollpane.setLayoutManager(new OverlayScrollPaneLayout());
+        scrollpane.setContents(new Figure());
+        scrollpane.getContents().setOpaque(true);
+        scrollpane.getContents().setBackgroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+    }
+
+    IFigure buildTooltip() {
+        return null;
+    }
+
+    /**
+     * @return The Clickable that is used to expand/collapse the drawer.
+     */
+    public Clickable getCollapseToggle() {
+        return collapseToggle;
+    }
+
+    /**
+     * @return The content pane for this figure, i.e. the Figure to which children can be added.
+     */
+    public IFigure getContentPane() {
+        return scrollpane.getContents();
+    }
+
+    /**
+     * @see Figure#getMinimumSize(int, int)
+     */
+    public Dimension getMinimumSize(int wHint, int hHint) {
+        /*
+         * Fix related to Bug #35176 The figure returns a minimum size that is of at least a certain
+         * height, so as to prevent each drawer from getting too small (in which case, the
+         * scrollbars cover up the entire available space).
+         */
+        if (isExpanded()) {
+            List children = getContentPane().getChildren();
+            if (!children.isEmpty()) {
+                Dimension result = collapseToggle
+                        .getPreferredSize(wHint, hHint).getCopy();
+                result.height += getContentPane().getInsets().getHeight();
+                IFigure child = (IFigure) children.get(0);
+                result.height += Math.min(80,
+                                          child.getPreferredSize(wHint, -1).height + 9);
+                return result.intersect(getPreferredSize(wHint, hHint));
+            }
+        }
+
+        return super.getMinimumSize(wHint, hHint);
+    }
+
+    /**
+     * Returns the ScrollPane associated with this DrawerFigure
+     * 
+     * @return the ScrollPane
+     */
+    public ScrollPane getScrollpane() {
+        return scrollpane;
+    }
+
+    protected void handleExpandStateChanged() {
+        if (isExpanded()) {
+            if (scrollpane.getParent() != this)
+                add(scrollpane);
+        } else {
+            if (scrollpane.getParent() == this)
+                remove(scrollpane);
+
+            // collapse all pinnable palette stack children that aren't pinned
+            for (Iterator iterator = getContentPane().getChildren().iterator(); iterator
+                    .hasNext();) {
+                Object child = iterator.next();
+                if (child instanceof PinnablePaletteStackFigure
+                        && !((PinnablePaletteStackFigure) child).isPinnedOpen()) {
+                    ((PinnablePaletteStackFigure) child).setExpanded(false);
+                }
+            }
+
+        }
+
+        if (pinFigure != null) {
+            pinFigure.setVisible(isExpanded() && showPin);
+        }
+    }
+
+    /**
+     * @return <code>true</code> if the drawer is expanded
+     */
+    public boolean isExpanded() {
+        return collapseToggle.isSelected();
+    }
+
+    /**
+     * @return <code>true</code> if the drawer is expanded and is pinned (i.e., it can't be
+     *         automatically collapsed)
+     */
+    public boolean isPinnedOpen() {
+        return isExpanded() && pinFigure.isVisible() && pinFigure.isSelected();
+    }
+
+    /**
+     * @return <code>true</code> if the drawer is expanded and its pin is showing
+     */
+    public boolean isPinShowing() {
+        return isExpanded() && showPin;
+    }
+
+    public void setAnimating(boolean isAnimating) {
+        if (isAnimating) {
+            if (scrollpane.getParent() != this) {
+                addedScrollpane = true;
+                add(scrollpane);
+            }
+            scrollpane.setVerticalScrollBarVisibility(ScrollPane.NEVER);
+        } else {
+            scrollpane.setVerticalScrollBarVisibility(ScrollPane.AUTOMATIC);
+            if (addedScrollpane) {
+                remove(scrollpane);
+                addedScrollpane = false;
+            }
+        }
+    }
+
+    public void setExpanded(boolean value) {
+        collapseToggle.setSelected(value);
+    }
+
+    public void setLayoutMode(int layoutMode) {
+        if (this.layoutMode == layoutMode) {
+            return;
+        }
+
+        this.layoutMode = layoutMode;
+
+        LayoutManager manager;
+        if (layoutMode == PaletteViewerPreferences.LAYOUT_COLUMNS) {
+            manager = new ColumnsLayout();
+            getContentPane().setBorder(SCROLL_PANE_BORDER);
+        } else if (layoutMode == PaletteViewerPreferences.LAYOUT_ICONS) {
+            PaletteContainerFlowLayout fl = new PaletteContainerFlowLayout();
+            fl.setMinorSpacing(0);
+            fl.setMajorSpacing(0);
+            manager = fl;
+            getContentPane().setBorder(SCROLL_PANE_BORDER);
+        } else {
+            manager = new ToolbarLayout();
+            getContentPane().setBorder(SCROLL_PANE_LIST_BORDER);
+        }
+        getContentPane().setLayoutManager(manager);
+        /* TIZEN: Because the layout(clientArea) of the initial state is invalid, reset layout. { */
+        arrowButton.setLayout();
+        /* } TIZEN */
+    }
+
+    /**
+     * Pins or unpins the drawer. The drawer can be pinned open only when it is expanded. Attempts
+     * to pin it when it is collapsed will do nothing.
+     * 
+     * @param pinned
+     *            <code>true</code> if the drawer is to be pinned
+     */
+    public void setPinned(boolean pinned) {
+        if (!isExpanded() || !showPin) {
+            return;
+        }
+
+        pinFigure.setSelected(pinned);
+    }
+
+    /**
+     * Displays the given text in the drawer's header as its title.
+     * 
+     * @param s
+     *            The title of the drawer
+     */
+    public void setTitle(String s) {
+        drawerLabel.setText(s);
+    }
+
+    /**
+     * Displays the given image in the header as the drawer's icon.
+     * 
+     * @param icon
+     *            The icon for this drawer.
+     */
+    public void setTitleIcon(Image icon) {
+        drawerLabel.setIcon(icon);
+    }
+
+    public void showPin(boolean show) {
+        showPin = show;
+        handleExpandStateChanged();
+    }
+
+    /* TIZEN: clean-up image's resource { */
+    public void dispose() {
+        arrowButton.dispose();
+        arrowButton.setParent(null);
+        ((PaletteScrollBar) scrollpane.getVerticalScrollBar()).dispose();
+    }
+    /* } TIZEN */
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DropShadowButtonBorder.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/DropShadowButtonBorder.java
new file mode 100644 (file)
index 0000000..c080e61
--- /dev/null
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.AbstractBorder;
+import org.eclipse.draw2d.ButtonModel;
+import org.eclipse.draw2d.Clickable;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.custom.ViewForm;
+import org.eclipse.swt.graphics.Color;
+
+
+class DropShadowButtonBorder extends AbstractBorder {
+
+    protected Insets insets = new Insets(1, 1, 3, 3);
+
+    private static final Color highlight = ColorConstants.menuBackgroundSelected,
+            dropshadow2 = new Color(null, ViewForm.borderMiddleRGB),
+            dropshadow3 = new Color(null, ViewForm.borderOutsideRGB);
+
+    /**
+     * Returns the space used by the border for the figure provided as input. In this border all
+     * sides always have equal width.
+     * 
+     * @param figure
+     *            Figure for which this is the border.
+     * @return Insets for this border.
+     */
+    public Insets getInsets(IFigure figure) {
+        return insets;
+    }
+
+    public boolean isOpaque() {
+        return true;
+    }
+
+    public void paint(IFigure figure, Graphics g, Insets insets) {
+        ButtonModel model = ((Clickable) figure).getModel();
+        Rectangle r = getPaintRectangle(figure, insets);
+        g.setLineWidth(1);
+        r.width -= 3;
+        r.height -= 3;
+
+        if (model.isMouseOver() && !model.isArmed()) {
+            g.setForegroundColor(highlight);
+            g.drawRectangle(r);
+
+            r.translate(1, 1);
+            g.setForegroundColor(dropshadow2);
+            g.drawLine(r.x, r.bottom(), r.right(), r.bottom());
+            g.drawLine(r.right(), r.y, r.right(), r.bottom());
+
+            r.translate(1, 1);
+            g.setForegroundColor(dropshadow3);
+            g.drawLine(r.x + 1, r.bottom(), r.right() - 1, r.bottom());
+            g.drawLine(r.right(), r.y + 1, r.right(), r.bottom() - 1);
+        } else if (model.isPressed()) {
+            r.translate(1, 1);
+
+            g.setForegroundColor(highlight);
+            g.drawRectangle(r);
+
+            r.translate(1, 1);
+            g.setForegroundColor(dropshadow2);
+            g.drawLine(r.x, r.bottom(), r.right(), r.bottom());
+            g.drawLine(r.right(), r.y, r.right(), r.bottom());
+        } else {
+            r.translate(1, 1);
+
+            g.setForegroundColor(dropshadow3);
+            g.drawRectangle(r);
+
+            r.translate(1, 1);
+            g.drawLine(r.x, r.bottom(), r.right(), r.bottom());
+            g.drawLine(r.right(), r.y, r.right(), r.bottom());
+        }
+
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/EditPartTipHelper.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/EditPartTipHelper.java
new file mode 100644 (file)
index 0000000..c3a6920
--- /dev/null
@@ -0,0 +1,190 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseMoveListener;
+import org.eclipse.swt.events.MouseTrackAdapter;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.ShellAdapter;
+import org.eclipse.swt.events.ShellEvent;
+import org.eclipse.swt.events.ShellListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+
+class EditPartTipHelper extends org.eclipse.draw2d.PopUpHelper {
+
+    private static EditPartTipHelper currentHelper;
+    private ShellListener shellListener;
+
+    private static void setHelper(EditPartTipHelper helper) {
+        if (currentHelper != null && currentHelper != helper
+                && currentHelper.isShowing())
+            currentHelper.hide();
+        currentHelper = helper;
+    }
+
+    public EditPartTipHelper(Control c) {
+        super(c, SWT.ON_TOP | SWT.TOOL | SWT.NO_TRIM);
+    }
+
+    /**
+     * Sets the LightWeightSystem object's contents to the passed tooltip, and displays the tip at
+     * the coordianates specified by tipPosX and tipPosY. The given coordinates will be adjusted if
+     * the tip cannot be completely visible on the screen.
+     * 
+     * @param tip
+     *            The tool tip to be displayed.
+     * @param tipPosX
+     *            X coordiante of tooltip to be displayed
+     * @param tipPosY
+     *            Y coordinate of tooltip to be displayed
+     */
+    public void displayToolTipAt(IFigure tip, int tipPosX, int tipPosY) {
+        if (tip != null) {
+            // Adjust the position if the tip will not be completely visible on
+            // the screen
+            int shiftX = 0;
+            int shiftY = 0;
+            Dimension tipSize = tip.getPreferredSize();
+            getShell();
+            tipSize = tipSize.getExpanded(getShellTrimSize());
+            org.eclipse.swt.graphics.Rectangle area = control.getDisplay()
+                    .getClientArea();
+            org.eclipse.swt.graphics.Point end = new org.eclipse.swt.graphics.Point(
+                                                                                    tipPosX + tipSize.width, tipPosY + tipSize.height);
+            if (!area.contains(end)) {
+                shiftX = end.x - (area.x + area.width);
+                shiftY = end.y - (area.y + area.height);
+                shiftX = shiftX < 0 ? 0 : shiftX;
+                shiftY = shiftY < 0 ? 0 : shiftY;
+            }
+            tipPosX -= shiftX;
+            tipPosY -= shiftY;
+
+            // Display the tip
+            EditPartTipHelper.setHelper(this);
+            getLightweightSystem().setContents(tip);
+            setShellBounds(tipPosX, tipPosY, tipSize.width, tipSize.height);
+            show();
+            getShell().setCapture(true);
+        }
+    }
+
+    public void dispose() {
+        if (shellListener != null) {
+            control.getShell().removeShellListener(shellListener);
+            shellListener = null;
+        }
+        super.dispose();
+    }
+
+    /**
+     * @see org.eclipse.draw2d.PopUpHelper#hide()
+     */
+    protected void hide() {
+        super.hide();
+        currentHelper = null;
+    }
+
+    protected void hookShellListeners() {
+
+        /*
+         * If the cursor leaves the tip window, hide the tooltip and dispose of its shell
+         */
+        getShell().addMouseTrackListener(new MouseTrackAdapter() {
+            public void mouseExit(MouseEvent e) {
+                getShell().setCapture(false);
+                dispose();
+            }
+        });
+        /*
+         * If the mouseExit listener does not get called, dispose of the shell if the cursor is no
+         * longer in the tooltip. This occurs in the rare case that a mouseEnter is not received on
+         * the tooltip when it appears.
+         */
+        getShell().addMouseMoveListener(new MouseMoveListener() {
+            public void mouseMove(MouseEvent e) {
+                Point eventPoint = getShell().toDisplay(new Point(e.x, e.y));
+                if (!getShell().getBounds().contains(eventPoint)) {
+                    if (isShowing())
+                        getShell().setCapture(false);
+                    dispose();
+                }
+            }
+        });
+
+        // This is to dispose of the tooltip when the user ALT-TABs to another
+        // window.
+        if (shellListener == null) {
+            shellListener = new ShellAdapter() {
+                public void shellDeactivated(ShellEvent event) {
+                    Display.getCurrent().asyncExec(new Runnable() {
+                        public void run() {
+                            Shell active = Display.getCurrent()
+                                    .getActiveShell();
+                            if (getShell() == active
+                                    || control.getShell() == active
+                                    || getShell().isDisposed())
+                                return;
+                            if (isShowing())
+                                getShell().setCapture(false);
+                            dispose();
+                        }
+                    });
+                }
+            };
+            control.getShell().addShellListener(shellListener);
+            getShell().addShellListener(shellListener);
+        }
+
+        /*
+         * Workaround for GTK Bug - Control.setCapture(boolean) not implemented: If the cursor is
+         * not over the shell when it is first painted, hide the tooltip and dispose of the shell.
+         */
+        if (SWT.getPlatform().equals("gtk")) { //$NON-NLS-1$
+            getShell().addPaintListener(new PaintListener() {
+                public void paintControl(PaintEvent event) {
+                    Point cursorLoc = Display.getCurrent().getCursorLocation();
+                    if (!getShell().getBounds().contains(cursorLoc)) {
+                        // This must be run asynchronously. If not, other paint
+                        // listeners may attempt to paint on a disposed control.
+                        Display.getCurrent().asyncExec(new Runnable() {
+                            public void run() {
+                                if (isShowing())
+                                    getShell().setCapture(false);
+                                dispose();
+                            }
+                        });
+                    }
+                }
+            });
+        }
+    }
+
+    public static boolean isCurrent(EditPartTipHelper helper) {
+        return currentHelper != null && helper == currentHelper;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/GroupEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/GroupEditPart.java
new file mode 100644 (file)
index 0000000..54a5098
--- /dev/null
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.Border;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.LayoutManager;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.PaletteColorUtil;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteContainer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerPreferences;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteEditPart;
+
+
+public class GroupEditPart extends PaletteEditPart {
+
+    /** Scrollpane border constant for icon and column layout mode **/
+    private static final Border SCROLL_PANE_BORDER = new MarginBorder(2, 2, 2,
+                                                                      2);
+
+    /** Scrollpane border constant for list and details layout mode **/
+    private static final Border SCROLL_PANE_LIST_BORDER = new MarginBorder(2,
+                                                                           0, 2, 0);
+
+    private int cachedLayout = -1;
+
+    public GroupEditPart(PaletteContainer group) {
+        super(group);
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
+     */
+    public IFigure createFigure() {
+        Figure figure = new Figure();
+        figure.setOpaque(true);
+        figure.setBackgroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+        return figure;
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
+     */
+    protected void refreshVisuals() {
+        int layout = getLayoutSetting();
+        if (cachedLayout == layout)
+            return;
+        cachedLayout = layout;
+        LayoutManager manager;
+        if (layout == PaletteViewerPreferences.LAYOUT_COLUMNS) {
+            manager = new ColumnsLayout();
+            getContentPane().setBorder(SCROLL_PANE_BORDER);
+        } else if (layout == PaletteViewerPreferences.LAYOUT_ICONS) {
+            PaletteContainerFlowLayout flow = new PaletteContainerFlowLayout();
+            flow.setMajorSpacing(0);
+            flow.setMinorSpacing(0);
+            manager = flow;
+            getContentPane().setBorder(SCROLL_PANE_BORDER);
+        } else {
+            manager = new ToolbarLayout();
+            getContentPane().setBorder(SCROLL_PANE_LIST_BORDER);
+        }
+        getContentPane().setLayoutManager(manager);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/IPaletteStackEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/IPaletteStackEditPart.java
new file mode 100644 (file)
index 0000000..1fcfeca
--- /dev/null
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteEditPart;
+
+
+/**
+ * An interface to define the common behavior between all palette stack editparts (i.e. the type on
+ * the palette toolbar and the type in a drawer or group on the palette pane).
+ * 
+ * @author crevells
+ * @since 3.4
+ */
+public interface IPaletteStackEditPart {
+
+    /**
+     * Opens/expands the palette stack.
+     */
+    void openMenu();
+
+    /**
+     * Returns the active palette entry editpart in the stack.
+     * 
+     * @return the active part
+     */
+    PaletteEditPart getActiveEntry();
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/OverlayScrollPaneLayout.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/OverlayScrollPaneLayout.java
new file mode 100644 (file)
index 0000000..6a3cabd
--- /dev/null
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.ScrollBar;
+import org.eclipse.draw2d.ScrollPane;
+import org.eclipse.draw2d.ScrollPaneLayout;
+import org.eclipse.draw2d.Viewport;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+
+public class OverlayScrollPaneLayout extends ScrollPaneLayout {
+
+    /**
+     * {@inheritDoc} In OverlayScrollPane, scrollbars are overlayed on top of the Viewport, so the
+     * preferred size is just the Viewports preferred size.
+     * 
+     * @since 2.0
+     */
+    protected Dimension calculatePreferredSize(IFigure container, int wHint,
+                                               int hHint) {
+        ScrollPane scrollpane = (ScrollPane) container;
+        Insets insets = scrollpane.getInsets();
+
+        int excludedWidth = insets.getWidth();
+        int excludedHeight = insets.getHeight();
+
+        return scrollpane
+                .getViewport()
+                .getPreferredSize(wHint - excludedWidth, hHint - excludedHeight)
+                .getExpanded(excludedWidth, excludedHeight);
+    }
+
+    /** {@inheritDoc} */
+    public void layout(IFigure parent) {
+        ScrollPane scrollpane = (ScrollPane) parent;
+        Rectangle clientArea = parent.getClientArea();
+
+        ScrollBar hBar = scrollpane.getHorizontalScrollBar(), vBar = scrollpane
+                .getVerticalScrollBar();
+        Viewport viewport = scrollpane.getViewport();
+
+        Insets insets = new Insets();
+        insets.bottom = hBar.getPreferredSize(clientArea.width,
+                                              clientArea.height).height;
+        insets.right = vBar.getPreferredSize(clientArea.width,
+                                             clientArea.height).width;
+
+        int hVis = scrollpane.getHorizontalScrollBarVisibility(), vVis = scrollpane
+                .getVerticalScrollBarVisibility();
+
+        Dimension available = clientArea.getSize(), preferred = viewport
+                .getPreferredSize(available.width, available.height).getCopy();
+
+        boolean none = available.contains(preferred), both = !none
+                && vVis != NEVER && hVis != NEVER
+                && preferred.contains(available), showV = both
+                        || preferred.height > available.height,
+                showH = both
+                        || preferred.width > available.width;
+
+        // Adjust for visibility override flags
+        showV = !(vVis == NEVER) && (showV || vVis == ALWAYS);
+        showH = !(hVis == NEVER) && (showH || hVis == ALWAYS);
+
+        if (!showV)
+            insets.right = 0;
+        if (!showH)
+            insets.bottom = 0;
+        Rectangle bounds, viewportArea = clientArea;
+
+        if (showV) {
+            bounds = new Rectangle(viewportArea.right() - insets.right,
+                                   viewportArea.y, insets.right, viewportArea.height);
+            vBar.setBounds(bounds);
+            // vBar.setMaximum(preferred.height);
+        }
+        if (showH) {
+            bounds = new Rectangle(viewportArea.x, viewportArea.bottom()
+                    - insets.bottom, viewportArea.width, insets.bottom);
+            hBar.setBounds(bounds);
+            // hBar.setMaximum(preferred.width);
+        }
+        vBar.setVisible(showV);
+        hBar.setVisible(showH);
+        viewport.setBounds(viewportArea);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PaletteContainerFlowLayout.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PaletteContainerFlowLayout.java
new file mode 100644 (file)
index 0000000..b564e21
--- /dev/null
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import java.util.List;
+
+import org.eclipse.draw2d.FlowLayout;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+
+/**
+ * Extends <code>FlowLayout</code> to allow the pane of a pinnable stack in icon mode to occupy the
+ * row following the row in which the icon of the palette stack header appears.
+ * 
+ * @author crevells
+ * @since 3.4
+ */
+public class PaletteContainerFlowLayout extends FlowLayout {
+
+    /**
+     * Constructs a PaletteContainerFlowLayout with horizontal orientation.
+     */
+    public PaletteContainerFlowLayout() {
+    }
+
+    /**
+     * Constructs a PaletteContainerFlowLayout whose orientation is given in the input.
+     * 
+     * @param isHorizontal
+     *            <code>true</code> if the layout should be horizontal
+     */
+    public PaletteContainerFlowLayout(boolean isHorizontal) {
+        setHorizontal(isHorizontal);
+    }
+
+    /**
+     * Overridden to include the size of the expanded pane of an expanded pinnable palette stack.
+     * 
+     * @see org.eclipse.draw2d.AbstractLayout#calculatePreferredSize(IFigure, int, int)
+     */
+    protected Dimension calculatePreferredSize(IFigure container, int wHint,
+                                               int hHint) {
+
+        Dimension prefSize = super.calculatePreferredSize(container, wHint,
+                                                          hHint);
+
+        List children = container.getChildren();
+        IFigure child;
+
+        // Build the sizes for each row, and update prefSize accordingly
+        Dimension expandedPaneSize = null;
+        for (int i = 0; i < children.size(); i++) {
+            child = (IFigure) children.get(i);
+
+            if (child instanceof PinnablePaletteStackFigure
+                    && ((PinnablePaletteStackFigure) child).isExpanded()) {
+
+                // Subtract out the insets from the hints
+                if (wHint > -1)
+                    wHint = Math.max(0, wHint
+                            - container.getInsets().getWidth());
+                if (hHint > -1)
+                    hHint = Math.max(0, hHint
+                            - container.getInsets().getHeight());
+
+                // Figure out the new hint that we are interested in based on
+                // the
+                // orientation. Ignore the other hint (by setting it to -1).
+                // NOTE:
+                // The children of the parent figure will then be asked to
+                // ignore
+                // that hint as well.
+                if (isHorizontal()) {
+                    hHint = -1;
+                } else {
+                    wHint = -1;
+                }
+
+                expandedPaneSize = ((PinnablePaletteStackFigure) child)
+                        .getExpandedContainerPreferredSize(wHint, hHint);
+
+                break; // there can only be one expanded stack
+            }
+        }
+
+        if (expandedPaneSize != null) {
+            // increment height to account for expanded stack
+            prefSize.height += transposer.t(expandedPaneSize).height;
+            prefSize.union(getBorderPreferredSize(container));
+        }
+
+        return prefSize;
+    }
+
+    /**
+     * Overridden to handle <code>PinnablePaletteStackFigure</code>.
+     * 
+     * @see FlowLayout#getChildSize(IFigure, int, int)
+     */
+    protected Dimension getChildSize(IFigure child, int wHint, int hHint) {
+        if (child instanceof PinnablePaletteStackFigure) {
+            return ((PinnablePaletteStackFigure) child).getHeaderPreferredSize(
+                                                                               wHint, hHint);
+        } else {
+            return child.getPreferredSize(wHint, hHint);
+        }
+    }
+
+    /**
+     * Overridden to include the size of the expanded pane of an expanded pinnable palette stack
+     * during the layout.
+     * 
+     * @see FlowLayout#layoutRow(IFigure)
+     */
+    protected void layoutRow(IFigure parent) {
+        int majorAdjustment = 0;
+        int minorAdjustment = 0;
+        int correctMajorAlignment = majorAlignment;
+        int correctMinorAlignment = minorAlignment;
+
+        majorAdjustment = data.area.width - data.rowWidth + getMinorSpacing();
+
+        switch (correctMajorAlignment) {
+            case ALIGN_LEFTTOP:
+                majorAdjustment = 0;
+                break;
+            case ALIGN_CENTER:
+                majorAdjustment /= 2;
+                break;
+            case ALIGN_RIGHTBOTTOM:
+                break;
+        }
+
+        int expandedPaneHeight = 0;
+        for (int j = 0; j < data.rowCount; j++) {
+            if (fill) {
+                data.bounds[j].height = data.rowHeight;
+            } else {
+                minorAdjustment = data.rowHeight - data.bounds[j].height;
+                switch (correctMinorAlignment) {
+                    case ALIGN_LEFTTOP:
+                        minorAdjustment = 0;
+                        break;
+                    case ALIGN_CENTER:
+                        minorAdjustment /= 2;
+                        break;
+                    case ALIGN_RIGHTBOTTOM:
+                        break;
+                }
+                data.bounds[j].y += minorAdjustment;
+            }
+            data.bounds[j].x += majorAdjustment;
+
+            IFigure child = data.row[j];
+            setBoundsOfChild(parent, data.row[j], transposer.t(data.bounds[j]));
+
+            if (child instanceof PinnablePaletteStackFigure
+                    && ((PinnablePaletteStackFigure) child).isExpanded()) {
+
+                int wHint = -1;
+                int hHint = -1;
+                if (isHorizontal())
+                    wHint = parent.getClientArea().width;
+                else
+                    hHint = parent.getClientArea().height;
+
+                expandedPaneHeight = ((PinnablePaletteStackFigure) child)
+                        .getExpandedContainerPreferredSize(wHint, hHint).height;
+                child.setBounds(new Rectangle(data.area.x, data.area.y
+                        + data.rowY, data.area.width, data.rowHeight
+                                + expandedPaneHeight));
+            }
+        }
+        data.rowY += getMajorSpacing() + data.rowHeight + expandedPaneHeight;
+        initRow();
+    }
+
+    /**
+     * Overridden to set the bounds for <code>PinnablePaletteStackFigures</code> .
+     * 
+     * @see FlowLayout#setBoundsOfChild(IFigure, IFigure, Rectangle)
+     */
+    protected void setBoundsOfChild(IFigure parent, IFigure child,
+                                    Rectangle bounds) {
+
+        if (child instanceof PinnablePaletteStackFigure
+                && ((PinnablePaletteStackFigure) child).isExpanded()) {
+            parent.getClientArea(Rectangle.SINGLETON);
+            bounds.translate(Rectangle.SINGLETON.x, Rectangle.SINGLETON.y);
+            ((PinnablePaletteStackFigure) child)
+                    .setHeaderBoundsLayoutHint(bounds);
+        } else {
+            super.setBoundsOfChild(parent, child, bounds);
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PaletteScrollBar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PaletteScrollBar.java
new file mode 100644 (file)
index 0000000..8a083d7
--- /dev/null
@@ -0,0 +1,273 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   1) update package name
+ *   2) apply new UI
+ *      - update UI category's scrolling button (color, dimension)
+ *      - The scrollbar's triangle widgets changed into the images.
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.BorderLayout;
+import org.eclipse.draw2d.Clickable;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RangeModel;
+import org.eclipse.draw2d.ScrollBar;
+import org.eclipse.draw2d.ScrollBarLayout;
+import org.eclipse.draw2d.Toggle;
+import org.eclipse.draw2d.TreeSearch;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.PaletteData;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.PaletteColorUtil;
+import org.tizen.efluibuilder.ui.editor.palette.internal.ArrowButton;
+
+
+public final class PaletteScrollBar extends ScrollBar {
+
+    /* ECLIPSE { */
+    // private static final PointList OUTER_DOWN_TRIANGLE = new PointList(3);
+    // private static final PointList INNER_DOWN_TRIANGLE = new PointList(3);
+    // private static final PointList OUTER_UP_TRIANGLE = new PointList(3);
+    // private static final PointList INNER_UP_TRIANGLE = new PointList(3);
+
+    // public static final int BUTTON_HEIGHT = 7;
+    /* ECLIPSE } */
+
+    /* TIZEN: update UI: modify scrolling button's height { */
+    public static final int BUTTON_HEIGHT = 10;
+    // these are figure for image figures
+    private ArrowButton arrowButtonUp, arrowButtonDown;
+    /* TIZEN } */
+    private static final int BUTTON_WIDTH = 76;
+
+    private static final int SCROLL_TIME = 200;
+
+    private static final Image TRANSPARENCY;
+
+    static {
+        Display display = Display.getCurrent();
+        PaletteData pData = new PaletteData(0xFF, 0xFF00, 0xFF0000);
+        RGB rgb = display.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW)
+                .getRGB();
+        int fillColor = pData.getPixel(rgb);
+        ImageData iData = new ImageData(1, 1, 24, pData);
+        iData.setPixel(0, 0, fillColor);
+        iData.setAlpha(0, 0, 200);
+        TRANSPARENCY = new Image(display, iData);
+
+        /* ECLIPSE { */
+        // OUTER_DOWN_TRIANGLE.addPoint(new Point(34, 2));
+        // OUTER_DOWN_TRIANGLE.addPoint(new Point(38, 6));
+        // OUTER_DOWN_TRIANGLE.addPoint(new Point(42, 2));
+
+        // INNER_DOWN_TRIANGLE.addPoint(new Point(35, 2));
+        // INNER_DOWN_TRIANGLE.addPoint(new Point(37, 5));
+        // INNER_DOWN_TRIANGLE.addPoint(new Point(41, 2));
+
+        // OUTER_UP_TRIANGLE.addPoint(new Point(33, 5));
+        // OUTER_UP_TRIANGLE.addPoint(new Point(38, 0));
+        // OUTER_UP_TRIANGLE.addPoint(new Point(42, 5));
+
+        // INNER_UP_TRIANGLE.addPoint(new Point(34, 5));
+        // INNER_UP_TRIANGLE.addPoint(new Point(38, 1));
+        // INNER_UP_TRIANGLE.addPoint(new Point(42, 5));
+        /* ECLIPSE } */
+    }
+
+//    protected Label downLabel;
+//
+//    protected Label upLabel;
+
+    public PaletteScrollBar() {
+        super();
+    }
+
+    public boolean containsPoint(int x, int y) {
+        return findDescendantAtExcluding(x, y, IdentitySearch.INSTANCE) != null;
+    }
+
+    protected Clickable createDefaultDownButton() {
+        arrowButtonDown = new ArrowButton(ArrowButton.DIRECTION_DOWN);
+        return createTransparentArrowButton(true);
+    }
+
+    protected Clickable createDefaultUpButton() {
+        arrowButtonUp = new ArrowButton(ArrowButton.DIRECTION_UP);
+        return createTransparentArrowButton(false);
+    }
+
+    /**
+     * Creates the figure used for the scrollbar button.
+     * 
+     * @param down
+     *            true if the arrow should be pointing down; false, if it should be pointing up.
+     * @return a new <code>Toggle</code> figure for the scroll bar button
+     */
+    private Toggle createTransparentArrowButton(final boolean down) {
+        Toggle button = new Toggle() {
+            protected void paintFigure(Graphics g) {
+                // paint background
+                if (!getModel().isMouseOver())
+                    g.drawImage(TRANSPARENCY, new Rectangle(0, 0, 1, 1),
+                                getBounds());
+                else {
+                    g.setBackgroundColor(getModel().isArmed() ? PaletteColorUtil
+                            .getSelectedColor() : PaletteColorUtil
+                                    .getHoverColor());
+                    g.fillRectangle(getBounds());
+                }
+
+                // paint triangle
+                g.translate(getLocation());
+                /* ECLIPSE { */
+                // PointList outerPoints = transpose(down ? OUTER_DOWN_TRIANGLE
+                // : OUTER_UP_TRIANGLE);
+                // PointList innerPoints = transpose(down ? INNER_DOWN_TRIANGLE
+                // : INNER_UP_TRIANGLE);
+                // g.setBackgroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+                // g.fillPolygon(outerPoints);
+                // g.setBackgroundColor(PaletteColorUtil.WIDGET_DARK_SHADOW);
+                // g.fillPolygon(innerPoints);
+                /* ECLIPSE } */
+                g.translate(getLocation().getNegated());
+            }
+        };
+
+        /* TIZEN : The scrollbar's triangle widgets changed into the images { */
+
+        ArrowButton arrowButton = (down) ? arrowButtonDown : arrowButtonUp;
+        arrowButton.setPreferredSize(ArrowButton.TRIANGLE_SIZE * 2 + 2,
+                                     ArrowButton.TRIANGLE_SIZE);
+        button.setLayoutManager(new BorderLayout());
+        button.add(arrowButton, BorderLayout.CENTER);
+        arrowButton.setLayout();
+        /* TIZEN } */
+        button.setRolloverEnabled(true);
+        button.setRequestFocusEnabled(false);
+        return button;
+    }
+
+    /**
+     * Transposes a list of points using the <code>transposer</code>.
+     * 
+     * @param origPoints
+     *            the original list of points
+     * @return a new list of transposed points
+     */
+    /* ECLIPSE { : never used */
+    // private PointList transpose(PointList origPoints) {
+    // PointList transposedPoints = new PointList(origPoints.size());
+    // for (int i = 0; i < origPoints.size(); i++) {
+    // transposedPoints.addPoint(transposer.t(origPoints.getPoint(i)));
+    // }
+    // return transposedPoints;
+    // }
+    /* ECLIPSE } */
+
+    public IFigure findFigureAt(int x, int y, TreeSearch search) {
+        IFigure result = super.findFigureAt(x, y, search);
+        if (result != this)
+            return result;
+        return null;
+    }
+
+    public Dimension getPreferredSize(int wHint, int hHint) {
+        return new Dimension(wHint, hHint);
+    }
+
+    protected void initialize() {
+        super.initialize();
+        setLayoutManager(new ScrollBarLayout(transposer) {
+            protected Rectangle layoutButtons(ScrollBar scrollBar) {
+                Rectangle bounds = transposer.t(scrollBar.getClientArea());
+                Dimension buttonSize = new Dimension(BUTTON_WIDTH,
+                                                     BUTTON_HEIGHT);
+
+                getButtonUp().setBounds(
+                                        transposer.t(new Rectangle(bounds.getTop()
+                                                .getTranslated(-(buttonSize.width / 2), 0),
+                                                                   buttonSize)));
+                Rectangle r = new Rectangle(bounds.getBottom().getTranslated(
+                                                                             -(buttonSize.width / 2), -buttonSize.height),
+                                            buttonSize);
+                getButtonDown().setBounds(transposer.t(r));
+                Rectangle trackBounds = bounds.getCropped(new Insets(
+                                                                     buttonSize.height, 0, buttonSize.height, 0));
+                RangeModel model = scrollBar.getRangeModel();
+                getButtonUp()
+                        .setVisible(model.getValue() != model.getMinimum());
+                getButtonDown().setVisible(
+                                           model.getValue() != model.getMaximum()
+                                                   - model.getExtent());
+                return trackBounds;
+            }
+        });
+        setPageUp(null);
+        setPageDown(null);
+        setThumb(null);
+        setOpaque(false);
+    }
+
+    protected void stepDown() {
+        timedStep(false);
+    }
+
+    protected void stepUp() {
+        timedStep(true);
+    }
+
+    protected void timedStep(boolean up) {
+        int increment = Math.max(getExtent() * 1 / 2, getStepIncrement());
+        int value = getValue();
+        long startTime = System.currentTimeMillis();
+        long elapsedTime = System.currentTimeMillis() - startTime;
+        while (elapsedTime < SCROLL_TIME) {
+            int step = (int) (increment * elapsedTime / SCROLL_TIME);
+            step = up ? value - step : value + step;
+            setValue(step);
+            getUpdateManager().performUpdate();
+            elapsedTime = System.currentTimeMillis() - startTime;
+        }
+    }
+
+//    protected void updateDownLabel() {
+//        getButtonDown().setVisible(getValue() < (getMaximum() - getExtent()));
+//    }
+//
+//    protected void updateUpLabel() {
+//        getButtonUp().setVisible(getValue() > getMinimum());
+//    }
+
+    public void dispose() {
+        if (arrowButtonUp != null) {
+            getButtonUp().remove(arrowButtonUp);
+            arrowButtonUp.dispose();
+            arrowButtonUp = null;
+        }
+        if (arrowButtonDown != null) {
+            getButtonDown().remove(arrowButtonDown);
+            arrowButtonDown.dispose();
+            arrowButtonDown = null;
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PaletteStackEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PaletteStackEditPart.java
new file mode 100644 (file)
index 0000000..1935df3
--- /dev/null
@@ -0,0 +1,416 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import java.beans.PropertyChangeEvent;
+import java.util.Iterator;
+
+import org.eclipse.draw2d.ActionEvent;
+import org.eclipse.draw2d.ActionListener;
+import org.eclipse.draw2d.Border;
+import org.eclipse.draw2d.BorderLayout;
+import org.eclipse.draw2d.ButtonBorder;
+import org.eclipse.draw2d.ButtonModel;
+import org.eclipse.draw2d.ChangeEvent;
+import org.eclipse.draw2d.ChangeListener;
+import org.eclipse.draw2d.Clickable;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.swt.events.MenuEvent;
+import org.eclipse.swt.events.MenuListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteListener;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteStack;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.ToolEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.actions.SetActivePaletteToolAction;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteEditPart;
+
+
+/**
+ * The EditPart for a PaletteStack to be used on the toolbar.
+ * 
+ * @author Whitney Sorenson
+ * @since 3.0
+ */
+public class PaletteStackEditPart extends PaletteEditPart implements
+        IPaletteStackEditPart {
+
+    private static final Dimension EMPTY_DIMENSION = new Dimension(0, 0);
+
+    // listen to changes of clickable tool figure
+    private ChangeListener clickableListener = new ChangeListener() {
+        public void handleStateChanged(ChangeEvent event) {
+            if (event.getPropertyName().equals(ButtonModel.MOUSEOVER_PROPERTY))
+                arrowFigure.getModel().setMouseOver(
+                                                    activeFigure.getModel().isMouseOver());
+            else if (event.getPropertyName().equals(ButtonModel.ARMED_PROPERTY))
+                arrowFigure.getModel().setArmed(
+                                                activeFigure.getModel().isArmed());
+        }
+    };
+
+    // listen to changes of arrow figure
+    private ChangeListener clickableArrowListener = new ChangeListener() {
+        public void handleStateChanged(ChangeEvent event) {
+            if (event.getPropertyName().equals(ButtonModel.MOUSEOVER_PROPERTY))
+                activeFigure.getModel().setMouseOver(
+                                                     arrowFigure.getModel().isMouseOver());
+            if (event.getPropertyName().equals(ButtonModel.ARMED_PROPERTY))
+                activeFigure.getModel().setArmed(
+                                                 arrowFigure.getModel().isArmed());
+        }
+    };
+
+    // listen to see if arrow is pressed
+    private ActionListener actionListener = new ActionListener() {
+        public void actionPerformed(ActionEvent event) {
+            openMenu();
+        }
+    };
+
+    // listen to see if active tool is changed in palette
+    private PaletteListener paletteListener = new PaletteListener() {
+        public void activeToolChanged(PaletteViewer palette, ToolEntry tool) {
+            if (getStack().getChildren().contains(tool)) {
+                if (!arrowFigure.getModel().isSelected())
+                    arrowFigure.getModel().setSelected(true);
+                if (!getStack().getActiveEntry().equals(tool))
+                    getStack().setActiveEntry(tool);
+            } else
+                arrowFigure.getModel().setSelected(false);
+        }
+    };
+
+    private Clickable activeFigure;
+    private RolloverArrow arrowFigure;
+    private Figure contentsFigure;
+    private Menu menu;
+
+    /**
+     * Creates a new PaletteStackEditPart with the given PaletteStack as its model.
+     * 
+     * @param model
+     *            the PaletteStack to associate with this EditPart.
+     */
+    public PaletteStackEditPart(PaletteStack model) {
+        super(model);
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPart#activate()
+     */
+    public void activate() {
+        // in case the model is out of sync
+        checkActiveEntrySync();
+        getPaletteViewer().addPaletteListener(paletteListener);
+        super.activate();
+    }
+
+    /**
+     * Called when the active entry has changed.
+     * 
+     * @param oldValue
+     *            the old model value (can be null)
+     * @param newValue
+     *            the new model value (can be null)
+     */
+    private void activeEntryChanged(Object oldValue, Object newValue) {
+        GraphicalEditPart part = null;
+        Clickable clickable = null;
+
+        if (newValue != null) {
+            part = (GraphicalEditPart) getViewer().getEditPartRegistry().get(
+                                                                             newValue);
+            clickable = (Clickable) part.getFigure();
+            clickable.setVisible(true);
+            clickable.addChangeListener(clickableListener);
+            activeFigure = clickable;
+        } else {
+            activeFigure = null;
+        }
+
+        if (oldValue != null) {
+            part = (GraphicalEditPart) getViewer().getEditPartRegistry().get(
+                                                                             oldValue);
+            // if part is null, its no longer a child.
+            if (part != null) {
+                clickable = (Clickable) part.getFigure();
+                clickable.setVisible(false);
+                clickable.removeChangeListener(clickableListener);
+            }
+        }
+    }
+
+    private void checkActiveEntrySync() {
+        if (activeFigure == null)
+            activeEntryChanged(null, getStack().getActiveEntry());
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
+     */
+    public IFigure createFigure() {
+
+        Figure figure = new Figure() {
+            public Dimension getPreferredSize(int wHint, int hHint) {
+                if (PaletteStackEditPart.this.getChildren().isEmpty())
+                    return EMPTY_DIMENSION;
+                return super.getPreferredSize(wHint, hHint);
+            }
+        };
+        figure.setLayoutManager(new BorderLayout());
+
+        contentsFigure = new Figure();
+        StackLayout stackLayout = new StackLayout();
+        // make it so the stack layout does not allow the invisible figures to
+        // contribute
+        // to its bounds
+        stackLayout.setObserveVisibility(true);
+        contentsFigure.setLayoutManager(stackLayout);
+        figure.add(contentsFigure, BorderLayout.CENTER);
+
+        arrowFigure = new RolloverArrow();
+        arrowFigure.addChangeListener(clickableArrowListener);
+        arrowFigure.addActionListener(actionListener);
+        figure.add(arrowFigure, BorderLayout.RIGHT);
+
+        return figure;
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPart#deactivate()
+     */
+    public void deactivate() {
+        if (activeFigure != null)
+            activeFigure.removeChangeListener(clickableListener);
+        arrowFigure.removeActionListener(actionListener);
+        arrowFigure.removeChangeListener(clickableArrowListener);
+        getPaletteViewer().removePaletteListener(paletteListener);
+        super.deactivate();
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPart#eraseTargetFeedback(org.eclipse.gef.Request)
+     */
+    public void eraseTargetFeedback(Request request) {
+        Iterator children = getChildren().iterator();
+
+        while (children.hasNext()) {
+            PaletteEditPart part = (PaletteEditPart) children.next();
+            part.eraseTargetFeedback(request);
+        }
+        super.eraseTargetFeedback(request);
+    }
+
+    /**
+     * @see org.eclipse.gef.GraphicalEditPart#getContentPane()
+     */
+    public IFigure getContentPane() {
+        return contentsFigure;
+    }
+
+    private PaletteStack getStack() {
+        return (PaletteStack) getModel();
+    }
+
+    /**
+     * Opens the menu to display the choices for the active entry.
+     */
+    public void openMenu() {
+        MenuManager menuManager = new MenuManager();
+
+        Iterator children = getChildren().iterator();
+        PaletteEditPart part = null;
+        PaletteEntry entry = null;
+        while (children.hasNext()) {
+            part = (PaletteEditPart) children.next();
+            entry = (PaletteEntry) part.getModel();
+
+            menuManager
+                    .add(new SetActivePaletteToolAction(getPaletteViewer(),
+                                                        entry.getLabel(), entry.getSmallIcon(), getStack()
+                                                                .getActiveEntry().equals(entry),
+                                                        (ToolEntry) entry));
+        }
+
+        menu = menuManager.createContextMenu(getPaletteViewer().getControl());
+
+        // make the menu open below the figure
+        Rectangle figureBounds = getFigure().getBounds().getCopy();
+        getFigure().translateToAbsolute(figureBounds);
+
+        Point menuLocation = getPaletteViewer().getControl().toDisplay(
+                                                                       figureBounds.getBottomLeft().x, figureBounds.getBottomLeft().y);
+
+        // remove feedback from the arrow Figure and children figures
+        arrowFigure.getModel().setMouseOver(false);
+        eraseTargetFeedback(new Request(RequestConstants.REQ_SELECTION));
+
+        menu.setLocation(menuLocation);
+        menu.addMenuListener(new StackMenuListener(menu, getViewer()
+                .getControl().getDisplay()));
+        menu.setVisible(true);
+    }
+
+    /**
+     * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
+     */
+    public void propertyChange(PropertyChangeEvent event) {
+        if (event.getPropertyName().equals(PaletteStack.PROPERTY_ACTIVE_ENTRY))
+            activeEntryChanged(event.getOldValue(), event.getNewValue());
+        else
+            super.propertyChange(event);
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractEditPart#refreshChildren()
+     */
+    protected void refreshChildren() {
+        super.refreshChildren();
+        checkActiveEntrySync();
+        Iterator children = getChildren().iterator();
+        while (children.hasNext()) {
+            PaletteEditPart editPart = (PaletteEditPart) children.next();
+            if (!editPart.getFigure().equals(activeFigure))
+                editPart.getFigure().setVisible(false);
+        }
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPart#showTargetFeedback(org.eclipse.gef.Request)
+     */
+    public void showTargetFeedback(Request request) {
+        // if menu is showing, don't show feedback. this is a fix
+        // for the occasion when show is called after forced erase
+        if (menu != null && !menu.isDisposed() && menu.isVisible())
+            return;
+
+        Iterator children = getChildren().iterator();
+        while (children.hasNext()) {
+            PaletteEditPart part = (PaletteEditPart) children.next();
+            part.showTargetFeedback(request);
+        }
+
+        super.showTargetFeedback(request);
+    }
+
+    public PaletteEditPart getActiveEntry() {
+        return (PaletteEditPart) getViewer().getEditPartRegistry().get(
+                                                                       getStack().getActiveEntry());
+    }
+
+}
+
+
+class StackMenuListener implements MenuListener {
+
+    private Menu menu;
+    private Display d;
+
+    /**
+     * Creates a new listener to listen to the menu that it used to select the active tool on a
+     * stack. Disposes the stack with an asyncExec after hidden is called.
+     */
+    StackMenuListener(Menu menu, Display d) {
+        this.menu = menu;
+        this.d = d;
+    }
+
+    /**
+     * @see org.eclipse.swt.events.MenuListener#menuShown(org.eclipse.swt.events.MenuEvent)
+     */
+    public void menuShown(MenuEvent e) {
+    }
+
+    /**
+     * @see org.eclipse.swt.events.MenuListener#menuHidden(org.eclipse.swt.events.MenuEvent)
+     */
+    public void menuHidden(MenuEvent e) {
+        d.asyncExec(new Runnable() {
+            public void run() {
+                if (menu != null) {
+                    if (!menu.isDisposed())
+                        menu.dispose();
+                    menu = null;
+                }
+            }
+        });
+    }
+
+}
+
+
+class RolloverArrow extends Clickable {
+
+    private static final Border BORDER_TOGGLE = new ButtonBorder(
+                                                                 ButtonBorder.SCHEMES.TOOLBAR);
+
+    /**
+     * Creates a new Clickable that paints a triangle figure.
+     */
+    RolloverArrow() {
+        super();
+        setRolloverEnabled(true);
+        setBorder(BORDER_TOGGLE);
+        setBackgroundColor(ColorConstants.black);
+        setOpaque(false);
+        setPreferredSize(11, -1);
+    }
+
+    /**
+     * @return false so that the focus rectangle is not drawn.
+     */
+    public boolean hasFocus() {
+        return false;
+    }
+
+    public void paintFigure(Graphics graphics) {
+        Rectangle rect = getClientArea();
+
+        graphics.translate(getLocation());
+
+        // fill the arrow
+        int[] points = new int[8];
+
+        points[0] = 3;
+        points[1] = rect.height / 2;
+        points[2] = 8;
+        points[3] = rect.height / 2;
+        points[4] = 5;
+        points[5] = 3 + rect.height / 2;
+        points[6] = 3;
+        points[7] = rect.height / 2;
+
+        graphics.fillPolygon(points);
+
+        graphics.translate(getLocation().getNegated());
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PinFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PinFigure.java
new file mode 100644 (file)
index 0000000..2a5d63b
--- /dev/null
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.Border;
+import org.eclipse.draw2d.ButtonModel;
+import org.eclipse.draw2d.ChangeEvent;
+import org.eclipse.draw2d.ChangeListener;
+import org.eclipse.draw2d.FigureUtilities;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.ImageFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.Toggle;
+import org.eclipse.gef.internal.InternalImages;
+import org.eclipse.gef.internal.ui.palette.PaletteColorUtil;
+import org.eclipse.gef.ui.palette.PaletteMessages;
+import org.eclipse.swt.graphics.Color;
+
+
+/**
+ * This is the figure for the pinned and unpinned toggle.
+ * 
+ * @author crevells
+ * @since 3.4
+ */
+public class PinFigure extends Toggle {
+
+    private static final Color PIN_HOTSPOT_COLOR = FigureUtilities.mixColors(
+                                                                             PaletteColorUtil.WIDGET_LIST_BACKGROUND,
+                                                                             PaletteColorUtil.WIDGET_NORMAL_SHADOW, 0.60);
+
+    private static final Border TOOLTIP_BORDER = new MarginBorder(0, 2, 1, 0);
+
+    public PinFigure() {
+        super(new ImageFigure(InternalImages.get(InternalImages.IMG_UNPINNED)));
+        setRolloverEnabled(true);
+        setRequestFocusEnabled(false);
+        Label tooltip = new Label(PaletteMessages.TOOLTIP_PIN_FIGURE);
+        tooltip.setBorder(TOOLTIP_BORDER);
+        setToolTip(tooltip);
+        setOpaque(false);
+
+        addChangeListener(new ChangeListener() {
+
+            public void handleStateChanged(ChangeEvent e) {
+                if (e.getPropertyName().equals(ButtonModel.SELECTED_PROPERTY)) {
+                    if (isSelected()) {
+                        ((ImageFigure) (getChildren().get(0)))
+                                .setImage(InternalImages
+                                        .get(InternalImages.IMG_PINNED));
+                        ((Label) getToolTip())
+                                .setText(PaletteMessages.TOOLTIP_UNPIN_FIGURE);
+                    } else {
+                        ((ImageFigure) (getChildren().get(0)))
+                                .setImage(InternalImages
+                                        .get(InternalImages.IMG_UNPINNED));
+                        ((Label) getToolTip())
+                                .setText(PaletteMessages.TOOLTIP_PIN_FIGURE);
+                    }
+                }
+            }
+        });
+    }
+
+    protected void paintFigure(Graphics graphics) {
+        super.paintFigure(graphics);
+
+        ButtonModel model = getModel();
+        if (isRolloverEnabled() && model.isMouseOver()) {
+            graphics.setBackgroundColor(PIN_HOTSPOT_COLOR);
+            graphics.fillRoundRectangle(getClientArea().getCopy().shrink(1, 1),
+                                        3, 3);
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PinnablePaletteStackEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PinnablePaletteStackEditPart.java
new file mode 100644 (file)
index 0000000..4196ed8
--- /dev/null
@@ -0,0 +1,237 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import java.beans.PropertyChangeEvent;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteListener;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteStack;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.ToolEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.IPinnableEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteEditPart;
+
+
+/**
+ * The EditPart for a pinnable PaletteStack to be used in a drawer or group. Some of this code has
+ * been take from <code>PaletteStackEditPart</code>, but they are significantly different to warrant
+ * two editpart classes.
+ * 
+ * @author Whitney Sorenson, crevells
+ * @since 3.4
+ */
+public class PinnablePaletteStackEditPart extends PaletteEditPart implements
+        IPaletteStackEditPart, IPinnableEditPart {
+
+    // listen to see if active tool is changed in the palette
+    private PaletteListener paletteListener = new PaletteListener() {
+
+        public void activeToolChanged(PaletteViewer palette, ToolEntry tool) {
+            if (!getStackFigure().isPinnedOpen()
+                    && getStack().getChildren().contains(tool)) {
+                if (!getStack().getActiveEntry().equals(tool)) {
+                    getStack().setActiveEntry(tool);
+                }
+            }
+            if (!getStackFigure().isPinnedOpen()) {
+                getStackFigure().setExpanded(false);
+            }
+        }
+    };
+
+    /**
+     * Creates a new PaletteStackEditPart with the given PaletteStack as its model.
+     * 
+     * @param model
+     *            the PaletteStack to associate with this EditPart.
+     */
+    public PinnablePaletteStackEditPart(PaletteStack model) {
+        super(model);
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPart#activate()
+     */
+    public void activate() {
+        // in case the model is out of sync
+        checkActiveEntrySync();
+        getPaletteViewer().addPaletteListener(paletteListener);
+        super.activate();
+    }
+
+    /**
+     * Called when the active entry has changed.
+     * 
+     * @param oldValue
+     *            the old model value (can be null)
+     * @param newValue
+     *            the new model value (can be null)
+     */
+    private void activeEntryChanged(Object oldValue, Object newValue) {
+        GraphicalEditPart part = null;
+        IFigure oldFigure = null;
+        IFigure newFigure = null;
+        int index = -1;
+
+        if (oldValue != null) {
+            part = (GraphicalEditPart) getViewer().getEditPartRegistry().get(
+                                                                             oldValue);
+            // if part is null, its no longer a child.
+            if (part != null) {
+                oldFigure = part.getFigure();
+
+                // preserve the original order of the palette stack children
+                index = getModelChildren().indexOf(part.getModel());
+            }
+        }
+
+        if (newValue != null) {
+            part = (GraphicalEditPart) getViewer().getEditPartRegistry().get(
+                                                                             newValue);
+            newFigure = part.getFigure();
+        }
+
+        getStackFigure().activeEntryChanged(oldFigure, index, newFigure);
+    }
+
+    private void checkActiveEntrySync() {
+        if (getStackFigure().getActiveFigure() == null)
+            activeEntryChanged(null, getStack().getActiveEntry());
+    }
+
+    public IFigure createFigure() {
+        return new PinnablePaletteStackFigure();
+    }
+
+    private PinnablePaletteStackFigure getStackFigure() {
+        return (PinnablePaletteStackFigure) getFigure();
+    }
+
+    public void deactivate() {
+        getPaletteViewer().removePaletteListener(paletteListener);
+        super.deactivate();
+    }
+
+    public void eraseTargetFeedback(Request request) {
+        Iterator children = getChildren().iterator();
+
+        while (children.hasNext()) {
+            PaletteEditPart part = (PaletteEditPart) children.next();
+            part.eraseTargetFeedback(request);
+        }
+        super.eraseTargetFeedback(request);
+    }
+
+    public IFigure getContentPane() {
+        // not completely accurate, but is there any other way?
+        return getStackFigure().getContentPane();
+    }
+
+    protected void removeChildVisual(EditPart childEditPart) {
+        IFigure child = ((GraphicalEditPart) childEditPart).getFigure();
+        getStackFigure().getContentPane(child).remove(child);
+    }
+
+    protected void addChild(EditPart childEP, int index) {
+        index = updateIndexBasedOnActiveFigure(index, childEP);
+        super.addChild(childEP, index);
+    }
+
+    protected void reorderChild(EditPart childEP, int index) {
+        IFigure childFigure = ((GraphicalEditPart) childEP).getFigure();
+        if (childFigure == getStackFigure().getActiveFigure()) {
+            // no need to reorder figures if this is the active figure
+            List children = getChildren();
+            children.remove(childEP);
+            children.add(index, childEP);
+        } else {
+            removeChildVisual(childEP);
+            List children = getChildren();
+            children.remove(childEP);
+            children.add(index, childEP);
+            index = updateIndexBasedOnActiveFigure(index, childEP);
+            addChildVisual(childEP, index);
+        }
+    }
+
+    private int updateIndexBasedOnActiveFigure(int index, EditPart childEP) {
+        for (int i = 0; i < index; i++) {
+            Object ep = getChildren().get(i);
+            if (((GraphicalEditPart) ep).getFigure() == getStackFigure()
+                    .getActiveFigure()) {
+                return index - 1;
+            }
+        }
+        return index;
+    }
+
+    private PaletteStack getStack() {
+        return (PaletteStack) getModel();
+    }
+
+    public void propertyChange(PropertyChangeEvent event) {
+        if (event.getPropertyName().equals(PaletteStack.PROPERTY_ACTIVE_ENTRY))
+            activeEntryChanged(event.getOldValue(), event.getNewValue());
+        else
+            super.propertyChange(event);
+    }
+
+    protected void refreshChildren() {
+        super.refreshChildren();
+        checkActiveEntrySync();
+    }
+
+    protected void refreshVisuals() {
+        getStackFigure().setLayoutMode(getLayoutSetting());
+    }
+
+    public void openMenu() {
+        setExpanded(true);
+    }
+
+    public void setExpanded(boolean value) {
+        getStackFigure().setExpanded(value);
+    }
+
+    public boolean isExpanded() {
+        return getStackFigure().isExpanded();
+    }
+
+    public boolean canBePinned() {
+        return isExpanded();
+    }
+
+    public boolean isPinnedOpen() {
+        return getStackFigure().isPinnedOpen();
+    }
+
+    public void setPinnedOpen(boolean pinned) {
+        getStackFigure().setPinned(pinned);
+    }
+
+    public PaletteEditPart getActiveEntry() {
+        return (PaletteEditPart) getViewer().getEditPartRegistry().get(
+                                                                       getStack().getActiveEntry());
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PinnablePaletteStackFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/PinnablePaletteStackFigure.java
new file mode 100644 (file)
index 0000000..17c5db3
--- /dev/null
@@ -0,0 +1,604 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import java.util.Iterator;
+
+import org.eclipse.draw2d.AbstractLayout;
+import org.eclipse.draw2d.Animation;
+import org.eclipse.draw2d.BorderLayout;
+import org.eclipse.draw2d.ButtonModel;
+import org.eclipse.draw2d.ChangeEvent;
+import org.eclipse.draw2d.ChangeListener;
+import org.eclipse.draw2d.Clickable;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.FlowLayout;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.Toggle;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.internal.ui.palette.PaletteColorUtil;
+import org.eclipse.gef.ui.palette.PaletteViewerPreferences;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.ToolEntryEditPart.ToolEntryToggle;
+
+
+/**
+ * A pinnable palette stack figure.
+ * 
+ * @author crevells
+ * @since 3.4
+ */
+public class PinnablePaletteStackFigure extends Figure {
+
+    private static final Dimension EMPTY_DIMENSION = new Dimension(0, 0);
+
+    static final int ARROW_WIDTH = 9;
+
+    /**
+     * A toggle with a triangle figure.
+     */
+    class RolloverArrow extends Toggle {
+
+        RolloverArrow() {
+            super();
+            setRolloverEnabled(true);
+            setBorder(null);
+            setOpaque(false);
+            setPreferredSize(ARROW_WIDTH, -1);
+        }
+
+        /**
+         * @return false so that the focus rectangle is not drawn.
+         */
+        public boolean hasFocus() {
+            return false;
+        }
+
+        public void paintFigure(Graphics graphics) {
+            Rectangle rect = getClientArea();
+
+            ButtonModel model = getModel();
+            if (isRolloverEnabled() && model.isMouseOver()) {
+                graphics.setBackgroundColor(PaletteColorUtil.ARROW_HOVER);
+                graphics.fillRoundRectangle(rect, 3, 3);
+            }
+
+            graphics.translate(getLocation());
+
+            // fill the arrow
+            int[] points = new int[8];
+
+            int middleY = rect.height / 2;
+            if (isSelected()
+                    || layoutMode == PaletteViewerPreferences.LAYOUT_ICONS
+                    || layoutMode == PaletteViewerPreferences.LAYOUT_COLUMNS) {
+                // pointing down
+                int startingX = (ARROW_WIDTH - 5) / 2; // triangle width = 5
+                points[0] = startingX;
+                points[1] = middleY;
+                points[2] = startingX + 5;
+                points[3] = middleY;
+                points[4] = startingX + 2;
+                points[5] = middleY + 3;
+                points[6] = startingX;
+                points[7] = middleY;
+            } else {
+                // pointing to the right
+                int startingX = (ARROW_WIDTH - 3) / 2; // triangle width = 3
+                points[0] = startingX;
+                points[1] = middleY - 2;
+                points[2] = startingX + 3;
+                points[3] = middleY + 1;
+                points[4] = startingX;
+                points[5] = middleY + 4;
+                points[6] = startingX;
+                points[7] = middleY - 2;
+            }
+
+            graphics.setBackgroundColor(PaletteColorUtil.WIDGET_DARK_SHADOW);
+            graphics.fillPolygon(points);
+
+            graphics.translate(getLocation().getNegated());
+        }
+    }
+
+    /**
+     * Layout manager for the palette stack header figure that handles the layout of the
+     * <code>headerFigure</code> (<code>arrowFigure</code> and the active tool figure) when in icons
+     * or columns layout mode.
+     */
+    private class HeaderIconLayout extends StackLayout {
+
+        protected boolean isSensitiveVertically(IFigure container) {
+            return false;
+        }
+
+        public void layout(IFigure parent) {
+
+            Rectangle r = parent.getClientArea();
+
+            if (activeToolFigure != null) {
+                activeToolFigure.setBounds(r);
+            }
+
+            // All tool figures have saved an area in its margin for the arrow
+            // figure in
+            // case that tool figure is in a stack (see the BORDER variables in
+            // ToolEntryEditPart). Calculate the arrow figure bounds by using
+            // the insets
+            // of the active tool figure.
+            r.x = r.right() - ToolEntryEditPart.ICON_HIGHLIGHT_INSETS.right
+                    - ARROW_WIDTH;
+            r.y += ToolEntryEditPart.ICON_HIGHLIGHT_INSETS.top;
+            r.width = ARROW_WIDTH;
+            r.height -= ToolEntryEditPart.ICON_HIGHLIGHT_INSETS.getHeight();
+            arrowFigure.setBounds(r);
+        }
+    }
+
+    /**
+     * Layout manager for the palette stack header figure that handles the layout of the
+     * <code>headerFigure</code> (<code>pinFigure</code>, <code>arrowFigure</code>, and the active
+     * tool figure) when in list or details layout mode.
+     */
+    private class HeaderListLayout extends StackLayout {
+
+        protected boolean isSensitiveVertically(IFigure container) {
+            return false;
+        }
+
+        protected Dimension calculatePreferredSize(IFigure parent, int wHint,
+                                                   int hHint) {
+            if (isExpanded()) {
+                Dimension pinSize = pinFigure.getSize();
+                Dimension preferredSize = super.calculatePreferredSize(parent,
+                                                                       wHint - pinSize.width, hHint);
+                preferredSize.width += pinSize.width;
+                return preferredSize;
+            } else {
+                return super.calculatePreferredSize(parent, wHint, hHint);
+            }
+        }
+
+        public void layout(IFigure parent) {
+
+            Rectangle r = parent.getClientArea();
+            Dimension pinSize = isExpanded() ? pinFigure.getPreferredSize()
+                    : EMPTY_DIMENSION;
+
+            // layout the pin figure
+            Rectangle.SINGLETON.setSize(pinSize);
+            Rectangle.SINGLETON.setLocation(r.right() - pinSize.width,
+                                            r.getCenter().y - (pinSize.height / 2));
+            pinFigure.setBounds(Rectangle.SINGLETON);
+
+            if (activeToolFigure != null) {
+                activeToolFigure.setBounds(r.getResized(-pinSize.width, 0));
+            }
+
+            // All tool figures have saved an area in its margin for the arrow
+            // figure in
+            // case that tool figure is in a stack (see the BORDER variables in
+            // ToolEntryEditPart). Calculate the arrow figure bounds by using
+            // the insets
+            // of the active tool figure.
+            r.x += ToolEntryEditPart.LIST_HIGHLIGHT_INSETS.left;
+            r.y += ToolEntryEditPart.LIST_HIGHLIGHT_INSETS.top;
+            r.width = ARROW_WIDTH;
+            r.height -= ToolEntryEditPart.LIST_HIGHLIGHT_INSETS.getHeight();
+            arrowFigure.setBounds(r);
+
+        }
+    }
+
+    /**
+     * Layout manager for the palette stack figure that handles the layout of the
+     * <code>headerFigure</code>, <code>expandablePane</code>, and <code>pinFigure</code> when in
+     * icons or columns layout mode.
+     */
+    private class PaletteStackIconLayout extends AbstractLayout {
+
+        protected Dimension calculatePreferredSize(IFigure parent, int wHint,
+                                                   int hHint) {
+            return parent.getSize();
+        }
+
+        public void layout(IFigure parent) {
+            if (isExpanded()) {
+                headerFigure.setBounds(headerBoundsLayoutHint);
+
+                Rectangle paneBounds = parent.getClientArea();
+                paneBounds.y += headerBoundsLayoutHint.height;
+                paneBounds.height -= headerBoundsLayoutHint.height;
+                expandablePane.setBounds(paneBounds);
+
+                Rectangle pinBounds = Rectangle.SINGLETON;
+                Dimension pinSize = pinFigure.getPreferredSize();
+                pinBounds.setSize(pinSize);
+                int pinFigureAreaHeight = expandablePane.getInsets().top;
+                pinBounds.setLocation(expandablePane.getClientArea().right()
+                        - pinSize.width,
+                                      (paneBounds.y + pinFigureAreaHeight / 2)
+                                              - (pinSize.height / 2));
+                pinFigure.setBounds(pinBounds);
+            } else {
+                headerFigure.setBounds(parent.getClientArea());
+            }
+        }
+    }
+
+    /**
+     * listens to selection events on the arrow figure
+     */
+    private ChangeListener clickableArrowListener = new ChangeListener() {
+
+        public void handleStateChanged(ChangeEvent event) {
+            Clickable clickable = (Clickable) event.getSource();
+            if (event.getPropertyName() == ButtonModel.MOUSEOVER_PROPERTY
+                    && getActiveFigure() instanceof ToolEntryToggle) {
+                ((ToolEntryToggle) getActiveFigure())
+                        .setShowHoverFeedback(clickable.getModel()
+                                .isMouseOver());
+            }
+            if (event.getPropertyName() == ButtonModel.SELECTED_PROPERTY) {
+
+                Animation.markBegin();
+                handleExpandStateChanged();
+                Animation.run(150);
+
+                // Now collapse other stacks when they are not pinned open or in
+                // the
+                // case of columns and icons layout mode (where only one stack
+                // can
+                // be expanded at a time for layout reasons).
+                if (isExpanded()) {
+                    boolean collapseOtherStacks =
+                            (layoutMode == PaletteViewerPreferences.LAYOUT_COLUMNS || layoutMode == PaletteViewerPreferences.LAYOUT_ICONS);
+
+                    for (Iterator iterator = getParent().getChildren()
+                            .iterator(); iterator.hasNext();) {
+                        Object childFigure = iterator.next();
+                        if (childFigure instanceof PinnablePaletteStackFigure
+                                && childFigure != PinnablePaletteStackFigure.this) {
+
+                            if (collapseOtherStacks
+                                    || (((PinnablePaletteStackFigure) childFigure)
+                                            .isExpanded() && !((PinnablePaletteStackFigure) childFigure)
+                                                    .isPinnedOpen())) {
+
+                                ((PinnablePaletteStackFigure) childFigure)
+                                        .setExpanded(false);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    };
+
+    private IFigure headerFigure;
+
+    private IFigure activeToolFigure;
+
+    private PinFigure pinFigure;
+
+    private RolloverArrow arrowFigure;
+
+    private IFigure expandablePane;
+
+    private int layoutMode = -1;
+
+    private Rectangle headerBoundsLayoutHint = new Rectangle();
+
+    public PinnablePaletteStackFigure() {
+        super();
+
+        arrowFigure = new RolloverArrow();
+        arrowFigure.addChangeListener(clickableArrowListener);
+
+        headerFigure = new Figure();
+        headerFigure.add(arrowFigure);
+
+        pinFigure = new PinFigure();
+        pinFigure.setBorder(new MarginBorder(0, 0, 0, 2));
+
+        expandablePane = new Figure();
+
+        add(headerFigure);
+    }
+
+    protected void paintFigure(Graphics g) {
+        super.paintFigure(g);
+
+        if (!isExpanded()) {
+            return;
+        }
+
+        Rectangle headerBounds = headerFigure.getBounds().getCopy();
+        Rectangle paneBounds = expandablePane.getClientArea();
+
+        // fill expandable pane background
+        g.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_40);
+        g.fillRectangle(paneBounds);
+
+        if (layoutMode == PaletteViewerPreferences.LAYOUT_ICONS
+                || layoutMode == PaletteViewerPreferences.LAYOUT_COLUMNS) {
+
+            int pinHeight = expandablePane.getInsets().top;
+            Rectangle pinAreaBounds = new Rectangle(paneBounds.x,
+                                                    expandablePane.getBounds().y, paneBounds.width, pinHeight);
+
+            // fill background colors
+            g.setForegroundColor(PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_40);
+            g.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_85);
+            g.fillGradient(headerBounds, true);
+
+            g.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_85);
+            g.fillRectangle(pinAreaBounds);
+
+            // draw white lines
+            g.setForegroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+            g.drawLine(headerBounds.getTopLeft().getTranslated(1, 1),
+                       headerBounds.getTopRight().getTranslated(-1, 1));
+            g.drawLine(headerBounds.getBottomLeft().getTranslated(1, 0),
+                       headerBounds.getTopLeft().getTranslated(1, 1));
+            g.drawLine(headerBounds.getBottomRight().getTranslated(-2, 0),
+                       headerBounds.getTopRight().getTranslated(-2, 1));
+
+            g.drawLine(pinAreaBounds.getTopLeft().getTranslated(0, 1),
+                       pinAreaBounds.getTopRight().getTranslated(-1, 1));
+            g.drawLine(pinAreaBounds.getBottomLeft().getTranslated(0, -2),
+                       pinAreaBounds.getBottomRight().getTranslated(-1, -2));
+
+            // draw grey border around the whole palette stack
+            PointList points = new PointList();
+            points.addPoint(headerBounds.getBottomLeft());
+            points.addPoint(headerBounds.getTopLeft().getTranslated(0, 2));
+            points.addPoint(headerBounds.getTopLeft().getTranslated(1, 1));
+            points.addPoint(headerBounds.getTopLeft().getTranslated(2, 0));
+            points.addPoint(headerBounds.getTopRight().getTranslated(-3, 0));
+            points.addPoint(headerBounds.getTopRight().getTranslated(-2, 1));
+            points.addPoint(headerBounds.getTopRight().getTranslated(-1, 2));
+            points.addPoint(headerBounds.getBottomRight().getTranslated(-1, 0));
+            points.addPoint(pinAreaBounds.getTopRight().getTranslated(-1, 0));
+            points.addPoint(paneBounds.getBottomRight().getTranslated(-1, -1));
+            points.addPoint(paneBounds.getBottomLeft().getTranslated(0, -1));
+            points.addPoint(pinAreaBounds.getTopLeft().getTranslated(0, 0));
+            points.addPoint(headerBounds.getBottomLeft());
+
+            g.setForegroundColor(PaletteColorUtil.WIDGET_BACKGROUND_NORMAL_SHADOW_40);
+            g.drawPolygon(points);
+
+            g.setForegroundColor(PaletteColorUtil.WIDGET_BACKGROUND_NORMAL_SHADOW_80);
+            Point pt = headerBounds.getTopLeft().getTranslated(0, 1);
+            g.drawPoint(pt.x, pt.y);
+            pt = headerBounds.getTopLeft().getTranslated(1, 0);
+            g.drawPoint(pt.x, pt.y);
+            pt = headerBounds.getTopRight().getTranslated(-2, 0);
+            g.drawPoint(pt.x, pt.y);
+            pt = headerBounds.getTopRight().getTranslated(-1, 1);
+            g.drawPoint(pt.x, pt.y);
+        } else {
+
+            // fill header background
+            g.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_85);
+            g.fillRectangle(headerBounds);
+
+            // draw top and bottom border lines of header figure
+            g.setForegroundColor(PaletteColorUtil.WIDGET_BACKGROUND_NORMAL_SHADOW_65);
+            g.drawLine(headerBounds.getTopLeft(), headerBounds.getTopRight());
+            g.setForegroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+            g.drawLine(headerBounds.getBottomLeft().getTranslated(0, -2),
+                       headerBounds.getBottomRight().getTranslated(0, -2));
+
+            // draw bottom border line of expandable pane
+            g.setForegroundColor(PaletteColorUtil.WIDGET_BACKGROUND_NORMAL_SHADOW_65);
+            g.drawLine(paneBounds.getBottomLeft().getTranslated(0, -1),
+                       paneBounds.getBottomRight().getTranslated(0, -1));
+        }
+
+    }
+
+    /**
+     * @return The content pane for this figure, i.e. the Figure to which children can be added.
+     */
+    public IFigure getContentPane(IFigure figure) {
+        if (figure == activeToolFigure) {
+            return headerFigure;
+        }
+        return getContentPane();
+    }
+
+    public IFigure getContentPane() {
+        return expandablePane;
+    }
+
+    public IFigure getActiveFigure() {
+        return activeToolFigure;
+    }
+
+    /**
+     * @return <code>true</code> if the palette stack is expanded
+     */
+    public boolean isExpanded() {
+        return arrowFigure.getModel().isSelected();
+    }
+
+    /**
+     * @return <code>true</code> if the palette stack is expanded and is pinned (i.e., it can't be
+     *         automatically collapsed)
+     */
+    public boolean isPinnedOpen() {
+        return isExpanded() && pinFigure.getModel().isSelected();
+    }
+
+    /**
+     * Pins or unpins the stack. The stack can be pinned open only when it is expanded. Attempts to
+     * pin it when it is collapsed will do nothing.
+     * 
+     * @param pinned
+     *            <code>true</code> if the stack is to be pinned
+     */
+    public void setPinned(boolean pinned) {
+        if (isExpanded()) {
+            pinFigure.setSelected(pinned);
+        }
+    }
+
+    public void setExpanded(boolean value) {
+        arrowFigure.setSelected(value);
+        if (!value) {
+            pinFigure.setSelected(false);
+        }
+    }
+
+    public void setLayoutMode(int newLayoutMode) {
+        if (this.layoutMode == newLayoutMode) {
+            return;
+        }
+
+        this.layoutMode = newLayoutMode;
+
+        // Only one stack can be expanded in icons and layout mode, therefore
+        // for
+        // consistency let's always collapse stacks when changing the layout
+        // modes.
+        setExpanded(false);
+
+        if (newLayoutMode == PaletteViewerPreferences.LAYOUT_LIST
+                || newLayoutMode == PaletteViewerPreferences.LAYOUT_DETAILS) {
+
+            headerFigure.setLayoutManager(new HeaderListLayout());
+
+            expandablePane.setLayoutManager(new ToolbarLayout());
+            expandablePane.setBorder(new MarginBorder(1, 0, 1, 0));
+            setLayoutManager(new ToolbarLayout());
+
+        } else {
+            headerFigure.setLayoutManager(new HeaderIconLayout());
+            if (activeToolFigure != null) {
+                headerFigure.setConstraint(activeToolFigure,
+                                           BorderLayout.CENTER);
+            }
+
+            setLayoutManager(new PaletteStackIconLayout());
+
+            // account for space used by pin figure
+            expandablePane.setBorder(new MarginBorder(18, 0, 0, 0));
+
+            if (layoutMode == PaletteViewerPreferences.LAYOUT_COLUMNS) {
+                expandablePane.setLayoutManager(new ColumnsLayout());
+            } else { // LAYOUT_ICONS
+                FlowLayout fl = new FlowLayout();
+                fl.setMinorSpacing(0);
+                fl.setMajorSpacing(0);
+                expandablePane.setLayoutManager(fl);
+            }
+        }
+    }
+
+    public void activeEntryChanged(IFigure oldFigure, int oldFigureIndex,
+                                   IFigure newFigure) {
+
+        if (oldFigure != null) {
+            // if figure is null, its no longer a child.
+            expandablePane.add(oldFigure, oldFigureIndex);
+        }
+
+        if (newFigure != null) {
+            activeToolFigure = newFigure;
+            headerFigure.add(activeToolFigure, BorderLayout.CENTER, 0);
+        } else {
+            activeToolFigure = null;
+        }
+    }
+
+    private void handleExpandStateChanged() {
+        if (isExpanded()) {
+            if (expandablePane.getParent() != this) {
+                add(expandablePane);
+
+                if (layoutMode == PaletteViewerPreferences.LAYOUT_LIST
+                        || layoutMode == PaletteViewerPreferences.LAYOUT_DETAILS) {
+                    headerFigure.add(pinFigure);
+                } else {
+                    add(pinFigure);
+                }
+            }
+        } else {
+            if (expandablePane.getParent() == this) {
+                remove(expandablePane);
+                pinFigure.getParent().remove(pinFigure);
+            }
+        }
+    }
+
+    /**
+     * Gets the preferred size of the expandable pane figure. Used by
+     * <code>PaletteContainerFlowLayout</code> when the layout is icons or columns mode.
+     * 
+     * @param wHint
+     *            width hint
+     * @param hHint
+     *            height hint
+     * @return the preferred size of the expandable pane figure or (0,0) if the pane is collapsed
+     */
+    public Dimension getExpandedContainerPreferredSize(int wHint, int hHint) {
+        if (isExpanded()) {
+            return expandablePane.getPreferredSize(wHint, hHint);
+        } else {
+            return EMPTY_DIMENSION;
+        }
+    }
+
+    /**
+     * Sets the header bounds layout hint. Set by <code>PaletteContainerFlowLayout</code> when the
+     * layout is icons or columns mode and used by <code>PaletteStackIconLayout</code>.
+     * 
+     * @param rect
+     *            the new value
+     */
+    public void setHeaderBoundsLayoutHint(Rectangle rect) {
+        headerBoundsLayoutHint.setBounds(rect);
+    }
+
+    /**
+     * Gets the preferred size of the header figure. Used by <code>PaletteContainerFlowLayout</code>
+     * and <code>ColumnsLayout</code> when the layout is icons or columns mode.
+     * 
+     * @param wHint
+     *            width hint
+     * @param hHint
+     *            height hint
+     * @return the preferred size of the header figure
+     */
+    public Dimension getHeaderPreferredSize(int wHint, int hHint) {
+        return headerFigure.getPreferredSize(wHint, hHint);
+    }
+
+    public boolean containsPoint(int x, int y) {
+        return headerFigure.containsPoint(x, y)
+                || (isExpanded() && expandablePane.containsPoint(x, y));
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/RaisedBorder.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/RaisedBorder.java
new file mode 100644 (file)
index 0000000..e1296d5
--- /dev/null
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+
+/**
+ * @author Pratik Shah
+ */
+public class RaisedBorder extends MarginBorder {
+
+    private static final Insets DEFAULT_INSETS = new Insets(1, 1, 1, 1);
+
+    /**
+     * @see org.eclipse.draw2d.Border#getInsets(IFigure)
+     */
+    public Insets getInsets(IFigure figure) {
+        return insets;
+    }
+
+    public RaisedBorder() {
+        this(DEFAULT_INSETS);
+    }
+
+    public RaisedBorder(Insets insets) {
+        super(insets);
+    }
+
+    public RaisedBorder(int t, int l, int b, int r) {
+        super(t, l, b, r);
+    }
+
+    public boolean isOpaque() {
+        return true;
+    }
+
+    /**
+     * @see org.eclipse.draw2d.Border#paint(IFigure, Graphics, Insets)
+     */
+    public void paint(IFigure figure, Graphics g, Insets insets) {
+        g.setLineStyle(Graphics.LINE_SOLID);
+        g.setLineWidth(1);
+        g.setForegroundColor(ColorConstants.buttonLightest);
+        Rectangle r = getPaintRectangle(figure, insets);
+        r.resize(-1, -1);
+        g.drawLine(r.x, r.y, r.right(), r.y);
+        g.drawLine(r.x, r.y, r.x, r.bottom());
+        g.setForegroundColor(ColorConstants.buttonDarker);
+        g.drawLine(r.x, r.bottom(), r.right(), r.bottom());
+        g.drawLine(r.right(), r.y, r.right(), r.bottom());
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/SeparatorBorder.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/SeparatorBorder.java
new file mode 100644 (file)
index 0000000..205b2ad
--- /dev/null
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+
+final class SeparatorBorder extends MarginBorder {
+
+    SeparatorBorder(int t, int l, int b, int r) {
+        super(t, l, b, r);
+    }
+
+    public void paint(IFigure f, Graphics g, Insets i) {
+        Rectangle r = getPaintRectangle(f, i);
+        r.height--;
+        g.setForegroundColor(ColorConstants.buttonDarker);
+        g.drawLine(r.x, r.bottom(), r.right(), r.bottom());
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/SeparatorEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/SeparatorEditPart.java
new file mode 100644 (file)
index 0000000..6e8ab70
--- /dev/null
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.PaletteColorUtil;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteSeparator;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteEditPart;
+
+
+/**
+ * EditPart for the PaletteSeparator
+ * 
+ * @author Pratik Shah
+ */
+public class SeparatorEditPart extends PaletteEditPart {
+
+    /**
+     * Constructor
+     * 
+     * @param separator
+     *            The PaletteSeparator for which this EditPart is being created
+     */
+    public SeparatorEditPart(PaletteSeparator separator) {
+        super(separator);
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
+     */
+    protected IFigure createFigure() {
+        return new SeparatorFigure();
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#getToolTipText()
+     */
+    protected String getToolTipText() {
+        return null;
+    }
+
+    /**
+     * Figure for the separator
+     * 
+     * @author Pratik Shah
+     */
+    static class SeparatorFigure extends Figure {
+        /**
+         * @see org.eclipse.draw2d.IFigure#getPreferredSize(int, int)
+         */
+        public Dimension getPreferredSize(int wHint, int hHint) {
+            if (getBackgroundColor().equals(PaletteColorUtil.WIDGET_BACKGROUND))
+                return new Dimension(wHint, 4);
+            return new Dimension(wHint, 5);
+        }
+
+        private static final Insets CROP = new Insets(1, 3, 2, 4);
+
+        /**
+         * 
+         * @see org.eclipse.draw2d.Figure#paintFigure(Graphics)
+         */
+        protected void paintFigure(Graphics g) {
+            Rectangle r = getBounds().getCropped(CROP);
+            if (getBackgroundColor().equals(
+                                            PaletteColorUtil.WIDGET_LIST_BACKGROUND)) {
+                g.setForegroundColor(PaletteColorUtil.WIDGET_NORMAL_SHADOW);
+                g.drawLine(r.getLeft(), r.getRight());
+            } else {
+                g.setForegroundColor(PaletteColorUtil.WIDGET_NORMAL_SHADOW);
+                g.drawLine(r.getBottomLeft(), r.getTopLeft());
+                g.drawLine(r.getTopLeft(), r.getTopRight());
+
+                g.setForegroundColor(ColorConstants.buttonLightest);
+                g.drawLine(r.getBottomLeft(), r.getBottomRight());
+                g.drawLine(r.getBottomRight(), r.getTopRight());
+            }
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/SliderPaletteEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/SliderPaletteEditPart.java
new file mode 100644 (file)
index 0000000..a463053
--- /dev/null
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteRoot;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteAnimator;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteToolbarLayout;
+
+
+public class SliderPaletteEditPart extends PaletteEditPart {
+
+    private PaletteAnimator controller;
+
+    public SliderPaletteEditPart(PaletteRoot paletteRoot) {
+        super(paletteRoot);
+    }
+
+    public IFigure createFigure() {
+        Figure figure = new Figure();
+        figure.setOpaque(true);
+        figure.setForegroundColor(ColorConstants.listForeground);
+        figure.setBackgroundColor(ColorConstants.listBackground);
+        return figure;
+    }
+
+    /**
+     * This method overrides super's functionality to do nothing.
+     * 
+     * @see PaletteEditPart#refreshVisuals()
+     */
+    protected void refreshVisuals() {
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#registerVisuals()
+     */
+    protected void registerVisuals() {
+        super.registerVisuals();
+        controller = new PaletteAnimator(
+                                         ((PaletteViewer) getViewer()).getPaletteViewerPreferences());
+        getViewer().getEditPartRegistry()
+                .put(PaletteAnimator.class, controller);
+        ToolbarLayout layout = new PaletteToolbarLayout();
+        getFigure().setLayoutManager(layout);
+        getFigure().addLayoutListener(controller);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/TemplateEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/TemplateEditPart.java
new file mode 100644 (file)
index 0000000..b0f3380
--- /dev/null
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.Request;
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleControlEvent;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IMemento;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.PaletteColorUtil;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteTemplateEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerPreferences;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteEditPart;
+
+
+/**
+ * @author Eric Bordeau, Pratik Shah
+ */
+public class TemplateEditPart extends PaletteEditPart {
+
+    private static final String SELECTION_STATE = "selection"; //$NON-NLS-1$
+
+    /**
+     * Constructor
+     * 
+     * @param entry
+     *            The model entry
+     */
+    public TemplateEditPart(PaletteTemplateEntry entry) {
+        super(entry);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#createAccessible()
+     */
+    protected AccessibleEditPart createAccessible() {
+        return new AccessibleGraphicalEditPart() {
+            public void getDescription(AccessibleEvent e) {
+                e.result = getTemplateEntry().getDescription();
+            }
+
+            public void getName(AccessibleEvent e) {
+                e.result = getTemplateEntry().getLabel();
+            }
+
+            public void getRole(AccessibleControlEvent e) {
+                e.detail = ACC.ROLE_LISTITEM;
+            }
+        };
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
+     */
+    public IFigure createFigure() {
+        IFigure fig = new DetailedLabelFigure() {
+
+            public IFigure getToolTip() {
+                return createToolTip();
+            }
+
+            protected void paintFigure(Graphics graphics) {
+                super.paintFigure(graphics);
+
+                if (isSelected()) {
+                    graphics.setBackgroundColor(PaletteColorUtil
+                            .getSelectedColor());
+                }
+                graphics.fillRoundRectangle(ToolEntryEditPart
+                        .getSelectionRectangle(getLayoutSetting(), this), 3, 3);
+            }
+
+        };
+        fig.setRequestFocusEnabled(true);
+        return fig;
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#deactivate()
+     */
+    public void deactivate() {
+        ((DetailedLabelFigure) getFigure()).dispose();
+        super.deactivate();
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#getDragTracker(Request)
+     */
+    public DragTracker getDragTracker(Request request) {
+        return new SingleSelectionTracker() {
+            protected boolean handleButtonDown(int button) {
+                getFigure().requestFocus();
+                return super.handleButtonDown(button);
+            }
+        };
+    }
+
+    private PaletteTemplateEntry getTemplateEntry() {
+        return (PaletteTemplateEntry) getModel();
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#getToolTipText()
+     */
+    protected String getToolTipText() {
+        String result = null;
+        if (getLayoutSetting() != PaletteViewerPreferences.LAYOUT_DETAILS) {
+            result = super.getToolTipText();
+        }
+        return result;
+    }
+
+    /**
+     * If this edit part's name is truncated in its label, the name should be prepended to the
+     * tooltip.
+     * 
+     * @return whether the name needs to be included in the tooltip
+     */
+    protected boolean nameNeededInToolTip() {
+        DetailedLabelFigure label = (DetailedLabelFigure) getFigure();
+        return label.isNameTruncated() || super.nameNeededInToolTip();
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
+     */
+    protected void refreshVisuals() {
+        DetailedLabelFigure fig = (DetailedLabelFigure) getFigure();
+        PaletteEntry entry = getPaletteEntry();
+        fig.setName(entry.getLabel());
+        fig.setDescription(entry.getDescription());
+        if (getPreferenceSource().useLargeIcons())
+            setImageDescriptor(entry.getLargeIcon());
+        else
+            setImageDescriptor(entry.getSmallIcon());
+        int layoutMode = getLayoutSetting();
+        fig.setLayoutMode(layoutMode);
+        if (layoutMode == PaletteViewerPreferences.LAYOUT_COLUMNS) {
+            fig.setBorder(ToolEntryEditPart.ICON_BORDER);
+        } else if (layoutMode == PaletteViewerPreferences.LAYOUT_LIST
+                || layoutMode == PaletteViewerPreferences.LAYOUT_DETAILS) {
+            fig.setBorder(ToolEntryEditPart.LIST_BORDER);
+        } else if (layoutMode == PaletteViewerPreferences.LAYOUT_ICONS
+                && !isToolbarItem()) {
+            fig.setBorder(ToolEntryEditPart.ICON_BORDER);
+        } else {
+            fig.setBorder(null);
+        }
+        super.refreshVisuals();
+    }
+
+    public void restoreState(IMemento memento) {
+        setSelected(memento.getInteger(SELECTION_STATE).intValue());
+        super.restoreState(memento);
+    }
+
+    public void saveState(IMemento memento) {
+        memento.putInteger(SELECTION_STATE, getSelected());
+        super.saveState(memento);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#setImageInFigure(Image)
+     */
+    protected void setImageInFigure(Image image) {
+        DetailedLabelFigure fig = (DetailedLabelFigure) getFigure();
+        fig.setImage(image);
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPart#setSelected(int)
+     */
+    public void setSelected(int value) {
+        super.setSelected(value);
+        DetailedLabelFigure label = (DetailedLabelFigure) getFigure();
+        if (value == SELECTED_PRIMARY) {
+            label.requestFocus();
+            label.setSelected(true);
+        } else {
+            label.setSelected(false);
+        }
+        label.repaint();
+
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/ToolEntryEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/ToolEntryEditPart.java
new file mode 100644 (file)
index 0000000..1de88da
--- /dev/null
@@ -0,0 +1,673 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   1) update package name
+ *   2) apply new UI  
+ *      - paintFigure: apply 3-state mode (normal, mouse over, selected)
+ *      - activate: Sets customLabel's font
+ *      - setSelected: add method for apply selected effect icon
+ *      - changeToolEntryItem: add method for 3-state's icon and font
+ *      - getCachedImage: return the Palette icon's cached image for the direct manipulation
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.ActionEvent;
+import org.eclipse.draw2d.ActionListener;
+import org.eclipse.draw2d.Border;
+import org.eclipse.draw2d.ButtonBorder;
+import org.eclipse.draw2d.ButtonModel;
+import org.eclipse.draw2d.Clickable;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.Toggle;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleControlEvent;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IMemento;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditorCombinedTemplateCreationEntry;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditorCombinedTemplateCreationEntry.State;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteStack;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.ToolEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerPreferences;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.IPinnableEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteEditPart;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.FontResources;
+
+
+public class ToolEntryEditPart extends PaletteEditPart {
+
+    class MenuTimer implements Runnable {
+        public static final int MENU_TIMER_DELAY = 400;
+
+        private boolean enabled = true;
+
+        public void disable() {
+            enabled = false;
+        }
+
+        public void run() {
+            if (enabled) {
+                getButtonModel().setArmed(false);
+                getButtonModel().setPressed(false);
+                ((IPaletteStackEditPart) getParent()).openMenu();
+                getViewer().getEditDomain().loadDefaultTool();
+            }
+        }
+    }
+
+    abstract class ToggleButtonTracker extends SingleSelectionTracker {
+        private MenuTimer timer = null;
+
+        protected void enableTimer() {
+            timer = new MenuTimer();
+            getViewer().getControl().getDisplay()
+                    .timerExec(MenuTimer.MENU_TIMER_DELAY, timer);
+        }
+
+        protected void disableTimer() {
+            if (timer != null) {
+                timer.disable();
+                timer = null;
+            }
+        }
+
+        protected boolean handleButtonDown(int button) {
+            if (getParent() instanceof IPaletteStackEditPart)
+                enableTimer();
+
+            if (button == 2 && isInState(STATE_INITIAL))
+                performConditionalSelection();
+            super.handleButtonDown(button);
+            if (button == 1) {
+                getFigure().internalGetEventDispatcher().requestRemoveFocus(
+                                                                            getFigure());
+                getButtonModel().setArmed(true);
+                getButtonModel().setPressed(true);
+            }
+            return true;
+        }
+
+        protected boolean handleDrag() {
+            org.eclipse.draw2d.geometry.Point point = getLocation().getCopy();
+            getFigure().translateToRelative(point);
+            if (!getFigure().containsPoint(point)) {
+                getButtonModel().setArmed(false);
+                getButtonModel().setMouseOver(false);
+                disableTimer();
+            } else {
+                getButtonModel().setArmed(true);
+                getButtonModel().setMouseOver(true);
+            }
+            return true;
+        }
+
+        protected boolean handleNativeDragFinished(DragSourceEvent event) {
+            getPaletteViewer().setActiveTool(null);
+            return true;
+        }
+    }
+
+    class GTKToggleButtonTracker extends ToggleButtonTracker {
+        int gtkState = 0;
+
+        public void deactivate() {
+            disableTimer();
+            super.deactivate();
+        }
+
+        protected boolean handleButtonUp(int button) {
+            disableTimer();
+
+            // Workaround for Bug 96351. It should be removed when Bug 35585 is
+            // fixed.
+            if (gtkState == 1) {
+                handleNativeDragFinished(null);
+                return true;
+            }
+
+            if (button == 1) {
+                getButtonModel().setPressed(false);
+                getButtonModel().setArmed(false);
+            }
+            return super.handleButtonUp(button);
+        }
+
+        protected boolean handleNativeDragStarted(DragSourceEvent event) {
+            disableTimer();
+            gtkState = 1;
+            return true;
+        }
+    }
+
+    class OtherToggleButtonTracker extends ToggleButtonTracker {
+
+        private static final int WIN_THRESHOLD = 3;
+
+        private Point mouseDownLoc = null;
+
+        public void deactivate() {
+            disableTimer();
+            getButtonModel().setPressed(false);
+            getButtonModel().setArmed(false);
+            super.deactivate();
+        }
+
+        protected boolean handleButtonDown(int button) {
+            mouseDownLoc = new Point(getLocation().x, getLocation().y);
+            return super.handleButtonDown(button);
+        }
+
+        protected boolean handleButtonUp(int button) {
+            disableTimer();
+
+            if (button == 1) {
+                getButtonModel().setPressed(false);
+                getButtonModel().setArmed(false);
+            }
+            return super.handleButtonUp(button);
+        }
+
+        protected boolean handleNativeDragStarted(DragSourceEvent event) {
+            disableTimer();
+
+            // win hack because button down is delayed
+            if (getParent() instanceof IPaletteStackEditPart
+                    && SWT.getPlatform().equals("win32")) { //$NON-NLS-1$
+                Point nds = getPaletteViewer().getControl().toControl(
+                                                                      event.display.getCursorLocation());
+                if (mouseDownLoc != null
+                        && (Math.abs(nds.x - mouseDownLoc.x) + Math.abs(nds.y
+                                - mouseDownLoc.y)) < WIN_THRESHOLD) {
+                    getButtonModel().setArmed(false);
+                    getButtonModel().setPressed(false);
+                    ((IPaletteStackEditPart) getParent()).openMenu();
+                    getViewer().getEditDomain().loadDefaultTool();
+                    event.doit = false;
+                    return false;
+                }
+            }
+
+            getButtonModel().setPressed(false);
+            getButtonModel().setArmed(false);
+            return true;
+        }
+    }
+
+    /**
+     * The figure for for a <code>ToolEntryEditPart</code>.
+     */
+    class ToolEntryToggle extends Toggle {
+
+        private boolean showHoverFeedback = false;
+
+        ToolEntryToggle(IFigure contents) {
+            super(contents);
+            setOpaque(false);
+            setEnabled(true);
+            if (isToolbarItem()) {
+                setStyle(Clickable.STYLE_BUTTON | Clickable.STYLE_TOGGLE);
+                setBorder(TOOLBAR_ITEM_BORDER);
+            }
+        }
+
+        public boolean containsPoint(int x, int y) {
+            Rectangle rect = getBounds().getCopy();
+            if (customLabel.getBorder() == ICON_BORDER) {
+                rect.width -= PinnablePaletteStackFigure.ARROW_WIDTH;
+            } else if (customLabel.getBorder() == LIST_BORDER) {
+                rect.width -= PinnablePaletteStackFigure.ARROW_WIDTH;
+                rect.x += PinnablePaletteStackFigure.ARROW_WIDTH;
+            }
+            return rect.contains(x, y);
+        }
+
+        public IFigure findMouseEventTargetAt(int x, int y) {
+            return null;
+        }
+
+        public IFigure getToolTip() {
+            return createToolTip();
+        }
+
+        public void setEnabled(boolean value) {
+            super.setEnabled(value);
+            if (isEnabled()) {
+                setRolloverEnabled(true);
+                if (getFlag(STYLE_BUTTON)) {
+                    setBorder(TOOLBAR_ITEM_BORDER);
+                }
+                setForegroundColor(null);
+            } else {
+                if (getFlag(STYLE_BUTTON)) {
+                    setBorder(null);
+                }
+                setRolloverEnabled(false);
+                setForegroundColor(ColorConstants.gray);
+            }
+        }
+
+        protected void paintFigure(Graphics graphics) {
+            super.paintFigure(graphics);
+
+            if (!isToolbarItem() && isEnabled() && isRolloverEnabled()) {
+                ButtonModel model = getModel();
+
+                /* ECLIPSE { */
+                /*
+                 * if (model.isSelected()) { graphics.setBackgroundColor(PaletteColorUtil
+                 * .getSelectedColor()); graphics.fillRoundRectangle(
+                 * getSelectionRectangle(getLayoutSetting(), customLabel), 3, 3); } else if
+                 * (model.isMouseOver() || showHoverFeedback) {
+                 * graphics.setBackgroundColor(PaletteColorUtil .getHoverColor());
+                 * graphics.fillRoundRectangle( getSelectionRectangle(getLayoutSetting(),
+                 * customLabel), 3, 3); }
+                 */
+                /* } ECLIPSE */
+
+                /* TIZEN: add 3-state mode (normal, mouseover, selected) { */
+                if (model.isSelected()) {
+                } else if (model.isMouseOver() || showHoverFeedback) {
+                    // true case: This is normal only
+                    if (currentState == State.NORMAL) {
+                        changeToolEntryItem(State.MOUSEOVER);
+                    }
+                } else {
+                    if (this.hasFocus()) {
+                        return;
+                    }
+                    // true case: This is not normal only
+                    if (currentState != State.NORMAL) {
+                        changeToolEntryItem(State.NORMAL);
+                    }
+                }
+                /* } TIZEN */
+            }
+        }
+
+        protected void paintBorder(Graphics graphics) {
+            if (isEnabled()) {
+
+                if (getBorder() != null)
+                    getBorder().paint(this, graphics, NO_INSETS);
+                if (hasFocus()) {
+                    graphics.setForegroundColor(ColorConstants.black);
+                    graphics.setBackgroundColor(ColorConstants.white);
+
+                    Rectangle area = isToolbarItem() ? getClientArea()
+                            : getSelectionRectangle(getLayoutSetting(),
+                                                    customLabel);
+                    if (isStyle(STYLE_BUTTON))
+                        graphics.drawFocus(area.x, area.y, area.width,
+                                           area.height);
+                    else
+                        graphics.drawFocus(area.x, area.y, area.width - 1,
+                                           area.height - 1);
+                }
+            } else {
+                super.paintBorder(graphics);
+            }
+        }
+
+        /**
+         * Should hover feedback be shown? Allows other palette entities to control when the hover
+         * feedback should be shown on this tool entry.
+         * 
+         * @param showHoverFeedback
+         *            true if the hover feedback is to be shown; false otherwise.
+         */
+        public void setShowHoverFeedback(boolean showHoverFeedback) {
+            this.showHoverFeedback = showHoverFeedback;
+            repaint();
+        }
+    }
+
+    private static final String ACTIVE_STATE = "active"; //$NON-NLS-1$
+    private DetailedLabelFigure customLabel;
+
+    public ToolEntryEditPart(PaletteEntry paletteEntry) {
+        super(paletteEntry);
+    }
+
+    /* TIZEN: add new UI: current drag cached image for direct manipulation { */
+    public Image getCachedImage() {
+        return customLabel.getCachedImage();
+    }
+    /* TIZEN } */
+
+    public Object getAdapter(Class key) {
+        if (key == IPinnableEditPart.class) {
+            if ((getParent() instanceof PinnablePaletteStackEditPart)
+                    && ((PinnablePaletteStackEditPart) getParent())
+                            .canBePinned()
+                    && ((PaletteStack) getParent().getModel()).getActiveEntry()
+                            .equals(getModel())) {
+                return getParent();
+            }
+        }
+        return super.getAdapter(key);
+    }
+
+    protected AccessibleEditPart createAccessible() {
+        return new AccessibleGraphicalEditPart() {
+            public void getDescription(AccessibleEvent e) {
+                e.result = getPaletteEntry().getDescription();
+            }
+
+            public void getName(AccessibleEvent e) {
+                e.result = getPaletteEntry().getLabel();
+            }
+
+            public void getRole(AccessibleControlEvent e) {
+                if (getParent() instanceof IPaletteStackEditPart
+                        && (ToolEntryEditPart.this == ((IPaletteStackEditPart) getParent())
+                                .getActiveEntry())) {
+                    e.detail = ACC.ROLE_COMBOBOX;
+                } else {
+                    e.detail = ACC.ROLE_PUSHBUTTON;
+                }
+            }
+
+            public void getState(AccessibleControlEvent e) {
+                super.getState(e);
+                if (getButtonModel().isSelected())
+                    e.detail |= ACC.STATE_CHECKED;
+            }
+        };
+    }
+
+    static final Border TOOLBAR_ITEM_BORDER = new ButtonBorder(
+                                                               ButtonBorder.SCHEMES.TOOLBAR);
+
+    // The following are the insets that the bounds of the label figure should
+    // be
+    // cropped to paint the blue/orange select and hover feedback rectangles.
+    static final Insets LIST_HIGHLIGHT_INSETS = new Insets(1, 5, 2, 0);
+    static final Insets ICON_HIGHLIGHT_INSETS = new Insets(2, 1, 2, 1);
+
+    // The following are the borders that go around the entire tool figure to
+    // provide room to draw the arrow and outline of the palette stack figure if
+    // this tool happens to appear as the active tool of a stack.
+    static final Border LIST_BORDER = new MarginBorder(3,
+                                                       PinnablePaletteStackFigure.ARROW_WIDTH + 7, 4, 0);
+    static final Border ICON_BORDER = new MarginBorder(4, 4, 3,
+                                                       PinnablePaletteStackFigure.ARROW_WIDTH + 4);
+
+    public IFigure createFigure() {
+
+        customLabel = new DetailedLabelFigure();
+        Clickable button = new ToolEntryToggle(customLabel);
+        button.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent event) {
+                getPaletteViewer().setActiveTool(getToolEntry());
+            }
+        });
+
+        return button;
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#deactivate()
+     */
+    public void deactivate() {
+        customLabel.dispose();
+        super.deactivate();
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPart#eraseTargetFeedback(Request)
+     */
+    public void eraseTargetFeedback(Request request) {
+        if (RequestConstants.REQ_SELECTION.equals(request.getType()))
+            getButtonModel().setMouseOver(false);
+        super.eraseTargetFeedback(request);
+    }
+
+    private ButtonModel getButtonModel() {
+        Clickable c = (Clickable) getFigure();
+        return c.getModel();
+    }
+
+    /**
+     * @see PaletteEditPart#getDragTracker(Request)
+     */
+    public DragTracker getDragTracker(Request request) {
+        if (SWT.getPlatform().equals("gtk")) //$NON-NLS-1$
+            return new GTKToggleButtonTracker();
+        else
+            return new OtherToggleButtonTracker();
+    }
+
+    private ToolEntry getToolEntry() {
+        return (ToolEntry) getPaletteEntry();
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.editparts.PaletteEditPart#getToolTipText()
+     */
+    protected String getToolTipText() {
+        String result = null;
+        if (getLayoutSetting() != PaletteViewerPreferences.LAYOUT_DETAILS) {
+            result = super.getToolTipText();
+        }
+        return result;
+    }
+
+    /**
+     * If this edit part's name is truncated in its label, the name should be prepended to the
+     * tooltip.
+     * 
+     * @return whether the name needs to be included in the tooltip
+     */
+    protected boolean nameNeededInToolTip() {
+        DetailedLabelFigure label = (DetailedLabelFigure) getFigure()
+                .getChildren().get(0);
+        return label.isNameTruncated() || super.nameNeededInToolTip();
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
+     */
+    protected void refreshVisuals() {
+        PaletteEntry entry = getPaletteEntry();
+
+        customLabel.setName(entry.getLabel());
+        customLabel.setDescription(entry.getDescription());
+        if (getPreferenceSource().useLargeIcons())
+            setImageDescriptor(entry.getLargeIcon());
+        else
+            setImageDescriptor(entry.getSmallIcon());
+        int layoutMode = getLayoutSetting();
+        customLabel.setLayoutMode(layoutMode);
+        if (layoutMode == PaletteViewerPreferences.LAYOUT_COLUMNS) {
+            customLabel.setBorder(ICON_BORDER);
+        } else if (layoutMode == PaletteViewerPreferences.LAYOUT_LIST
+                || layoutMode == PaletteViewerPreferences.LAYOUT_DETAILS) {
+            customLabel.setBorder(LIST_BORDER);
+        } else if (layoutMode == PaletteViewerPreferences.LAYOUT_ICONS
+                && !isToolbarItem()) {
+            customLabel.setBorder(ICON_BORDER);
+        } else {
+            customLabel.setBorder(null);
+        }
+        super.refreshVisuals();
+    }
+
+    @Override
+    public void activate() {
+        /* TIZEN: new UI: Sets customLabel's font { */
+        customLabel.setFont(FontResources.PALETTE_COMPONENT_NORMAL);
+        customLabel.setForegroundColor(ColorResources.PALETTE_UI_COMPONENT_NORMAL);
+        /* } TIZEN */
+        super.activate();
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPart#removeNotify()
+     */
+    public void removeNotify() {
+        if (getButtonModel().isSelected())
+            getPaletteViewer().setActiveTool(null);
+        super.removeNotify();
+    }
+
+    public void setToolSelected(boolean value) {
+        getButtonModel().setSelected(value);
+    }
+
+    public void restoreState(IMemento memento) {
+        if (new Boolean(memento.getString(ACTIVE_STATE)).booleanValue())
+            getPaletteViewer().setActiveTool(getToolEntry());
+        super.restoreState(memento);
+    }
+
+    public void saveState(IMemento memento) {
+        memento.putString(ACTIVE_STATE, new Boolean(getPaletteViewer()
+                .getActiveTool() == getToolEntry()).toString());
+        super.saveState(memento);
+    }
+
+    /**
+     * @see PaletteEditPart#setImageInFigure(Image)
+     */
+    protected void setImageInFigure(Image image) {
+        DetailedLabelFigure fig = (DetailedLabelFigure) (getFigure()
+                .getChildren().get(0));
+        fig.setImage(image);
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPart#setSelected(int)
+     */
+    public void setSelected(int value) {
+        /* TIZEN: add new UI: apply selected effect icon { */
+        if (this.getSelected() == value) {
+            return;
+        }
+        changeToolEntryItem((value != EditPart.SELECTED_NONE) ? State.SELECT : State.NORMAL);
+        /* } TIZEN */
+
+        super.setSelected(value);
+        if (value == SELECTED_PRIMARY
+                && getPaletteViewer().getControl() != null
+                && !getPaletteViewer().getControl().isDisposed()
+                && getPaletteViewer().getControl().isFocusControl())
+            getFigure().requestFocus();
+    }
+
+    /* TIZEN: added for 3-state { */
+    private State currentState = State.NORMAL;
+    /* } TIZEN */
+
+    /* TIZEN: added managing for 3-state's icon and font { */
+    private void changeToolEntryItem(State changeState) {
+        if (currentState == changeState) {
+            return;
+        }
+
+        Color foregroundColor;
+        Font newFont = null;
+
+        switch (changeState) {
+            case MOUSEOVER:
+                currentState = State.MOUSEOVER;
+                newFont = FontResources.PALETTE_COMPONENT_BOLD;
+                foregroundColor = ColorResources.PALETTE_UI_COMPONENT_NORMAL;
+                break;
+            case SELECT:
+                currentState = State.SELECT;
+                newFont = FontResources.PALETTE_COMPONENT_NORMAL;
+                foregroundColor = ColorResources.PALETTE_UI_COMPONENT_SELECT;
+                break;
+            default: // or NORMAL
+                currentState = State.NORMAL;
+                newFont = FontResources.PALETTE_COMPONENT_NORMAL;
+                foregroundColor = ColorResources.PALETTE_UI_COMPONENT_NORMAL;
+                break;
+        }
+
+        DesignEditorCombinedTemplateCreationEntry entry = (DesignEditorCombinedTemplateCreationEntry) getToolEntry();
+        entry.setIconMode(currentState);
+        ImageDescriptor smallIcon = entry.getSmallIcon();
+        setImageDescriptor(smallIcon);
+
+        customLabel.setForegroundColor(foregroundColor);
+        customLabel.setFont(newFont);
+        customLabel.invalidateTree(); // advux: font -bold issue
+    }
+    /* } TIZEN */
+
+    /**
+     * @see org.eclipse.gef.EditPart#showTargetFeedback(Request)
+     */
+    public void showTargetFeedback(Request request) {
+        if (RequestConstants.REQ_SELECTION.equals(request.getType()))
+            getButtonModel().setMouseOver(true);
+        super.showTargetFeedback(request);
+    }
+
+    static Rectangle getSelectionRectangle(int layoutMode,
+                                           DetailedLabelFigure labelFigure) {
+        Rectangle rect = Rectangle.SINGLETON;
+        rect.setBounds(labelFigure.getBounds());
+        if (layoutMode == PaletteViewerPreferences.LAYOUT_LIST
+                || layoutMode == PaletteViewerPreferences.LAYOUT_DETAILS) {
+
+            rect.x += PinnablePaletteStackFigure.ARROW_WIDTH;
+            rect.width -= PinnablePaletteStackFigure.ARROW_WIDTH;
+            int newWidth = labelFigure.getPreferredSize().width + 17;
+            if (newWidth < rect.width) {
+                rect.width = newWidth;
+            }
+            rect.crop(LIST_HIGHLIGHT_INSETS);
+        } else {
+            rect.width -= PinnablePaletteStackFigure.ARROW_WIDTH;
+            rect.crop(ICON_HIGHLIGHT_INSETS);
+        }
+        return rect;
+    }
+
+    // Reference code for java reflection: Using in createFigure()
+    // private void setCustomLabel(DetailedLabelFigure figure) {
+    // final String INTERNAL_FIELD_CUSTOMLABEL = "customLabel";
+    //
+    // Field field = ReflectionUtil.getField(this, INTERNAL_FIELD_CUSTOMLABEL, true);
+    // try {
+    // if (field != null) {
+    // field.set(this, figure);
+    // }
+    // } catch (IllegalArgumentException e) {
+    // e.printStackTrace();
+    // } catch (IllegalAccessException e) {
+    // e.printStackTrace();
+    // }
+    // }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/ToolbarEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/internal/ui/palette/editparts/ToolbarEditPart.java
new file mode 100644 (file)
index 0000000..fb829be
--- /dev/null
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-09 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts;
+
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.MarginBorder;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.PaletteColorUtil;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteToolbar;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerPreferences;
+
+
+/**
+ * An editpart for the <code>PaletteToolbar</code>.
+ * 
+ * @author crevells
+ * @since 3.4
+ */
+public class ToolbarEditPart extends GroupEditPart {
+
+    /**
+     * Creates a new instance.
+     * 
+     * @param model
+     *            the <code>PaletteToolbar</code>
+     */
+    public ToolbarEditPart(PaletteToolbar model) {
+        super(model);
+    }
+
+    public IFigure createFigure() {
+        IFigure figure = new Figure() {
+
+            protected void paintFigure(Graphics graphics) {
+                super.paintFigure(graphics);
+
+                // draw top border
+                graphics.setForegroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+                graphics.drawLine(getBounds().getTopLeft(), getBounds()
+                        .getTopRight());
+
+                // draw bottom border
+                graphics.setForegroundColor(PaletteColorUtil.WIDGET_BACKGROUND_NORMAL_SHADOW_70);
+                graphics.drawLine(
+                                  getBounds().getBottomLeft().getTranslated(0, -1),
+                                  getBounds().getBottomRight().getTranslated(0, -1));
+            }
+
+        };
+        figure.setOpaque(true);
+        figure.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND);
+        figure.setBorder(new MarginBorder(2, 1, 1, 1));
+
+        return figure;
+    }
+
+    protected int getLayoutSetting() {
+        return PaletteViewerPreferences.LAYOUT_ICONS;
+    }
+
+    public boolean isToolbarItem() {
+        return true;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/CombinedTemplateCreationEntry.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/CombinedTemplateCreationEntry.java
new file mode 100644 (file)
index 0000000..52b0321
--- /dev/null
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *   - modify Constructs of CombinedTemplateCreationEntry
+ *      from @link org.eclipse.gef.dnd.TemplateTransferDragSourceListener to org.tizen.efluibuilder.ui.editor.internal.gef.dnd.TemplateTransferDragSourceListener
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import org.eclipse.gef.requests.CreationFactory;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * A combination of a {@link PaletteTemplateEntry} and {@link ToolEntry}. The entry will be rendered
+ * as a ToolEntry, but it will also be possible to use the entry as a DragSource in the same way as
+ * a template.
+ * 
+ * @author hudsonr
+ */
+public class CombinedTemplateCreationEntry extends CreationToolEntry {
+
+    private Object template;
+
+    /**
+     * Constructs an entry with the given creation factory and template. The creation factory is
+     * used by the creation tool when the entry is selected. The template is used with the
+     * {@link org.tizen.efluibuilder.ui.editor.internal.gef.dnd.TemplateTransferDragSourceListener}.
+     * 
+     * @since 3.2
+     * @param label
+     *            the label
+     * @param shortDesc
+     *            the descriptoin
+     * @param template
+     *            the template object
+     * @param factory
+     *            the CreationFactory
+     * @param iconSmall
+     *            the small icon
+     * @param iconLarge
+     *            the large icon
+     */
+    public CombinedTemplateCreationEntry(String label, String shortDesc,
+            Object template, CreationFactory factory,
+            ImageDescriptor iconSmall, ImageDescriptor iconLarge) {
+        super(label, shortDesc, factory, iconSmall, iconLarge);
+        setTemplate(template);
+    }
+
+    /**
+     * Constructs an entry with the given creation factory. The creation factory is also used as the
+     * template object.
+     * 
+     * @param label
+     *            the label
+     * @param shortDesc
+     *            the description
+     * @param factory
+     *            the creation factory and template
+     * @param iconSmall
+     *            the small icon
+     * @param iconLarge
+     *            the large icon
+     * @since 3.2
+     */
+    public CombinedTemplateCreationEntry(String label, String shortDesc,
+            CreationFactory factory, ImageDescriptor iconSmall,
+            ImageDescriptor iconLarge) {
+        this(label, shortDesc, factory, factory, iconSmall, iconLarge);
+    }
+
+    /**
+     * Returns the template object.
+     * 
+     * @return Object the template
+     */
+    public Object getTemplate() {
+        return template;
+    }
+
+    /**
+     * Sets the template.
+     * 
+     * @param template
+     *            The template
+     */
+    public void setTemplate(Object template) {
+        this.template = template;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/ConnectionCreationToolEntry.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/ConnectionCreationToolEntry.java
new file mode 100644 (file)
index 0000000..4b2baa6
--- /dev/null
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import org.eclipse.gef.requests.CreationFactory;
+import org.eclipse.gef.tools.ConnectionCreationTool;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * A palette ToolEntry for a {@link org.eclipse.gef.tools.ConnectionCreationTool}.
+ * 
+ * @author hudsonr
+ * @since 2.1
+ */
+public class ConnectionCreationToolEntry extends CreationToolEntry {
+
+    /**
+     * Constructor for ConnectionCreationToolEntry.
+     * 
+     * @param label
+     *            the label
+     * @param shortDesc
+     *            the description
+     * @param factory
+     *            the CreationFactory
+     * @param iconSmall
+     *            the small icon
+     * @param iconLarge
+     *            the large icon
+     */
+    public ConnectionCreationToolEntry(String label, String shortDesc,
+            CreationFactory factory, ImageDescriptor iconSmall,
+            ImageDescriptor iconLarge) {
+        super(label, shortDesc, factory, iconSmall, iconLarge);
+        setToolClass(ConnectionCreationTool.class);
+        setUserModificationPermission(PERMISSION_NO_MODIFICATION);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/CreationToolEntry.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/CreationToolEntry.java
new file mode 100644 (file)
index 0000000..d741eaa
--- /dev/null
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import org.eclipse.gef.requests.CreationFactory;
+import org.eclipse.gef.tools.CreationTool;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * A palette ToolEntry for a {@link CreationTool}.
+ * 
+ * @author hudsonr
+ * @since 2.1
+ */
+public class CreationToolEntry extends ToolEntry {
+
+    /**
+     * The creation factory used with the returned creation tool.
+     * 
+     * @deprecated in 3.1. This field will be removed in future releases. The factory is being
+     *             provided to the tool via the {@link ToolEntry#setToolProperty(Object, Object)}
+     *             method.
+     */
+    protected final CreationFactory factory;
+
+    /**
+     * Constructor for CreationToolEntry.
+     * 
+     * @param label
+     *            the label
+     * @param shortDesc
+     *            the description
+     * @param factory
+     *            the CreationFactory
+     * @param iconSmall
+     *            the small icon
+     * @param iconLarge
+     *            the large icon
+     */
+    public CreationToolEntry(String label, String shortDesc,
+            CreationFactory factory, ImageDescriptor iconSmall,
+            ImageDescriptor iconLarge) {
+        super(label, shortDesc, iconSmall, iconLarge, CreationTool.class);
+        this.factory = factory;
+        setToolProperty(CreationTool.PROPERTY_CREATION_FACTORY, factory);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/MarqueeToolEntry.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/MarqueeToolEntry.java
new file mode 100644 (file)
index 0000000..660bcc8
--- /dev/null
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import org.eclipse.gef.SharedImages;
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.gef.tools.MarqueeSelectionTool;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * A palette ToolEntry for a {@link org.eclipse.gef.tools.MarqueeSelectionTool}.
+ * 
+ * @author rhudson
+ * @author pshah
+ * @author anyssen
+ * 
+ * @since 2.1
+ */
+public class MarqueeToolEntry extends ToolEntry {
+
+    /**
+     * Creates a new MarqueeToolEntry that can select nodes
+     */
+    public MarqueeToolEntry() {
+        this(null, null);
+    }
+
+    /**
+     * Constructor for MarqueeToolEntry.
+     * 
+     * @param label
+     *            the label
+     */
+    public MarqueeToolEntry(String label) {
+        this(label, null);
+    }
+
+    /**
+     * Constructor for MarqueeToolEntry.
+     * 
+     * @param label
+     *            the label; can be <code>null</code>
+     * @param description
+     *            the description (can be <code>null</code>)
+     */
+    public MarqueeToolEntry(String label, String description) {
+        super(label, description, null, null, MarqueeSelectionTool.class);
+        if (label == null || label.length() == 0)
+            setLabel(GEFMessages.MarqueeTool_Label);
+        setUserModificationPermission(PERMISSION_NO_MODIFICATION);
+    }
+
+    /**
+     * @see org.eclipse.gef.palette.PaletteEntry#getDescription()
+     */
+    public String getDescription() {
+        String description = super.getDescription();
+        if (description != null)
+            return description;
+
+        int marqueeBehavior = getMarqueeBehavior();
+        if (marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_TOUCHED) {
+            return GEFMessages.MarqueeTool_Connections_Touched_Desc;
+        }
+        if (marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_CONTAINED) {
+            return GEFMessages.MarqueeTool_Connections_Contained_Desc;
+        }
+        if (marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED) {
+            return GEFMessages.MarqueeTool_Nodes_Touched_Desc;
+        }
+        if (marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED) {
+            return GEFMessages.MarqueeTool_Nodes_Contained_Desc;
+        }
+        if (marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED_AND_RELATED_CONNECTIONS) {
+            return GEFMessages.MarqueeTool_Nodes_Touched_And_Related_Connections_Desc;
+        }
+        if (marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_AND_RELATED_CONNECTIONS) {
+            return GEFMessages.MarqueeTool_Nodes_Contained_And_Related_Connections_Desc;
+        }
+        throw new IllegalArgumentException("Unknown marquee behavior"); //$NON-NLS-1$
+    }
+
+    /**
+     * @see org.eclipse.gef.palette.PaletteEntry#getLargeIcon()
+     */
+    public ImageDescriptor getLargeIcon() {
+        ImageDescriptor imageDescriptor = super.getLargeIcon();
+        if (imageDescriptor != null) {
+            return imageDescriptor;
+        }
+        // infer icon from behavior mode
+        int marqueeBehavior = getMarqueeBehavior();
+        if (marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_CONTAINED
+                || marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_TOUCHED) {
+            return SharedImages.DESC_MARQUEE_TOOL_CONNECTIONS_24;
+        } else if (marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED
+                || marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED) {
+            return SharedImages.DESC_MARQUEE_TOOL_NODES_24;
+        } else {
+            return SharedImages.DESC_MARQUEE_TOOL_24;
+        }
+    }
+
+    private int getMarqueeBehavior() {
+        // retrieve marquee behavior from tool property
+        Object value = getToolProperty(MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR);
+        if (value != null && value instanceof Integer) {
+            return ((Integer) value).intValue();
+        }
+        // return default behavior
+        return MarqueeSelectionTool.DEFAULT_MARQUEE_BEHAVIOR;
+    }
+
+    /**
+     * @see org.eclipse.gef.palette.PaletteEntry#getSmallIcon()
+     */
+    public ImageDescriptor getSmallIcon() {
+        ImageDescriptor imageDescriptor = super.getSmallIcon();
+        if (imageDescriptor != null) {
+            return imageDescriptor;
+        }
+        // infer icon from marquee behavior
+        int marqueeBehavior = getMarqueeBehavior();
+        if (marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_CONTAINED
+                || marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_TOUCHED) {
+            return SharedImages.DESC_MARQUEE_TOOL_CONNECTIONS_16;
+        } else if (marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED
+                || marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED) {
+            return SharedImages.DESC_MARQUEE_TOOL_NODES_16;
+        } else {
+            return SharedImages.DESC_MARQUEE_TOOL_16;
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteContainer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteContainer.java
new file mode 100644 (file)
index 0000000..0d45d99
--- /dev/null
@@ -0,0 +1,262 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * Default implementation of PaletteContainer
+ * 
+ * @author Pratik Shah
+ */
+public class PaletteContainer extends PaletteEntry {
+
+    /**
+     * Property name indicating that this PaletteContainer's children have changed
+     */
+    public static final String PROPERTY_CHILDREN = "Children Changed"; //$NON-NLS-1$
+
+    /**
+     * This container's contents
+     */
+    protected List children = new ArrayList();
+
+    /**
+     * Constructor
+     * <p>
+     * Any parameter can be <code>null</code>.
+     * </p>
+     * 
+     * @param label
+     *            The container's name
+     * @param desc
+     *            The container's description
+     * @param icon
+     *            The small icon to represent this container
+     * @param type
+     *            The container's type
+     */
+    protected PaletteContainer(String label, String desc, ImageDescriptor icon,
+            Object type) {
+        super(label, desc, icon, null, type);
+    }
+
+    /**
+     * Returns true if this type can be a child of this container.
+     * 
+     * @param type
+     *            the type being requested
+     * @return true if this can be a child of this container
+     */
+    public boolean acceptsType(Object type) {
+        return true;
+    }
+
+    /**
+     * Adds the given entry to the end of this PaletteContainer
+     * 
+     * @param entry
+     *            the PaletteEntry to add
+     */
+    public void add(PaletteEntry entry) {
+        add(-1, entry);
+    }
+
+    /**
+     * Adds the given PaletteEntry at position <code>index</code>.
+     * 
+     * @param index
+     *            position to add the PaletteEntry
+     * @param entry
+     *            the PaletteEntry to add
+     */
+    public void add(int index, PaletteEntry entry) {
+        if (!acceptsType(entry.getType()))
+            throw new IllegalArgumentException(
+                                               "This container can not contain this type of child: " //$NON-NLS-1$
+                                                       + entry.getType());
+
+        List oldChildren = new ArrayList(getChildren());
+
+        int actualIndex = index < 0 ? getChildren().size() : index;
+        getChildren().add(actualIndex, entry);
+        entry.setParent(this);
+        listeners.firePropertyChange(PROPERTY_CHILDREN, oldChildren,
+                                     getChildren());
+    }
+
+    /**
+     * Adds the list of {@link PaletteEntry} objects to this PaletteContainer.
+     * 
+     * @param list
+     *            a list of PaletteEntry objects to add to this PaletteContainer
+     */
+    public void addAll(List list) {
+        ArrayList oldChildren = new ArrayList(getChildren());
+        for (int i = 0; i < list.size(); i++) {
+            PaletteEntry child = (PaletteEntry) list.get(i);
+            if (!acceptsType(child.getType()))
+                throw new IllegalArgumentException(
+                                                   "This container can not contain this type of child: " //$NON-NLS-1$
+                                                           + child.getType());
+            getChildren().add(child);
+            child.setParent(this);
+        }
+        listeners.firePropertyChange(PROPERTY_CHILDREN, oldChildren,
+                                     getChildren());
+    }
+
+    /**
+     * Appends the given entry after the entry with the given id, but before the next separator.
+     * 
+     * @param id
+     *            the id of the entry to append after
+     * @param entry
+     *            the entry to add
+     */
+    public void appendToSection(String id, PaletteEntry entry) {
+        // find the entry with the given id
+        boolean found = false;
+        for (int i = 0; i < getChildren().size(); i++) {
+            PaletteEntry currEntry = (PaletteEntry) getChildren().get(i);
+            if (currEntry.getId().equals(id))
+                found = true;
+            else if (found && currEntry instanceof PaletteSeparator) {
+                add(i, entry);
+                return;
+            }
+        }
+        if (found)
+            add(entry);
+        else
+            throw new IllegalArgumentException("Section not found: " + id); //$NON-NLS-1$
+    }
+
+    /**
+     * @return the children of this container
+     */
+    public List getChildren() {
+        return children;
+    }
+
+    private boolean move(PaletteEntry entry, boolean up) {
+        int index = getChildren().indexOf(entry);
+        if (index < 0) {
+            // This container does not contain the given palette entry
+            return false;
+        }
+        index = up ? index - 1 : index + 1;
+        if (index < 0 || index >= getChildren().size()) {
+            // Performing the move operation will give the child an invalid
+            // index
+            return false;
+        }
+        if (getChildren().get(index) instanceof PaletteContainer
+                && getUserModificationPermission() == PaletteEntry.PERMISSION_FULL_MODIFICATION) {
+            // move it into a container if we have full permission
+            PaletteContainer container = (PaletteContainer) getChildren().get(
+                                                                              index);
+            if (container.acceptsType(entry.getType())
+                    && container.getUserModificationPermission() == PaletteEntry.PERMISSION_FULL_MODIFICATION) {
+                remove(entry);
+                if (up)
+                    container.add(entry);
+                else
+                    container.add(0, entry);
+                return true;
+            }
+        }
+        List oldChildren = new ArrayList(getChildren());
+        getChildren().remove(entry);
+        getChildren().add(index, entry);
+        listeners.firePropertyChange(PROPERTY_CHILDREN, oldChildren,
+                                     getChildren());
+        return true;
+    }
+
+    /**
+     * Moves the given entry down, if possible. This method only handles moving the child within
+     * this container.
+     * 
+     * @param entry
+     *            The entry to be moved
+     * @return <code>true</code> if the given entry was successfully moved down
+     */
+    public boolean moveDown(PaletteEntry entry) {
+        return move(entry, false);
+    }
+
+    /**
+     * Moves the given entry up, if possible. This method only handles moving the child within this
+     * container.
+     * 
+     * @param entry
+     *            The entry to be moved
+     * @return <code>true</code> if the given entry was successfully moved up
+     */
+    public boolean moveUp(PaletteEntry entry) {
+        return move(entry, true);
+    }
+
+    /**
+     * Removes the given PaletteEntry from this PaletteContainer
+     * 
+     * @param entry
+     *            the PaletteEntry to remove
+     */
+    public void remove(PaletteEntry entry) {
+        List oldChildren = new ArrayList(getChildren());
+        if (getChildren().remove(entry)) {
+            entry.setParent(null);
+            listeners.firePropertyChange(PROPERTY_CHILDREN, oldChildren,
+                                         getChildren());
+        }
+    }
+
+    /**
+     * Sets the children of this PaletteContainer to the given list of {@link PaletteEntry} objects.
+     * 
+     * @param list
+     *            the list of children
+     */
+    public void setChildren(List list) {
+        List oldChildren = children;
+        for (int i = 0; i < oldChildren.size(); i++) {
+            PaletteEntry entry = (PaletteEntry) oldChildren.get(i);
+            entry.setParent(null);
+        }
+        children = list;
+        for (int i = 0; i < children.size(); i++) {
+            PaletteEntry entry = (PaletteEntry) children.get(i);
+            entry.setParent(this);
+        }
+        listeners.firePropertyChange(PROPERTY_CHILDREN, oldChildren,
+                                     getChildren());
+    }
+
+    /**
+     * @see java.lang.Object#toString()
+     */
+    public String toString() {
+        return "Palette Container (" //$NON-NLS-1$
+                + (getLabel() != null ? getLabel() : "") //$NON-NLS-1$
+                + ")"; //$NON-NLS-1$
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteDrawer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteDrawer.java
new file mode 100644 (file)
index 0000000..25ca3b6
--- /dev/null
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * A PaletteDrawer is a collapsible container that can have other non-container palette entries.
+ * 
+ * @author Pratik Shah
+ */
+public class PaletteDrawer extends PaletteContainer {
+
+    /**
+     * The type for this PaletteEntry.
+     * 
+     * @see PaletteEntry#getType()
+     */
+    public static final Object PALETTE_TYPE_DRAWER = "$Palette Drawer"; //$NON-NLS-1$
+    /**
+     * Property name used when notification about a change in the drawer's initial state is fired.
+     */
+    public static final String PROPERTY_INITIAL_STATUS = "Initial status"; //$NON-NLS-1$
+
+    /**
+     * Constants indicating the possible initial states for a drawer:
+     * <UL>
+     * <LI>INITIAL_STATE_OPEN - The drawer is expanded when the palette is created.</LI>
+     * <LI>INITIAL_STATE_CLOSED - The drawer is collapsed when the palette is created.</LI>
+     * <LI>INITIAL_STATE_PINNED_OPEN - The drawer is pinned open (which would prevent it from being
+     * collapsed automatically) when the palette is created.</LI>
+     * </UL>
+     */
+    public static final int INITIAL_STATE_OPEN = 0, INITIAL_STATE_CLOSED = 1,
+            INITIAL_STATE_PINNED_OPEN = 2;
+
+    /**
+     * @deprecated use {@link #INITIAL_STATE_PINNED_OPEN}
+     */
+    public static final int INITIAL_STATUS_PINNED_OPEN = 2;
+
+    private int initialState;
+    private Object drawerType;
+    private boolean showDefaultIcon = true;
+
+    /**
+     * Constructor
+     * 
+     * @param label
+     *            The name/label for this entry
+     */
+    public PaletteDrawer(String label) {
+        this(label, (ImageDescriptor) null);
+    }
+
+    /**
+     * Constructor
+     * 
+     * @param label
+     *            The name/label for this entry
+     * @param icon
+     *            An icon for this drawer
+     */
+    public PaletteDrawer(String label, ImageDescriptor icon) {
+        super(label, null, icon, PALETTE_TYPE_DRAWER);
+        setUserModificationPermission(PERMISSION_LIMITED_MODIFICATION);
+    }
+
+    /**
+     * Returns true if this type can be a child of this container
+     * 
+     * @param type
+     *            the type being requested
+     * @return true if this can be a child of this container
+     */
+    public boolean acceptsType(Object type) {
+        if (type.equals(PALETTE_TYPE_DRAWER)
+                || type.equals(PaletteGroup.PALETTE_TYPE_GROUP))
+            return false;
+        return super.acceptsType(type);
+    }
+
+    /**
+     * @return <code>ToolEntry.PALETTE_TYPE_TOOL</code> or
+     *         <code>PaletteTemplateEntry.PALETTE_TYPE_TEMPLATE</code> or (if the drawer is empty
+     *         and a drawerType has not been explicitly set) <code>PALETTE_TYPE_UNKNOWN</code>
+     * 
+     * @see #setDrawerType(Object)
+     */
+    public Object getDrawerType() {
+        if (drawerType != null) {
+            return drawerType;
+        }
+        for (int i = 0; i < children.size(); i++) {
+            PaletteEntry child = (PaletteEntry) children.get(i);
+            Object type = child.getType();
+            if (PaletteSeparator.PALETTE_TYPE_SEPARATOR.equals(type) == false)
+                return type;
+        }
+        return PaletteEntry.PALETTE_TYPE_UNKNOWN;
+    }
+
+    /**
+     * @return INITIAL_STATE_OPEN or INITIAL_STATE_CLOSED or INITIAL_STATE_PINNED_OPEN
+     */
+    public int getInitialState() {
+        return initialState;
+    }
+
+    /**
+     * @return <code>true</code> if open initially
+     */
+    public boolean isInitiallyOpen() {
+        return (getInitialState() == INITIAL_STATE_OPEN || getInitialState() == INITIAL_STATE_PINNED_OPEN);
+    }
+
+    /**
+     * @return <code>true</code> if the drawer is to be pinned open initially.
+     */
+    public boolean isInitiallyPinned() {
+        return (getInitialState() == INITIAL_STATE_PINNED_OPEN);
+    }
+
+    /**
+     * DrawerType indicates whether a drawer will contain ToolEntries of PaletteTemplateEntries. A
+     * drawer should not contain entries of both these types. However, there are no
+     * checks/restrictions that will prevent you from doing so.
+     * 
+     * @param obj
+     *            <code>ToolEntry.PALETTE_TYPE_TOOL</code> or
+     *            <code>PaletteTemplateEntry.PALETTE_TYPE_TEMPLATE</code>
+     */
+    public void setDrawerType(Object obj) {
+        drawerType = obj;
+    }
+
+    /**
+     * Sets the initial state of this drawer (i.e. the state that this drawer should be when the
+     * palette is created).
+     * 
+     * @param state
+     *            INITIAL_STATE_OPEN or INITIAL_STATE_CLOSED or INITIAL_STATE_PINNED_OPEN
+     */
+    public void setInitialState(int state) {
+        if (initialState == state)
+            return;
+        int oldState = initialState;
+        initialState = state;
+        listeners.firePropertyChange(PROPERTY_INITIAL_STATUS, oldState, state);
+    }
+
+    /**
+     * Should the default icon be shown for this drawer if no icon is set?
+     * 
+     * @return true if the default icon should be shown if no icon is set; false otherwise
+     * @since 3.4
+     */
+    public boolean showDefaultIcon() {
+        return showDefaultIcon;
+    }
+
+    /**
+     * Should the default icon be shown for this drawer if no icon is set?
+     * 
+     * @param showDefaultIcon
+     *            true if the default icon should be shown if no icon is set; false otherwise
+     * @since 3.4
+     */
+    public void setShowDefaultIcon(boolean showDefaultIcon) {
+        this.showDefaultIcon = showDefaultIcon;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteEntry.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteEntry.java
new file mode 100644 (file)
index 0000000..4e9b414
--- /dev/null
@@ -0,0 +1,463 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * Root class (statically) for the palette model.
+ * 
+ * @author Pratik Shah
+ */
+public class PaletteEntry {
+
+    /**
+     * Property name for the entry's small icon
+     */
+    public static final String PROPERTY_SMALL_ICON = "Small Icon"; //$NON-NLS-1$
+
+    /**
+     * Property name for the entry's type
+     */
+    public static final String PROPERTY_TYPE = "Type"; //$NON-NLS-1$
+
+    /**
+     * Property name for the entry's large icon
+     */
+    public static final String PROPERTY_LARGE_ICON = "Large Icon"; //$NON-NLS-1$
+
+    /**
+     * Property name for the entry's label (name)
+     */
+    public static final String PROPERTY_LABEL = "Name"; //$NON-NLS-1$
+
+    /**
+     * Property name for the entry's description
+     */
+    public static final String PROPERTY_DESCRIPTION = "Description"; //$NON-NLS-1$
+
+    /**
+     * Property name for the entry's hidden status
+     */
+    public static final String PROPERTY_VISIBLE = "Visible"; //$NON-NLS-1$
+
+    /**
+     * Property name for the entry's default staus
+     */
+    public static final String PROPERTY_DEFAULT = "Default"; //$NON-NLS-1$
+
+    /**
+     * Property name for the entry's parent
+     */
+    public static final String PROPERTY_PARENT = "Parent"; //$NON-NLS-1$
+
+    /**
+     * Type unknown
+     */
+    public static final String PALETTE_TYPE_UNKNOWN = "Palette_type_Unknown";//$NON-NLS-1$
+
+    /**
+     * No changes can be made to a PaletteEntry with this permission level.
+     */
+    public static final int PERMISSION_NO_MODIFICATION = 1;
+
+    /**
+     * Entries with this permission level can only be hidden/shown.
+     */
+    public static final int PERMISSION_HIDE_ONLY = 3;
+
+    /**
+     * Any property of entries with this level of permission can be changed; however, they cannot be
+     * deleted from the palette. The children PaletteContainers with this permission level can be
+     * reordered within that container (however, cross-container moving is not allowed).
+     * 
+     */
+    public static final int PERMISSION_LIMITED_MODIFICATION = 7;
+
+    /**
+     * All modifications allowed.
+     */
+    public static final int PERMISSION_FULL_MODIFICATION = 15;
+
+    /**
+     * PropertyChangeSupport
+     */
+    protected PropertyChangeSupport listeners = new PropertyChangeSupport(this);
+
+    private PaletteContainer parent;
+    private String label, id;
+    private String shortDescription;
+    private ImageDescriptor iconSmall;
+    private ImageDescriptor iconLarge;
+    private boolean visible = true;
+    private int permission = PERMISSION_FULL_MODIFICATION;
+    private Object type = PaletteEntry.PALETTE_TYPE_UNKNOWN;
+
+    /**
+     * Constructor
+     * <p>
+     * Any parameter can be <code>null</code>
+     * </p>
+     * 
+     * @param label
+     *            The entry's name
+     * @param shortDescription
+     *            The entry's description
+     */
+    public PaletteEntry(String label, String shortDescription) {
+        this(label, shortDescription, null, null, null);
+    }
+
+    /**
+     * Constructor
+     * <p>
+     * Any parameter can be <code>null</code>
+     * </p>
+     * 
+     * @param label
+     *            The entry's name
+     * @param shortDescription
+     *            The entry's description
+     * @param type
+     *            The entry's type
+     */
+    public PaletteEntry(String label, String shortDescription, Object type) {
+        this(label, shortDescription, null, null, type);
+    }
+
+    /**
+     * Constructor
+     * <p>
+     * Any parameter can be <code>null</code>
+     * </p>
+     * 
+     * @param label
+     *            The entry's name
+     * @param shortDescription
+     *            The entry's description
+     * @param iconSmall
+     *            The small icon to represent this entry
+     * @param iconLarge
+     *            The large icon to represent this entry
+     */
+    public PaletteEntry(String label, String shortDescription,
+            ImageDescriptor iconSmall, ImageDescriptor iconLarge) {
+        this(label, shortDescription, iconSmall, iconLarge, null);
+    }
+
+    /**
+     * Constructor
+     * <p>
+     * Any parameter can be <code>null</code>
+     * </p>
+     * 
+     * @param label
+     *            The entry's name
+     * @param shortDescription
+     *            The entry's description
+     * @param iconSmall
+     *            The small icon to represent this entry
+     * @param iconLarge
+     *            The large icon to represent this entry
+     * @param type
+     *            The entry's type
+     */
+    public PaletteEntry(String label, String shortDescription,
+            ImageDescriptor iconSmall, ImageDescriptor iconLarge, Object type) {
+        this(label, shortDescription, iconSmall, iconLarge, type, null);
+    }
+
+    /**
+     * Constructor
+     * <p>
+     * Any parameter can be <code>null</code>
+     * </p>
+     * 
+     * @param label
+     *            The entry's name
+     * @param shortDescription
+     *            The entry's description
+     * @param smallIcon
+     *            The small icon to represent this entry
+     * @param largeIcon
+     *            The large icon to represent this entry
+     * @param type
+     *            The entry's type
+     * @param id
+     *            The entry's id (preferrably unique)
+     */
+    public PaletteEntry(String label, String shortDescription,
+            ImageDescriptor smallIcon, ImageDescriptor largeIcon, Object type,
+            String id) {
+        setLabel(label);
+        setDescription(shortDescription);
+        setSmallIcon(smallIcon);
+        setLargeIcon(largeIcon);
+        setType(type);
+        setId(id);
+    }
+
+    /**
+     * A listener can only be added once. Adding it more than once will do nothing.
+     * 
+     * @param listener
+     *            the PropertyChangeListener that is to be notified of changes
+     * @see java.beans.PropertyChangeSupport#addPropertyChangeListener(java.beans.PropertyChangeListener)
+     */
+    public void addPropertyChangeListener(PropertyChangeListener listener) {
+        listeners.removePropertyChangeListener(listener);
+        listeners.addPropertyChangeListener(listener);
+    }
+
+    /**
+     * @return a short desecription describing this entry.
+     */
+    public String getDescription() {
+        return shortDescription;
+    }
+
+    /**
+     * Returns the id. If no ID has been set (or it is <code>null</code>), an empty String will be
+     * returned.
+     * 
+     * @return String id
+     */
+    public String getId() {
+        if (id == null)
+            return ""; //$NON-NLS-1$
+        return id;
+    }
+
+    /**
+     * @return the label for this entry.
+     */
+    public String getLabel() {
+        return label;
+    }
+
+    /**
+     * @return a large icon representing this entry.
+     */
+    public ImageDescriptor getLargeIcon() {
+        return iconLarge;
+    }
+
+    /**
+     * @return the parent container of this entry
+     */
+    public PaletteContainer getParent() {
+        return parent;
+    }
+
+    /**
+     * @return a small icon representing the entry.
+     */
+    public ImageDescriptor getSmallIcon() {
+        return iconSmall;
+    }
+
+    /**
+     * @return the type of this entry. Useful for different interpretations of the palette model.
+     */
+    public Object getType() {
+        return type;
+    }
+
+    /**
+     * Returned values are from amongst the following:
+     * <UL>
+     * <LI>PERMISSION_NO_MODIFICATION</LI>
+     * <LI>PERMISSION_HIDE_ONLY</LI>
+     * <LI>PERMISSION_LIMITED_MODIFICATION</LI>
+     * <LI>PERMISSION_FULL_MODIFICATION</LI>
+     * </UL>
+     * 
+     * @return the permission level for this entry.
+     * @see #setUserModificationPermission(int)
+     */
+    public int getUserModificationPermission() {
+        return permission;
+    }
+
+    /**
+     * @return whether or not this entry is visible. An entry that is not visible is not shown on
+     *         the palette.
+     */
+    public boolean isVisible() {
+        return visible;
+    }
+
+    /**
+     * @param listener
+     *            the PropertyChangeListener that is not to be notified anymore
+     * @see java.beans.PropertyChangeSupport#removePropertyChangeListener(java.beans.PropertyChangeListener)
+     */
+    public void removePropertyChangeListener(PropertyChangeListener listener) {
+        listeners.removePropertyChangeListener(listener);
+    }
+
+    /**
+     * Mutator method for description
+     * 
+     * @param s
+     *            The new description
+     */
+    public void setDescription(String s) {
+        if (s == null && shortDescription == null) {
+            return;
+        }
+
+        if (s == null || !s.equals(shortDescription)) {
+            String oldDescrption = shortDescription;
+            shortDescription = s;
+            listeners.firePropertyChange(PROPERTY_DESCRIPTION, oldDescrption,
+                                         shortDescription);
+        }
+    }
+
+    /**
+     * Sets the id. Can be <code>null</code>.
+     * 
+     * @param id
+     *            The new id to be set
+     */
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     * Mutator method for label
+     * 
+     * @param s
+     *            The new name
+     */
+    public void setLabel(String s) {
+        if (s == null && label == null) {
+            return;
+        }
+
+        if (s == null || !s.equals(label)) {
+            String oldLabel = label;
+            label = s;
+            listeners.firePropertyChange(PROPERTY_LABEL, oldLabel, label);
+        }
+    }
+
+    /**
+     * Mutator method for large icon
+     * 
+     * @param icon
+     *            The large icon to represent this entry
+     */
+    public void setLargeIcon(ImageDescriptor icon) {
+        if (icon != iconLarge) {
+            ImageDescriptor oldIcon = iconLarge;
+            iconLarge = icon;
+            listeners.firePropertyChange(PROPERTY_LARGE_ICON, oldIcon,
+                                         iconLarge);
+        }
+    }
+
+    /**
+     * Sets the parent of this entry
+     * 
+     * @param newParent
+     *            The parent PaletteContainer
+     */
+    public void setParent(PaletteContainer newParent) {
+        if (parent != newParent) {
+            PaletteContainer oldParent = parent;
+            parent = newParent;
+            listeners.firePropertyChange(PROPERTY_PARENT, oldParent, parent);
+        }
+    }
+
+    /**
+     * Mutator method for small icon
+     * 
+     * @param icon
+     *            The new small icon to represent this entry
+     */
+    public void setSmallIcon(ImageDescriptor icon) {
+        if (icon != iconSmall) {
+            ImageDescriptor oldIcon = iconSmall;
+            iconSmall = icon;
+            listeners.firePropertyChange(PROPERTY_SMALL_ICON, oldIcon, icon);
+        }
+    }
+
+    /**
+     * Mutator method for type
+     * 
+     * @param newType
+     *            The new type
+     */
+    public void setType(Object newType) {
+        if (newType == null && type == null) {
+            return;
+        }
+
+        if (type == null || !type.equals(newType)) {
+            Object oldType = type;
+            type = newType;
+            listeners.firePropertyChange(PROPERTY_TYPE, oldType, type);
+        }
+    }
+
+    /**
+     * Permissions are not checked before making modifications. Clients should check the permission
+     * before invoking a modification. Sub-classes may extend the set of permissions. Current set
+     * has:
+     * <UL>
+     * <LI>PERMISSION_NO_MODIFICATION</LI>
+     * <LI>PERMISSION_HIDE_ONLY</LI>
+     * <LI>PERMISSION_LIMITED_MODIFICATION</LI>
+     * <LI>PERMISSION_FULL_MODIFICATION</LI>
+     * </UL>
+     * Default is <code>PERMISSION_FULL_MODIFICATION</code>
+     * 
+     * @param permission
+     *            One of the above-specified permission levels
+     */
+    public void setUserModificationPermission(int permission) {
+        this.permission = permission;
+    }
+
+    /**
+     * Makes this entry visible or invisible. An invisible entry does not show up on the palette.
+     * 
+     * @param newVal
+     *            The new boolean indicating whether the entry is visible or not
+     */
+    public void setVisible(boolean newVal) {
+        if (newVal != visible) {
+            visible = newVal;
+            listeners.firePropertyChange(PROPERTY_VISIBLE, !visible, visible);
+        }
+    }
+
+    /**
+     * @see java.lang.Object#toString()
+     */
+    public String toString() {
+        return "Palette Entry (" + (label != null ? label : "") //$NON-NLS-2$//$NON-NLS-1$
+                + ")"; //$NON-NLS-1$
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteGroup.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteGroup.java
new file mode 100644 (file)
index 0000000..2785284
--- /dev/null
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import java.util.List;
+
+
+/**
+ * A PaletteGroup consists of a group of {@link org.eclipse.gef.palette.PaletteEntry} objects that
+ * are uncollapsible . The user modification level is set to
+ * {@link PaletteEntry#PERMISSION_NO_MODIFICATION}, meaning that the entries cannot be reordered.
+ */
+public class PaletteGroup extends PaletteContainer {
+
+    /** Type Identifier **/
+    public static final String PALETTE_TYPE_GROUP = "Palette_Group";//$NON-NLS-1$
+
+    /**
+     * Creates a new PaletteGroup with the given label
+     * 
+     * @param label
+     *            the label
+     */
+    public PaletteGroup(String label) {
+        super(label, null, null, PALETTE_TYPE_GROUP);
+        setUserModificationPermission(PERMISSION_NO_MODIFICATION);
+    }
+
+    /**
+     * Creates a new PaletteGroup with the given label and list of {@link PaletteEntry Palette
+     * Entries}.
+     * 
+     * @param label
+     *            the label
+     * @param children
+     *            the list of PaletteEntry children
+     */
+    public PaletteGroup(String label, List children) {
+        this(label);
+        addAll(children);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteListener.java
new file mode 100644 (file)
index 0000000..3cb55ee
--- /dev/null
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import java.util.EventListener;
+
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+
+
+/**
+ * Listens to changes in the palette.
+ */
+public interface PaletteListener extends EventListener {
+
+    /**
+     * A new tool was activated in the palette.
+     * 
+     * @param palette
+     *            the source of the change
+     * @param tool
+     *            the new tool that was activated
+     */
+    void activeToolChanged(PaletteViewer palette, ToolEntry tool);
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteRoot.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteRoot.java
new file mode 100644 (file)
index 0000000..6f1a0bd
--- /dev/null
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+/**
+ * Serves as the root {@link org.eclipse.gef.palette.PaletteEntry} for the palette model.
+ */
+public class PaletteRoot extends PaletteContainer {
+
+    /** Type Identifier **/
+    public static String PALETTE_TYPE_ROOT = "Palette_Root";//$NON-NLS-1$
+    private ToolEntry defaultEntry;
+
+    /**
+     * Creates a new PaletteRoot.
+     */
+    public PaletteRoot() {
+        super(null, null, null, PALETTE_TYPE_ROOT);
+    }
+
+    /**
+     * @see org.eclipse.gef.palette.PaletteContainer#acceptsType(java.lang.Object)
+     */
+    public boolean acceptsType(Object type) {
+        if (type.equals(ToolEntry.PALETTE_TYPE_TOOL)
+                || type.equals(PaletteStack.PALETTE_TYPE_STACK))
+            return false;
+        return super.acceptsType(type);
+    }
+
+    /**
+     * @return the default ToolEntry
+     */
+    public ToolEntry getDefaultEntry() {
+        return defaultEntry;
+    }
+
+    /**
+     * Sets the default entry to the passed value. This ToolEntry represents the tool that will be
+     * loaded by default.
+     * 
+     * @param entry
+     *            the default entry
+     */
+    public void setDefaultEntry(ToolEntry entry) {
+        this.defaultEntry = entry;
+    }
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString() {
+        return "Palette Root"; //$NON-NLS-1$
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteSeparator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteSeparator.java
new file mode 100644 (file)
index 0000000..7de0497
--- /dev/null
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteMessages;
+
+
+/**
+ * A separator for the palette <br>
+ * <br>
+ * Separators can also be used as markers. Palettes that expect external code to add entries to it
+ * can use such markers to indicate where those new entries should be added. For this to happen, a
+ * separator must be uniquely identified. Unless a separator is not a marker, it is recommended that
+ * it be given a unique ID.
+ * 
+ * @author Pratik Shah
+ */
+public class PaletteSeparator extends PaletteEntry {
+
+    /** Type identifier **/
+    public static final Object PALETTE_TYPE_SEPARATOR = "$Palette Separator";//$NON-NLS-1$
+
+    /**
+     * Creates a new PaletteSeparator with an empty string as its identifier.
+     */
+    public PaletteSeparator() {
+        this(""); //$NON-NLS-1$
+    }
+
+    /**
+     * Constructor
+     * 
+     * @param id
+     *            This Separator's unique ID
+     */
+    public PaletteSeparator(String id) {
+        super(PaletteMessages.NEW_SEPARATOR_LABEL, "", PALETTE_TYPE_SEPARATOR);//$NON-NLS-1$
+        setId(id);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteStack.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteStack.java
new file mode 100644 (file)
index 0000000..a994419
--- /dev/null
@@ -0,0 +1,197 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * The model object for a PaletteStack - A stack of tools. A stack should contain only tools and
+ * should have permissions that are less than or equal to its parent.
+ * 
+ * @author Whitney Sorenson
+ * @since 3.0
+ */
+public class PaletteStack extends PaletteContainer {
+
+    /**
+     * Listens to visibility changes of the children palette entries so that the active entry can be
+     * updated if the current active entry is hidden.
+     */
+    private PropertyChangeListener childListener = new PropertyChangeListener() {
+        public void propertyChange(PropertyChangeEvent evt) {
+            if (evt.getPropertyName().equals(PaletteEntry.PROPERTY_VISIBLE)
+                    && evt.getNewValue() == Boolean.FALSE
+                    && activeEntry == evt.getSource()) {
+                checkActiveEntry();
+            }
+        }
+    };
+
+    /** Type identifier **/
+    public static final String PALETTE_TYPE_STACK = "$PaletteStack"; //$NON-NLS-1$
+
+    /** Property name for the active entry **/
+    public static final String PROPERTY_ACTIVE_ENTRY = "Active Entry"; //$NON-NLS-1$
+
+    private PaletteEntry activeEntry;
+
+    /**
+     * Creates a new PaletteStack with the given name, description, and icon. These will be shown
+     * only in the customize menu. Any of the given parameter can be <code>null</code>.
+     * 
+     * @param name
+     *            the stack's name
+     * @param desc
+     *            the stack's description
+     * @param icon
+     *            an ImageDescriptor for the stack's small icon
+     * @see PaletteContainer#PaletteContainer(String, String, ImageDescriptor, Object)
+     */
+    public PaletteStack(String name, String desc, ImageDescriptor icon) {
+        super(name, desc, icon, PALETTE_TYPE_STACK);
+        setUserModificationPermission(PERMISSION_LIMITED_MODIFICATION);
+    }
+
+    /**
+     * Returns true if this type can be a child of this container Only accepts ToolEntry's.
+     * 
+     * @param type
+     *            the type being requested
+     * @return true if this can be a child of this container
+     */
+    public boolean acceptsType(Object type) {
+        if (!type.equals(ToolEntry.PALETTE_TYPE_TOOL))
+            return false;
+        return super.acceptsType(type);
+    }
+
+    /**
+     * @see org.eclipse.gef.palette.PaletteContainer#add(int, org.eclipse.gef.palette.PaletteEntry)
+     */
+    public void add(int index, PaletteEntry entry) {
+        super.add(index, entry);
+        checkActiveEntry();
+    }
+
+    /**
+     * @see org.eclipse.gef.palette.PaletteContainer#addAll(java.util.List)
+     */
+    public void addAll(List list) {
+        super.addAll(list);
+        checkActiveEntry();
+        updateListeners(list, true);
+    }
+
+    /**
+     * Checks to make sure the active entry is up-to-date and sets it to the first child if it is
+     * <code>null</code>.
+     */
+    private void checkActiveEntry() {
+        PaletteEntry currEntry = activeEntry;
+        if (!getChildren().contains(activeEntry))
+            activeEntry = null;
+        if (activeEntry == null && getChildren().size() > 0)
+            activeEntry = (PaletteEntry) getChildren().get(0);
+        if (activeEntry != null && !activeEntry.isVisible()) {
+            for (Iterator iterator = getChildren().iterator(); iterator
+                    .hasNext();) {
+                PaletteEntry child = (PaletteEntry) iterator.next();
+                if (child.isVisible()) {
+                    activeEntry = child;
+                    break;
+                }
+                activeEntry = null;
+            }
+        }
+        listeners.firePropertyChange(PROPERTY_ACTIVE_ENTRY, currEntry,
+                                     activeEntry);
+    }
+
+    /**
+     * Returns the PaletteEntry referring to the active entry that should be shown in the palette.
+     * 
+     * @return active entry to be shown in the palette.
+     */
+    public PaletteEntry getActiveEntry() {
+        checkActiveEntry();
+        return activeEntry;
+    }
+
+    /**
+     * @see org.eclipse.gef.palette.PaletteContainer#remove(org.eclipse.gef.palette.PaletteEntry)
+     */
+    public void remove(PaletteEntry entry) {
+        super.remove(entry);
+        checkActiveEntry();
+        updateListeners(Collections.singletonList(entry), false);
+    }
+
+    /**
+     * Sets the "active" child entry to the given PaletteEntry. This entry will be shown on the
+     * palette and will be checked in the menu.
+     * 
+     * @param entry
+     *            the entry to show on the palette.
+     */
+    public void setActiveEntry(PaletteEntry entry) {
+        PaletteEntry oldEntry = activeEntry;
+        if (activeEntry != null
+                && (activeEntry.equals(entry) || !getChildren().contains(entry)))
+            return;
+        activeEntry = entry;
+        listeners.firePropertyChange(PROPERTY_ACTIVE_ENTRY, oldEntry,
+                                     activeEntry);
+    }
+
+    public void add(PaletteEntry entry) {
+        super.add(entry);
+        updateListeners(Collections.singletonList(entry), true);
+    }
+
+    public void setChildren(List list) {
+        updateListeners(getChildren(), false);
+        super.setChildren(list);
+        updateListeners(getChildren(), true);
+        checkActiveEntry();
+    }
+
+    /**
+     * Either adds or remove the <code>childListener</code> to each palette entry in the collection.
+     * 
+     * @param entries
+     *            a collection of <code>PaletteEntries</code>
+     * @param add
+     *            true if the lister should be added; false if it should be removed
+     */
+    private void updateListeners(Collection entries, boolean add) {
+        for (Iterator iterator = entries.iterator(); iterator.hasNext();) {
+            PaletteEntry child = (PaletteEntry) iterator.next();
+            if (add) {
+                child.addPropertyChangeListener(childListener);
+            } else {
+                child.removePropertyChangeListener(childListener);
+            }
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteTemplateEntry.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteTemplateEntry.java
new file mode 100644 (file)
index 0000000..a0b1a58
--- /dev/null
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * @author Eric Bordeau
+ */
+public class PaletteTemplateEntry extends PaletteEntry {
+
+    private Object template;
+
+    /** Type identifier **/
+    public static final String PALETTE_TYPE_TEMPLATE = "$Palette Template"; //$NON-NLS-1$
+
+    /**
+     * Creates a new PaletteTemplateEntry with the given template.
+     * 
+     * @param label
+     *            the entry's name
+     * @param shortDesc
+     *            the entry's description
+     * @param template
+     *            the template for this entry
+     * @param iconSmall
+     *            an ImageDescriptor for the entry's small icon
+     * @param iconLarge
+     *            an ImageDescriptor for the entry's large icon
+     * @see PaletteEntry#PaletteEntry(String, String, ImageDescriptor, ImageDescriptor, Object)
+     */
+    public PaletteTemplateEntry(String label, String shortDesc,
+            Object template, ImageDescriptor iconSmall,
+            ImageDescriptor iconLarge) {
+        super(label, shortDesc, iconSmall, iconLarge, PALETTE_TYPE_TEMPLATE);
+        setTemplate(template);
+    }
+
+    /**
+     * @return the user-defined template object
+     */
+    public Object getTemplate() {
+        return template;
+    }
+
+    /**
+     * Sets the template object to the given value
+     * 
+     * @param template
+     *            the template object
+     */
+    public void setTemplate(Object template) {
+        this.template = template;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteToolbar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PaletteToolbar.java
new file mode 100644 (file)
index 0000000..5e49e6c
--- /dev/null
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import java.util.List;
+
+
+/**
+ * A PaletteGroup consists of a group of {@link org.eclipse.gef.palette.PaletteEntry} objects that
+ * are uncollapsible . The user modification level is set to
+ * {@link PaletteEntry#PERMISSION_NO_MODIFICATION}, meaning that the entries cannot be reordered.
+ * 
+ * @author crevells
+ * @since 3.4
+ */
+public class PaletteToolbar extends PaletteContainer {
+
+    /**
+     * Type Identifier for a palette group that looks like a toolbar and only supports icons mode.
+     * 
+     * @since 3.4
+     */
+    public static final String PALETTE_TYPE_TOOLBAR_GROUP = "Palette_Toolbar_Group";//$NON-NLS-1$
+
+    /**
+     * Creates a new PaletteGroup with the given label
+     * 
+     * @param label
+     *            the label
+     */
+    public PaletteToolbar(String label) {
+        super(label, null, null, PALETTE_TYPE_TOOLBAR_GROUP);
+        setUserModificationPermission(PERMISSION_NO_MODIFICATION);
+    }
+
+    /**
+     * Creates a new PaletteGroup with the given label and list of {@link PaletteEntry Palette
+     * Entries}.
+     * 
+     * @param label
+     *            the label
+     * @param children
+     *            the list of PaletteEntry children
+     */
+    public PaletteToolbar(String label, List children) {
+        this(label);
+        addAll(children);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PanningSelectionToolEntry.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/PanningSelectionToolEntry.java
new file mode 100644 (file)
index 0000000..45268a6
--- /dev/null
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import org.eclipse.gef.tools.PanningSelectionTool;
+
+
+/**
+ * A ToolEntry for a {@link PanningSelectionTool}.
+ * 
+ * @author msorens
+ * @since 3.0
+ */
+public class PanningSelectionToolEntry extends SelectionToolEntry {
+
+    /**
+     * Creates a new PanningSelectionToolEntry.
+     */
+    public PanningSelectionToolEntry() {
+        this(null);
+    }
+
+    /**
+     * Constructor for PanningSelectionToolEntry.
+     * 
+     * @param label
+     *            the label
+     */
+    public PanningSelectionToolEntry(String label) {
+        this(label, null);
+    }
+
+    /**
+     * Constructor for PanningSelectionToolEntry.
+     * 
+     * @param label
+     *            the label
+     * @param shortDesc
+     *            the description
+     */
+    public PanningSelectionToolEntry(String label, String shortDesc) {
+        super(label, shortDesc);
+        setToolClass(PanningSelectionTool.class);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/SelectionToolEntry.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/SelectionToolEntry.java
new file mode 100644 (file)
index 0000000..890cb53
--- /dev/null
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import org.eclipse.gef.SharedImages;
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.gef.tools.SelectionTool;
+
+
+/**
+ * A ToolEntry for a {@link SelectionTool}.
+ * 
+ * @author hudsonr
+ * @since 2.1
+ */
+public class SelectionToolEntry extends ToolEntry {
+
+    /**
+     * Creates a new SelectionToolEntry.
+     */
+    public SelectionToolEntry() {
+        this(null);
+    }
+
+    /**
+     * Constructor for SelectionToolEntry.
+     * 
+     * @param label
+     *            the label
+     */
+    public SelectionToolEntry(String label) {
+        this(label, null);
+    }
+
+    /**
+     * Constructor for SelectionToolEntry.
+     * 
+     * @param label
+     *            the label
+     * @param shortDesc
+     *            the description
+     */
+    public SelectionToolEntry(String label, String shortDesc) {
+        super(label, shortDesc, SharedImages.DESC_SELECTION_TOOL_16,
+              SharedImages.DESC_SELECTION_TOOL_24, SelectionTool.class);
+        if (label == null || label.length() == 0)
+            setLabel(GEFMessages.SelectionTool_Label);
+        setUserModificationPermission(PERMISSION_NO_MODIFICATION);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/ToolEntry.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/ToolEntry.java
new file mode 100644 (file)
index 0000000..c6b313f
--- /dev/null
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.palette;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.gef.Tool;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * A factory for returning Tools.
+ */
+public abstract class ToolEntry extends PaletteEntry {
+
+    /** Type Identifier **/
+    public static final Object PALETTE_TYPE_TOOL = "$Palette Tool";//$NON-NLS-1$
+
+    private Map map;
+    private Class toolClass;
+
+    /**
+     * Creates a new ToolEntry. Any parameter can be <code>null</code>.
+     * 
+     * @param label
+     *            the entry's name
+     * @param shortDesc
+     *            the entry's description
+     * @param iconSmall
+     *            the entry's small icon
+     * @param iconLarge
+     *            the entry's large icon
+     */
+    public ToolEntry(String label, String shortDesc, ImageDescriptor iconSmall,
+            ImageDescriptor iconLarge) {
+        this(label, shortDesc, iconSmall, iconLarge, null);
+    }
+
+    /**
+     * Constructor to create a new ToolEntry. Any parameter can be <code>null</code>.
+     * 
+     * @param label
+     *            the entry's name
+     * @param description
+     *            the entry's description
+     * @param iconSmall
+     *            the entry's small icon
+     * @param iconLarge
+     *            the entry's large icon
+     * @param tool
+     *            the type of tool that this entry uses
+     * @since 3.1
+     */
+    public ToolEntry(String label, String description,
+            ImageDescriptor iconSmall, ImageDescriptor iconLarge, Class tool) {
+        super(label, description, iconSmall, iconLarge, PALETTE_TYPE_TOOL);
+        setToolClass(tool);
+    }
+
+    /**
+     * Creates the tool of the type specified by {@link #setToolClass(Class)} for this ToolEntry.
+     * The tool is also configured with the properties set in
+     * {@link #setToolProperty(Object, Object)}. Sub-classes overriding this method should ensure
+     * that their tools are also configured with those properties.
+     * 
+     * @return the tool for this entry
+     */
+    public Tool createTool() {
+        if (toolClass == null)
+            return null;
+        Tool tool;
+        try {
+            tool = (Tool) toolClass.newInstance();
+        } catch (IllegalAccessException iae) {
+            return null;
+        } catch (InstantiationException ie) {
+            return null;
+        }
+        tool.setProperties(getToolProperties());
+        return tool;
+    }
+
+    /**
+     * @return the properties set in {@link #setToolProperty(Object, Object)}
+     * @since 3.1
+     */
+    protected Map getToolProperties() {
+        return map;
+    }
+
+    /**
+     * Returns the property value for the specified property key.
+     * 
+     * @param key
+     *            the property key
+     * @return the value for the requested property
+     * @since 3.1
+     */
+    public Object getToolProperty(Object key) {
+        if (map != null)
+            return map.get(key);
+        return null;
+    }
+
+    /**
+     * Sets the type of tool to be created. This provides clients with a method of specifying a
+     * different type of tool to be created without having to sub-class. The provided class should
+     * have a default constructor for this to work successfully.
+     * 
+     * @param toolClass
+     *            the type of tool to be created by this entry
+     * @since 3.1
+     */
+    public void setToolClass(Class toolClass) {
+        if (toolClass != null)
+            Assert.isTrue(Tool.class.isAssignableFrom(toolClass));
+        this.toolClass = toolClass;
+    }
+
+    /**
+     * Clients can use this method to configure the associated tool without having to sub-class.
+     * 
+     * @param key
+     *            the property name
+     * @param value
+     *            a value of type associated with the given property
+     * @since 3.1
+     * @see Tool#setProperties(Map)
+     */
+    public void setToolProperty(Object key, Object value) {
+        if (map == null)
+            map = new HashMap();
+        map.put(key, value);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/package.html b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/palette/package.html
new file mode 100644 (file)
index 0000000..132550d
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+
+<head>
+<!--
+/**
+ * <copyright>
+ *
+ * (C) COPYRIGHT International Business Machines Corporation 2000.
+ *
+ * </copyright>
+ */
+-->
+
+</head>
+
+<body>
+This package defines and implements the model used by the
+{@link org.eclipse.gef.ui.palette.PaletteViewer PaletteViewer}.
+</body>
+
+</html>
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ruler/DesignEditorRulerComposite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ruler/DesignEditorRulerComposite.java
new file mode 100644 (file)
index 0000000..c1e1a80
--- /dev/null
@@ -0,0 +1,663 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-06-17 Jihoon Song (jihoon.song@samsung.com)
+ *  Modified by S-Core Co.Ltd.
+ *  1. Internalization of Code in Tizen SDK
+ *   - set custom EditPartFactory to RulerViewer
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ruler;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.draw2d.AbstractBorder;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.DefaultRangeModel;
+import org.eclipse.draw2d.FigureCanvas;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.RangeModel;
+import org.eclipse.draw2d.Viewport;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.Handle;
+import org.eclipse.gef.RootEditPart;
+import org.eclipse.gef.internal.ui.rulers.GuideEditPart;
+import org.eclipse.gef.internal.ui.rulers.RulerContextMenuProvider;
+import org.eclipse.gef.internal.ui.rulers.RulerEditPart;
+import org.eclipse.gef.internal.ui.rulers.RulerRootEditPart;
+import org.eclipse.gef.rulers.RulerProvider;
+import org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler;
+import org.eclipse.gef.ui.parts.ScrollingGraphicalViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.tizen.efluibuilder.ui.editor.ruler.DesignEditorRulerEditPartFactory;
+
+
+/**
+ * A RulerComposite is used to show rulers to the north and west of the control
+ * of a given {@link #setGraphicalViewer(ScrollingGraphicalViewer) graphical
+ * viewer}. The rulers will be shown based on whether or not
+ * {@link org.eclipse.gef.rulers.RulerProvider#PROPERTY_HORIZONTAL_RULER
+ * horizontal ruler} and
+ * {@link org.eclipse.gef.rulers.RulerProvider#PROPERTY_VERTICAL_RULER vertical
+ * ruler} properties are set on the given viewer, and the value of the
+ * {@link org.eclipse.gef.rulers.RulerProvider#PROPERTY_RULER_VISIBILITY
+ * visibility} property.
+ * 
+ * @author Pratik Shah
+ * @since 3.0
+ */
+public class DesignEditorRulerComposite extends Composite {
+
+    private EditDomain rulerEditDomain;
+    private GraphicalViewer left, top;
+    private FigureCanvas editor;
+    private GraphicalViewer diagramViewer;
+    private Font font;
+    private Listener layoutListener;
+    private PropertyChangeListener propertyListener;
+    private boolean layingOut = false;
+    private boolean isRulerVisible = true;
+    private boolean needToLayout = false;
+    private Runnable runnable = new Runnable() {
+        public void run() {
+            layout(false);
+        }
+    };
+
+    /**
+     * Constructor
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot
+     *            be null)
+     * @param style
+     *            the style of widget to construct
+     * @see Composite#Composite(org.eclipse.swt.widgets.Composite, int)
+     */
+    public DesignEditorRulerComposite(Composite parent, int style) {
+        super(parent, style);
+        addDisposeListener(new DisposeListener() {
+            public void widgetDisposed(DisposeEvent e) {
+                disposeResources();
+            }
+        });
+    }
+
+    /**
+     * Calculates the proper trim. Includes scrollbars' sizes only if they're
+     * visible.
+     * 
+     * @param canvas
+     *            The canvas.
+     * @since 3.6
+     */
+    public static Rectangle calculateEditorTrim(Canvas canvas) {
+        /*
+         * Workaround for Bug# 87712 Calculating the trim using the clientArea.
+         */
+        Rectangle bounds = canvas.getBounds();
+        Rectangle clientArea = canvas.getClientArea();
+        Rectangle result = new Rectangle(0, 0, bounds.width - clientArea.width,
+                                         bounds.height - clientArea.height);
+        if (result.width != 0 || result.height != 0) {
+            Rectangle trim = canvas.computeTrim(0, 0, 0, 0);
+            result.x = result.height == 0 ? 0 : trim.x;
+            result.y = result.width == 0 ? 0 : trim.y;
+        }
+        return result;
+    }
+
+    /**
+     * Calculates the proper trim for the ruler.
+     * 
+     * @param canvas
+     *            The canvas.
+     * @since 3.6
+     */
+    public static Rectangle calculateRulerTrim(Canvas canvas) {
+        // IMPORTANT: As stated in bug #314750, this is a Mac Carbon related
+        // workaround that is not needed on Cocoa.
+        if ("carbon".equals(SWT.getPlatform())) { //$NON-NLS-1$
+            Rectangle trim = canvas.computeTrim(0, 0, 0, 0);
+            trim.width = 0 - trim.x * 2;
+            trim.height = 0 - trim.y * 2;
+            return trim;
+        }
+        return new Rectangle(0, 0, 0, 0);
+    }
+
+    private GraphicalViewer createRulerContainer(int orientation) {
+        ScrollingGraphicalViewer viewer = new RulerViewer();
+        final boolean isHorizontal = orientation == PositionConstants.NORTH
+                || orientation == PositionConstants.SOUTH;
+
+        // Finish initializing the viewer
+        viewer.setRootEditPart(new RulerRootEditPart(isHorizontal));
+        viewer.setEditPartFactory(new DesignEditorRulerEditPartFactory(diagramViewer));
+        viewer.createControl(this);
+        ((GraphicalEditPart) viewer.getRootEditPart()).getFigure().setBorder(
+                                                                             new RulerBorder(isHorizontal));
+        viewer.setProperty(GraphicalViewer.class.toString(), diagramViewer);
+
+        // Configure the viewer's control
+        FigureCanvas canvas = (FigureCanvas) viewer.getControl();
+        canvas.setScrollBarVisibility(FigureCanvas.NEVER);
+        if (font == null) {
+            FontData[] data = canvas.getFont().getFontData();
+            for (int i = 0; i < data.length; i++) {
+                data[i].setHeight(data[i].getHeight() - 1);
+            }
+            font = new Font(Display.getCurrent(), data);
+        }
+        canvas.setFont(font);
+        if (isHorizontal) {
+            canvas.getViewport().setHorizontalRangeModel(
+                                                         editor.getViewport().getHorizontalRangeModel());
+        } else {
+            canvas.getViewport().setVerticalRangeModel(
+                                                       editor.getViewport().getVerticalRangeModel());
+        }
+
+        // Add the viewer to the rulerEditDomain
+        if (rulerEditDomain == null) {
+            rulerEditDomain = new EditDomain();
+            rulerEditDomain.setCommandStack(diagramViewer.getEditDomain()
+                    .getCommandStack());
+        }
+        rulerEditDomain.addViewer(viewer);
+
+        return viewer;
+    }
+
+    private void disposeResources() {
+        if (diagramViewer != null)
+            diagramViewer.removePropertyChangeListener(propertyListener);
+        if (font != null)
+            font.dispose();
+        // layoutListener is not being removed from the scroll bars because they
+        // are already
+        // disposed at this point.
+    }
+
+    private void disposeRulerViewer(GraphicalViewer viewer) {
+        if (viewer == null)
+            return;
+        /*
+         * There's a tie from the editor's range model to the RulerViewport (via
+         * a listener) to the RulerRootEditPart to the RulerViewer. Break this
+         * tie so that the viewer doesn't leak and can be garbage collected.
+         */
+        RangeModel rModel = new DefaultRangeModel();
+        Viewport port = ((FigureCanvas) viewer.getControl()).getViewport();
+        port.setHorizontalRangeModel(rModel);
+        port.setVerticalRangeModel(rModel);
+        rulerEditDomain.removeViewer(viewer);
+        viewer.getControl().dispose();
+    }
+
+    /**
+     * Perform the ruler layout.
+     * 
+     * @since 3.6
+     */
+    public void doLayout() {
+        if (left == null && top == null) {
+            Rectangle area = getClientArea();
+            if (editor != null && !editor.isDisposed()
+                    && !editor.getBounds().equals(area))
+                editor.setBounds(area);
+            return;
+        }
+
+        int leftWidth = 0, topHeight = 0;
+        Rectangle leftTrim = null, topTrim = null;
+        if (left != null) {
+            leftTrim = calculateRulerTrim((Canvas) left.getControl());
+            // Adding the trim width here because FigureCanvas#computeSize()
+            // does not
+            leftWidth = left.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).x
+                    + leftTrim.width;
+        }
+        if (top != null) {
+            topTrim = calculateRulerTrim((Canvas) top.getControl());
+            topHeight = top.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y
+                    + topTrim.height;
+        }
+
+        Rectangle editorSize = getClientArea();
+        editorSize.x = leftWidth;
+        editorSize.y = topHeight;
+        editorSize.width -= leftWidth;
+        editorSize.height -= topHeight;
+        editor.setBounds(editorSize);
+
+        /*
+         * Fix for Bug# 67554 Take trim into account. Some platforms (such as
+         * MacOS and Motif) leave some trimming around some canvasses.
+         */
+        Rectangle trim = calculateEditorTrim(editor);
+        if (left != null && leftTrim != null) {
+            // The - 1 and + 1 are to compensate for the RulerBorder
+            left.getControl().setBounds(0, topHeight - trim.x + leftTrim.x - 1,
+                                        leftWidth,
+                                        editorSize.height - trim.height + leftTrim.height + 1);
+        }
+        if (top != null && topTrim != null) {
+            top.getControl().setBounds(leftWidth - trim.y + topTrim.y - 1, 0,
+                                       editorSize.width - trim.width + topTrim.width + 1,
+                                       topHeight);
+        }
+    }
+
+    private GraphicalViewer getRulerContainer(int orientation) {
+        GraphicalViewer result = null;
+        switch (orientation) {
+            case PositionConstants.NORTH:
+                result = top;
+                break;
+            case PositionConstants.WEST:
+                result = left;
+        }
+        return result;
+    }
+
+    /**
+     * @see org.eclipse.swt.widgets.Composite#layout(boolean)
+     */
+    public void layout(boolean change) {
+        if (!layingOut && !isDisposed()) {
+            checkWidget();
+            if (change || needToLayout) {
+                needToLayout = false;
+                layingOut = true;
+                doLayout();
+                layingOut = false;
+            }
+        }
+    }
+
+    /**
+     * Creates rulers for the given graphical viewer.
+     * <p>
+     * The primaryViewer or its Control cannot be <code>null</code>. The
+     * primaryViewer's Control should be a FigureCanvas and a child of this
+     * Composite. This method should only be invoked once.
+     * <p>
+     * To create ruler(s), simply add the RulerProvider(s) (with the right key:
+     * RulerProvider.PROPERTY_HORIZONTAL_RULER or
+     * RulerProvider.PROPERTY_VERTICAL_RULER) as a property on the given viewer.
+     * It can be done after this method is invoked.
+     * RulerProvider.PROPERTY_RULER_VISIBILITY can be used to show/hide the
+     * rulers.
+     * 
+     * @param primaryViewer
+     *            The graphical viewer for which the rulers have to be created
+     */
+    public void setGraphicalViewer(ScrollingGraphicalViewer primaryViewer) {
+        // pre-conditions
+        Assert.isNotNull(primaryViewer);
+        Assert.isNotNull(primaryViewer.getControl());
+        Assert.isTrue(diagramViewer == null);
+
+        diagramViewer = primaryViewer;
+        editor = (FigureCanvas) diagramViewer.getControl();
+
+        // layout whenever the scrollbars are shown or hidden, and whenever the
+        // RulerComposite
+        // is resized
+        layoutListener = new Listener() {
+            public void handleEvent(Event event) {
+                // @TODO:Pratik If you use Display.asyncExec(runnable) here,
+                // some flashing
+                // occurs. You can see it when the palette is in the editor, and
+                // you hit
+                // the button to show/hide it.
+                layout(true);
+            }
+        };
+        addListener(SWT.Resize, layoutListener);
+        editor.getHorizontalBar().addListener(SWT.Show, layoutListener);
+        editor.getHorizontalBar().addListener(SWT.Hide, layoutListener);
+        editor.getVerticalBar().addListener(SWT.Show, layoutListener);
+        editor.getVerticalBar().addListener(SWT.Hide, layoutListener);
+
+        propertyListener = new PropertyChangeListener() {
+            public void propertyChange(PropertyChangeEvent evt) {
+                String property = evt.getPropertyName();
+                if (RulerProvider.PROPERTY_HORIZONTAL_RULER.equals(property)) {
+                    setRuler(
+                             (RulerProvider) diagramViewer
+                                     .getProperty(RulerProvider.PROPERTY_HORIZONTAL_RULER),
+                             PositionConstants.NORTH);
+                } else if (RulerProvider.PROPERTY_VERTICAL_RULER
+                        .equals(property)) {
+                    setRuler(
+                             (RulerProvider) diagramViewer
+                                     .getProperty(RulerProvider.PROPERTY_VERTICAL_RULER),
+                             PositionConstants.WEST);
+                } else if (RulerProvider.PROPERTY_RULER_VISIBILITY
+                        .equals(property))
+                    setRulerVisibility(((Boolean) diagramViewer
+                            .getProperty(RulerProvider.PROPERTY_RULER_VISIBILITY))
+                                    .booleanValue());
+            }
+        };
+        diagramViewer.addPropertyChangeListener(propertyListener);
+        Boolean rulerVisibility = (Boolean) diagramViewer
+                .getProperty(RulerProvider.PROPERTY_RULER_VISIBILITY);
+        if (rulerVisibility != null)
+            setRulerVisibility(rulerVisibility.booleanValue());
+        setRuler(
+                 (RulerProvider) diagramViewer
+                         .getProperty(RulerProvider.PROPERTY_HORIZONTAL_RULER),
+                 PositionConstants.NORTH);
+        setRuler(
+                 (RulerProvider) diagramViewer
+                         .getProperty(RulerProvider.PROPERTY_VERTICAL_RULER),
+                 PositionConstants.WEST);
+    }
+
+    private void setRuler(RulerProvider provider, int orientation) {
+        Object ruler = null;
+        if (isRulerVisible && provider != null)
+            // provider.getRuler() might return null (at least the API does not
+            // prevent that)
+            ruler = provider.getRuler();
+
+        if (ruler == null) {
+            // Ruler is not visible or is not present
+            setRulerContainer(null, orientation);
+            // Layout right-away to prevent an empty control from showing
+            layout(true);
+            return;
+        }
+
+        GraphicalViewer container = getRulerContainer(orientation);
+        if (container == null) {
+            container = createRulerContainer(orientation);
+            setRulerContainer(container, orientation);
+        }
+        if (container.getContents() != ruler) {
+            container.setContents(ruler);
+            needToLayout = true;
+            Display.getCurrent().asyncExec(runnable);
+        }
+    }
+
+    private void setRulerContainer(GraphicalViewer container, int orientation) {
+        if (orientation == PositionConstants.NORTH) {
+            if (top == container)
+                return;
+            disposeRulerViewer(top);
+            top = container;
+        } else if (orientation == PositionConstants.WEST) {
+            if (left == container)
+                return;
+            disposeRulerViewer(left);
+            left = container;
+        }
+    }
+
+    private void setRulerVisibility(boolean isVisible) {
+        if (isRulerVisible != isVisible) {
+            isRulerVisible = isVisible;
+            if (diagramViewer != null) {
+                setRuler(
+                         (RulerProvider) diagramViewer
+                                 .getProperty(RulerProvider.PROPERTY_HORIZONTAL_RULER),
+                         PositionConstants.NORTH);
+                setRuler(
+                         (RulerProvider) diagramViewer
+                                 .getProperty(RulerProvider.PROPERTY_VERTICAL_RULER),
+                         PositionConstants.WEST);
+            }
+        }
+    }
+
+    private static class RulerBorder extends AbstractBorder {
+        private static final Insets H_INSETS = new Insets(0, 1, 0, 0);
+        private static final Insets V_INSETS = new Insets(1, 0, 0, 0);
+        private boolean horizontal;
+
+        /**
+         * Constructor
+         * 
+         * @param isHorizontal
+         *            whether or not the ruler being bordered is horizontal or
+         *            not
+         */
+        public RulerBorder(boolean isHorizontal) {
+            horizontal = isHorizontal;
+        }
+
+        /**
+         * @see org.eclipse.draw2d.Border#getInsets(org.eclipse.draw2d.IFigure)
+         */
+        public Insets getInsets(IFigure figure) {
+            return horizontal ? H_INSETS : V_INSETS;
+        }
+
+        /**
+         * @see org.eclipse.draw2d.Border#paint(org.eclipse.draw2d.IFigure,
+         *      org.eclipse.draw2d.Graphics, org.eclipse.draw2d.geometry.Insets)
+         */
+        public void paint(IFigure figure, Graphics graphics, Insets insets) {
+            graphics.setForegroundColor(ColorConstants.buttonDarker);
+            if (horizontal) {
+                graphics.drawLine(
+                                  figure.getBounds().getTopLeft(),
+                                  figure.getBounds()
+                                          .getBottomLeft()
+                                          .translate(
+                                                     new org.eclipse.draw2d.geometry.Point(
+                                                                                           0, -4)));
+            } else {
+                graphics.drawLine(
+                                  figure.getBounds().getTopLeft(),
+                                  figure.getBounds()
+                                          .getTopRight()
+                                          .translate(
+                                                     new org.eclipse.draw2d.geometry.Point(
+                                                                                           -4, 0)));
+            }
+        }
+    }
+
+    /**
+     * Custom graphical viewer intended to be used for rulers.
+     * 
+     * @author Pratik Shah
+     * @since 3.0
+     */
+    private static class RulerViewer extends ScrollingGraphicalViewer {
+        /**
+         * Constructor
+         */
+        public RulerViewer() {
+            super();
+            init();
+        }
+
+        /**
+         * @see org.eclipse.gef.EditPartViewer#appendSelection(org.eclipse.gef.EditPart)
+         */
+        public void appendSelection(EditPart editpart) {
+            if (editpart instanceof RootEditPart)
+                editpart = ((RootEditPart) editpart).getContents();
+            setFocus(editpart);
+            super.appendSelection(editpart);
+        }
+
+        /**
+         * @see org.eclipse.gef.GraphicalViewer#findHandleAt(org.eclipse.draw2d.geometry.Point)
+         */
+        public Handle findHandleAt(org.eclipse.draw2d.geometry.Point p) {
+            final GraphicalEditPart gep = (GraphicalEditPart) findObjectAtExcluding(
+                                                                                    p, new ArrayList());
+            if (gep == null || !(gep instanceof GuideEditPart))
+                return null;
+            return new Handle() {
+                public DragTracker getDragTracker() {
+                    return ((GuideEditPart) gep).getDragTracker(null);
+                }
+
+                public org.eclipse.draw2d.geometry.Point getAccessibleLocation() {
+                    return null;
+                }
+            };
+        }
+
+        /**
+         * @see org.eclipse.gef.ui.parts.AbstractEditPartViewer#init()
+         */
+        protected void init() {
+            setContextMenu(new RulerContextMenuProvider(this));
+            setKeyHandler(new RulerKeyHandler(this));
+        }
+
+        /**
+         * Requests to reveal a ruler are ignored since that causes undesired
+         * scrolling to the origin of the ruler
+         * 
+         * @see org.eclipse.gef.EditPartViewer#reveal(org.eclipse.gef.EditPart)
+         */
+        public void reveal(EditPart part) {
+            if (part != getContents())
+                super.reveal(part);
+        }
+
+        /**
+         * 
+         * @see org.eclipse.gef.ui.parts.GraphicalViewerImpl#handleFocusGained(org.eclipse.swt.events.FocusEvent)
+         */
+        protected void handleFocusGained(FocusEvent fe) {
+            if (focusPart == null) {
+                setFocus(getContents());
+            }
+            super.handleFocusGained(fe);
+        }
+
+        /**
+         * 
+         * @see org.eclipse.gef.ui.parts.GraphicalViewerImpl#handleFocusLost(org.eclipse.swt.events.FocusEvent)
+         */
+        protected void handleFocusLost(FocusEvent fe) {
+            super.handleFocusLost(fe);
+            if (focusPart == getContents()) {
+                setFocus(null);
+            }
+        }
+
+        /**
+         * Custom KeyHandler intended to be used with a RulerViewer
+         * 
+         * @author Pratik Shah
+         * @since 3.0
+         */
+        protected static class RulerKeyHandler extends
+                GraphicalViewerKeyHandler {
+            /**
+             * Constructor
+             * 
+             * @param viewer
+             *            The viewer for which this handler processes keyboard
+             *            input
+             */
+            public RulerKeyHandler(GraphicalViewer viewer) {
+                super(viewer);
+            }
+
+            /**
+             * @see org.eclipse.gef.KeyHandler#keyPressed(org.eclipse.swt.events.KeyEvent)
+             */
+            public boolean keyPressed(KeyEvent event) {
+                if (event.keyCode == SWT.DEL) {
+                    // If a guide has focus, delete it
+                    if (getFocusEditPart() instanceof GuideEditPart) {
+                        RulerEditPart parent = (RulerEditPart) getFocusEditPart()
+                                .getParent();
+                        getViewer()
+                                .getEditDomain()
+                                .getCommandStack()
+                                .execute(
+                                         parent.getRulerProvider()
+                                                 .getDeleteGuideCommand(
+                                                                        getFocusEditPart()
+                                                                                .getModel()));
+                        event.doit = false;
+                        return true;
+                    }
+                    return false;
+                } else if (((event.stateMask & SWT.ALT) != 0)
+                        && (event.keyCode == SWT.ARROW_UP)) {
+                    // ALT + UP_ARROW pressed
+                    // If a guide has focus, give focus to the ruler
+                    EditPart parent = getFocusEditPart().getParent();
+                    if (parent instanceof RulerEditPart)
+                        navigateTo(getFocusEditPart().getParent(), event);
+                    return true;
+                }
+                return super.keyPressed(event);
+            }
+        }
+    }
+
+    /**
+     * Retrieve the left ruler graphical viewer.
+     * 
+     * @return The left ruler graphical viewer.
+     * @since 3.6
+     */
+    protected GraphicalViewer getLeft() {
+        return left;
+    }
+
+    /**
+     * Retrieve the top ruler graphical viewer.
+     * 
+     * @return The top ruler graphical viewer.
+     * @since 3.6
+     */
+    protected GraphicalViewer getTop() {
+        return top;
+    }
+
+    /**
+     * Retrieve the editor figure canvas.
+     * 
+     * @return The editor figure canvas.
+     * @since 3.6
+     */
+    protected FigureCanvas getEditor() {
+        return editor;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/actions/SetActivePaletteToolAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/actions/SetActivePaletteToolAction.java
new file mode 100644 (file)
index 0000000..6c6422e
--- /dev/null
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.ToolEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+
+
+/**
+ * This action sets a Tool to be the active entry in the PaletteViewer.
+ */
+public class SetActivePaletteToolAction extends Action {
+
+    private PaletteViewer viewer;
+    private ToolEntry entry;
+
+    /**
+     * Creates a new SetActivePaletteToolAction with the given entry to set, as well as a label,
+     * icon, and isChecked to be used in a menu.
+     * 
+     * @param viewer
+     *            the PaletteViewer
+     * @param label
+     *            the label to show in the menu for this entry.
+     * @param icon
+     *            the icon to show in the menu for this entry.
+     * @param isChecked
+     *            whether or not this is the current active entry.
+     * @param entry
+     *            the entry to set if this action is invoked.
+     */
+    public SetActivePaletteToolAction(PaletteViewer viewer, String label,
+            ImageDescriptor icon, boolean isChecked, ToolEntry entry) {
+        super(label, icon);
+        this.viewer = viewer;
+        this.entry = entry;
+        setChecked(isChecked);
+    }
+
+    /**
+     * @see org.eclipse.jface.action.IAction#run()
+     */
+    public void run() {
+        if (viewer != null) {
+            viewer.setActiveTool(entry);
+
+            // The PaletteViewerKeyHandler will not pick up key events when the
+            // context menu is open for palette stacks so we need to indicate
+            // that the focus needs to change to the tool entry that the user
+            // has just selected. See GraphicalViewerKeyHandler.procesSelect().
+            EditPart part = (EditPart) viewer.getEditPartRegistry().get(entry);
+            viewer.appendSelection(part);
+            viewer.setFocus(part);
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/ChangeIconSizeAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/ChangeIconSizeAction.java
new file mode 100644 (file)
index 0000000..6da6fc3
--- /dev/null
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import org.eclipse.jface.action.Action;
+
+
+/**
+ * This action toggles the "Use Large Icons" option for the current layout mode of the palette.
+ * 
+ * @author Pratik Shah
+ */
+public class ChangeIconSizeAction extends Action {
+
+    private PaletteViewerPreferences prefs;
+
+    /**
+     * Constructor
+     * 
+     * @param prefs
+     *            The <code>PaletteViewerPreferences</code> object that this action is manipulating
+     */
+    public ChangeIconSizeAction(PaletteViewerPreferences prefs) {
+        super(PaletteMessages.SETTINGS_USE_LARGE_ICONS_LABEL_CAPS);
+        this.prefs = prefs;
+        setChecked(prefs.useLargeIcons());
+    }
+
+    /**
+     * Toggles the "Use Large Icons" option for the current layout mode.
+     * 
+     * @see org.eclipse.jface.action.Action#run()
+     */
+    public void run() {
+        prefs.setCurrentUseLargeIcons(!prefs.useLargeIcons());
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/CustomizeAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/CustomizeAction.java
new file mode 100644 (file)
index 0000000..7e43d69
--- /dev/null
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.jface.action.Action;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteRoot;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize.PaletteCustomizerDialog;
+
+
+/**
+ * This action launches the PaletteCustomizerDialog for the given palette.
+ * 
+ * @author Pratik Shah
+ */
+public class CustomizeAction extends Action {
+
+    private PaletteViewer paletteViewer;
+
+    /**
+     * Constructor
+     * 
+     * @param palette
+     *            the palette which has to be customized when this action is run
+     */
+    public CustomizeAction(PaletteViewer palette) {
+        super();
+        setText(PaletteMessages.MENU_OPEN_CUSTOMIZE_DIALOG);
+        paletteViewer = palette;
+    }
+
+    /**
+     * Opens the Customizer Dialog for the palette
+     * 
+     * @see org.eclipse.jface.action.IAction#run()
+     */
+    public void run() {
+        PaletteCustomizerDialog dialog = paletteViewer.getCustomizerDialog();
+        List list = paletteViewer.getSelectedEditParts();
+        if (!list.isEmpty()) {
+            PaletteEntry selection = (PaletteEntry) ((EditPart) list.get(0))
+                    .getModel();
+            if (!(selection instanceof PaletteRoot)) {
+                dialog.setDefaultSelection(selection);
+            }
+        }
+        dialog.open();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/DefaultPaletteViewerPreferences.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/DefaultPaletteViewerPreferences.java
new file mode 100644 (file)
index 0000000..32be45e
--- /dev/null
@@ -0,0 +1,365 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  2016-09-06 Byoungchang Son sonbc121.son@samsung.com
+ *  Modified by S-Core Co.Ltd.     
+ *  1. Internalization of Code in Tizen SDK
+ *   1) update package name
+ *   2) apply new UI  
+ *      - disable menu items (List and Icons Only) of in the context menu
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+
+import org.eclipse.gef.internal.InternalGEFPlugin;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.graphics.FontData;
+
+
+/**
+ * This is the default implementation for PaletteViewerPreferences. It uses a single
+ * IPreferenceStore to load and save the palette viewer settings.
+ * <p>
+ * It is recommended that the default constructor be used (which will use the preference store in
+ * the GEF plugin) as that will cause the preferences to be shared across different types of
+ * editors. If the client does not wish to share one of the existing preferences for their editor
+ * (say the auto-collapse setting), they will have to sub-class this class and override the
+ * necessary methods (in this case, {@link #getAutoCollapseSetting()} and
+ * {@link #setAutoCollapseSetting(int)}) and save that preference in some other preference store.
+ * Sub-classes can add newer preferences to the store by using {@link #getPreferenceStore()}.
+ * </p>
+ * 
+ * @author Pratik Shah
+ */
+public class DefaultPaletteViewerPreferences implements
+        PaletteViewerPreferences {
+
+    private static final String DEFAULT_FONT = "Default"; //$NON-NLS-1$
+
+    private PreferenceStoreListener listener;
+    private IPropertyChangeListener fontListener;
+    private FontData fontData;
+    private PropertyChangeSupport listeners = new PropertyChangeSupport(this);
+    private IPreferenceStore store;
+    /* ECLIPSE: original menus) { */
+    // private int[] supportedModes = { LAYOUT_COLUMNS, LAYOUT_LIST, LAYOUT_ICONS,
+    // LAYOUT_DETAILS };
+    /* } ECLIPSE */
+    /* TIZEN: disable menu items (List and Icons Only) of in the context menu { */
+    private int[] supportedModes = { LAYOUT_COLUMNS, LAYOUT_DETAILS };
+    /* } TIZEN */
+
+    /**
+     * Default Constructor
+     * <p>
+     * Uses the GEF Plugin's IPreferenceStore to store the preferences.
+     * </p>
+     */
+    public DefaultPaletteViewerPreferences() {
+        this(InternalGEFPlugin.getDefault().getPreferenceStore());
+    }
+
+    /**
+     * Constructor
+     * 
+     * @param store
+     *            The IPreferenceStore where the settings are to be saved.
+     */
+    public DefaultPaletteViewerPreferences(final IPreferenceStore store) {
+        this.store = store;
+        store.setDefault(PREFERENCE_DETAILS_ICON_SIZE, false);
+        store.setDefault(PREFERENCE_COLUMNS_ICON_SIZE, true);
+        store.setDefault(PREFERENCE_ICONS_ICON_SIZE, true);
+        store.setDefault(PREFERENCE_LIST_ICON_SIZE, false);
+        store.setDefault(PREFERENCE_LAYOUT, LAYOUT_LIST);
+        store.setDefault(PREFERENCE_AUTO_COLLAPSE, COLLAPSE_AS_NEEDED);
+        store.setDefault(PREFERENCE_FONT, DEFAULT_FONT);
+
+        listener = new PreferenceStoreListener();
+        store.addPropertyChangeListener(listener);
+
+        fontListener = new IPropertyChangeListener() {
+            public void propertyChange(PropertyChangeEvent event) {
+                if (JFaceResources.DIALOG_FONT.equals(event.getProperty())) {
+                    if (getPreferenceStore().getString(PREFERENCE_FONT).equals(
+                                                                               DEFAULT_FONT)) {
+                        setFontData(JFaceResources.getDialogFont()
+                                .getFontData()[0]);
+                        handlePreferenceStorePropertyChanged(PREFERENCE_FONT);
+                    }
+                }
+            }
+        };
+        JFaceResources.getFontRegistry().addListener(fontListener);
+    }
+
+    /**
+     * NOTE: The <code>oldValue</code> field of the <code>PropertyChangeEvent</code> used to notify
+     * listeners will always be <code>null</code>.
+     * 
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#addPropertyChangeListener(PropertyChangeListener)
+     */
+    public void addPropertyChangeListener(PropertyChangeListener listener) {
+        listeners.addPropertyChangeListener(listener);
+    }
+
+    /**
+     * This is a convenience method that converts the given layout mode to the matching preference
+     * name.
+     * 
+     * <UL>
+     * <LI>int <-> String</LI>
+     * <LI>LAYOUT_LIST <-> PREFERENCE_LIST_ICON_SIZE</LI>
+     * <LI>LAYOUT_COLUMNS <-> PREFERENCE_COLUMNS_ICON_SIZE</LI>
+     * <LI>LAYOUT_ICONS <-> PREFERENCE_ICONS_ICON_SIZE</LI>
+     * <LI>LAYOUT_DETAILS <-> PREFERENCE_DETAILS_ICON_SIZE</LI>
+     * </UL>
+     * 
+     * @param layout
+     *            LAYOUT_LIST, LAYOUT_DETAILS, LAYOUT_COLUMNS, or LAYOUT_ICONS
+     * @return The corresponding preference String
+     */
+    public static String convertLayoutToPreferenceName(int layout) {
+        String key = ""; //$NON-NLS-1$
+        switch (layout) {
+            case LAYOUT_COLUMNS:
+                key = PREFERENCE_COLUMNS_ICON_SIZE;
+                break;
+            case LAYOUT_LIST:
+                key = PREFERENCE_LIST_ICON_SIZE;
+                break;
+            case LAYOUT_ICONS:
+                key = PREFERENCE_ICONS_ICON_SIZE;
+                break;
+            case LAYOUT_DETAILS:
+                key = PREFERENCE_DETAILS_ICON_SIZE;
+                break;
+        }
+        return key;
+    }
+
+    /**
+     * This convenience method converts the given preference to the matching layout mode.
+     * 
+     * <UL>
+     * <LI>int <-> String</LI>
+     * <LI>LAYOUT_LIST <-> PREFERENCE_LIST_ICON_SIZE</LI>
+     * <LI>LAYOUT_COLUMNS <-> PREFERENCE_COLUMNS_ICON_SIZE</LI>
+     * <LI>LAYOUT_ICONS <-> PREFERENCE_ICONS_ICON_SIZE</LI>
+     * <LI>LAYOUT_DETAILS <-> PREFERENCE_DETAILS_ICON_SIZE</LI>
+     * </UL>
+     * 
+     * @param preference
+     *            PREFERENCE_DETAILS_ICON_SIZE, PREFERENCE_COLUMNS_ICON_SIZE,
+     *            PREFERENCE_ICONS_ICON_SIZE or PREFERENCE_LIST_ICON_SIZE
+     * @return The corresponding layout code
+     */
+    public static int convertPreferenceNameToLayout(String preference) {
+        int layout = -1;
+        if (preference.equals(PREFERENCE_DETAILS_ICON_SIZE)) {
+            layout = LAYOUT_DETAILS;
+        } else if (preference.equals(PREFERENCE_COLUMNS_ICON_SIZE)) {
+            layout = LAYOUT_COLUMNS;
+        } else if (preference.equals(PREFERENCE_ICONS_ICON_SIZE)) {
+            layout = LAYOUT_ICONS;
+        } else if (preference.equals(PREFERENCE_LIST_ICON_SIZE)) {
+            layout = LAYOUT_LIST;
+        }
+        return layout;
+    }
+
+    /**
+     * The oldValue of the PropertyChangeEvent that is fired will always be <code>null</code>.
+     * 
+     * @param property
+     *            The programmatic name of the property that was changed
+     * @param newVal
+     *            The new value of the property
+     * @see java.beans.PropertyChangeSupport#firePropertyChange(java.lang.String, java.lang.Object,
+     *      java.lang.Object)
+     */
+    protected void firePropertyChanged(String property, Object newVal) {
+        listeners.firePropertyChange(property, null, newVal);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#getAutoCollapseSetting()
+     */
+    public int getAutoCollapseSetting() {
+        return getPreferenceStore().getInt(PREFERENCE_AUTO_COLLAPSE);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#getFontData()
+     */
+    public FontData getFontData() {
+        if (fontData == null) {
+            String value = getPreferenceStore().getString(PREFERENCE_FONT);
+            if (value.equals(DEFAULT_FONT)) {
+                fontData = JFaceResources.getDialogFont().getFontData()[0];
+            } else {
+                fontData = new FontData(value);
+            }
+        }
+        return fontData;
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#getLayoutSetting()
+     */
+    public int getLayoutSetting() {
+        return getPreferenceStore().getInt(PREFERENCE_LAYOUT);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#getSupportedLayoutModes()
+     */
+    public int[] getSupportedLayoutModes() {
+        return supportedModes;
+    }
+
+    /**
+     * This method is invoked when the preference store fires a property change.
+     * 
+     * @param property
+     *            The property String used for the change fired by the preference store
+     */
+    protected void handlePreferenceStorePropertyChanged(String property) {
+        if (property.equals(PREFERENCE_LAYOUT)) {
+            firePropertyChanged(property, new Integer(getLayoutSetting()));
+        } else if (property.equals(PREFERENCE_AUTO_COLLAPSE)) {
+            firePropertyChanged(property, new Integer(getAutoCollapseSetting()));
+        } else if (property.equals(PREFERENCE_FONT)) {
+            firePropertyChanged(property, getFontData());
+        } else {
+            firePropertyChanged(property, new Boolean(
+                                                      useLargeIcons(convertPreferenceNameToLayout(property))));
+        }
+    }
+
+    /**
+     * @return The IPreferenceStore used by this class to store the preferences.
+     */
+    protected IPreferenceStore getPreferenceStore() {
+        return store;
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#isSupportedLayoutMode(int)
+     */
+    public boolean isSupportedLayoutMode(int layout) {
+        for (int i = 0; i < supportedModes.length; i++) {
+            if (supportedModes[i] == layout) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#removePropertyChangeListener(PropertyChangeListener)
+     */
+    public void removePropertyChangeListener(PropertyChangeListener listener) {
+        listeners.removePropertyChangeListener(listener);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#setAutoCollapseSetting(int)
+     */
+    public void setAutoCollapseSetting(int newVal) {
+        getPreferenceStore().setValue(PREFERENCE_AUTO_COLLAPSE, newVal);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#setFontData(FontData)
+     */
+    public void setFontData(FontData data) {
+        fontData = data;
+        String value = data.toString();
+        if (fontData.equals(JFaceResources.getDialogFont().getFontData()[0])) {
+            value = DEFAULT_FONT;
+        }
+        getPreferenceStore().setValue(PREFERENCE_FONT, value);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#setLayoutSetting(int)
+     */
+    public void setLayoutSetting(int newVal) {
+        getPreferenceStore().setValue(PREFERENCE_LAYOUT, newVal);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#setCurrentUseLargeIcons(boolean)
+     */
+    public void setCurrentUseLargeIcons(boolean newVal) {
+        setUseLargeIcons(getLayoutSetting(), newVal);
+    }
+
+    /**
+     * NOTE: Restricting the layout modes here does not in any way restrict those values from being
+     * stored in the preference store. Instead, it is the responsibility of all clients manipulating
+     * the layout settings to check to see if a particular layout mode is supported before
+     * manipulating it, or allowing the end user to manipulate it.
+     * 
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#setSupportedLayoutModes(int[])
+     */
+    public void setSupportedLayoutModes(int[] modes) {
+        supportedModes = modes;
+        if (!isSupportedLayoutMode(getPreferenceStore().getDefaultInt(
+                                                                      PREFERENCE_LAYOUT))) {
+            getPreferenceStore().setDefault(PREFERENCE_LAYOUT,
+                                            supportedModes[0]);
+        }
+        if (!isSupportedLayoutMode(getPreferenceStore().getInt(
+                                                               PREFERENCE_LAYOUT))) {
+            setLayoutSetting(supportedModes[0]);
+        }
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#setUseLargeIcons(int, boolean)
+     */
+    public void setUseLargeIcons(int layout, boolean newVal) {
+        getPreferenceStore().setValue(convertLayoutToPreferenceName(layout),
+                                      newVal);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#useLargeIcons(int)
+     */
+    public boolean useLargeIcons(int layout) {
+        return getPreferenceStore().getBoolean(
+                                               convertLayoutToPreferenceName(layout));
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.PaletteViewerPreferences#useLargeIcons()
+     */
+    public boolean useLargeIcons() {
+        return useLargeIcons(getLayoutSetting());
+    }
+
+    private class PreferenceStoreListener implements IPropertyChangeListener {
+        /**
+         * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+         */
+        public void propertyChange(PropertyChangeEvent evt) {
+            handlePreferenceStorePropertyChanged(evt.getProperty());
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/FlyoutPaletteComposite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/FlyoutPaletteComposite.java
new file mode 100644 (file)
index 0000000..a911a7c
--- /dev/null
@@ -0,0 +1,1672 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   1) update package name
+ *   2) apply new UI  
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.draw2d.ActionEvent;
+import org.eclipse.draw2d.ActionListener;
+import org.eclipse.draw2d.Border;
+import org.eclipse.draw2d.Button;
+import org.eclipse.draw2d.ButtonBorder;
+import org.eclipse.draw2d.FocusEvent;
+import org.eclipse.draw2d.FocusListener;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.LightweightSystem;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.Triangle;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.SharedCursors;
+import org.eclipse.gef.dnd.TemplateTransfer;
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.TransferDropTargetListener;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleControlAdapter;
+import org.eclipse.swt.accessibility.AccessibleControlEvent;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseMoveListener;
+import org.eclipse.swt.events.MouseTrackAdapter;
+import org.eclipse.swt.events.MouseTrackListener;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Tracker;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IPerspectiveListener;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.XMLMemento;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.PaletteColorUtil;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.views.palette.PaletteView;
+import org.tizen.efluibuilder.ui.editor.palette.PaletteConstants;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.FontResources;
+
+
+/**
+ * The FlyoutPaletteComposite is used to show a flyout palette alongside another control. The flyout
+ * palette auto-hides (thus maximizing space) when not in use, but can also be pinned open if so
+ * desired. It will only be visible when the PaletteView is not.
+ * 
+ * @author Pratik Shah
+ * @since 3.0
+ */
+public class FlyoutPaletteComposite extends Composite {
+
+    private static final FontManager FONT_MGR = new FontManager();
+
+    private static final String PROPERTY_PALETTE_WIDTH = "org.eclipse.gef.ui.palette.fpa.paletteWidth"; //$NON-NLS-1$
+    private static final String PROPERTY_STATE = "org.eclipse.gef.ui.palette.fpa.state"; //$NON-NLS-1$
+    private static final String PROPERTY_DOCK_LOCATION = "org.eclipse.gef.ui.palette.fpa.dock"; //$NON-NLS-1$
+
+    private static final int DEFAULT_PALETTE_SIZE = 125;
+    private static final int MIN_PALETTE_SIZE = 20;
+    private static final int MAX_PALETTE_SIZE = 500;
+
+    private static final int STATE_HIDDEN = 8;
+    private static final int STATE_EXPANDED = 1;
+
+    /* ECLIPSE */
+    /*
+     * private static final Dimension ARROW_SIZE = new Dimension(6, 11);
+     */
+    /* TIZEN: 6 -> 11 */
+    private static final Dimension ARROW_SIZE = new Dimension(11, 11);
+
+    private static final int SASH_BUTTON_WIDTH = 11;
+
+    /**
+     * One of the two possible initial states of the flyout palette. This is the default one. When
+     * in this state, only the flyout palette's sash is visible.
+     */
+    public static final int STATE_COLLAPSED = 2;
+    /**
+     * One of the two possible initial states of the flyout palette. When in this state, the flyout
+     * palette is completely visible and pinned open so that it doesn't disappear when the user
+     * wanders away from the flyout.
+     */
+    public static final int STATE_PINNED_OPEN = 4;
+
+    private PropertyChangeSupport listeners = new PropertyChangeSupport(this);
+    private Composite paletteContainer;
+    private PaletteViewer pViewer, externalViewer;
+    private IMemento capturedPaletteState;
+    private Control graphicalControl;
+    private Composite sash;
+    private PaletteViewerProvider provider;
+    private FlyoutPreferences prefs;
+    private Point cachedBounds = new Point(0, 0);
+    /*
+     * Fix for Bug# 71525 transferFocus is used to transfer focus from the button in the vertical
+     * sash title to the button in the horizontal paletteComposite title. When either button is
+     * pressed it is set to true, and when either the sash or the paletteComposite gets notified of
+     * the change in state, they transfer the focus to their button if this flag is set to true and
+     * if that button is visible.
+     */
+    private boolean transferFocus = false;
+    private int dock = PositionConstants.EAST;
+    private int paletteState = STATE_HIDDEN;
+    private int paletteWidth = DEFAULT_PALETTE_SIZE;
+    private int minWidth = MIN_PALETTE_SIZE;
+    private int cachedSize = -1, cachedState = -1, cachedLocation = -1;
+    private int cachedTitleHeight = 24; // give it a default value
+
+    private IPerspectiveListener perspectiveListener = new IPerspectiveListener() {
+        public void perspectiveActivated(IWorkbenchPage page,
+                                         IPerspectiveDescriptor perspective) {
+            handlePerspectiveActivated(page, perspective);
+        }
+
+        public void perspectiveChanged(IWorkbenchPage page,
+                                       IPerspectiveDescriptor perspective, String changeId) {
+            handlePerspectiveChanged(page, perspective, changeId);
+        }
+    };
+
+    /**
+     * Constructor
+     * 
+     * @param parent
+     *            The parent Composite
+     * @param style
+     *            The style of the widget to construct; only SWT.BORDER is allowed
+     * @param page
+     *            The current workbench page
+     * @param pvProvider
+     *            The provider that is to be used to create the flyout palette
+     * @param preferences
+     *            To save/retrieve the preferences for the flyout
+     */
+    public FlyoutPaletteComposite(Composite parent, int style,
+            IWorkbenchPage page, PaletteViewerProvider pvProvider,
+            FlyoutPreferences preferences) {
+        super(parent, style | SWT.NO_BACKGROUND | SWT.NO_REDRAW_RESIZE
+                | SWT.DOUBLE_BUFFERED);
+        provider = pvProvider;
+        prefs = preferences;
+        sash = createSash();
+        paletteContainer = createPaletteContainer();
+        hookIntoWorkbench(page.getWorkbenchWindow());
+
+        // Initialize the state properly
+        if (prefs.getPaletteWidth() <= 0)
+            prefs.setPaletteWidth(DEFAULT_PALETTE_SIZE);
+        setPaletteWidth(prefs.getPaletteWidth());
+        setDockLocation(prefs.getDockLocation());
+        updateState(page);
+
+        addListener(SWT.Resize, new Listener() {
+            public void handleEvent(Event event) {
+                Rectangle area = getClientArea();
+                /*
+                 * @TODO:Pratik Sometimes, the editor is resized to 1,1 or 0,0 (depending on the
+                 * platform) when the editor is closed or maximized. We have to ignore such resizes.
+                 * See Bug# 62748
+                 */
+                if (area.width > minWidth)
+                    layout(true);
+            }
+        });
+
+        listeners.addPropertyChangeListener(new PropertyChangeListener() {
+            public void propertyChange(PropertyChangeEvent evt) {
+                String property = evt.getPropertyName();
+                if (property.equals(PROPERTY_PALETTE_WIDTH))
+                    prefs.setPaletteWidth(paletteWidth);
+                else if (property.equals(PROPERTY_DOCK_LOCATION))
+                    prefs.setDockLocation(dock);
+                else if (property.equals(PROPERTY_STATE))
+                    if (paletteState == STATE_COLLAPSED
+                            || paletteState == STATE_PINNED_OPEN)
+                        prefs.setPaletteState(paletteState);
+            }
+        });
+    }
+
+    private void addListenerToCtrlHierarchy(Control parent, int eventType,
+                                            Listener listener) {
+        parent.addListener(eventType, listener);
+        if (!(parent instanceof Composite))
+            return;
+        Control[] children = ((Composite) parent).getChildren();
+        for (int i = 0; i < children.length; i++) {
+            addListenerToCtrlHierarchy(children[i], eventType, listener);
+        }
+    }
+
+    private IMemento capturePaletteState(PaletteViewer viewer) {
+        IMemento memento = XMLMemento.createWriteRoot("paletteState"); //$NON-NLS-1$
+        try {
+            viewer.saveState(memento);
+        } catch (RuntimeException re) {
+            // Bug 74843 -- See comment #1
+            // If there's a problem with saving the palette's state, it simply
+            // won't be
+            // transferred to the new palette
+            memento = null;
+            /*
+             * @TODO:Pratik You should log this exception.
+             */
+        }
+        return memento;
+    }
+
+    private Control createFlyoutControlButton(Composite parent) {
+        return new ButtonCanvas(parent);
+    }
+
+    /**
+     * This is a convenient method to get a default FlyoutPreferences object. The returned
+     * FlyoutPreferences does not save any changes made to the given {@link Preferences Preferences}
+     * . It's upto the owner plugin to {@link Plugin#savePluginPreferences() save} the changes
+     * before it {@link Plugin#stop(org.osgi.framework.BundleContext) stops}.
+     * 
+     * @param prefs
+     *            {@link Plugin#getPluginPreferences() a plugin's Preferences}
+     * @return a default implementation of FlyoutPreferences that stores the settings in the given
+     *         Preferences
+     * @since 3.2
+     */
+    public static FlyoutPreferences createFlyoutPreferences(Preferences prefs) {
+        return new DefaultFlyoutPreferences(prefs);
+    }
+
+    private Composite createPaletteContainer() {
+        return new PaletteComposite(this, SWT.NO_BACKGROUND
+                | SWT.NO_REDRAW_RESIZE | SWT.DOUBLE_BUFFERED);
+    }
+
+    private Composite createSash() {
+        return new Sash(this, SWT.NONE);
+    }
+
+    private Control createTitle(Composite parent, boolean isHorizontal) {
+        return new TitleCanvas(parent, isHorizontal);
+    }
+
+    private Control getPaletteViewerControl() {
+        Control result = null;
+        if (pViewer != null)
+            result = pViewer.getControl();
+        // Fix for bug 101703 -- pViewer.getControl().getParent() might be
+        // parented
+        // by paletteContainer
+        if (result != null && !result.isDisposed()
+                && result.getParent() != paletteContainer)
+            result = result.getParent();
+        return result;
+    }
+
+    private void handlePerspectiveActivated(IWorkbenchPage page,
+                                            IPerspectiveDescriptor perspective) {
+        updateState(page);
+    }
+
+    private void handlePerspectiveChanged(IWorkbenchPage page,
+                                          IPerspectiveDescriptor perspective, String changeId) {
+        if (changeId.equals(IWorkbenchPage.CHANGE_VIEW_SHOW)
+                || changeId.equals(IWorkbenchPage.CHANGE_VIEW_HIDE))
+            updateState(page);
+    }
+
+    // Will return false if the ancestor or descendant is null
+    private boolean isDescendantOf(Control ancestor, Control descendant) {
+        if (ancestor == null || descendant == null)
+            return false;
+        while (descendant != null) {
+            if (ancestor == descendant)
+                return true;
+            descendant = descendant.getParent();
+        }
+        return false;
+    }
+
+    private boolean isInState(int state) {
+        return (paletteState & state) != 0;
+    }
+
+    private boolean isMirrored() {
+        return (getStyle() & SWT.MIRRORED) != 0;
+    }
+
+    /**
+     * @see Composite#layout(boolean)
+     */
+    public void layout(boolean changed) {
+        if (graphicalControl == null || graphicalControl.isDisposed())
+            return;
+
+        Rectangle area = getClientArea();
+        if (area.width == 0 || area.height == 0)
+            return;
+
+        int sashWidth = sash.computeSize(-1, -1).x;
+        int pWidth = paletteWidth;
+        int maxWidth = Math.min(area.width / 2, MAX_PALETTE_SIZE);
+        maxWidth = Math.max(maxWidth, minWidth);
+        pWidth = Math.max(pWidth, minWidth);
+        pWidth = Math.min(pWidth, maxWidth);
+
+        /*
+         * Fix for Bug# 65892 Laying out only when necessary helps reduce flicker on GTK in the case
+         * where the flyout palette is being resized past its maximum size.
+         */
+        if (paletteState == cachedState && pWidth == cachedSize
+                && cachedLocation == dock && cachedBounds == getSize())
+            return;
+        cachedState = paletteState;
+        cachedSize = pWidth;
+        cachedLocation = dock;
+        cachedBounds = getSize();
+
+        // #65892 on Mac Cocoa, the redraw causes great flickering, therefore we
+        // skip it there
+        String ws = Platform.getWS();
+        if (ws != null && !ws.equals(Platform.WS_COCOA)) {
+            setRedraw(false);
+        }
+        if (isInState(STATE_HIDDEN)) {
+            sash.setVisible(false);
+            paletteContainer.setVisible(false);
+            graphicalControl.setBounds(area);
+        } else if (dock == PositionConstants.EAST)
+            layoutComponentsEast(area, sashWidth, pWidth);
+        else
+            layoutComponentsWest(area, sashWidth, pWidth);
+        sash.layout();
+        // #65892 see above
+        if (ws != null && !ws.equals(Platform.WS_COCOA)) {
+            setRedraw(true);
+        }
+        update();
+    }
+
+    private void layoutComponentsEast(Rectangle area, int sashWidth, int pWidth) {
+        if (isInState(STATE_COLLAPSED)) {
+            paletteContainer.setVisible(false);
+            sash.setBounds(area.x + area.width - sashWidth, area.y, sashWidth,
+                           area.height);
+            sash.setVisible(true);
+            graphicalControl.setBounds(area.x, area.y, area.width - sashWidth,
+                                       area.height);
+        } else if (isInState(STATE_EXPANDED)) {
+            paletteContainer.moveAbove(graphicalControl);
+            sash.moveAbove(paletteContainer);
+            sash.setBounds(area.x + area.width - pWidth - sashWidth, area.y,
+                           sashWidth, area.height);
+            paletteContainer.setBounds(area.x + area.width - pWidth, area.y,
+                                       pWidth, area.height);
+            sash.setVisible(true);
+            paletteContainer.setVisible(true);
+            graphicalControl.setBounds(area.x, area.y, area.width - sashWidth,
+                                       area.height);
+        } else if (isInState(STATE_PINNED_OPEN)) {
+            sash.setBounds(area.x + area.width - pWidth - sashWidth, area.y,
+                           sashWidth, area.height);
+            paletteContainer.setBounds(area.x + area.width - pWidth, area.y,
+                                       pWidth, area.height);
+            sash.setVisible(true);
+            paletteContainer.setVisible(true);
+            graphicalControl.setBounds(area.x, area.y, area.width - sashWidth
+                    - pWidth, area.height);
+        }
+    }
+
+    private void layoutComponentsWest(Rectangle area, int sashWidth, int pWidth) {
+        if (isInState(STATE_COLLAPSED)) {
+            paletteContainer.setVisible(false);
+            sash.setBounds(area.x, area.y, sashWidth, area.height);
+            sash.setVisible(true);
+            graphicalControl.setBounds(area.x + sashWidth, area.y, area.width
+                    - sashWidth, area.height);
+        } else if (isInState(STATE_EXPANDED)) {
+            paletteContainer.setVisible(true);
+            paletteContainer.moveAbove(graphicalControl);
+            sash.moveAbove(paletteContainer);
+            sash.setBounds(area.x + pWidth, area.y, sashWidth, area.height);
+            paletteContainer.setBounds(area.x, area.y, pWidth, area.height);
+            sash.setVisible(true);
+            graphicalControl.setBounds(area.x + sashWidth, area.y, area.width
+                    - sashWidth, area.height);
+        } else if (isInState(STATE_PINNED_OPEN)) {
+            paletteContainer.setVisible(true);
+            sash.setBounds(area.x + pWidth, area.y, sashWidth, area.height);
+            paletteContainer.setBounds(area.x, area.y, pWidth, area.height);
+            sash.setVisible(true);
+            graphicalControl.setBounds(area.x + pWidth + sashWidth, area.y,
+                                       area.width - sashWidth - pWidth, area.height);
+        }
+    }
+
+    private void hookIntoWorkbench(final IWorkbenchWindow window) {
+        window.addPerspectiveListener(perspectiveListener);
+        addDisposeListener(new DisposeListener() {
+            public void widgetDisposed(DisposeEvent e) {
+                window.removePerspectiveListener(perspectiveListener);
+                perspectiveListener = null;
+            }
+        });
+    }
+
+    private boolean restorePaletteState(PaletteViewer newPalette, IMemento state) {
+        if (state != null) {
+            try {
+                return newPalette.restoreState(state);
+            } catch (RuntimeException re) {
+                /*
+                 * @TODO:Pratik You should log this exception
+                 */
+            }
+        }
+        return false;
+    }
+
+    /**
+     * If an external palette viewer is provided, palette state (that is captured in
+     * {@link PaletteViewer#saveState(IMemento)} -- active tool, drawer expansion state, drawer pin
+     * state, etc.) will be maintained when switching between the two viewers. Providing an external
+     * viewer, although recommended, is optional.
+     * 
+     * @param viewer
+     *            The palette viewer used in the PaletteView
+     */
+    public void setExternalViewer(PaletteViewer viewer) {
+        if (viewer == null && externalViewer != null)
+            capturedPaletteState = capturePaletteState(externalViewer);
+        externalViewer = viewer;
+        if (externalViewer != null && pViewer != null)
+            transferState(pViewer, externalViewer);
+    }
+
+    private void setDockLocation(int position) {
+        if (position != PositionConstants.EAST
+                && position != PositionConstants.WEST)
+            return;
+        if (position != dock) {
+            int oldPosition = dock;
+            dock = position;
+            listeners.firePropertyChange(PROPERTY_DOCK_LOCATION, oldPosition,
+                                         dock);
+            if (pViewer != null)
+                layout(true);
+        }
+    }
+
+    private void setPaletteWidth(int newSize) {
+        if (paletteWidth != newSize) {
+            int oldValue = paletteWidth;
+            paletteWidth = newSize;
+            listeners.firePropertyChange(PROPERTY_PALETTE_WIDTH, oldValue,
+                                         paletteWidth);
+            if (pViewer != null)
+                layout(true);
+        }
+    }
+
+    /**
+     * Sets the control along the side of which the palette is to be displayed. The given Control
+     * should be a child of this Composite. This method should only be invoked once.
+     * 
+     * @param graphicalViewer
+     *            the control of the graphical viewer; cannot be <code>null</code>
+     */
+    public void setGraphicalControl(Control graphicalViewer) {
+        Assert.isTrue(graphicalViewer != null);
+        Assert.isTrue(graphicalViewer.getParent() == this);
+        Assert.isTrue(graphicalControl == null);
+        graphicalControl = graphicalViewer;
+        addListenerToCtrlHierarchy(graphicalControl, SWT.MouseEnter,
+                                   new Listener() {
+                                       public void handleEvent(Event event) {
+                                           if (!isInState(STATE_EXPANDED))
+                                               return;
+                                           Display.getCurrent().timerExec(250, new Runnable() {
+                                               public void run() {
+                                                   if (isDescendantOf(graphicalControl, Display
+                                                           .getCurrent().getCursorControl())
+                                                           && isInState(STATE_EXPANDED))
+                                                       setState(STATE_COLLAPSED);
+                                               }
+                                           });
+                                       }
+                                   });
+    }
+
+    /*
+     * @TODO:Pratik For 4.0, change the parameter of this method to be EditpartViewer instead of
+     * GraphicalViewer.
+     */
+    /**
+     * This method hooks a DropTargetListener that collapses the flyout patette when the user drags
+     * something from the palette and moves the cursor to the primary viewer's control. If the
+     * auto-hide feature of the palette is to work properly when dragging, this method should be
+     * called before any other drop target listeners are added to the primary viewer.
+     * 
+     * @param viewer
+     *            the primary viewer
+     */
+    public void hookDropTargetListener(GraphicalViewer viewer) {
+        viewer.addDropTargetListener(new TransferDropTargetListener() {
+            public void dragEnter(DropTargetEvent event) {
+            }
+
+            public void dragLeave(DropTargetEvent event) {
+            }
+
+            public void dragOperationChanged(DropTargetEvent event) {
+            }
+
+            public void dragOver(DropTargetEvent event) {
+            }
+
+            public void drop(DropTargetEvent event) {
+            }
+
+            public void dropAccept(DropTargetEvent event) {
+            }
+
+            public Transfer getTransfer() {
+                return TemplateTransfer.getInstance();
+            }
+
+            public boolean isEnabled(DropTargetEvent event) {
+                if (isInState(STATE_EXPANDED))
+                    setState(STATE_COLLAPSED);
+                return false;
+            }
+        });
+    }
+
+    /*
+     * If the given state is invalid (as could be the case when FlyoutPreferences.getPaletteState()
+     * is invoked for the first time), it will be defaulted to STATE_COLLAPSED.
+     */
+    private void setState(int newState) {
+        /*
+         * Fix for Bug# 69617 and Bug# 81248 FlyoutPreferences.getPaletteState() could return an
+         * invalid state if none is stored. In that case, we use the default state: STATE_COLLAPSED.
+         */
+        if (newState != STATE_HIDDEN && newState != STATE_PINNED_OPEN
+                && newState != STATE_EXPANDED)
+            newState = STATE_COLLAPSED;
+        if (paletteState == newState)
+            return;
+        int oldState = paletteState;
+        paletteState = newState;
+        switch (paletteState) {
+            case STATE_EXPANDED:
+            case STATE_COLLAPSED:
+            case STATE_PINNED_OPEN:
+                if (pViewer == null) {
+                    pViewer = provider.createPaletteViewer(paletteContainer);
+                    if (externalViewer != null)
+                        transferState(externalViewer, pViewer);
+                    else
+                        restorePaletteState(pViewer, capturedPaletteState);
+                    capturedPaletteState = null;
+                    minWidth = Math.max(pViewer.getControl().computeSize(0, 0).x,
+                                        MIN_PALETTE_SIZE);
+                }
+                break;
+            case STATE_HIDDEN:
+                if (pViewer == null)
+                    break;
+                if (externalViewer != null) {
+                    ((TizenEditDomain) provider.getEditDomain()).setTizenPaletteViewer(externalViewer);
+                    transferState(pViewer, externalViewer);
+                }
+                if (((TizenEditDomain) provider.getEditDomain()).getTizenPaletteViewer() == pViewer)
+                    provider.getEditDomain().setPaletteViewer(null);
+
+                Control pViewerCtrl = getPaletteViewerControl();
+                if (pViewerCtrl != null && !pViewerCtrl.isDisposed())
+                    pViewerCtrl.dispose();
+                pViewer = null;
+        }
+        /*
+         * Fix for Bug# 63901 When the flyout collapses, if the palette has focus, throw focus to
+         * the graphical control. That way, hitting ESC will still deactivate the current tool and
+         * load the default one. Note that focus is being set on RulerComposite and not
+         * GraphicalViewer's control. But this is okay since RulerComposite passes the focus on to
+         * its first child, which is the graphical viewer's control.
+         */
+        if (paletteState == STATE_COLLAPSED
+                && pViewer.getControl().isFocusControl())
+            graphicalControl.setFocus();
+        layout(true);
+        listeners.firePropertyChange(PROPERTY_STATE, oldState, newState);
+    }
+
+    private void transferState(PaletteViewer src, PaletteViewer dest) {
+        restorePaletteState(dest, capturePaletteState(src));
+    }
+
+    private void updateState(IWorkbenchPage page) {
+        IViewReference view = page.findViewReference(PaletteView.ID);
+        if (view == null && isInState(STATE_HIDDEN))
+            setState(prefs.getPaletteState());
+        if (view != null && !isInState(STATE_HIDDEN))
+            setState(STATE_HIDDEN);
+    }
+
+    /**
+     * FlyoutPreferences is used to save/load the preferences for the flyout palette.
+     * 
+     * @author Pratik Shah
+     * @since 3.0
+     */
+    public interface FlyoutPreferences {
+        /**
+         * Should return {@link PositionConstants#EAST} or {@link PositionConstants#WEST}. Any other
+         * int will be ignored and the default dock location (EAST) will be used instead.
+         * 
+         * @return the saved dock location of the Palette
+         */
+        int getDockLocation();
+
+        /**
+         * When there is no saved state, this method can return any non-positive int (which will
+         * result in the palette using the default state -- collapsed), or
+         * {@link FlyoutPaletteComposite#STATE_COLLAPSED}, or
+         * {@link FlyoutPaletteComposite#STATE_PINNED_OPEN}
+         * 
+         * @return the saved state of the palette
+         */
+        int getPaletteState();
+
+        /**
+         * When there is no saved width, this method can return any int (preferrably a non-positive
+         * int). Returning a non-positive int will cause the palette to be sized to the default
+         * size, whereas returning a postive int will find the closest match in the valid range (>=
+         * minimum and <= maximum)
+         * 
+         * @return the saved width of the flyout palette
+         */
+        int getPaletteWidth();
+
+        /**
+         * This method is invoked when the flyout palette's dock location is changed. The provided
+         * dock location should be persisted and returned in {@link #getDockLocation()}.
+         * 
+         * @param location
+         *            {@link PositionConstants#EAST} or {@link PositionConstants#WEST}
+         */
+        void setDockLocation(int location);
+
+        /**
+         * This method is invoked when the flyout palette's state is changed (the new state becomes
+         * the default). The provided state should be persisted and returned in
+         * {@link #getPaletteState()}.
+         * 
+         * @param state
+         *            {@link FlyoutPaletteComposite#STATE_COLLAPSED} or
+         *            {@link FlyoutPaletteComposite#STATE_PINNED_OPEN}
+         */
+        void setPaletteState(int state);
+
+        /**
+         * This method is invoked when the flyout palette is resized. The provided width should be
+         * persisted and returned in {@link #getPaletteWidth()}.
+         * 
+         * @param width
+         *            the new size of the flyout palette
+         */
+        void setPaletteWidth(int width);
+    }
+
+    private class Sash extends Composite {
+        private Control button;
+
+        public Sash(Composite parent, int style) {
+            super(parent, style);
+            button = createFlyoutControlButton(this);
+            new SashDragManager();
+
+            addMouseTrackListener(new MouseTrackAdapter() {
+                public void mouseHover(MouseEvent e) {
+                    if (isInState(STATE_COLLAPSED))
+                        setState(STATE_EXPANDED);
+                }
+            });
+
+            addListener(SWT.Paint, new Listener() {
+                public void handleEvent(Event event) {
+                    paintSash(event.gc);
+                }
+            });
+
+            addListener(SWT.Resize, new Listener() {
+                public void handleEvent(Event event) {
+                    layout(true);
+                }
+            });
+
+            listeners.addPropertyChangeListener(new PropertyChangeListener() {
+                public void propertyChange(PropertyChangeEvent evt) {
+                    if (evt.getPropertyName().equals(PROPERTY_STATE))
+                        updateState();
+                }
+            });
+        }
+
+        public Point computeSize(int wHint, int hHint, boolean changed) {
+            if (isInState(STATE_PINNED_OPEN))
+                return new Point(3, 3);
+
+            // button size plus two pixels for the two lines to be drawn
+            return new Point(SASH_BUTTON_WIDTH + 2, cachedTitleHeight);
+        }
+
+        private void handleSashDragged(int shiftAmount) {
+            int newSize = paletteContainer.getBounds().width
+                    + (dock == PositionConstants.EAST ? -shiftAmount
+                            : shiftAmount);
+            setPaletteWidth(newSize);
+        }
+
+        public void layout(boolean changed) {
+            if (button == null)
+                return;
+
+            if (isInState(STATE_PINNED_OPEN)) {
+                button.setVisible(false);
+                return;
+            }
+
+            button.setVisible(true);
+            Rectangle area = getClientArea();
+            button.setBounds(area.x + 1, area.y + 1, SASH_BUTTON_WIDTH,
+                             cachedTitleHeight - 1);
+
+            if (transferFocus) {
+                transferFocus = false;
+                button.setFocus();
+            }
+        }
+
+        private void paintSash(GC gc) {
+            Rectangle bounds = getBounds();
+            if (isInState(STATE_PINNED_OPEN)) {
+                gc.setBackground(PaletteColorUtil.WIDGET_BACKGROUND);
+                gc.fillRectangle(0, 0, bounds.width, bounds.height);
+
+                gc.setForeground(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+                gc.drawLine(0, 0, bounds.width, 0);
+                gc.setForeground(PaletteColorUtil.WIDGET_NORMAL_SHADOW);
+                gc.drawLine(0, bounds.height - 1, bounds.width - 1,
+                            bounds.height - 1);
+                gc.setForeground(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+                gc.drawLine(0, 0, 0, bounds.height);
+                gc.setForeground(PaletteColorUtil.WIDGET_NORMAL_SHADOW);
+                gc.drawLine(bounds.width - 1, 0, bounds.width - 1,
+                            bounds.height - 1);
+            } else {
+                gc.setForeground(PaletteColorUtil.WIDGET_NORMAL_SHADOW);
+                gc.drawLine(0, 0, 0, bounds.height);
+                gc.drawLine(bounds.width - 1, 0, bounds.width - 1,
+                            bounds.height);
+
+                gc.setForeground(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+                gc.drawLine(1, 0, 1, bounds.height);
+
+                gc.setForeground(PaletteColorUtil.WIDGET_BACKGROUND_LIST_BACKGROUND_85);
+                gc.drawLine(2, 0, 2, bounds.height);
+            }
+        }
+
+        private void updateState() {
+            setCursor(isInState(STATE_EXPANDED | STATE_PINNED_OPEN) ? SharedCursors.SIZEWE
+                    : null);
+        }
+
+        private class SashDragManager extends MouseAdapter implements
+                MouseMoveListener {
+            protected boolean dragging = false;
+            protected boolean correctState = false;
+            protected boolean mouseDown = false;
+            protected int origX;
+            protected Listener keyListener = new Listener() {
+                public void handleEvent(Event event) {
+                    if (event.keyCode == SWT.ALT || event.keyCode == SWT.ESC) {
+                        dragging = false;
+                        Display.getCurrent().removeFilter(SWT.KeyDown, this);
+                    }
+                    event.doit = false;
+                    event.type = SWT.None;
+                }
+            };
+
+            public SashDragManager() {
+                Sash.this.addMouseMoveListener(this);
+                Sash.this.addMouseListener(this);
+            }
+
+            public void mouseDown(MouseEvent me) {
+                if (me.button != 1)
+                    return;
+                mouseDown = true;
+                correctState = isInState(STATE_EXPANDED | STATE_PINNED_OPEN);
+                origX = me.x;
+                Display.getCurrent().addFilter(SWT.KeyDown, keyListener);
+            }
+
+            public void mouseMove(MouseEvent me) {
+                if (mouseDown)
+                    dragging = true;
+                if (dragging && correctState)
+                    handleSashDragged(me.x - origX);
+            }
+
+            public void mouseUp(MouseEvent me) {
+                Display.getCurrent().removeFilter(SWT.KeyDown, keyListener);
+                if (!dragging && me.button == 1) {
+                    if (isInState(STATE_COLLAPSED))
+                        setState(STATE_EXPANDED);
+                    else if (isInState(STATE_EXPANDED))
+                        setState(STATE_COLLAPSED);
+                }
+                dragging = false;
+                correctState = false;
+                mouseDown = false;
+            }
+        }
+    }
+
+    private class ResizeAction extends Action {
+        public ResizeAction() {
+            super(PaletteMessages.RESIZE_LABEL);
+        }
+
+        public boolean isEnabled() {
+            return !isInState(STATE_COLLAPSED);
+        }
+
+        public void run() {
+            final Tracker tracker = new Tracker(FlyoutPaletteComposite.this,
+                                                SWT.RIGHT | SWT.LEFT);
+            Rectangle[] rects = new Rectangle[1];
+            rects[0] = sash.getBounds();
+            tracker.setCursor(SharedCursors.SIZEE);
+            tracker.setRectangles(rects);
+            if (tracker.open()) {
+                int deltaX = sash.getBounds().x - tracker.getRectangles()[0].x;
+                if (dock == PositionConstants.WEST)
+                    deltaX = -deltaX;
+                setPaletteWidth(paletteContainer.getBounds().width + deltaX);
+            }
+            tracker.dispose();
+        }
+    }
+
+    private class TitleDragManager extends MouseAdapter implements Listener,
+            MouseTrackListener {
+        protected boolean switchDock = false;
+        protected boolean dragging = false;
+        protected int threshold;
+
+        public TitleDragManager(Control ctrl) {
+            ctrl.addListener(SWT.DragDetect, this);
+            ctrl.addMouseListener(this);
+            ctrl.addMouseTrackListener(this);
+        }
+
+        public void handleEvent(Event event) {
+            dragging = true;
+            switchDock = false;
+            threshold = dock == PositionConstants.EAST ? Integer.MAX_VALUE / 2
+                    : -1;
+            final Composite flyout = FlyoutPaletteComposite.this;
+            final Rectangle flyoutBounds = flyout.getBounds();
+            final int switchThreshold = flyoutBounds.x
+                    + (flyoutBounds.width / 2);
+            Rectangle bounds = sash.getBounds();
+            if (paletteContainer.getVisible())
+                bounds = bounds.union(paletteContainer.getBounds());
+            final Rectangle origBounds = Display.getCurrent().map(flyout, null,
+                                                                  bounds);
+            final Tracker tracker = new Tracker(Display.getDefault(), SWT.NULL);
+            tracker.setRectangles(new Rectangle[] { origBounds });
+            tracker.setStippled(true);
+            tracker.addListener(SWT.Move, new Listener() {
+                public void handleEvent(final Event evt) {
+                    Display.getCurrent().syncExec(new Runnable() {
+                        public void run() {
+                            Control ctrl = Display.getCurrent()
+                                    .getCursorControl();
+                            Point pt = flyout.toControl(evt.x, evt.y);
+                            switchDock = isDescendantOf(graphicalControl, ctrl)
+                                    && ((dock == PositionConstants.WEST && pt.x > threshold - 10) || (dock == PositionConstants.EAST && pt.x < threshold + 10));
+                            boolean invalid = false;
+                            if (!switchDock)
+                                invalid = !isDescendantOf(
+                                                          FlyoutPaletteComposite.this, ctrl);
+                            if (switchDock) {
+                                if (dock == PositionConstants.WEST) {
+                                    threshold = Math.max(threshold, pt.x);
+                                    threshold = Math.min(threshold,
+                                                         switchThreshold);
+                                } else {
+                                    threshold = Math.min(threshold, pt.x);
+                                    threshold = Math.max(threshold,
+                                                         switchThreshold);
+                                }
+                            }
+                            Rectangle placeHolder = origBounds;
+                            if (switchDock) {
+                                if (dock == PositionConstants.EAST)
+                                    placeHolder = new Rectangle(0, 0,
+                                                                origBounds.width, origBounds.height);
+                                else
+                                    placeHolder = new Rectangle(
+                                                                flyoutBounds.width
+                                                                        - origBounds.width,
+                                                                0,
+                                                                origBounds.width, origBounds.height);
+                                placeHolder = Display.getCurrent().map(flyout,
+                                                                       null, placeHolder);
+                            }
+                            // update the cursor
+                            int cursor;
+                            if (invalid)
+                                cursor = DragCursors.INVALID;
+                            else if ((!switchDock && dock == PositionConstants.EAST)
+                                    || (switchDock && dock == PositionConstants.WEST))
+                                cursor = DragCursors.RIGHT;
+                            else
+                                cursor = DragCursors.LEFT;
+                            if (isMirrored()) {
+                                if (cursor == DragCursors.RIGHT)
+                                    cursor = DragCursors.LEFT;
+                                else if (cursor == DragCursors.LEFT)
+                                    cursor = DragCursors.RIGHT;
+                            }
+                            tracker.setCursor(DragCursors.getCursor(cursor));
+                            // update the rectangle only if it has changed
+                            if (!tracker.getRectangles()[0].equals(placeHolder))
+                                tracker.setRectangles(new Rectangle[] { placeHolder });
+                        }
+                    });
+                }
+            });
+            if (tracker.open()) {
+                if (switchDock)
+                    setDockLocation(PositionConstants.EAST_WEST & ~dock);
+                // mouse up is received by the tracker and by this listener, so
+                // we set dragging
+                // to be false
+                dragging = false;
+            }
+            tracker.dispose();
+        }
+
+        public void mouseEnter(MouseEvent e) {
+        }
+
+        public void mouseExit(MouseEvent e) {
+        }
+
+        public void mouseHover(MouseEvent e) {
+            /*
+             * @TODO:Pratik Mouse hover events are received if the hover occurs just before you
+             * finish or cancel the drag. Open a bugzilla about it?
+             */
+            if (isInState(STATE_COLLAPSED))
+                setState(STATE_EXPANDED);
+        }
+
+        public void mouseUp(MouseEvent me) {
+            if (me.button != 1)
+                return;
+            if (isInState(STATE_COLLAPSED))
+                setState(STATE_EXPANDED);
+            else if (isInState(STATE_EXPANDED))
+                setState(STATE_COLLAPSED);
+        }
+    }
+
+    private class PaletteComposite extends Composite {
+        protected Control button, title;
+
+        public PaletteComposite(Composite parent, int style) {
+            super(parent, style);
+            createComponents();
+
+            listeners.addPropertyChangeListener(new PropertyChangeListener() {
+                public void propertyChange(PropertyChangeEvent evt) {
+                    if (evt.getPropertyName().equals(PROPERTY_STATE))
+                        updateState();
+                    else if (evt.getPropertyName().equals(
+                                                          PROPERTY_DOCK_LOCATION))
+                        if (getVisible())
+                            layout(true);
+                }
+            });
+
+            addListener(SWT.Resize, new Listener() {
+                public void handleEvent(Event event) {
+                    layout(true);
+                }
+            });
+
+            updateState();
+        }
+
+        protected void createComponents() {
+            title = createTitle(this, true);
+            button = createFlyoutControlButton(this);
+        }
+
+        public void layout(boolean changed) {
+            Control pCtrl = getPaletteViewerControl();
+            if (pCtrl == null || pCtrl.isDisposed())
+                return;
+
+            Rectangle area = getClientArea();
+            boolean buttonVisible = button.getVisible();
+            Point titleSize = title.computeSize(-1, -1);
+            Point buttonSize = buttonVisible ? button.computeSize(-1, -1)
+                    : new Point(0, 0);
+            cachedTitleHeight = Math.max(titleSize.y, buttonSize.y);
+            if (buttonVisible) {
+                buttonSize.x = Math.max(cachedTitleHeight, buttonSize.x);
+            }
+            if (dock == PositionConstants.EAST) {
+                /* ECLIPSE */
+                /* int buttonX = area.width - buttonSize.x; */
+                /* TIZEN: add offset { */
+                int offset = -1; // // advux - UI Tunning
+                int buttonX = area.width - buttonSize.x + offset;
+                /* TIZEN } */
+                button.setBounds(buttonX, 0, buttonSize.x, cachedTitleHeight);
+                title.setBounds(0, 0, buttonX, cachedTitleHeight);
+            } else {
+                int titleX = buttonSize.x;
+                button.setBounds(0, 0, buttonSize.x, cachedTitleHeight);
+                title.setBounds(titleX, 0, area.width - titleX,
+                                cachedTitleHeight);
+            }
+            area.y += cachedTitleHeight;
+            area.height -= cachedTitleHeight;
+            pCtrl.setBounds(area);
+        }
+
+        protected void updateState() {
+            button.setVisible(isInState(STATE_PINNED_OPEN));
+            if (transferFocus && button.getVisible()) {
+                transferFocus = false;
+                button.setFocus();
+            }
+            layout(true);
+        }
+    }
+
+    private static class TitleLabel extends Label {
+        protected static final Border BORDER = new MarginBorder(4, 3, 4, 3);
+        protected static final Border TOOL_TIP_BORDER = new MarginBorder(0, 2,
+                                                                         0, 2);
+
+        public TitleLabel(boolean isHorizontal) {
+            /* ECLIPSE { */
+            // super(GEFMessages.Palette_Label, InternalImages
+            // .get(InternalImages.IMG_PALETTE));
+            /* ECLIPSE } */
+
+            /* TIZEN { */
+            super(GEFMessages.Palette_Label, PaletteConstants.imgDescTitle.createImage());
+            /* TIZEN } */
+
+            setLabelAlignment(PositionConstants.LEFT);
+            setBorder(BORDER);
+            Label tooltip = new Label(getText());
+            tooltip.setBorder(TOOL_TIP_BORDER);
+            setToolTip(tooltip);
+            /* ECLIPSE { */
+            // setForegroundColor(ColorConstants.listForeground);
+            /* ECLIPSE } */
+
+            /* TIZEN { */
+            setForegroundColor(ColorResources.PALETTE_TITLE);
+            /* TIZEN } */
+        }
+
+        public IFigure getToolTip() {
+            if (isTextTruncated())
+                return super.getToolTip();
+            return null;
+        }
+
+        protected void paintFigure(Graphics graphics) {
+
+            // paint the gradient
+            graphics.pushState();
+            org.eclipse.draw2d.geometry.Rectangle r = org.eclipse.draw2d.geometry.Rectangle.SINGLETON;
+            r.setBounds(getBounds());
+            graphics.setForegroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+            /* ECLIPSE { */
+            // graphics.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND);
+            // graphics.fillGradient(r, true);
+            /* ECLIPSE } */
+
+            /* TIZEN { */
+            graphics.setBackgroundColor(ColorResources.PALETTE_TITLE_BACKGROUND);
+            graphics.fillRectangle(r);
+            /* TIZEN } */
+
+            // draw bottom border
+            graphics.setForegroundColor(PaletteColorUtil.WIDGET_NORMAL_SHADOW);
+            graphics.drawLine(r.getBottomLeft().getTranslated(0, -1), r
+                    .getBottomRight().getTranslated(0, -1));
+
+            graphics.popState();
+
+            // paint the text and icon
+            super.paintFigure(graphics);
+
+            // paint the focus rectangle around the text
+            if (hasFocus()) {
+                org.eclipse.draw2d.geometry.Rectangle textBounds = getTextBounds();
+                // We reduce the width by 1 because FigureUtilities grows it by
+                // 1 unnecessarily
+                textBounds.width--;
+                graphics.drawFocus(bounds.getResized(-1, -1).intersect(
+                                                                       textBounds.getExpanded(getInsets())));
+            }
+        }
+    }
+
+    private class ButtonCanvas extends Canvas {
+        private LightweightSystem lws;
+
+        public ButtonCanvas(Composite parent) {
+            super(parent, SWT.NO_REDRAW_RESIZE | SWT.NO_BACKGROUND);
+            init();
+            provideAccSupport();
+        }
+
+        public Point computeSize(int wHint, int hHint, boolean changed) {
+            Dimension size = lws.getRootFigure().getPreferredSize(wHint, hHint);
+            size.union(new Dimension(wHint, hHint));
+            return new org.eclipse.swt.graphics.Point(size.width, size.height);
+        }
+
+        private int getArrowDirection() {
+            int direction = PositionConstants.EAST;
+            if (isInState(STATE_EXPANDED | STATE_PINNED_OPEN))
+                direction = dock == PositionConstants.WEST ? PositionConstants.WEST
+                        : PositionConstants.EAST;
+            else
+                direction = dock == PositionConstants.WEST ? PositionConstants.EAST
+                        : PositionConstants.WEST;
+            if (isMirrored()) {
+                if (direction == PositionConstants.WEST)
+                    direction = PositionConstants.EAST;
+                else
+                    direction = PositionConstants.WEST;
+            }
+            return direction;
+        }
+
+        private String getButtonTooltipText() {
+            if (isInState(STATE_COLLAPSED))
+                return PaletteMessages.PALETTE_SHOW;
+            return PaletteMessages.PALETTE_HIDE;
+        }
+
+        private void init() {
+            setCursor(SharedCursors.ARROW);
+            lws = new LightweightSystem();
+            lws.setControl(this);
+            final ArrowButton b = new ArrowButton(getArrowDirection());
+            b.setRolloverEnabled(true);
+            b.setBorder(new ButtonBorder(ButtonBorder.SCHEMES.TOOLBAR));
+            b.addActionListener(new ActionListener() {
+                public void actionPerformed(ActionEvent event) {
+                    transferFocus = true;
+                    if (isInState(STATE_COLLAPSED))
+                        setState(STATE_PINNED_OPEN);
+                    else
+                        setState(STATE_COLLAPSED);
+                }
+            });
+            listeners.addPropertyChangeListener(new PropertyChangeListener() {
+                public void propertyChange(PropertyChangeEvent evt) {
+                    if (evt.getPropertyName().equals(PROPERTY_STATE)) {
+                        b.setDirection(getArrowDirection());
+                        setToolTipText(getButtonTooltipText());
+                    } else if (evt.getPropertyName().equals(
+                                                            PROPERTY_DOCK_LOCATION))
+                        b.setDirection(getArrowDirection());
+                }
+            });
+            lws.setContents(b);
+        }
+
+        private void provideAccSupport() {
+            getAccessible().addAccessibleListener(new AccessibleAdapter() {
+                public void getDescription(AccessibleEvent e) {
+                    e.result = PaletteMessages.ACC_DESC_PALETTE_BUTTON;
+                }
+
+                public void getHelp(AccessibleEvent e) {
+                    getDescription(e);
+                }
+
+                public void getName(AccessibleEvent e) {
+                    e.result = getToolTipText();
+                }
+            });
+            getAccessible().addAccessibleControlListener(
+                                                         new AccessibleControlAdapter() {
+                                                             public void getRole(AccessibleControlEvent e) {
+                                                                 e.detail = ACC.ROLE_PUSHBUTTON;
+                                                             }
+                                                         });
+        }
+
+        private class ArrowButton extends Button {
+
+            private Triangle triangle;
+
+            /**
+             * Creates a new instance
+             * 
+             * @param direction
+             *            the direction the arrow should face (PositionConstants.RIGHT or
+             *            PositionConstants.LEFT)
+             */
+            public ArrowButton(int direction) {
+                super();
+                setDirection(direction);
+
+                triangle = new Triangle();
+                triangle.setOutline(true);
+                /* ECLIPSE { */
+                // triangle.setBackgroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+                // triangle.setForegroundColor(PaletteColorUtil.WIDGET_DARK_SHADOW);
+                /* ECLIPSE } */
+
+                /* TIZEN { */
+                triangle.setBackgroundColor(ColorResources.PALETTE_TITLE);
+                triangle.setForegroundColor(ColorResources.PALETTE_TITLE);
+                /* TIZEN } */
+                setContents(triangle);
+            }
+
+            public void setDirection(int direction) {
+                if (triangle != null) {
+                    triangle.setDirection(direction);
+                }
+            }
+
+            protected void layout() {
+                org.eclipse.draw2d.geometry.Rectangle clientArea = getBounds();
+                triangle.setBounds(new org.eclipse.draw2d.geometry.Rectangle(clientArea.getCenter().getTranslated(-ARROW_SIZE.width / 2,
+                                                                                                                  -ARROW_SIZE.height / 2),
+                                                                             ARROW_SIZE));
+            }
+
+            protected void paintFigure(Graphics graphics) {
+                super.paintFigure(graphics);
+
+                // paint the gradient
+                graphics.pushState();
+                org.eclipse.draw2d.geometry.Rectangle r = org.eclipse.draw2d.geometry.Rectangle.SINGLETON;
+                r.setBounds(getBounds());
+                graphics.setForegroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
+
+                /* ECLIPSE { */
+                // graphics.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND);
+                // graphics.fillGradient(r, true);
+                /* ECLIPSE } */
+
+                /* TIZEN { */
+                graphics.setBackgroundColor(ColorResources.PALETTE_TITLE_BACKGROUND);
+                graphics.fillRectangle(r);
+                /* TIZEN } */
+
+                graphics.popState();
+
+                // draw bottom border
+                graphics.setForegroundColor(PaletteColorUtil.WIDGET_NORMAL_SHADOW);
+                graphics.drawLine(r.getBottomLeft().getTranslated(0, -1), r
+                        .getBottomRight().getTranslated(0, -1));
+            }
+        }
+    }
+
+    private class TitleCanvas extends Canvas {
+        private LightweightSystem lws;
+
+        public TitleCanvas(Composite parent, boolean horizontal) {
+            super(parent, SWT.NO_REDRAW_RESIZE | SWT.NO_BACKGROUND);
+            init(horizontal);
+            provideAccSupport();
+        }
+
+        /**
+         * @see org.eclipse.swt.widgets.Control#computeSize(int, int, boolean)
+         */
+        public Point computeSize(int wHint, int hHint, boolean changed) {
+            Dimension size = lws.getRootFigure().getPreferredSize(wHint, hHint);
+            size.union(new Dimension(wHint, hHint));
+            return new org.eclipse.swt.graphics.Point(size.width, size.height);
+        }
+
+        private void init(boolean isHorizontal) {
+            final IFigure contents = new TitleLabel(true);
+            contents.setRequestFocusEnabled(true);
+            contents.setFocusTraversable(true);
+            contents.addFocusListener(new FocusListener() {
+                public void focusGained(FocusEvent fe) {
+                    fe.gainer.repaint();
+                }
+
+                public void focusLost(FocusEvent fe) {
+                    fe.loser.repaint();
+                }
+            });
+
+            lws = new LightweightSystem();
+            lws.setControl(this);
+            lws.setContents(contents);
+            setCursor(SharedCursors.SIZEALL);
+            FONT_MGR.register(this);
+            new TitleDragManager(this);
+            /* TIZEN { Remove unnecessary context menu */
+            // final MenuManager manager = new MenuManager();
+            // MenuManager mgr = new MenuManager(PaletteMessages.DOCK_LABEL);
+            // mgr.add(new ChangeDockAction(PaletteMessages.LEFT_LABEL,
+            // PositionConstants.WEST));
+            // mgr.add(new ChangeDockAction(PaletteMessages.RIGHT_LABEL,
+            // PositionConstants.EAST));
+            // manager.add(new ResizeAction());
+            // manager.add(mgr);
+            // setMenu(manager.createContextMenu(this));
+            // mgr.addMenuListener(new IMenuListener() {
+            // public void menuAboutToShow(IMenuManager menuMgr) {
+            // IContributionItem[] items = menuMgr.getItems();
+            // for (int i = 0; i < items.length; i++) {
+            // ((ActionContributionItem) items[i]).update();
+            // }
+            // }
+            // });
+
+            // addDisposeListener(new DisposeListener() {
+            // public void widgetDisposed(DisposeEvent e) {
+            // FONT_MGR.unregister(TitleCanvas.this);
+            // manager.dispose();
+            // }
+            // });
+            /* TIZEN } */
+        }
+
+        private void provideAccSupport() {
+            getAccessible().addAccessibleListener(new AccessibleAdapter() {
+                public void getDescription(AccessibleEvent e) {
+                    e.result = PaletteMessages.ACC_DESC_PALETTE_TITLE;
+                }
+
+                public void getHelp(AccessibleEvent e) {
+                    getDescription(e);
+                }
+
+                public void getName(AccessibleEvent e) {
+                    e.result = GEFMessages.Palette_Label;
+                }
+            });
+            getAccessible().addAccessibleControlListener(
+                                                         new AccessibleControlAdapter() {
+                                                             public void getRole(AccessibleControlEvent e) {
+                                                                 e.detail = ACC.ROLE_LABEL;
+                                                             }
+                                                         });
+        }
+
+        public void setFont(Font font) {
+            ((IFigure) lws.getRootFigure().getChildren().get(0)).setFont(font);
+            if (isVisible()) {
+                /*
+                 * If this canvas is in the sash, we want the FlyoutPaletteComposite to layout
+                 * (which will cause the sash to be resized and laid out). However, if this canvas
+                 * is in the paletteContainer, the paletteContainer's bounds won't change, and hence
+                 * it won't layout. Thus, we also invoke getParent().layout().
+                 */
+                FlyoutPaletteComposite.this.layout(true);
+                getParent().layout(true);
+            }
+        }
+    }
+
+    private class ChangeDockAction extends Action {
+        private int position;
+
+        /**
+         * Constructor
+         * 
+         * @param text
+         *            this action's text
+         * @param position
+         *            the dock side that this action represents: PositionConstants.EAST or
+         *            PositionConstants.WEST
+         */
+        public ChangeDockAction(String text, int position) {
+            super(text, IAction.AS_RADIO_BUTTON);
+            this.position = position;
+        }
+
+        /**
+         * This Action is checked when the palette is docked on the side this action represents
+         * 
+         * @see org.eclipse.jface.action.IAction#isChecked()
+         */
+        public boolean isChecked() {
+            return dock == position;
+        }
+
+        /**
+         * Changes the palette's dock location to the side this action represents
+         * 
+         * @see org.eclipse.jface.action.IAction#run()
+         */
+        public void run() {
+            setDockLocation(position);
+        }
+    }
+
+    private static class FontManager {
+        private final String fontName = getFontType();
+        private List registrants = new ArrayList();
+        private Font titleFont;
+        private final IPropertyChangeListener fontListener = new IPropertyChangeListener() {
+            public void propertyChange(
+                                       org.eclipse.jface.util.PropertyChangeEvent event) {
+                if (fontName.equals(event.getProperty()))
+                    handleFontChanged();
+            }
+        };
+
+        private FontManager() {
+        }
+
+        protected final Font createTitleFont() {
+            return JFaceResources.getFont(fontName);
+        }
+
+        protected void dispose() {
+            titleFont = null;
+            JFaceResources.getFontRegistry().removeListener(fontListener);
+        }
+
+        protected String getFontType() {
+            return JFaceResources.DIALOG_FONT;
+        }
+
+        protected void handleFontChanged() {
+            if (titleFont == null)
+                return;
+            Font oldFont = titleFont;
+            titleFont = createTitleFont();
+            for (Iterator iter = registrants.iterator(); iter.hasNext();)
+                ((Control) iter.next()).setFont(titleFont);
+            oldFont.dispose();
+        }
+
+        protected void init() {
+            titleFont = createTitleFont();
+            JFaceResources.getFontRegistry().addListener(fontListener);
+        }
+
+        public void register(Control ctrl) {
+            if (titleFont == null)
+                init();
+            /* ECLIPSE { */
+            // ctrl.setFont(titleFont);
+            /* ECLIPSE } */
+
+            /* TIZEN { */
+            ctrl.setFont(FontResources.PALETTE_TITLE_BOLD);
+            /* TIZEN } */
+
+            registrants.add(ctrl);
+        }
+
+        public void unregister(Control ctrl) {
+            registrants.remove(ctrl);
+            if (registrants.isEmpty())
+                dispose();
+        }
+    }
+
+    /**
+     * Default implementation of FlyoutPreferences that stores the flyout palette settings in the
+     * given Preferences.
+     * 
+     * @author Pratik Shah
+     * @since 3.2
+     */
+    private static class DefaultFlyoutPreferences implements FlyoutPreferences {
+        /*
+         * There's no need to set the default for these properties since the default-default of 0
+         * for ints will suffice.
+         */
+        private static final String PALETTE_DOCK_LOCATION = "org.eclipse.gef.pdock"; //$NON-NLS-1$
+        private static final String PALETTE_SIZE = "org.eclipse.gef.psize"; //$NON-NLS-1$
+        private static final String PALETTE_STATE = "org.eclipse.gef.pstate"; //$NON-NLS-1$
+
+        private Preferences prefs;
+
+        private DefaultFlyoutPreferences(Preferences preferences) {
+            prefs = preferences;
+        }
+
+        public int getDockLocation() {
+            return prefs.getInt(PALETTE_DOCK_LOCATION);
+        }
+
+        public int getPaletteState() {
+            return prefs.getInt(PALETTE_STATE);
+        }
+
+        public int getPaletteWidth() {
+            return prefs.getInt(PALETTE_SIZE);
+        }
+
+        public void setDockLocation(int location) {
+            prefs.setValue(PALETTE_DOCK_LOCATION, location);
+        }
+
+        public void setPaletteState(int state) {
+            prefs.setValue(PALETTE_STATE, state);
+        }
+
+        public void setPaletteWidth(int width) {
+            prefs.setValue(PALETTE_SIZE, width);
+        }
+    }
+
+    private static class DragCursors {
+        public static final int INVALID = 0;
+
+        public static final int LEFT = 1;
+
+        public static final int RIGHT = 2;
+
+        private final static Cursor cursors[] = new Cursor[3];
+
+        /**
+         * Return the cursor for a drop scenario, as identified by code. Code must be one of
+         * INVALID, LEFT, RIGHT. If the code is not found default to INVALID. Note that since these
+         * three cursors are static, they will only be created once for the lifetime of the eclipse
+         * session and shared (i.e this is not an image leak).
+         * 
+         * @param code
+         *            the code
+         * @return the cursor
+         */
+        public static Cursor getCursor(int code) {
+            Display display = Display.getCurrent();
+            if (cursors[code] == null) {
+                ImageDescriptor source = null;
+                ImageDescriptor mask = null;
+                switch (code) {
+                    case LEFT:
+                        source = PlatformUI
+                                .getWorkbench()
+                                .getSharedImages()
+                                .getImageDescriptor(
+                                                    ISharedImages.IMG_OBJS_DND_LEFT_SOURCE);
+                        mask = PlatformUI
+                                .getWorkbench()
+                                .getSharedImages()
+                                .getImageDescriptor(
+                                                    ISharedImages.IMG_OBJS_DND_LEFT_MASK);
+                        cursors[LEFT] = new Cursor(display, source.getImageData(),
+                                                   mask.getImageData(), 16, 16);
+                        break;
+                    case RIGHT:
+                        source = PlatformUI
+                                .getWorkbench()
+                                .getSharedImages()
+                                .getImageDescriptor(
+                                                    ISharedImages.IMG_OBJS_DND_RIGHT_SOURCE);
+                        mask = PlatformUI
+                                .getWorkbench()
+                                .getSharedImages()
+                                .getImageDescriptor(
+                                                    ISharedImages.IMG_OBJS_DND_RIGHT_MASK);
+                        cursors[RIGHT] = new Cursor(display, source.getImageData(),
+                                                    mask.getImageData(), 16, 16);
+                        break;
+                    default:
+                    case INVALID:
+                        source = PlatformUI
+                                .getWorkbench()
+                                .getSharedImages()
+                                .getImageDescriptor(
+                                                    ISharedImages.IMG_OBJS_DND_INVALID_SOURCE);
+                        mask = PlatformUI
+                                .getWorkbench()
+                                .getSharedImages()
+                                .getImageDescriptor(
+                                                    ISharedImages.IMG_OBJS_DND_INVALID_MASK);
+                        cursors[INVALID] = new Cursor(display,
+                                                      source.getImageData(), mask.getImageData(), 16, 16);
+                        break;
+                }
+            }
+            return cursors[code];
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/LayoutAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/LayoutAction.java
new file mode 100644 (file)
index 0000000..7aebc88
--- /dev/null
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.gef.internal.Internal;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+
+
+/**
+ * This action allows to switch between the various supported layout modes for the given palette.
+ * 
+ * @author Pratik Shah
+ */
+public class LayoutAction extends Action implements IMenuCreator {
+
+    private PaletteViewerPreferences prefs;
+    private List actions;
+
+    /**
+     * Constructor
+     * 
+     * @param prefs
+     *            PaletteViewerPreferences object where the settings can be saved
+     */
+    public LayoutAction(PaletteViewerPreferences prefs) {
+        this(prefs, false);
+    }
+
+    /**
+     * Constructor
+     * 
+     * @param hasIcon
+     *            True if this action should associate an icon with itself
+     * @param prefs
+     *            PaletteViewerPreferences object where the settings can be saved
+     */
+    public LayoutAction(PaletteViewerPreferences prefs, boolean hasIcon) {
+        super(PaletteMessages.LAYOUT_MENU_LABEL);
+        this.prefs = prefs;
+        actions = createActions();
+        setMenuCreator(this);
+
+        if (hasIcon)
+            setImageDescriptor(ImageDescriptor.createFromFile(Internal.class,
+                                                              "icons/palette_layout.gif")); //$NON-NLS-1$
+
+        setToolTipText(PaletteMessages.LAYOUT_MENU_LABEL);
+    }
+
+    /**
+     * Helper method that wraps the given action in an ActionContributionItem and then adds it to
+     * the given menu.
+     * 
+     * @param parent
+     *            The menu to which the given action is to be added
+     * @param action
+     *            The action that is to be added to the given menu
+     */
+    protected void addActionToMenu(Menu parent, IAction action) {
+        ActionContributionItem item = new ActionContributionItem(action);
+        item.fill(parent, -1);
+    }
+
+    /**
+     * @return A list of actions that can switch to one of the supported layout modes
+     */
+    protected List createActions() {
+        ArrayList list = new ArrayList();
+        int[] modes = prefs.getSupportedLayoutModes();
+
+        Action action;
+        for (int i = 0; i < modes.length; i++) {
+            switch (modes[i]) {
+                case PaletteViewerPreferences.LAYOUT_COLUMNS:
+                    action = new LayoutChangeAction(
+                                                    PaletteViewerPreferences.LAYOUT_COLUMNS);
+                    action.setText(PaletteMessages.SETTINGS_COLUMNS_VIEW_LABEL);
+                    list.add(action);
+                    break;
+                case PaletteViewerPreferences.LAYOUT_LIST:
+                    action = new LayoutChangeAction(
+                                                    PaletteViewerPreferences.LAYOUT_LIST);
+                    action.setText(PaletteMessages.SETTINGS_LIST_VIEW_LABEL);
+                    list.add(action);
+                    break;
+                case PaletteViewerPreferences.LAYOUT_ICONS:
+                    action = new LayoutChangeAction(
+                                                    PaletteViewerPreferences.LAYOUT_ICONS);
+                    action.setText(PaletteMessages.SETTINGS_ICONS_VIEW_LABEL_CAPS);
+                    list.add(action);
+                    break;
+                case PaletteViewerPreferences.LAYOUT_DETAILS:
+                    action = new LayoutChangeAction(
+                                                    PaletteViewerPreferences.LAYOUT_DETAILS);
+                    action.setText(PaletteMessages.SETTINGS_DETAILS_VIEW_LABEL);
+                    list.add(action);
+                    break;
+            }
+        }
+        return list;
+    }
+
+    /**
+     * Empty method
+     * 
+     * @see org.eclipse.jface.action.IMenuCreator#dispose()
+     */
+    public void dispose() {
+    }
+
+    private Menu fillMenu(Menu menu) {
+        for (Iterator iter = actions.iterator(); iter.hasNext();) {
+            LayoutChangeAction action = (LayoutChangeAction) iter.next();
+            action.setChecked(prefs.getLayoutSetting() == action
+                    .getLayoutSetting());
+            addActionToMenu(menu, action);
+        }
+
+        setEnabled(!actions.isEmpty());
+
+        return menu;
+    }
+
+    /**
+     * @see org.eclipse.jface.action.IMenuCreator#getMenu(Control)
+     */
+    public Menu getMenu(Control parent) {
+        return fillMenu(new Menu(parent));
+    }
+
+    /**
+     * @see org.eclipse.jface.action.IMenuCreator#getMenu(Menu)
+     */
+    public Menu getMenu(Menu parent) {
+        return fillMenu(new Menu(parent));
+    }
+
+    private class LayoutChangeAction extends Action {
+        private int value;
+
+        public LayoutChangeAction(int layoutSetting) {
+            value = layoutSetting;
+        }
+
+        public int getLayoutSetting() {
+            return value;
+        }
+
+        public void run() {
+            prefs.setLayoutSetting(value);
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteContextMenuProvider.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteContextMenuProvider.java
new file mode 100644 (file)
index 0000000..517a3cd
--- /dev/null
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import org.eclipse.gef.ContextMenuProvider;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.ui.actions.GEFActionConstants;
+import org.eclipse.jface.action.IMenuManager;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.IPinnableEditPart;
+
+
+/**
+ * Provides the context menu for a palette.
+ * 
+ * @author Pratik Shah
+ */
+public class PaletteContextMenuProvider extends ContextMenuProvider {
+
+    /**
+     * Constructor
+     * 
+     * @param palette
+     *            the palette viewer for which the context menu has to be created
+     */
+    public PaletteContextMenuProvider(PaletteViewer palette) {
+        super(palette);
+    }
+
+    /**
+     * @return the palette viewer
+     */
+    protected PaletteViewer getPaletteViewer() {
+        return (PaletteViewer) getViewer();
+    }
+
+    /**
+     * This is the method that builds the context menu.
+     * 
+     * @param menu
+     *            The IMenuManager to which actions for the palette's context menu can be added.
+     * @see ContextMenuProvider#buildContextMenu(org.eclipse.jface.action.IMenuManager)
+     */
+    public void buildContextMenu(IMenuManager menu) {
+        GEFActionConstants.addStandardActionGroups(menu);
+
+        EditPart selectedPart = (EditPart) getPaletteViewer()
+                .getSelectedEditParts().get(0);
+        IPinnableEditPart pinnablePart = selectedPart.getAdapter(IPinnableEditPart.class);
+        if (pinnablePart != null && pinnablePart.canBePinned()) {
+            menu.appendToGroup(GEFActionConstants.MB_ADDITIONS,
+                               new PinDrawerAction(pinnablePart));
+        }
+        menu.appendToGroup(GEFActionConstants.GROUP_VIEW, new LayoutAction(
+                                                                           getPaletteViewer().getPaletteViewerPreferences()));
+        menu.appendToGroup(GEFActionConstants.GROUP_VIEW,
+                           new ChangeIconSizeAction(getPaletteViewer()
+                                   .getPaletteViewerPreferences()));
+        if (getPaletteViewer().getCustomizer() != null) {
+            menu.appendToGroup(GEFActionConstants.GROUP_REST,
+                               new CustomizeAction(getPaletteViewer()));
+        }
+        menu.appendToGroup(GEFActionConstants.GROUP_REST, new SettingsAction(
+                                                                             getPaletteViewer()));
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteCustomizer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteCustomizer.java
new file mode 100644 (file)
index 0000000..9edf083
--- /dev/null
@@ -0,0 +1,322 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteContainer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteDrawer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize.DefaultEntryPage;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize.DrawerEntryPage;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize.EntryPage;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize.PaletteDrawerFactory;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize.PaletteSeparatorFactory;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize.PaletteStackFactory;
+
+
+/**
+ * <code>PaletteCustomizer</code> is the <code>PaletteCustomizerDialog</code>'s interface to the
+ * model. This class is responsible for propogating to the model changes made in the dialog.
+ * 
+ * @author Pratik Shah
+ */
+public abstract class PaletteCustomizer {
+
+    /**
+     * Return true if this container can accept this entry as a new child. By default, this method
+     * checks to see first if the container has full permissions, then checks to see if this
+     * container can accept the type of the entry.
+     * 
+     * @param container
+     *            the container that will be the parent of this entry
+     * @param entry
+     *            the entry to add to the container
+     * @return true if this container can hold this entry
+     */
+    protected boolean canAdd(PaletteContainer container, PaletteEntry entry) {
+        return container.getUserModificationPermission() == PaletteEntry.PERMISSION_FULL_MODIFICATION
+                && container.acceptsType(entry.getType());
+    }
+
+    /**
+     * Indicates whether the given entry can be deleted from the model or not. Whether or not an
+     * entry can be deleted depends on its permsission (
+     * {@link PaletteEntry#getUserModificationPermission()}).
+     * <p>
+     * This method will be invoked by <code>PaletteCustomizerDialog</code> to determine whether or
+     * not to enable the "Delete" action.
+     * </p>
+     * 
+     * @param entry
+     *            The selected palette entry. It'll never be <code>null</code>.
+     * @return <code>true</code> if the given entry can be deleted
+     * 
+     * @see #performDelete(PaletteEntry)
+     */
+    public boolean canDelete(PaletteEntry entry) {
+        return entry.getUserModificationPermission() == PaletteEntry.PERMISSION_FULL_MODIFICATION;
+    }
+
+    /**
+     * Indicates whether the given entry can be moved down or not. Whether or not an entry can be
+     * moved down or not is determined by its parent's user modification permission (
+     * {@link PaletteEntry#getUserModificationPermission()}).
+     * <p>
+     * Will be called by PaletteCustomizerDialog to determine whether or not to enable the
+     * "Move Down" action.
+     * </p>
+     * 
+     * @param entry
+     *            The selected palette entry (it'll never be <code>null</code>)
+     * @return <code>true</code> if the given entry can be moved down
+     * 
+     * @see #performMoveDown(PaletteEntry)
+     */
+    public boolean canMoveDown(PaletteEntry entry) {
+        PaletteContainer parent = entry.getParent();
+        int parentPermission = parent.getUserModificationPermission();
+        if (parentPermission < PaletteEntry.PERMISSION_LIMITED_MODIFICATION) {
+            return false;
+        }
+
+        if (parent.getChildren().indexOf(entry) + 1 != parent.getChildren()
+                .size()) {
+            return true;
+        } else {
+            // The given entry is the last child in its parent.
+            if (parentPermission != PaletteEntry.PERMISSION_FULL_MODIFICATION
+                    || parent.getParent() == null)
+                return false;
+
+            // try to place in grand parent
+            if (canAdd(parent.getParent(), entry))
+                return true;
+
+            // walk parent siblings till we find one it can go into.
+            List children = parent.getParent().getChildren();
+            int parentIndex = children.indexOf(parent);
+            PaletteEntry parentSibling = null;
+
+            for (int i = parentIndex + 1; i < children.size(); i++) {
+                parentSibling = (PaletteEntry) children.get(i);
+                if (parentSibling instanceof PaletteContainer) {
+                    if (canAdd((PaletteContainer) parentSibling, entry))
+                        return true;
+                }
+            }
+
+            return false;
+
+        }
+    }
+
+    /**
+     * Indicates whether the given entry can be moved up or not. Whether or not an entry can be
+     * moved up or not is determined by its parent's user modification permission (
+     * {@link PaletteEntry#getUserModificationPermission()}).
+     * <p>
+     * Will be called by PaletteCustomizerDialog to determine whether or not to enable the "Move Up"
+     * action.
+     * </p>
+     * 
+     * @param entry
+     *            The selected palette entry (it'll never be <code>null</code>)
+     * @return <code>true</code> if the given entry can be moved up
+     * 
+     * @see #performMoveUp(PaletteEntry)
+     */
+    public boolean canMoveUp(PaletteEntry entry) {
+        PaletteContainer parent = entry.getParent();
+        int parentPermission = parent.getUserModificationPermission();
+        if (parentPermission < PaletteEntry.PERMISSION_LIMITED_MODIFICATION) {
+            return false;
+        }
+
+        if (parent.getChildren().indexOf(entry) != 0) {
+            return true;
+        } else {
+            // The given entry is the first child in its parent
+            if (parentPermission != PaletteEntry.PERMISSION_FULL_MODIFICATION
+                    || parent.getParent() == null)
+                return false;
+
+            // try to place in grand parent
+            if (canAdd(parent.getParent(), entry))
+                return true;
+
+            // walk parent siblings till we find one it can go into.
+            List children = parent.getParent().getChildren();
+            int parentIndex = children.indexOf(parent);
+            PaletteEntry parentSibling = null;
+
+            for (int i = parentIndex - 1; i >= 0; i--) {
+                parentSibling = (PaletteEntry) children.get(i);
+                if (parentSibling instanceof PaletteContainer) {
+                    if (canAdd((PaletteContainer) parentSibling, entry))
+                        return true;
+                }
+            }
+
+            return false;
+        }
+    }
+
+    /**
+     * Returns the list of PaletteEntryFactories that can be used to create new palette entries. The
+     * String returned by the getText() method of each PaletteEntryFactory will be used to populate
+     * the "New" drop-down. getImageDescriptor() will be used to set the icons on the drop down.
+     * This method can return null if there are no PaletteEntryFactories available.
+     * 
+     * @return The List of PaletteEntryFactories
+     */
+    public List getNewEntryFactories() {
+        List list = new ArrayList(4);
+        list.add(new PaletteSeparatorFactory());
+        list.add(new PaletteStackFactory());
+        list.add(new PaletteDrawerFactory());
+        return list;
+    }
+
+    /**
+     * Returns an EntryPage that will display the custom properties of the given entry. Can return
+     * null if there are no custom properties.
+     * 
+     * @param entry
+     *            The PaletteEntry whose properties page needs to be displayed (it'll never be
+     *            <code>null</code>)
+     * @return The EntryPage to represent the given entry
+     */
+    public EntryPage getPropertiesPage(PaletteEntry entry) {
+        if (entry instanceof PaletteDrawer) {
+            return new DrawerEntryPage();
+        }
+        return new DefaultEntryPage();
+    }
+
+    /**
+     * Updates the model by deleting the given entry from it. <br>
+     * Called when the "Delete" action in the PaletteCustomizerDialog is executed.
+     * 
+     * @param entry
+     *            The selected palette entry (it'll never be <code>null</code>)
+     * 
+     * @see #canDelete(PaletteEntry)
+     */
+    public void performDelete(PaletteEntry entry) {
+        entry.getParent().remove(entry);
+    }
+
+    /**
+     * Updates the model by moving the entry down. <br>
+     * Called when the "Move Down" action in the PaletteCustomizerDialog is invoked.
+     * 
+     * @param entry
+     *            The selected palette entry (it'll never be <code>null</code>)
+     * 
+     * @see #canMoveDown(PaletteEntry)
+     */
+    public void performMoveDown(PaletteEntry entry) {
+        PaletteContainer parent = entry.getParent();
+        if (!parent.moveDown(entry)) {
+            // This is the case of a PaletteEntry that is its parent's last
+            // child
+            // and will have to move down into the next slot in the grandparent
+            PaletteEntry parentSibling = null;
+            PaletteContainer newParent = parent.getParent();
+            int insertionIndex = 0;
+
+            if (canAdd(newParent, entry))
+                insertionIndex = newParent.getChildren().indexOf(parent) + 1;
+            else {
+                List parents = newParent.getChildren();
+
+                for (int i = parents.indexOf(parent) + 1; i < parents.size(); i++) {
+                    parentSibling = (PaletteEntry) parents.get(i);
+                    if (parentSibling instanceof PaletteContainer) {
+                        newParent = (PaletteContainer) parentSibling;
+                        if (canAdd(newParent, entry))
+                            break;
+                    }
+                }
+            }
+
+            parent.remove(entry);
+
+            newParent.add(insertionIndex, entry);
+        }
+    }
+
+    /**
+     * Updates the model by moving the entry up. <br>
+     * Called when the "Move Up" action in the PaletteCustomizerDialog is invoked.
+     * 
+     * @param entry
+     *            The selected palette entry (it'll never be <code>null</code>)
+     * 
+     * @see #canMoveUp(PaletteEntry)
+     */
+    public void performMoveUp(PaletteEntry entry) {
+        PaletteContainer parent = entry.getParent();
+        if (!parent.moveUp(entry)) {
+            // This is the case of a PaletteEntry that is its parent's first
+            // child
+            // and we should move up in the grand parent.
+            PaletteEntry parentSibling = null;
+            PaletteContainer newParent = parent.getParent();
+            int insertionIndex = 0;
+
+            if (canAdd(newParent, entry))
+                insertionIndex = newParent.getChildren().indexOf(parent);
+            else {
+                List parents = newParent.getChildren();
+
+                for (int i = parents.indexOf(parent) - 1; i >= 0; i--) {
+                    parentSibling = (PaletteEntry) parents.get(i);
+                    if (parentSibling instanceof PaletteContainer) {
+                        newParent = (PaletteContainer) parentSibling;
+                        if (canAdd(newParent, entry)) {
+                            insertionIndex = newParent.getChildren().size();
+                            break;
+                        }
+                    }
+                }
+            }
+
+            parent.remove(entry);
+
+            newParent.add(insertionIndex, entry);
+        }
+    }
+
+    /**
+     * Undoes the changes made to the model since the last save.
+     * <p>
+     * This method is invoked when the "Cancel" is selected in the
+     * <code>PaletteCustomizerDialog</code>.
+     * </p>
+     */
+    public abstract void revertToSaved();
+
+    /**
+     * Persists the changes made to the model.
+     * <p>
+     * Called when "OK" or "Apply" are selected in the <code>PaletteCustomizerDialog</code>.
+     * </p>
+     */
+    public abstract void save();
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteEditPartFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteEditPartFactory.java
new file mode 100644 (file)
index 0000000..7cec6ce
--- /dev/null
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.DrawerEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.GroupEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.PaletteStackEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.PinnablePaletteStackEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.SeparatorEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.SliderPaletteEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.TemplateEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.ToolEntryEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.ToolbarEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteContainer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteDrawer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteGroup;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteRoot;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteSeparator;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteStack;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteTemplateEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteToolbar;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteEditPart;
+
+
+/**
+ * Factory to create EditParts for different PaletteEntries.
+ * 
+ * @author Pratik Shah
+ */
+public class PaletteEditPartFactory implements EditPartFactory {
+
+    /**
+     * Create DrawerEditPart - edit part for PaletteDrawer
+     * 
+     * @param parentEditPart
+     *            the parent of the new editpart to be created
+     * @param model
+     *            the PaletteDrawer
+     * @return the newly created EditPart
+     */
+    protected EditPart createDrawerEditPart(EditPart parentEditPart,
+                                            Object model) {
+        return new DrawerEditPart((PaletteDrawer) model);
+    }
+
+    /**
+     * @see org.eclipse.gef.EditPartFactory#createEditPart(EditPart, Object)
+     */
+    public EditPart createEditPart(EditPart parentEditPart, Object model) {
+        if (model instanceof PaletteRoot)
+            return createMainPaletteEditPart(parentEditPart, model);
+        if (model instanceof PaletteStack)
+            return createStackEditPart(parentEditPart, model);
+        if (model instanceof PaletteContainer) {
+            Object type = ((PaletteContainer) model).getType();
+            if (PaletteDrawer.PALETTE_TYPE_DRAWER.equals(type))
+                return createDrawerEditPart(parentEditPart, model);
+            if (PaletteGroup.PALETTE_TYPE_GROUP.equals(type)
+                    || PaletteContainer.PALETTE_TYPE_UNKNOWN.equals(type))
+                return createGroupEditPart(parentEditPart, model);
+            if (PaletteToolbar.PALETTE_TYPE_TOOLBAR_GROUP.equals(type))
+                return createToolbarEditPart(parentEditPart, model);
+        }
+        if (model instanceof PaletteTemplateEntry)
+            return createTemplateEditPart(parentEditPart, model);
+        if (model instanceof PaletteSeparator)
+            return createSeparatorEditPart(parentEditPart, model);
+        if (model instanceof PaletteEntry)
+            return createEntryEditPart(parentEditPart, model);
+        return null;
+    }
+
+    /**
+     * Create SeparatorEditPart - edit part for PaletteSeparator
+     * 
+     * @param parentEditPart
+     *            the parent of the new editpart to be created
+     * @param model
+     *            the PaletteSeparator
+     * @return the newly created EditPart
+     */
+    protected EditPart createSeparatorEditPart(EditPart parentEditPart,
+                                               Object model) {
+        return new SeparatorEditPart((PaletteSeparator) model);
+    }
+
+    /**
+     * Create PaletteStackEditPart - edit part for PaletteStack
+     * 
+     * @param parentEditPart
+     *            the parent of the new editpart to be created
+     * @param model
+     *            the PaletteStack
+     * @return the newly created EditPart
+     */
+    protected EditPart createStackEditPart(EditPart parentEditPart, Object model) {
+        if (parentEditPart instanceof PaletteEditPart
+                && ((PaletteEditPart) parentEditPart).isToolbarItem()) {
+            return new PaletteStackEditPart((PaletteStack) model);
+        }
+        return new PinnablePaletteStackEditPart((PaletteStack) model);
+    }
+
+    /**
+     * Create ToolEntryEditPart - edit part for ToolEntry
+     * 
+     * @param parentEditPart
+     *            the parent of the new editpart to be created
+     * @param model
+     *            the ToolEntry
+     * @return the newly created EditPart
+     */
+    protected EditPart createEntryEditPart(EditPart parentEditPart, Object model) {
+        return new ToolEntryEditPart((PaletteEntry) model);
+    }
+
+    /**
+     * Create GroupEditPart - edit part for PaletteGroup
+     * 
+     * @param parentEditPart
+     *            the parent of the new editpart to be created
+     * @param model
+     *            the PaletteGroup
+     * @return the newly created EditPart
+     */
+    protected EditPart createGroupEditPart(EditPart parentEditPart, Object model) {
+        return new GroupEditPart((PaletteContainer) model);
+    }
+
+    /**
+     * Create ToolbarEditPart - edit part for PaletteToolbar
+     * 
+     * @param parentEditPart
+     *            the parent of the new editpart to be created
+     * @param model
+     *            the PaletteToolbar
+     * @return the newly created EditPart
+     */
+    protected EditPart createToolbarEditPart(EditPart parentEditPart,
+                                             Object model) {
+        return new ToolbarEditPart((PaletteToolbar) model);
+    }
+
+    /**
+     * Create SliderPaletteEditPart - edit part for PaletteRoot
+     * 
+     * @param parentEditPart
+     *            the parent of the new editpart to be created
+     * @param model
+     *            the PaletteRoot
+     * @return the newly created EditPart
+     */
+    protected EditPart createMainPaletteEditPart(EditPart parentEditPart,
+                                                 Object model) {
+        return new SliderPaletteEditPart((PaletteRoot) model);
+    }
+
+    /**
+     * Create TemplateEditPart - edit part for PaletteTemplateEntry
+     * 
+     * @param parentEditPart
+     *            the parent of the new editpart to be created
+     * @param model
+     *            the PaletteTemplateEntry
+     * @return the newly created EditPart
+     */
+    protected EditPart createTemplateEditPart(EditPart parentEditPart,
+                                              Object model) {
+        return new TemplateEditPart((PaletteTemplateEntry) model);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteMessages.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteMessages.java
new file mode 100644 (file)
index 0000000..96f3633
--- /dev/null
@@ -0,0 +1,309 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import org.eclipse.osgi.util.NLS;
+
+
+/**
+ * @author Pratik Shah
+ */
+public class PaletteMessages extends NLS {
+
+    /**
+     * The String "Customize Palette"
+     */
+    public static String CUSTOMIZE_DIALOG_TITLE;
+    /**
+     * The String "Drawer options:  "
+     */
+    public static String COLLAPSE_OPTIONS_TITLE;
+    /**
+     * The String "Layout options"
+     */
+    public static String SETTINGS_LAYOUT_OPTIONS_TITLE;
+    /**
+     * The String "&Apply"
+     */
+    public static String APPLY_LABEL;
+    /**
+     * The String "Move &Up"
+     */
+    public static String MOVE_UP_LABEL;
+    /**
+     * The String "Move Do&wn"
+     */
+    public static String MOVE_DOWN_LABEL;
+    /**
+     * The String "&Delete"
+     */
+    public static String DELETE_LABEL;
+    /**
+     * The String "&New"
+     */
+    public static String NEW_LABEL;
+    /**
+     * The String "&Columns"
+     */
+    public static String SETTINGS_COLUMNS_VIEW_LABEL;
+    /**
+     * The String "&List"
+     */
+    public static String SETTINGS_LIST_VIEW_LABEL;
+    /**
+     * The String "&Use large icons"
+     */
+    public static String SETTINGS_USE_LARGE_ICONS_LABEL;
+    /**
+     * The String "&Use Large Icons"
+     */
+    public static String SETTINGS_USE_LARGE_ICONS_LABEL_CAPS;
+    /**
+     * The String "&Icons only"
+     */
+    public static String SETTINGS_ICONS_VIEW_LABEL;
+    /**
+     * The String "&Icons Only"
+     */
+    public static String SETTINGS_ICONS_VIEW_LABEL_CAPS;
+    /**
+     * The String "&Never close"
+     */
+    public static String COLLAPSE_NEVER_LABEL;
+    /**
+     * The String "&Always close when opening another drawer"
+     */
+    public static String COLLAPSE_ALWAYS_LABEL;
+    /**
+     * The String "Close automatically &when there is not enough room"
+     */
+    public static String COLLAPSE_AS_NEEDED_LABEL;
+    /**
+     * The String "Nothing Selected"
+     */
+    public static String NO_SELECTION_TITLE;
+    /**
+     * The String "Na&me:  "
+     */
+    public static String NAME_LABEL;
+    /**
+     * The String "Des&cription:  "
+     */
+    public static String DESCRIPTION_LABEL;
+    /**
+     * The String "&Hide"
+     */
+    public static String HIDDEN_LABEL;
+    /**
+     * The String "No description is available."
+     */
+    public static String NO_DESCRIPTION_AVAILABLE;
+    /**
+     * The String "Select a node from the tree on the left."
+     */
+    public static String NO_SELECTION_MADE;
+    /**
+     * The String "Cus&tomize..."
+     */
+    public static String MENU_OPEN_CUSTOMIZE_DIALOG;
+    /**
+     * The String "Drawer"
+     */
+    public static String MODEL_TYPE_DRAWER;
+    /**
+     * The String "Separator"
+     */
+    public static String MODEL_TYPE_SEPARATOR;
+    /**
+     * The String "Stack"
+     */
+    public static String MODEL_TYPE_STACK;
+    /**
+     * The String "Separates entries in a palette container"
+     */
+    public static String NEW_SEPARATOR_DESC;
+    /**
+     * The String "New Drawer"
+     */
+    public static String NEW_DRAWER_LABEL;
+    /**
+     * The String "[Separator]"
+     */
+    public static String NEW_SEPARATOR_LABEL;
+    /**
+     * The String "New Stack"
+     */
+    public static String NEW_STACK_LABEL;
+    /**
+     * The String "Group"
+     */
+    public static String MODEL_TYPE_GROUP;
+    /**
+     * The String "New Group"
+     */
+    public static String NEW_GROUP_LABEL;
+    /**
+     * The String "&Layout"
+     */
+    public static String LAYOUT_MENU_LABEL;
+    /**
+     * The String "Could Not Accept Changes"
+     */
+    public static String ERROR;
+    /**
+     * The String "The currently displayed page contains invalid values."
+     */
+    public static String ABORT_PAGE_FLIPPING_MESSAGE;
+    /**
+     * The String "&Settings..."
+     */
+    public static String MENU_OPEN_SETTINGS_DIALOG;
+    /**
+     * The String "Palette Settings"
+     */
+    public static String SETTINGS_DIALOG_TITLE;
+    /**
+     * The String "&Details"
+     */
+    public static String SETTINGS_DETAILS_VIEW_LABEL;
+    /**
+     * The String "Font"
+     */
+    public static String SETTINGS_FONT_TITLE;
+    /**
+     * The String "C&hange..."
+     */
+    public static String SETTINGS_FONT_CHANGE;
+    /**
+     * The String "Font:  "
+     */
+    public static String SETTINGS_FONT_CURRENT;
+    /**
+     * The String "Layout:  "
+     */
+    public static String SETTINGS_LAYOUT_TITLE;
+    /**
+     * The String "Drawer Options"
+     */
+    public static String SETTINGS_DRAWER_OPTIONS_TITLE;
+    /**
+     * The String "&Open drawer at start-up"
+     */
+    public static String EXPAND_DRAWER_AT_STARTUP_LABEL;
+    /**
+     * The String "Columns layout options"
+     */
+    public static String SETTINGS_OPTIONS_COLUMNS;
+    /**
+     * The String "List layout options"
+     */
+    public static String SETTINGS_OPTIONS_LIST;
+    /**
+     * The String " layout options"
+     */
+    public static String SETTINGS_OPTIONS_ICONS_ONLY;
+    /**
+     * The String "Details layout options"
+     */
+    public static String SETTINGS_OPTIONS_DETAILS;
+    /**
+     * The String "&Override default column width settings"
+     */
+    public static String SETTINGS_LAYOUT_COLUMNS_OVERRIDE_WIDTH;
+    /**
+     * The String "Colu&mn width (in pixels):  "
+     */
+    public static String SETTINGS_LAYOUT_COLUMNS_WIDTH;
+    /**
+     * The String "&Pin drawer open at start-up"
+     */
+    public static String DRAWER_PIN_AT_STARTUP;
+    /**
+     * The String "&Restore Default"
+     */
+    public static String SETTINGS_DEFAULT_FONT;
+    /**
+     * The String "<Using Workbench Dialog Font>"
+     */
+    public static String SETTINGS_WORKBENCH_FONT_LABEL;
+    /**
+     * The String "-"
+     */
+    public static String NAME_DESCRIPTION_SEPARATOR;
+    /**
+     * The String "&Pinned"
+     */
+    public static String PINNED;
+    /**
+     * The String "Pin Open"
+     */
+    public static String TOOLTIP_PIN_FIGURE;
+
+    /**
+     * The String "Unpin"
+     */
+    public static String TOOLTIP_UNPIN_FIGURE;
+
+    /**
+     * The String "&Dock On"
+     */
+    public static String DOCK_LABEL;
+
+    /**
+     * The String "&Left"
+     */
+    public static String LEFT_LABEL;
+
+    /**
+     * The String "&Right"
+     */
+    public static String RIGHT_LABEL;
+
+    /**
+     * The String "&Resize"
+     */
+    public static String RESIZE_LABEL;
+
+    /**
+     * Show Palette
+     */
+    public static String PALETTE_SHOW;
+
+    /**
+     * Hide Palette
+     */
+    public static String PALETTE_HIDE;
+
+    /**
+     * This button is used to show or hide the palette.
+     */
+    public static String ACC_DESC_PALETTE_BUTTON;
+
+    /**
+     * The palette can be moved or resized through the context menu for this control.
+     */
+    public static String ACC_DESC_PALETTE_TITLE;
+
+    static {
+        /* TIZEN { */
+        NLS.initializeMessages(
+                               "org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.messages", PaletteMessages.class); //$NON-NLS-1$
+        /* } TIZEN */
+        /* ECLIPSE { */
+        // "org.eclipse.gef.ui.palette.messages", PaletteMessages.class); //$NON-NLS-1$
+        /* } ECLIPSE */
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteViewer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteViewer.java
new file mode 100644 (file)
index 0000000..fa81f3a
--- /dev/null
@@ -0,0 +1,502 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *    - add setCategoryState method
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.FigureCanvas;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.editparts.SimpleRootEditPart;
+import org.eclipse.gef.ui.parts.ScrollingGraphicalViewer;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IMemento;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.PaletteSelectionTool;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.DrawerEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.DrawerFigure;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.PaletteStackEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.ToolEntryEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteDrawer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteListener;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteRoot;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteStack;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.ToolEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize.PaletteCustomizerDialog;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.PaletteEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.parts.PaletteViewerKeyHandler;
+import org.tizen.efluibuilder.ui.editor.palette.PaletteConstants;
+
+
+/**
+ * Graphical viewer for the GEF palette.
+ * 
+ * @author Randy Hudson
+ * @author Pratik Shah
+ */
+public class PaletteViewer extends ScrollingGraphicalViewer {
+
+    private class PreferenceListener implements PropertyChangeListener {
+        /**
+         * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
+         */
+        public void propertyChange(PropertyChangeEvent evt) {
+            String property = evt.getPropertyName();
+            EditPart root = getRootEditPart().getContents();
+            if (property.equals(PaletteViewerPreferences.PREFERENCE_FONT)) {
+                updateFont();
+                refreshAllEditParts(root);
+            } else if (property
+                    .equals(PaletteViewerPreferences.PREFERENCE_LAYOUT)
+                    || property
+                            .equals(PaletteViewerPreferences.PREFERENCE_AUTO_COLLAPSE)
+                    || property
+                            .equals(DefaultPaletteViewerPreferences
+                                    .convertLayoutToPreferenceName(getPaletteViewerPreferences()
+                                            .getLayoutSetting()))) {
+                refreshAllEditParts(root);
+            }
+        }
+
+        private void refreshAllEditParts(EditPart part) {
+            part.refresh();
+            List children = part.getChildren();
+            for (Iterator iter = children.iterator(); iter.hasNext();) {
+                EditPart child = (EditPart) iter.next();
+                refreshAllEditParts(child);
+            }
+        }
+    }
+
+    private static final PaletteViewerPreferences PREFERENCE_STORE = new DefaultPaletteViewerPreferences();
+    private ToolEntry activeEntry = null;
+    private PaletteCustomizer customizer = null;
+    private PaletteCustomizerDialog customizerDialog = null;
+    private boolean globalScrollbar = false;
+    private List paletteListeners = new ArrayList();
+    private PaletteRoot paletteRoot = null;
+    private PreferenceListener prefListener = new PreferenceListener();
+    private PaletteViewerPreferences prefs = PREFERENCE_STORE;
+    private Font font = null;
+    private boolean categoryState = false;
+
+    /**
+     * Constructor
+     */
+    public PaletteViewer() {
+        EditDomain domain = new EditDomain();
+        // TizenEditDomain domain = new TizenEditDomain();
+
+        domain.setDefaultTool(new PaletteSelectionTool());
+        domain.loadDefaultTool();
+        setEditDomain(domain);
+        setKeyHandler(new PaletteViewerKeyHandler(this));
+        setEditPartFactory(new PaletteEditPartFactory());
+    }
+
+    /**
+     * Adds the given PaletteListener as the one to be notified when the active tool on the palette
+     * changes.
+     * 
+     * @param paletteListener
+     *            The listener that needs to be notified of active tool changes on the palette
+     */
+    public void addPaletteListener(PaletteListener paletteListener) {
+        if (paletteListeners != null)
+            paletteListeners.add(paletteListener);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.parts.GraphicalViewerImpl#createDefaultRoot()
+     */
+    protected void createDefaultRoot() {
+        setRootEditPart(new SimpleRootEditPart());
+    }
+
+    private void disposeFont() {
+        if (font != null) {
+            font.dispose();
+            font = null;
+        }
+    }
+
+    /**
+     * Indicates that the palette should scroll using a native vertical scrollbar as opposed to
+     * individual lightweight buttons that appear dynamically on each drawer. The default settings
+     * is <code>false</code>. Enabling this setting requires additional horizontal screen space for
+     * the scrollbar. Therefore, its use is discouraged.
+     * <p>
+     * This setting must be changed prior to calling
+     * {@link ScrollingGraphicalViewer#createControl(org.eclipse.swt.widgets.Composite)} . After the
+     * control is created, changing this setting will have no effect.
+     * </p>
+     * 
+     * @param value
+     *            <code>true</code> if a vertical scrollbar should be displayed
+     */
+    public void enableVerticalScrollbar(boolean value) {
+        this.globalScrollbar = value;
+    }
+
+    /**
+     * @return the DrawerEditPart that has the given part; part, if part is a drawer; null, if part
+     *         is not in a drawer
+     */
+    private DrawerEditPart findContainingDrawer(EditPart part) {
+        if (part == null)
+            return null;
+        if (part instanceof DrawerEditPart)
+            return (DrawerEditPart) part;
+        return findContainingDrawer(part.getParent());
+    }
+
+    /**
+     * Notifies registered listeners of change in the active tool on the palette
+     */
+    protected void fireModeChanged() {
+        if (paletteListeners == null)
+            return;
+        for (int listener = 0; listener < paletteListeners.size(); listener++)
+            ((PaletteListener) paletteListeners.get(listener))
+                    .activeToolChanged(this, activeEntry);
+    }
+
+    /**
+     * @return the customizer
+     */
+    public PaletteCustomizer getCustomizer() {
+        return customizer;
+    }
+
+    /**
+     * NOTE: A PaletteCustomizer must be set for this viewer using the
+     * {@link #setCustomizer(PaletteCustomizer)} method before this method is invoked.
+     * 
+     * @return The dialog that can be used to customize entries on the palette
+     */
+    public PaletteCustomizerDialog getCustomizerDialog() {
+        if (customizerDialog == null) {
+            customizerDialog = new PaletteCustomizerDialog(getControl()
+                    .getShell(), getCustomizer(), getPaletteRoot());
+        }
+        return customizerDialog;
+    }
+
+    /**
+     * @return the entry for the currently active tool
+     */
+    public ToolEntry getActiveTool() {
+        return activeEntry;
+    }
+
+    /**
+     * Returns the palette's root model.
+     * 
+     * @return the palette root
+     */
+    public PaletteRoot getPaletteRoot() {
+        return paletteRoot;
+    }
+
+    /**
+     * @return The PaletteViewerPreferences that this palette is using to store its preferences (if
+     *         none has been set, it returns the default one, which uses the GEF preference store)
+     */
+    public PaletteViewerPreferences getPaletteViewerPreferences() {
+        return prefs;
+    }
+
+    private ToolEntryEditPart getToolEntryEditPart(ToolEntry entry) {
+        return (ToolEntryEditPart) getEditPartRegistry().get(entry);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.parts.GraphicalViewerImpl#handleDispose(org.eclipse.swt.events.DisposeEvent)
+     */
+    protected void handleDispose(DisposeEvent e) {
+        super.handleDispose(e);
+        disposeFont();
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.parts.GraphicalViewerImpl#handleFocusGained(FocusEvent)
+     */
+    protected void handleFocusGained(FocusEvent fe) {
+        super.handleFocusGained(fe);
+        /*
+         * Fix for Bug# 63297 When the palette gets focus, the LWS will take care of setting focus
+         * on the correct figure. However, when the user clicks on an entry, the focus is
+         * "thrown away." In that case, the LWS would set focus on the first focusable figure. We
+         * override that here and set focus on the correct/selected figure. Invoking
+         * getFocusEditPart().setFocus(true) does not work because that editpart thinks it already
+         * has focus (it's not aware of focus being thrown away) and does nothing.
+         */
+        if (focusPart == null) {
+            IFigure fig = ((GraphicalEditPart) getFocusEditPart()).getFigure();
+            fig.internalGetEventDispatcher().requestFocus(fig);
+        }
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.parts.GraphicalViewerImpl#hookControl()
+     */
+    protected void hookControl() {
+        super.hookControl();
+        FigureCanvas canvas = getFigureCanvas();
+        canvas.getViewport().setContentsTracksWidth(true);
+        canvas.getViewport().setContentsTracksHeight(!globalScrollbar);
+        canvas.setHorizontalScrollBarVisibility(FigureCanvas.NEVER);
+        canvas.setVerticalScrollBarVisibility(globalScrollbar ? FigureCanvas.ALWAYS
+                : FigureCanvas.AUTOMATIC);
+        if (prefs != null)
+            prefs.addPropertyChangeListener(prefListener);
+        updateFont();
+    }
+
+    /**
+     * Returns true if the given PaletteDrawer is expanded
+     * 
+     * @param drawer
+     *            the PaletteDrawer
+     * @return true if expanded
+     */
+    public boolean isExpanded(PaletteDrawer drawer) {
+        EditPart ep = (EditPart) getEditPartRegistry().get(drawer);
+        if (ep instanceof DrawerEditPart)
+            return ((DrawerEditPart) ep).isExpanded();
+        return false;
+    }
+
+    /**
+     * Returns true if the given PaletteDrawer is pinned
+     * 
+     * @param drawer
+     *            the PaletteDrawer
+     * @return true if pinned
+     */
+    public boolean isPinned(PaletteDrawer drawer) {
+        EditPart ep = (EditPart) getEditPartRegistry().get(drawer);
+        if (ep instanceof DrawerEditPart)
+            return ((DrawerEditPart) ep).isPinnedOpen();
+        return false;
+    }
+
+    /**
+     * The given PaletteListener will not be notified of active tool changes in the palette.
+     * 
+     * @param paletteListener
+     *            the PaletteListener which doesn't want to be notified of active tool changes in
+     *            the palette anymore
+     */
+    public void removePaletteListener(PaletteListener paletteListener) {
+        paletteListeners.remove(paletteListener);
+    }
+
+    /**
+     * Tries to apply the state of the given IMemento to the contents of this viewer. It fails
+     * silently, i.e. no exceptions are thrown if the given state could not be applied.
+     * 
+     * @param memento
+     *            The memento that has the state to be applied to the contents of this viewer
+     * @return a boolean indicating whether or not the given memento was successfully applied
+     * @since 3.0
+     */
+    public boolean restoreState(IMemento memento) {
+        try {
+            PaletteEditPart part = (PaletteEditPart) getEditPartRegistry().get(
+                                                                               getPaletteRoot());
+            if (part != null)
+                part.restoreState(memento);
+        } catch (RuntimeException re) {
+            /*
+             * @TODO:Pratik Perhaps you should log this exception. Or not catch it at all.
+             */
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * @see ScrollingGraphicalViewer#reveal(EditPart)
+     */
+    public void reveal(EditPart part) {
+        // If the given part is a drawer, we don't need to expand it. Hence,
+        // when invoking
+        // findContainingDrawer(), we use part.getParent()
+        DrawerEditPart drawer = findContainingDrawer(part.getParent());
+        if (drawer != null && !drawer.isExpanded())
+            drawer.setExpanded(true);
+        // if the part is inside a stack, set it to be the top level item of the
+        // stack.
+        if (part.getParent() != null
+                && part.getParent() instanceof PaletteStackEditPart)
+            ((PaletteStack) part.getParent().getModel())
+                    .setActiveEntry((PaletteEntry) part.getModel());
+        super.reveal(part);
+    }
+
+    /**
+     * Captures the state of the contents of this viewer in the given memento
+     * 
+     * @param memento
+     *            the IMemento in which the state is to be saved
+     * @since 3.0
+     */
+    public void saveState(IMemento memento) {
+        // Bug# 69026 - The PaletteRoot can be null initially for VEP
+        PaletteEditPart base = (PaletteEditPart) getEditPartRegistry().get(
+                                                                           getPaletteRoot());
+        if (base != null)
+            base.saveState(memento);
+    }
+
+    /**
+     * Sets the customizer.
+     * 
+     * @param customizer
+     *            the customizer to be set
+     */
+    public void setCustomizer(PaletteCustomizer customizer) {
+        this.customizer = customizer;
+    }
+
+    /**
+     * Sets the active entry for this palette. The Editpart for the given entry will be activated
+     * (selected).
+     * 
+     * @param newMode
+     *            the ToolEntry whose EditPart has to be set as the active tool in this palette
+     */
+    public void setActiveTool(ToolEntry newMode) {
+        if (newMode == null)
+            newMode = getPaletteRoot().getDefaultEntry();
+        if (activeEntry != null)
+            getToolEntryEditPart(activeEntry).setToolSelected(false);
+        activeEntry = newMode;
+        if (activeEntry != null) {
+            ToolEntryEditPart editpart = getToolEntryEditPart(activeEntry);
+            if (editpart != null) {
+                editpart.setToolSelected(true);
+            }
+        }
+        fireModeChanged();
+    }
+
+    /**
+     * Sets the root for this palette.
+     * 
+     * @param root
+     *            the PaletteRoot for this palette
+     */
+    public void setPaletteRoot(PaletteRoot root) {
+        if (root == paletteRoot)
+            return;
+        paletteRoot = root;
+        if (paletteRoot != null) {
+            EditPart palette = getEditPartFactory().createEditPart(
+                                                                   getRootEditPart(), root);
+            getRootEditPart().setContents(palette);
+        }
+    }
+
+    /**
+     * This palette will use the given PaletteViewerPreferences to store all its preferences.
+     * <p>
+     * NOTE: This method should be invoked by a client only once (before the first time
+     * {@link #getPaletteViewerPreferences()} is invoked). Trying to invoke this method after that
+     * could lead to problems where some preferences would still be stored in the old preference
+     * store.
+     * </p>
+     * 
+     * @param prefs
+     *            the PaletteViewerPreferences that is to be used to store all the preferences for
+     *            this palette
+     */
+    public void setPaletteViewerPreferences(PaletteViewerPreferences prefs) {
+        if (this.prefs != null)
+            this.prefs.removePropertyChangeListener(prefListener);
+        this.prefs = prefs;
+        if (getControl() != null && !getControl().isDisposed())
+            this.prefs.addPropertyChangeListener(prefListener);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.parts.AbstractEditPartViewer#unhookControl()
+     */
+    protected void unhookControl() {
+        super.unhookControl();
+        disposeFont();
+        if (prefs != null)
+            prefs.removePropertyChangeListener(prefListener);
+    }
+
+    private void updateFont() {
+        disposeFont();
+
+        if (getControl() == null || getControl().isDisposed())
+            return;
+
+        font = new Font(Display.getCurrent(), getPaletteViewerPreferences()
+                .getFontData());
+        getControl().setFont(font);
+        getFigureCanvas().getViewport().invalidateTree();
+        getFigureCanvas().getViewport().revalidate();
+        getFigureCanvas().redraw();
+    }
+
+    /*
+     * TIZEN: add new UI: This shows a dynamically categories {
+     *
+     * The empty view state cases show only UI Container. Otherwise it shows all.
+     *
+     * @param bEmptyViewSate (empty) view state of current view
+     */
+    public void setCategoryState(boolean bEmptyViewSate) {
+        if (this.categoryState == bEmptyViewSate) {
+            return;
+        }
+        this.categoryState = bEmptyViewSate;
+        EditPart root = getRootEditPart().getContents();
+
+        List<?> categoryEditPartList = root.getChildren();
+        DrawerEditPart categoryEditPart = null;
+        for (Object categoryObj : categoryEditPartList) {
+            if (categoryObj instanceof DrawerEditPart) {
+                categoryEditPart = (DrawerEditPart) categoryObj;
+                DrawerFigure drawerFigure = categoryEditPart.getDrawerFigure();
+                if (bEmptyViewSate) {
+                    PaletteDrawer drawer = categoryEditPart.getDrawer();
+                    if (!drawer.getDescription().equals(PaletteConstants.CATEGORY_NAME_UI_CONTAINERS)) {
+                        drawerFigure.setVisible(false);
+                    }
+                } else {
+                    drawerFigure.setVisible(true);
+                }
+            }
+        }
+    } // end of setCategoryState
+    /* TIZEN } */
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteViewerPreferences.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteViewerPreferences.java
new file mode 100644 (file)
index 0000000..ede293d
--- /dev/null
@@ -0,0 +1,306 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import java.beans.PropertyChangeListener;
+
+import org.eclipse.swt.graphics.FontData;
+
+
+/**
+ * <code>PaletteViewerPreferences</code> is used to store/persist the various settings of a GEF
+ * palette.
+ * <p>
+ * <EM>IMPORTANT</EM>: This interface is <EM>not</EM> intended to be implemented by clients. Clients
+ * should inherit from {@link DefaultPaletteViewerPreferences}. New methods may be added in the
+ * future.
+ * 
+ * @author Pratik Shah
+ */
+public interface PaletteViewerPreferences {
+
+    /**
+     * This is a constant for one of the auto-collapse options. <br>
+     * Indicates that containers should always auto-collapse.
+     */
+    int COLLAPSE_ALWAYS = 2;
+
+    /**
+     * This is a constant for one of the auto-collapse options. <br>
+     * Indicates that containers should never auto-collapse.
+     */
+    int COLLAPSE_NEVER = 1;
+
+    /**
+     * This is a constant for one of the auto-collapse options. <br>
+     * Indicates that containers should auto-collapse only when there is not enough room on the
+     * palette. This is the default auto-collapse setting.
+     */
+    int COLLAPSE_AS_NEEDED = 0;
+
+    /**
+     * This is a constant for one of the layout options. <br>
+     * Indicates that the palette should be displayed in the columns mode.
+     */
+    int LAYOUT_COLUMNS = 1;
+
+    /**
+     * @deprecated Use LAYOUT_COLUMNS instead.
+     */
+    int LAYOUT_FOLDER = LAYOUT_COLUMNS;
+
+    /**
+     * This is a constant for one of the layout options. <br>
+     * Indicates that the palette should be displayed in the list mode. This is the default layout
+     * setting.
+     */
+    int LAYOUT_LIST = 0;
+
+    /**
+     * This is a constant for one of the layout options. <br>
+     * Indicates that the palette should be displayed in the icons only mode.
+     */
+    int LAYOUT_ICONS = 2;
+
+    /**
+     * This is a constant for one of the layout options. <br>
+     * Indicates that the palette should be displayed in the details mode.
+     */
+    int LAYOUT_DETAILS = 3;
+
+    /**
+     * Property name for the layout setting. If the PropertyChangeEvent fired has this property
+     * name, it means that the layout setting was changed.
+     */
+    String PREFERENCE_LAYOUT = "Layout Setting"; //$NON-NLS-1$
+
+    /**
+     * Property name for the auto-collapse setting. If the PropertyChangeEvent fired has this
+     * property name, it means that the auto-collapse setting was changed.
+     */
+    String PREFERENCE_AUTO_COLLAPSE = "Auto-Collapse Setting"; //$NON-NLS-1$
+
+    /**
+     * Property name for the large icon setting for columns layout. If the PropertyChangeEvent fired
+     * has this property name, it means that the large icon setting was changed for columns layout.
+     * Large icons are default.
+     */
+    String PREFERENCE_COLUMNS_ICON_SIZE = "Use Large Icons - Columns"; //$NON-NLS-1$
+
+    /**
+     * @deprecated Use PREFERENCE_COLUMNS_ICON_SIZE instead.
+     */
+    String PREFERENCE_FOLDER_ICON_SIZE = PREFERENCE_COLUMNS_ICON_SIZE;
+
+    /**
+     * Property name for the large icon setting for list layout. If the PropertyChangeEvent fired
+     * has this property name, it means that the large icon setting was changed for list layout.
+     * Small icons are default.
+     */
+    String PREFERENCE_LIST_ICON_SIZE = "Use Large Icons - List"; //$NON-NLS-1$
+
+    /**
+     * Property name for the large icon setting for icons only layout. If the PropertyChangeEvent
+     * fired has this property name, it means that the large icon setting was changed for icons only
+     * layout. Large icons are default.
+     */
+    String PREFERENCE_ICONS_ICON_SIZE = "Use Large Icons - Icons"; //$NON-NLS-1$
+
+    /**
+     * Property name for the large icon setting for details layout. If the PropertyChangeEvent fired
+     * has this property name, it means that the large icon setting was changed for details layout.
+     * Small icons are default.
+     */
+    String PREFERENCE_DETAILS_ICON_SIZE = "Use Large Icons - Details"; //$NON-NLS-1$
+
+    /**
+     * Property name for the palette font setting. If the PropertyChangeEvent fired has this
+     * property name, it means that the palette font was changed.
+     */
+    String PREFERENCE_FONT = "Palette Font"; //$NON-NLS-1$
+
+    /**
+     * @param listener
+     *            the PropertyChangeListener to be notified of changes
+     * @see java.beans.PropertyChangeSupport#addPropertyChangeListener(java.beans.PropertyChangeListener)
+     */
+    void addPropertyChangeListener(PropertyChangeListener listener);
+
+    /**
+     * Returns the current auto-collapse setting.
+     * <p>
+     * Possible values returned:
+     * <ul>
+     * <li>COLLAPSE_ALWAYS (Always collapse)</li>
+     * <li>COLLAPSE_AS_NEEDED (Collapse when needed)</li>
+     * <li>COLLAPSE_NEVER (Never collapse)</li>
+     * </ul>
+     * 
+     * @return One of the above-mentioned constants
+     */
+    int getAutoCollapseSetting();
+
+    /**
+     * @return The FontData for the font to be used in the palette.
+     */
+    FontData getFontData();
+
+    /**
+     * Returns the current layout setting.
+     * <p>
+     * Possible values returned:
+     * <ul>
+     * <li>LAYOUT_COLUMNS (columns View)</li>
+     * <li>LAYOUT_LIST (List View)</li>
+     * <li>LAYOUT_ICONS (Icons Only View)</li>
+     * <li>LAYOUT_DETAILS (Details View)</li>
+     * </ul>
+     * 
+     * @return One of the above-mentioned constants
+     */
+    int getLayoutSetting();
+
+    /**
+     * Returns the layout modes that are supported. All four layout modes -- LAYOUT_COLUMNS,
+     * LAYOUT_LIST, LAYOUT_ICONS, LAYOUT_DETAILS -- are supported by default.
+     * 
+     * @return The layout modes that are supported
+     * @see #setSupportedLayoutModes(int[])
+     */
+    int[] getSupportedLayoutModes();
+
+    /**
+     * This is a convenience method. Instead of getting the supported layout modes and checking to
+     * see if a certain layout is supported, you can call this method.
+     * 
+     * @param layout
+     *            LAYOUT_COLUMNS, LAYOUT_LIST, LAYOUT_ICONS, or LAYOUT_DETAILS
+     * @return <code>true</code> if the given layout is a supported mode
+     */
+    boolean isSupportedLayoutMode(int layout);
+
+    /**
+     * @param listener
+     *            the PropertyChangeListener that should not be notified hereafter
+     * @see java.beans.PropertyChangeSupport#removePropertyChangeListener(java.beans.PropertyChangeListener)
+     */
+    void removePropertyChangeListener(PropertyChangeListener listener);
+
+    /**
+     * Sets the auto-collapse setting.
+     * <p>
+     * Possible values:
+     * <ul>
+     * <li>COLLAPSE_ALWAYS (Always collapse)</li>
+     * <li>COLLAPSE_AS_NEEDED (Collapse when needed)</li>
+     * <li>COLLAPSE_NEVER (Never collapse)</li>
+     * </ul>
+     * 
+     * @param newVal
+     *            One of the above-mentioned constants
+     */
+    void setAutoCollapseSetting(int newVal);
+
+    /**
+     * Sets the FontData for the palette.
+     * 
+     * @param data
+     *            The FontData for the font to be used in the palette
+     */
+    void setFontData(FontData data);
+
+    /**
+     * Sets the given setting as the current layout.
+     * <p>
+     * Possible values:
+     * <ul>
+     * <li>LAYOUT_COLUMNS (Columns View)</li>
+     * <li>LAYOUT_LIST (List View)</li>
+     * <li>LAYOUT_ICONS (Icons Only View)</li>
+     * <li>LAYOUT_DETAILS (Details View)</li>
+     * </ul>
+     * 
+     * @param newVal
+     *            One of the above-mentioned constants
+     */
+    void setLayoutSetting(int newVal);
+
+    /**
+     * Sets the "Use Large Icons" option for the currently active layout.
+     * 
+     * @param newVal
+     *            <code>true</code> if large icons are to be used with the current layout setting
+     */
+    void setCurrentUseLargeIcons(boolean newVal);
+
+    /**
+     * The client can restrict the modes that the palette supports using this method. By default,
+     * the palette will support all layout modes: LAYOUT_ICONS, LAYOUT_DETAILS, LAYOUT_COLUMNS,
+     * LAYOUT_LIST. Should the client wish to not support all these modes, they can call this method
+     * with an array of the desired modes. This method should be called during set-up as soon as the
+     * preferences are created, and not later.
+     * <p>
+     * If the default layout mode and/or the current layout mode are not in the given array, the
+     * first layout mode in the given array will be set to be the default/current layout.
+     * </p>
+     * <p>
+     * NOTE: The given array of layout modes should have at least one, and is recommended to have at
+     * least two, of the recognized layout modes.
+     * </p>
+     * 
+     * @param modes
+     *            an array of layout modes desired
+     */
+    void setSupportedLayoutModes(int[] modes);
+
+    /**
+     * Sets the "Use Large Icons" option for the given layout. <br>
+     * The defaults are as follows:
+     * <ul>
+     * <li>LAYOUT_COLUMNS - <code>true</code></li>
+     * <li>LAYOUT_LIST - <code>false</code></li>
+     * <li>LAYOUT_ICONS - <code>true</code></li>
+     * <li>LAYOUT_DETAILS - <code>false</code></li>
+     * </ul>
+     * 
+     * @param layout
+     *            any of the above-mentioned constants
+     * @param newVal
+     *            <code>true</code> if large icons are to be used with the given layout
+     */
+    void setUseLargeIcons(int layout, boolean newVal);
+
+    /**
+     * Indicated whether large icons should be used with the given layout mode. <br>
+     * The defaults are as follows:
+     * <ul>
+     * <li>LAYOUT_COLUMNS - <code>true</code></li>
+     * <li>LAYOUT_LIST - <code>false</code></li>
+     * <li>LAYOUT_ICONS - <code>true</code></li>
+     * <li>LAYOUT_DETAILS - <code>false</code></li>
+     * </ul>
+     * 
+     * @param layout
+     *            any of the above-mentioned constants
+     * @return <code>true</code> if large icons are to be used with the given layout
+     */
+    boolean useLargeIcons(int layout);
+
+    /**
+     * @return <code>true</code> if large icons are to be used with the currently active layout
+     */
+    boolean useLargeIcons();
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteViewerProvider.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PaletteViewerProvider.java
new file mode 100644 (file)
index 0000000..245a1be
--- /dev/null
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.gef.EditDomain;
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * PaletteViewerProvider provides a standard way of creating palette viewers that can be shared
+ * across different clients that need to create a palette (PaletteViewerPage and
+ * FlyoutPaletteComposite, for instance).
+ * 
+ * @author Pratik Shah
+ * @since 3.0
+ */
+public class PaletteViewerProvider {
+
+    private TizenEditDomain graphicalViewerEditDomain;
+
+    /**
+     * Constructor
+     * 
+     * @param graphicalViewerDomain
+     *            The EditDomain with which each newly created PaletteViewer will be registered
+     */
+    public PaletteViewerProvider(EditDomain graphicalViewerDomain) {
+        Assert.isNotNull(graphicalViewerDomain);
+        graphicalViewerEditDomain = (TizenEditDomain) graphicalViewerDomain;
+    }
+
+    /**
+     * This method is invoked from {@link #createPaletteViewer(Composite)}. It configures the given
+     * viewer's settings.
+     * 
+     * @param viewer
+     *            the viewer that is to be configured
+     */
+    protected void configurePaletteViewer(PaletteViewer viewer) {
+        viewer.setContextMenu(new PaletteContextMenuProvider(viewer));
+    }
+
+    /**
+     * Creates a PaletteViewer on the given Composite
+     * 
+     * @param parent
+     *            the control for the PaletteViewer
+     * @return the newly created PaletteViewer
+     */
+    public PaletteViewer createPaletteViewer(Composite parent) {
+        PaletteViewer pViewer = new PaletteViewer();
+        pViewer.createControl(parent);
+        configurePaletteViewer(pViewer);
+        hookPaletteViewer(pViewer);
+        return pViewer;
+    }
+
+    /**
+     * @return the EditDomain provided during creation of this PaletteViewerProvider
+     */
+    public final EditDomain getEditDomain() {
+        return graphicalViewerEditDomain;
+    }
+
+    /**
+     * This method is invoked from {@link #createPaletteViewer(Composite)}. It is a step in the
+     * process of setting up the PaletteViewer after it has been created.
+     * 
+     * @param viewer
+     *            the viewer that is to be configured
+     */
+    protected void hookPaletteViewer(PaletteViewer viewer) {
+        ((TizenEditDomain) getEditDomain()).setTizenPaletteViewer(viewer);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PinDrawerAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/PinDrawerAction.java
new file mode 100644 (file)
index 0000000..efce168
--- /dev/null
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import org.eclipse.jface.action.Action;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.DrawerEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts.IPinnableEditPart;
+
+
+/**
+ * An action that can be used to pin the given pinnable palette editpart (drawer or stack) open.
+ * 
+ * @author Pratik Shah
+ */
+public class PinDrawerAction extends Action {
+
+    private IPinnableEditPart pinnableEditPart;
+
+    /**
+     * Constructor
+     * 
+     * @param drawer
+     *            The EditPart for the drawer that this action pins/unpins
+     */
+    public PinDrawerAction(DrawerEditPart drawer) {
+        this.pinnableEditPart = drawer;
+        setChecked(drawer.isPinnedOpen());
+        setEnabled(drawer.isExpanded());
+        setText(PaletteMessages.PINNED);
+    }
+
+    /**
+     * Constructor
+     * 
+     * @param pinnableEditPart
+     *            the pinnable palette editpart
+     * @since 3.4
+     */
+    public PinDrawerAction(IPinnableEditPart pinnableEditPart) {
+        this.pinnableEditPart = pinnableEditPart;
+        setChecked(pinnableEditPart.isPinnedOpen());
+        setEnabled(pinnableEditPart.isExpanded());
+        setText(PaletteMessages.PINNED);
+    }
+
+    /**
+     * Toggles the pinned open status of the pinnable palette editpart.
+     * 
+     * @see org.eclipse.jface.action.Action#run()
+     */
+    public void run() {
+        pinnableEditPart.setPinnedOpen(!pinnableEditPart.isPinnedOpen());
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/SettingsAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/SettingsAction.java
new file mode 100644 (file)
index 0000000..d1e59a3
--- /dev/null
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.Dialog;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize.PaletteSettingsDialog;
+
+
+/**
+ * An action to launch the Settings dialog for the given palette.
+ * 
+ * @author Pratik Shah
+ */
+public class SettingsAction extends Action {
+
+    private PaletteViewer paletteViewer;
+
+    /**
+     * Constructor
+     * 
+     * @param palette
+     *            The Palette which has to be customized when this action is run
+     */
+    public SettingsAction(PaletteViewer palette) {
+        super();
+        setText(PaletteMessages.MENU_OPEN_SETTINGS_DIALOG);
+        paletteViewer = palette;
+    }
+
+    /**
+     * Opens the Settings dialog
+     * 
+     * @see org.eclipse.jface.action.Action#run()
+     */
+    public void run() {
+        Dialog settings = new PaletteSettingsDialog(paletteViewer.getControl()
+                .getShell(), paletteViewer.getPaletteViewerPreferences());
+        settings.open();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/TizenEditDomain.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/TizenEditDomain.java
new file mode 100644 (file)
index 0000000..da01129
--- /dev/null
@@ -0,0 +1,486 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   1) update package name
+ *   2) apply new UI
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.DefaultEditDomain;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.tools.SelectionTool;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IEditorPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteListener;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteRoot;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.ToolEntry;
+
+
+/**
+ * The collective state of a GEF "application", loosely defined by a CommandStack, one or more
+ * EditPartViewers, and the active Tool. An EditDomain is usually tied with an Eclipse
+ * {@link org.eclipse.ui.IEditorPart IEditorPart}). However, the distinction between EditorPart and
+ * EditDomain was made to allow for much flexible use of the Graphical Editing Framework.
+ */
+public class TizenEditDomain extends DefaultEditDomain {
+
+    private Tool defaultTool;
+    private PaletteViewer paletteViewer;
+    private PaletteRoot paletteRoot;
+    private Tool activeTool;
+    private List viewers = new ArrayList();
+
+    /**
+     * Listens to the PaletteViewer for changes in selection, and sets the Domain's Tool
+     * accordingly.
+     */
+    private PaletteListener paletteListener = new PaletteListener() {
+        /* TIZEN */
+        @Override
+        public void activeToolChanged(org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer palette,
+                                      ToolEntry tool) {
+            handlePaletteToolChanged(); // TIZEN - click and drop
+        }
+    };
+
+    /**
+     * Constructs an EditDomain and loads the default tool.
+     */
+    public TizenEditDomain(IEditorPart editorPart) {
+        super(editorPart);
+    }
+
+    /**
+     * Adds an EditPartViewer into the EditDomain. A viewer is most likely placed in a
+     * {@link org.eclipse.ui.IWorkbenchPart WorkbenchPart} of some form, such as the IEditorPart or
+     * an IViewPart.
+     * 
+     * @param viewer
+     *            The EditPartViewer
+     */
+    // public void addViewer(EditPartViewer viewer) {
+    // viewer.setEditDomain(this);
+    // if (!viewers.contains(viewer))
+    // viewers.add(viewer);
+    // }
+    public void addViewer(PaletteViewer viewer) {
+        viewer.setEditDomain(this);
+        if (!viewers.contains(viewer))
+            viewers.add(viewer);
+    }
+
+    /**
+     * Called when one of the EditDomain's Viewers receives keyboard focus.
+     * 
+     * @param event
+     *            The SWT focus event
+     * @param viewer
+     *            the Viewer that received the event.
+     */
+    public void focusGained(FocusEvent event, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.focusGained(event, viewer);
+    }
+
+    /**
+     * Called when one of the EditDomain's Viewers is losing keyboard focus.
+     * 
+     * @param event
+     *            The SWT focus event
+     * @param viewer
+     *            the Viewer that received the event.
+     */
+    public void focusLost(FocusEvent event, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.focusLost(event, viewer);
+    }
+
+    /**
+     * Returns the active Tool
+     * 
+     * @return the active Tool
+     */
+    public Tool getActiveTool() {
+        return activeTool;
+    }
+
+    /**
+     * Returns the CommandStack. Command stacks could potentially be shared across domains depending
+     * on the application.
+     * 
+     * @return The command stack
+     */
+    // public CommandStack getCommandStack() {
+    // return commandStack;
+    // }
+
+    /**
+     * Returns the default tool for this edit domain. This will be a
+     * {@link org.eclipse.gef.tools.SelectionTool} unless specifically replaced using
+     * {@link #setDefaultTool(Tool)}.
+     * 
+     * @return The default Tool for this domain
+     */
+    public Tool getDefaultTool() {
+        if (defaultTool == null)
+            defaultTool = new SelectionTool();
+        return defaultTool;
+    }
+
+    /**
+     * Returns the palette viewer currently associated with this domain.
+     * 
+     * @since 1.0
+     * @return The current palette viewer
+     */
+
+    public org.eclipse.gef.ui.palette.PaletteViewer getPaletteViewer() {
+        // return (ScrollingGraphicalViewer)paletteViewer;
+        return null;
+    }
+
+    public PaletteViewer getTizenPaletteViewer() {
+        // return (ScrollingGraphicalViewer)paletteViewer;
+        return paletteViewer;
+    }
+
+    private void handlePaletteToolChanged() {
+        PaletteViewer paletteViewer = getTizenPaletteViewer();
+        if (paletteViewer != null) {
+            ToolEntry entry = paletteViewer.getActiveTool();
+            if (entry != null)
+                setActiveTool(entry.createTool());
+            else
+                setActiveTool(getDefaultTool());
+        }
+    }
+
+    /**
+     * Called when a key is <B>pressed</B> on a Viewer.
+     * 
+     * @param keyEvent
+     *            The SWT key event
+     * @param viewer
+     *            The source of the event.
+     */
+    public void keyDown(KeyEvent keyEvent, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.keyDown(keyEvent, viewer);
+    }
+
+    /**
+     * Called when a traversal occurs on a viewer.
+     * 
+     * @param traverseEvent
+     *            the SWT traverse event
+     * @param viewer
+     *            the source of the event
+     * @since 3.1
+     */
+    public void keyTraversed(TraverseEvent traverseEvent, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.keyTraversed(traverseEvent, viewer);
+    }
+
+    /**
+     * Called when a key is <B>released</b> on a Viewer.
+     * 
+     * @param keyEvent
+     *            The SWT key event
+     * @param viewer
+     *            the source of the event.
+     */
+    public void keyUp(KeyEvent keyEvent, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.keyUp(keyEvent, viewer);
+    }
+
+    /**
+     * Loads the default Tool. If a palette has been provided and that palette has a default, then
+     * that tool is loaded. If not, the EditDomain's default tool is loaded. By default, this is the
+     * {@link org.eclipse.gef.tools.SelectionTool}.
+     */
+    public void loadDefaultTool() {
+        setActiveTool(null);
+        PaletteViewer paletteViewer = getTizenPaletteViewer();
+        if (paletteRoot != null && paletteViewer != null) {
+            if (paletteRoot.getDefaultEntry() != null) {
+                paletteViewer.setActiveTool(paletteRoot.getDefaultEntry());
+                return;
+            } else
+                paletteViewer.setActiveTool(null);
+        }
+        setActiveTool(getDefaultTool());
+    }
+
+    /**
+     * Called when the mouse button has been double-clicked on a Viewer.
+     * 
+     * @param mouseEvent
+     *            The SWT mouse event
+     * @param viewer
+     *            The source of the event.
+     */
+    public void mouseDoubleClick(MouseEvent mouseEvent, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.mouseDoubleClick(mouseEvent, viewer);
+    }
+
+    /**
+     * Called when the mouse button has been pressed on a Viewer.
+     * 
+     * @param mouseEvent
+     *            The SWT mouse event
+     * @param viewer
+     *            The source of the event.
+     */
+    public void mouseDown(MouseEvent mouseEvent, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.mouseDown(mouseEvent, viewer);
+    }
+
+    /**
+     * Called when the mouse has been dragged within a Viewer.
+     * 
+     * @param mouseEvent
+     *            The SWT mouse event
+     * @param viewer
+     *            The source of the event.
+     */
+    public void mouseDrag(MouseEvent mouseEvent, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.mouseDrag(mouseEvent, viewer);
+    }
+
+    /**
+     * Called when the mouse has hovered on a Viewer.
+     * 
+     * @param mouseEvent
+     *            The SWT mouse event
+     * @param viewer
+     *            The source of the event.
+     */
+    public void mouseHover(MouseEvent mouseEvent, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.mouseHover(mouseEvent, viewer);
+    }
+
+    /**
+     * Called when the mouse has been moved on a Viewer.
+     * 
+     * @param mouseEvent
+     *            The SWT mouse event
+     * @param viewer
+     *            The viewer that the mouse event is over.
+     */
+    public void mouseMove(MouseEvent mouseEvent, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.mouseMove(mouseEvent, viewer);
+    }
+
+    /**
+     * Called when the mouse button has been released on a Viewer.
+     * 
+     * @param mouseEvent
+     *            The SWT mouse event
+     * @param viewer
+     *            The source of the event.
+     */
+    public void mouseUp(MouseEvent mouseEvent, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.mouseUp(mouseEvent, viewer);
+    }
+
+    /**
+     * Called by the DomainEventDispatcher when the mouse wheel has been scrolled.
+     * 
+     * @param event
+     *            The SWT event
+     * @param viewer
+     *            The source of the event
+     */
+    public void mouseWheelScrolled(Event event, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.mouseWheelScrolled(event, viewer);
+    }
+
+    /**
+     * Called when a native drag has finished on a Viewer.
+     * 
+     * @param event
+     *            The DragSourceEvent
+     * @param viewer
+     *            The viewer where the drag finished
+     */
+    public void nativeDragFinished(DragSourceEvent event, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.nativeDragFinished(event, viewer);
+    }
+
+    /**
+     * Called when a native drag has started on a Viewer.
+     * 
+     * @param event
+     *            The DragSourceEvent
+     * @param viewer
+     *            The viewer where the drag started
+     */
+    public void nativeDragStarted(DragSourceEvent event, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.nativeDragStarted(event, viewer);
+    }
+
+    /**
+     * Removes a previously added viewer from the EditDomain. A Viewer that is removed from the
+     * EditDomain will no longer forward input to the domain and its active Tool.
+     * 
+     * @param viewer
+     *            the Viewer being removed
+     */
+    public void removeViewer(EditPartViewer viewer) {
+        if (viewers.remove(viewer))
+            viewer.setEditDomain(null);
+    }
+
+    /**
+     * Sets the <code>CommandStack</code>.
+     * 
+     * @param stack
+     *            the CommandStack
+     */
+    // public void setCommandStack(CommandStack stack) {
+    // commandStack = stack;
+    // }
+
+    /**
+     * Sets the default Tool, which is used if the Palette does not provide a default
+     * 
+     * @param tool
+     *            <code>null</code> or a Tool
+     */
+    public void setDefaultTool(Tool tool) {
+        defaultTool = tool;
+    }
+
+    /**
+     * Sets the PalatteRoot for this EditDomain. If the EditDomain already knows about a
+     * PaletteViewer, this root will be set into the palette viewer also. Loads the default Tool
+     * after the root has been set.
+     * <p>
+     * It is recommended that the palette root not be set multiple times. Some components (such as
+     * the PaletteCustomizerDialog for the PaletteViewer) might still hold on to the old root. If
+     * the input has changed or needs to be refreshed, just remove all the children from the root
+     * and add the new ones.
+     * 
+     * @param root
+     *            the palette's root
+     */
+    public void setPaletteRoot(PaletteRoot root) {
+        if (paletteRoot == root)
+            return;
+        paletteRoot = root;
+        if (getTizenPaletteViewer() != null) {
+            getTizenPaletteViewer().setPaletteRoot(paletteRoot);
+            loadDefaultTool();
+        }
+    }
+
+    /**
+     * Sets the <code>PaletteViewer</code> for this EditDomain
+     * 
+     * @param palette
+     *            the PaletteViewer
+     */
+    public void setTizenPaletteViewer(PaletteViewer palette) {
+        if (palette == paletteViewer)
+            return;
+        if (paletteViewer != null)
+            paletteViewer.removePaletteListener(paletteListener);
+        paletteViewer = palette;
+        if (paletteViewer != null) {
+            palette.addPaletteListener(paletteListener);
+            if (paletteRoot != null) {
+                paletteViewer.setPaletteRoot(paletteRoot);
+                loadDefaultTool();
+            }
+        }
+    }
+
+    /**
+     * Sets the active Tool for this EditDomain. If a current Tool is active, it is deactivated. The
+     * new Tool is told its EditDomain, and is activated.
+     * 
+     * @param tool
+     *            the Tool
+     */
+    public void setActiveTool(Tool tool) {
+        if (activeTool != null)
+            activeTool.deactivate();
+        activeTool = tool;
+        if (activeTool != null) {
+            activeTool.setEditDomain(this);
+            activeTool.activate();
+        }
+    }
+
+    /**
+     * Called when the mouse enters a Viewer.
+     * 
+     * @param mouseEvent
+     *            the SWT mouse event
+     * @param viewer
+     *            the Viewer being entered
+     */
+    public void viewerEntered(MouseEvent mouseEvent, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.viewerEntered(mouseEvent, viewer);
+    }
+
+    /**
+     * Called when the mouse exits a Viewer.
+     * 
+     * @param mouseEvent
+     *            the SWT mouse event
+     * @param viewer
+     *            the Viewer being exited
+     */
+    public void viewerExited(MouseEvent mouseEvent, EditPartViewer viewer) {
+        Tool tool = getActiveTool();
+        if (tool != null)
+            tool.viewerExited(mouseEvent, viewer);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/DefaultEntryPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/DefaultEntryPage.java
new file mode 100644 (file)
index 0000000..e256df4
--- /dev/null
@@ -0,0 +1,303 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import org.eclipse.draw2d.FigureUtilities;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteSeparator;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteMessages;
+
+
+/**
+ * This is a default implementation of the {@link EntryPage} interface. It displays the entry's
+ * label, description and visible fields (and allows for their modification). It is live in the
+ * sense that the model is updated with the changes immediately (on every keystroke).
+ * 
+ * @author Pratik Shah
+ */
+public class DefaultEntryPage implements EntryPage {
+
+    private EntryPageContainer container;
+
+    /**
+     * This is the panel that is created by {@link #createControl(Composite, PaletteEntry)}. It will
+     * be <code>null</code> if that method hasn't been invoked yet.
+     */
+    private Composite panel;
+    /**
+     * This is the <code>PaletteEntry</code> that this page represents. It will be <code>null</code>
+     * until {@link #createControl(Composite, PaletteEntry)} is invoked.
+     */
+    private PaletteEntry entry;
+
+    /**
+     * Being live, this method is completely ignored. Model is updated with every keystroke. So,
+     * there is no need to wait for this method to be called to actually make the changes to the
+     * model.
+     */
+    public final void apply() {
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.EntryPage#createControl(Composite, PaletteEntry)
+     */
+    public void createControl(Composite parent, PaletteEntry entry) {
+        this.entry = entry;
+
+        panel = new Composite(parent, SWT.NONE);
+        panel.setFont(parent.getFont());
+        GridLayout gridLayout = new GridLayout(1, false);
+        gridLayout.marginWidth = 0;
+        gridLayout.marginHeight = 0;
+        panel.setLayout(gridLayout);
+        Control[] tablist = new Control[3];
+
+        createLabel(panel, SWT.NONE, PaletteMessages.NAME_LABEL);
+        tablist[0] = createNameText(panel);
+
+        createLabel(panel, SWT.NONE, PaletteMessages.DESCRIPTION_LABEL);
+        tablist[1] = createDescText(panel);
+
+        tablist[2] = createHiddenCheckBox(panel);
+
+        panel.setTabList(tablist);
+    }
+
+    /**
+     * Creates the <code>Text</code> where the description of the entry is to be displayed.
+     * 
+     * @param panel
+     *            The Composite in which the <code>Text</code> is to be created
+     * @return The newly created <code>Text</code>
+     */
+    protected Text createDescText(Composite panel) {
+        String desc = entry.getDescription();
+        Text description = createText(panel, SWT.MULTI | SWT.WRAP | SWT.BORDER
+                | SWT.V_SCROLL, desc);
+        GridData data = new GridData(GridData.FILL_HORIZONTAL);
+        data.widthHint = 150;
+        data.heightHint = description.computeTrim(0, 0, 10, FigureUtilities
+                .getFontMetrics(description.getFont()).getHeight() * 2).height;
+        description.setLayoutData(data);
+        if (getPermission() >= PaletteEntry.PERMISSION_LIMITED_MODIFICATION) {
+            description.addModifyListener(new ModifyListener() {
+                public void modifyText(ModifyEvent e) {
+                    handleDescriptionChanged(((Text) e.getSource()).getText());
+                }
+            });
+        }
+        return description;
+    }
+
+    /**
+     * Creates the <code>Button</code> (CheckBox) for indicating the hidden status of the entry. It
+     * initializes it with the current hidden state of entry.
+     * 
+     * @param panel
+     *            The Composite in which the Button is to be created
+     * @return The newly created Button
+     */
+    protected Button createHiddenCheckBox(Composite panel) {
+        Button hidden = new Button(panel, SWT.CHECK);
+        hidden.setFont(panel.getFont());
+        hidden.setText(PaletteMessages.HIDDEN_LABEL);
+        hidden.setSelection(!entry.isVisible());
+
+        if (getPermission() == PaletteEntry.PERMISSION_NO_MODIFICATION) {
+            hidden.setEnabled(false);
+        } else {
+            hidden.addSelectionListener(new SelectionAdapter() {
+                public void widgetSelected(SelectionEvent e) {
+                    handleHiddenSelected(((Button) e.getSource())
+                            .getSelection());
+                }
+            });
+        }
+
+        return hidden;
+    }
+
+    /**
+     * Creates a label
+     * 
+     * @param panel
+     *            The Composite in which the Label is to be created
+     * @param style
+     *            The stylebits for the Label
+     * @param text
+     *            The Label's text
+     * @return Label - The newly created Label
+     */
+    protected Label createLabel(Composite panel, int style, String text) {
+        Label label = new Label(panel, style);
+        label.setFont(panel.getFont());
+        label.setText(text);
+        return label;
+    }
+
+    /**
+     * Creates the Text where the name of the entry is to be displayed.
+     * 
+     * @param panel
+     *            The Composite in which the Text is to be created
+     * @return Text - The newly created Text
+     */
+    protected Text createNameText(Composite panel) {
+        Text name = createText(panel, SWT.SINGLE | SWT.BORDER, entry.getLabel());
+        if (getPermission() >= PaletteEntry.PERMISSION_LIMITED_MODIFICATION) {
+            name.addModifyListener(new ModifyListener() {
+                public void modifyText(ModifyEvent e) {
+                    handleNameChanged(((Text) e.getSource()).getText());
+                }
+            });
+        }
+        name.setVisible(true);
+        return name;
+    }
+
+    /**
+     * Creates a <code>Text</code>. This method is mainly a result of code-factoring.
+     * 
+     * @param panel
+     *            The Composite in which the Text is to be created
+     * @param style
+     *            The stylebits for the Text
+     * @param text
+     *            The text to be displayed in the Text
+     * @return a text widget with griddata constraint
+     */
+    protected Text createText(Composite panel, int style, String text) {
+        if (getEntry() instanceof PaletteSeparator
+                || getPermission() < PaletteEntry.PERMISSION_LIMITED_MODIFICATION) {
+            style = style | SWT.READ_ONLY;
+        }
+
+        Text textBox = new Text(panel, style);
+        textBox.setFont(panel.getFont());
+        if (text != null)
+            textBox.setText(text);
+        GridData data = new GridData(GridData.FILL_HORIZONTAL);
+        data.widthHint = 200;
+        textBox.setLayoutData(data);
+        return textBox;
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.EntryPage#getControl()
+     */
+    public Control getControl() {
+        return panel;
+    }
+
+    /**
+     * Provides sub-classes with access to the entry this class is monitoring.
+     * 
+     * @return PaletteEntry - The entry this class is monitoring
+     */
+    protected PaletteEntry getEntry() {
+        return entry;
+    }
+
+    /**
+     * Sub-classes should override this method to provide appropriate error notification messages.
+     * 
+     * @return The message to be used when notifying listeners about a state change
+     */
+    protected String getMessage() {
+        return ""; //$NON-NLS-1$
+    }
+
+    /**
+     * @return The <code>EntryPageContainer</code> to which this page can report errors.
+     */
+    protected EntryPageContainer getPageContainer() {
+        return container;
+    }
+
+    /**
+     * <p>
+     * Updates the model with the change in the entry's description, and updates the state of the
+     * page.
+     * </p>
+     * <p>
+     * This method is invoked on every keystroke in the Text displaying the description of the
+     * entry.
+     * </p>
+     * 
+     * @param text
+     *            The new description
+     */
+    protected void handleDescriptionChanged(String text) {
+        getEntry().setDescription(text.trim());
+    }
+
+    /**
+     * <p>
+     * Updates the model with the change in the entry's hidden state, and updates the state of the
+     * page.
+     * </p>
+     * <p>
+     * This method is invokes whenever the "Hidden" checkbox is selected.
+     * </p>
+     * 
+     * @param isChecked
+     *            The new selection value
+     */
+    protected void handleHiddenSelected(boolean isChecked) {
+        getEntry().setVisible(!isChecked);
+    }
+
+    /**
+     * <p>
+     * Updates the model with the change in the entry's name, and updates the state of the page.
+     * </p>
+     * <p>
+     * This method is invoked on every keystroke in the Text displaying the entry's name.
+     * </p>
+     * 
+     * @param text
+     *            The new name
+     */
+    protected void handleNameChanged(String text) {
+        getEntry().setLabel(text.trim());
+    }
+
+    /**
+     * @return the user permission on the entry
+     */
+    protected int getPermission() {
+        return getEntry().getUserModificationPermission();
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.EntryPage#setPageContainer(EntryPageContainer)
+     */
+    public void setPageContainer(EntryPageContainer pageContainer) {
+        container = pageContainer;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/DrawerEntryPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/DrawerEntryPage.java
new file mode 100644 (file)
index 0000000..10facbe
--- /dev/null
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteDrawer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteMessages;
+
+
+/**
+ * The default entry page for drawers.
+ * 
+ * @author Pratik Shah
+ */
+public class DrawerEntryPage extends DefaultEntryPage {
+
+    private Button openDrawerOption, pinDrawerOption;
+
+    private boolean contains(Object[] array, Object obj) {
+        for (int i = array.length - 1; i >= 0; i--) {
+            if (obj == array[i]) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.EntryPage#createControl(Composite, PaletteEntry)
+     */
+    public void createControl(Composite parent, PaletteEntry entry) {
+        super.createControl(parent, entry);
+
+        openDrawerOption = createOpenDrawerInitiallyOption(getComposite());
+        pinDrawerOption = createPinDrawerInitiallyOption(getComposite());
+
+        Control[] oldTablist = getComposite().getTabList();
+        if (!contains(oldTablist, openDrawerOption)) {
+            // This means that the super class must've set a specific tab order
+            // on this
+            // composite. We need to add the two newly created controls to this
+            // tab order.
+            Control[] newTablist = new Control[oldTablist.length + 2];
+            System.arraycopy(oldTablist, 0, newTablist, 0, oldTablist.length);
+            newTablist[newTablist.length - 2] = openDrawerOption;
+            newTablist[newTablist.length - 1] = pinDrawerOption;
+            getComposite().setTabList(newTablist);
+        }
+    }
+
+    /**
+     * Creates the button that provides the option to pin a drawer open at start-up.
+     * 
+     * @param panel
+     *            The parent Composite
+     * @return The button for the new option
+     */
+    protected Button createOpenDrawerInitiallyOption(Composite panel) {
+        Button b = new Button(panel, SWT.CHECK);
+        b.setFont(panel.getFont());
+        b.setText(PaletteMessages.EXPAND_DRAWER_AT_STARTUP_LABEL);
+        b.setSelection(getDrawer().isInitiallyOpen());
+        if (getPermission() >= PaletteEntry.PERMISSION_LIMITED_MODIFICATION) {
+            b.addSelectionListener(new SelectionAdapter() {
+                public void widgetSelected(SelectionEvent e) {
+                    handleOpenSelected(((Button) e.getSource()).getSelection());
+                }
+            });
+        } else {
+            b.setEnabled(false);
+        }
+
+        return b;
+    }
+
+    /**
+     * Creates the button that provides the option to have a drawer open at start-up.
+     * 
+     * @param panel
+     *            The parent Composite
+     * @return The button for the new option
+     */
+    protected Button createPinDrawerInitiallyOption(Composite panel) {
+        Button pinOption = new Button(panel, SWT.CHECK);
+        pinOption.setFont(panel.getFont());
+        pinOption.setText(PaletteMessages.DRAWER_PIN_AT_STARTUP);
+        GridData data = new GridData();
+        data.horizontalIndent = 15;
+        pinOption.setLayoutData(data);
+        pinOption.setEnabled(openDrawerOption.getSelection()
+                && openDrawerOption.isEnabled());
+        pinOption.setSelection(getDrawer().isInitiallyPinned());
+        if (getPermission() >= PaletteEntry.PERMISSION_LIMITED_MODIFICATION) {
+            pinOption.addSelectionListener(new SelectionAdapter() {
+                public void widgetSelected(SelectionEvent e) {
+                    handlePinSelected(((Button) e.getSource()).getSelection());
+                }
+            });
+        }
+        return pinOption;
+    }
+
+    private Composite getComposite() {
+        return (Composite) getControl();
+    }
+
+    /**
+     * Convenience method that provides access to the PaletteDrawer.
+     * 
+     * @return the entry as a PaletteDrawer
+     */
+    protected PaletteDrawer getDrawer() {
+        return (PaletteDrawer) getEntry();
+    }
+
+    /**
+     * Returns the checkbox button which controls whether the drawer is initially open.
+     * 
+     * @return the checkbox button which controls the initially open setting.
+     */
+    protected Button getOpenDrawerInitiallyButton() {
+        return openDrawerOption;
+    }
+
+    /**
+     * Returns the checkbox button which controls whether the drawer is initially pinned.
+     * 
+     * @return the checkbox button which controls the initially pinned setting.
+     */
+    protected Button getPinDrawerInitiallyButton() {
+        return pinDrawerOption;
+    }
+
+    /**
+     * This method is invoked when the selection state of the option to open drawer at start-up is
+     * toggled.
+     * <p>
+     * It sets the initial state of the drawer accordingly.
+     * 
+     * @param selection
+     *            <code>true</code> if that option is now selected
+     */
+    protected void handleOpenSelected(boolean selection) {
+        int status = selection ? PaletteDrawer.INITIAL_STATE_OPEN
+                : PaletteDrawer.INITIAL_STATE_CLOSED;
+        getDrawer().setInitialState(status);
+        pinDrawerOption.setEnabled(selection);
+        if (!selection) {
+            pinDrawerOption.setSelection(false);
+        }
+    }
+
+    /**
+     * This method is invoked when the selection state of the option to pin a drawer open at
+     * start-up is toggled.
+     * <p>
+     * It sets the initial state of the drawer accordingly.
+     * 
+     * @param selection
+     *            <code>true</code> if that option is now selected
+     */
+    protected void handlePinSelected(boolean selection) {
+        int status = selection ? PaletteDrawer.INITIAL_STATE_PINNED_OPEN
+                : PaletteDrawer.INITIAL_STATE_OPEN;
+        getDrawer().setInitialState(status);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/EntryPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/EntryPage.java
new file mode 100644 (file)
index 0000000..1a45ca6
--- /dev/null
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+
+
+/**
+ * An <code>EntryPage</code> displays properties of a <code>PaletteEntry</code>. Listeners can be
+ * added to a page
+ * 
+ * @author Pratik Shah
+ */
+public interface EntryPage {
+
+    /**
+     * Sets the page container for this page. This page will report its errors to the given page
+     * container.
+     * 
+     * @param pageContainer
+     *            The <code>EntryPageContainer</code> to which this page can report errors
+     */
+    void setPageContainer(EntryPageContainer pageContainer);
+
+    /**
+     * This method is called when changes made to properties need to be reflected in the model.
+     */
+    void apply();
+
+    /**
+     * Creates the Control that displays the properties of the given entry. This method will only be
+     * called once. The parent Composite's Font is set to the Workbench Dialog Font. The page's
+     * Controls should use the Workbench Dialog Font where appropriate.
+     * 
+     * @param parent
+     *            The Composite in which the Control has to be created
+     * @param entry
+     *            The entry whose properties have to be displayed
+     */
+    void createControl(Composite parent, PaletteEntry entry);
+
+    /**
+     * Returns the Panel (Control) that displays the properties of the entry. This is the same
+     * Control that was created in {@link #createControl(Composite,PaletteEntry)}.
+     * 
+     * @return the Control that displays the properties of the entry
+     * @see #createControl(Composite, PaletteEntry)
+     */
+    Control getControl();
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/EntryPageContainer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/EntryPageContainer.java
new file mode 100644 (file)
index 0000000..aeef816
--- /dev/null
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+/**
+ * An <code>EntryPageContainer</code> allows an <code>EntryPage</code> to report errors to it.
+ * 
+ * @author Pratik Shah
+ */
+public interface EntryPageContainer {
+
+    /**
+     * Clears the error.
+     */
+    void clearProblem();
+
+    /**
+     * Shows the error to the user.
+     * 
+     * @param description
+     *            A description of the problem. Should be as brief as possible.
+     */
+    void showProblem(String description);
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteContainerFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteContainerFactory.java
new file mode 100644 (file)
index 0000000..22ba42e
--- /dev/null
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import java.util.List;
+
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteContainer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteRoot;
+
+
+/**
+ * Abstract factory for <code>PaletteContainer</code>s
+ * 
+ * <p>
+ * This class does not create <code>PaletteContainer</code>s within other </code>
+ * PaletteContainer</code>s. The necessary methods may be overridden should such functionality be
+ * desired.
+ * </p>
+ * 
+ * @author Pratik Shah
+ */
+public abstract class PaletteContainerFactory extends PaletteEntryFactory {
+
+    /**
+     * @see PaletteEntryFactory#determineContainerForNewEntry(PaletteEntry)
+     */
+    protected PaletteContainer determineContainerForNewEntry(
+                                                             PaletteEntry selected) {
+        if (selected instanceof PaletteRoot)
+            return (PaletteContainer) selected;
+        PaletteContainer current = selected.getParent();
+        while (!(current instanceof PaletteRoot))
+            current = current.getParent();
+        return current;
+    }
+
+    /**
+     * @see PaletteEntryFactory#determineIndexForNewEntry(PaletteContainer, PaletteEntry)
+     */
+    protected int determineIndexForNewEntry(PaletteContainer parent,
+                                            PaletteEntry selected) {
+        if (parent == selected) {
+            return 0;
+        }
+
+        List children = parent.getChildren();
+        PaletteEntry current = selected;
+        while (!children.contains(current)) {
+            current = current.getParent();
+        }
+        return children.indexOf(current) + 1;
+    }
+
+    /**
+     * You can always create a new container. So, this method always returns true.
+     * 
+     * @see org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#canCreate(PaletteEntry)
+     */
+    public boolean canCreate(PaletteEntry selected) {
+        return true;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteCustomizationAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteCustomizationAction.java
new file mode 100644 (file)
index 0000000..5fa0291
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * <code>PaletteCustomizationAction</code>s are used to manipulate the palette model. They can
+ * enable and disable themselves when needed.
+ * 
+ * <p>
+ * This class is mainly a result of code-factoring.
+ * </p>
+ * 
+ * @author Pratik Shah
+ */
+public abstract class PaletteCustomizationAction extends Action {
+
+    /**
+     * Call this method to have the action update its state and enable or disable itself.
+     */
+    public abstract void update();
+
+    /**
+     * @see org.eclipse.jface.action.Action#setImageDescriptor(ImageDescriptor)
+     */
+    public void setImageDescriptor(ImageDescriptor newImage) {
+        super.setImageDescriptor(newImage);
+        setHoverImageDescriptor(newImage);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteCustomizerDialog.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteCustomizerDialog.java
new file mode 100644 (file)
index 0000000..23183ad
--- /dev/null
@@ -0,0 +1,1347 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.widgets.MultiLineLabel;
+import org.eclipse.gef.internal.Internal;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceColors;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.PageBook;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.ToolbarDropdownContributionItem;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteRoot;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteCustomizer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteMessages;
+
+
+/**
+ * This class implements a default dialog that allows customization of the different entries/items
+ * on a GEF palette, i.e. the model behind the palette.
+ * <p>
+ * The construction of the dialog is broken down into different methods in order to allow clients to
+ * further customize the appearance of the dialog, if so desired.
+ * </p>
+ * <p>
+ * This dialog can be re-used, i.e., it can be re-opened once closed. There is no need to create a
+ * new <code>PaletteCustomizerDialog</code> everytime a palette needs to be customized.
+ * </p>
+ * 
+ * @author Pratik Shah
+ * @see org.eclipse.gef.palette.PaletteEntry
+ * @see org.eclipse.gef.ui.palette.PaletteCustomizer
+ */
+public class PaletteCustomizerDialog extends Dialog implements
+        EntryPageContainer {
+
+    /**
+     * The unique ID for the Apply Button. It can be used to retrieve that widget from the internal
+     * map (using {@link #getWidget(int)} or {@link #getButton(int)}), or to identify that widget in
+     * {@link #buttonPressed(int)}.
+     */
+    protected static final int APPLY_ID = IDialogConstants.CLIENT_ID + 1;
+
+    /**
+     * Sub-classes that need to create their own unique IDs should do so by adding to this ID.
+     */
+    protected static final int CLIENT_ID = 16;
+
+    private HashMap widgets = new HashMap();
+    private HashMap entriesToPages = new HashMap();
+    private List actions;
+
+    private String errorMessage;
+    private Tree tree;
+    private Composite titlePage, errorPage;
+    private PageBook propertiesPanelContainer;
+    // This PageBook is used to switch the title of the properties panel to
+    // either an error
+    // message or the currently active entry's label
+    private PageBook titleSwitcher;
+    private PaletteCustomizer customizer;
+    private EntryPage activePage, noSelectionPage;
+    private CLabel title;
+    private MultiLineLabel errorTitle;
+    private Image titleImage;
+    private TreeViewer treeviewer;
+    private ILabelProvider treeViewerLabelProvider;
+    private PaletteEntry activeEntry;
+    private PaletteEntry initialSelection;
+    private PaletteRoot root;
+    private PropertyChangeListener titleUpdater = new PropertyChangeListener() {
+        public void propertyChange(PropertyChangeEvent evt) {
+            if (title == null) {
+                return;
+            }
+
+            title.setText(((PaletteEntry) evt.getSource()).getLabel());
+        }
+    };
+    private ISelectionChangedListener pageFlippingPreventer = new ISelectionChangedListener() {
+        public void selectionChanged(SelectionChangedEvent event) {
+            treeviewer.removePostSelectionChangedListener(this);
+            treeviewer.setSelection(new StructuredSelection(activeEntry));
+        }
+    };
+    private boolean isSetup = true;
+
+    /**
+     * Constructs a new customizer dialog.
+     * 
+     * @param shell
+     *            the parent Shell
+     * @param customizer
+     *            the customizer
+     * @param root
+     *            the palette root
+     */
+    public PaletteCustomizerDialog(Shell shell, PaletteCustomizer customizer,
+            PaletteRoot root) {
+        super(shell);
+        this.customizer = customizer;
+        this.root = root;
+        setShellStyle(getShellStyle() | SWT.RESIZE);
+    }
+
+    /**
+     * This method will be invoked whenever any <code>Button</code> created using
+     * {@link #createButton(Composite, int, String, int, ImageDescriptor)} or
+     * {@link Dialog#createButton(Composite, int, String, boolean)} is selected.
+     * 
+     * @see Dialog#buttonPressed(int)
+     */
+    protected void buttonPressed(int buttonId) {
+        if (APPLY_ID == buttonId) {
+            handleApplyPressed();
+        } else {
+            super.buttonPressed(buttonId);
+        }
+    }
+
+    /**
+     * This method should be invoked by EntryPages when an error that they had earlier reported
+     * (using {@link #showProblem(String)}) is fixed. This will hide the error message, enable the
+     * OK and Apply buttons and re-allow changing selection in the outline tree.
+     * 
+     * @see org.eclipse.gef.ui.palette.customize.EntryPageContainer#clearProblem()
+     * @see #showProblem(String)
+     */
+    public void clearProblem() {
+        if (errorMessage != null) {
+            titleSwitcher.showPage(titlePage);
+            Button okBtn = getButton(IDialogConstants.OK_ID); 
+            if (okBtn != null) {
+                okBtn.setEnabled(true);
+            }
+            Button applyBtn = getButton(APPLY_ID);
+            if (applyBtn != null) {
+                applyBtn.setEnabled(true);
+            }
+            errorMessage = null;
+        }
+    }
+
+    /**
+     * <p>
+     * NOTE: This dialog can be re-opened.
+     * </p>
+     * 
+     * @see org.eclipse.jface.window.Window#close()
+     */
+    public boolean close() {
+        // Remove listeners
+        if (activeEntry != null) {
+            activeEntry.removePropertyChangeListener(titleUpdater);
+        }
+
+        // Save or dump changes
+        // This needs to be done here and not in the handle methods because the
+        // user can
+        // also close the dialog with the 'X' in the top right of the window
+        // (which
+        // corresponds to a cancel).
+        if (getReturnCode() == OK) {
+            save();
+        } else {
+            revertToSaved();
+        }
+
+        // Close the dialog
+        boolean returnVal = super.close();
+
+        // Reset variables
+        entriesToPages.clear();
+        widgets.clear();
+        actions = null;
+        activePage = null;
+        tree = null;
+        propertiesPanelContainer = null;
+        titleSwitcher = null;
+        titlePage = null;
+        errorPage = null;
+        title = null;
+        errorTitle = null;
+        treeviewer = null;
+        noSelectionPage = null;
+        initialSelection = null;
+        activeEntry = null;
+        errorMessage = null;
+        isSetup = true;
+
+        return returnVal;
+    }
+
+    /**
+     * @see org.eclipse.jface.window.Window#configureShell(Shell)
+     */
+    protected void configureShell(Shell newShell) {
+        newShell.setText(PaletteMessages.CUSTOMIZE_DIALOG_TITLE);
+        super.configureShell(newShell);
+    }
+
+    /**
+     * This method should not be used to create buttons for the button bar. Use
+     * {@link Dialog#createButton(Composite, int, String, boolean)} for that. This method can be
+     * used to create any other button in the dialog. The parent <code>Composite</code> must have a
+     * GridLayout. These buttons will be available through {@link #getButton(int)} and
+     * {@link #getWidget(int)}. Ensure that the various buttons created by this method are given
+     * unique IDs. Pass in a <code>null</code> image descriptor if you don't want the button to have
+     * an icon. This method will take care of disposing the images that it creates.
+     * {@link #buttonPressed(int)} will be called when any of the buttons created by this method are
+     * clicked (selected).
+     * 
+     * @param parent
+     *            The composite in which the button is to be created
+     * @param id
+     *            The button's unique ID
+     * @param label
+     *            The button's text
+     * @param stylebits
+     *            The style bits for creating the button (eg., <code>SWT.PUSH</code> or
+     *            <code>SWT.CHECK</code>)
+     * @param descriptor
+     *            The ImageDescriptor from which the image/icon for this button should be created
+     * @return The newly created button for convenience
+     */
+    protected Button createButton(Composite parent, int id, String label,
+                                  int stylebits, ImageDescriptor descriptor) {
+        Button button = new Button(parent, stylebits);
+        button.setText(label);
+        button.setFont(parent.getFont());
+        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+        button.setLayoutData(data);
+
+        button.setData(new Integer(id));
+        button.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent event) {
+                buttonPressed(((Integer) event.widget.getData()).intValue());
+            }
+        });
+        widgets.put(new Integer(id), button);
+
+        if (descriptor != null) {
+            button.setImage(new Image(parent.getDisplay(), descriptor
+                    .getImageData()));
+            button.addDisposeListener(new DisposeListener() {
+                public void widgetDisposed(DisposeEvent e) {
+                    Image img = ((Button) e.getSource()).getImage();
+                    if (img != null && !img.isDisposed()) {
+                        img.dispose();
+                    }
+                }
+            });
+        }
+
+        return button;
+    }
+
+    /**
+     * Creates the OK, Cancel and Apply buttons
+     * 
+     * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(Composite)
+     */
+    protected void createButtonsForButtonBar(Composite parent) {
+        super.createButtonsForButtonBar(parent);
+        createButton(parent, APPLY_ID, PaletteMessages.APPLY_LABEL, false);
+    }
+
+    /**
+     * The dialog area contains the following:
+     * <UL>
+     * <LI>Outline ({@link #createOutline(Composite)})</LI>
+     * <LI>Properties Panel ({@link #createPropertiesPanel(Composite)})</LI>
+     * </UL>
+     * 
+     * <p>
+     * It is recommended that this method not be overridden. Override one of the methods that this
+     * method calls in order to customize the appearance of the dialog.
+     * </p>
+     * 
+     * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(Composite)
+     */
+    protected Control createDialogArea(Composite parent) {
+        Composite composite = (Composite) super.createDialogArea(parent);
+        GridLayout gridLayout = (GridLayout) composite.getLayout();
+        gridLayout.numColumns = 2;
+        gridLayout.horizontalSpacing = 10;
+
+        // Create the tree
+        Control child = createOutline(composite);
+        GridData data = new GridData(GridData.VERTICAL_ALIGN_FILL);
+        data.verticalSpan = 2;
+        child.setLayoutData(data);
+
+        // Create the panel where the properties of the selected palette entry
+        // will
+        // be shown
+        child = createPropertiesPanel(composite);
+        child.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+        // Create the separator b/w the dialog area and the button bar
+        Label label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
+        data = new GridData(GridData.FILL_HORIZONTAL);
+        data.horizontalSpan = 2;
+        label.setLayoutData(data);
+
+        // Select an element in the outline and set focus on the outline.
+        if (initialSelection == null) {
+            // We have to manually select the first item in the tree, because
+            // otherwise the
+            // will scroll to show the last item, and then will select the first
+            // visible item.
+            List children = getPaletteRoot().getChildren();
+            if (!children.isEmpty()) {
+                initialSelection = (PaletteEntry) children.get(0);
+            }
+        }
+        if (initialSelection != null) {
+            treeviewer.setSelection(new StructuredSelection(initialSelection));
+        } else {
+            setActiveEntry(null);
+        }
+        isSetup = false;
+        tree.setFocus();
+
+        return composite;
+    }
+
+    /**
+     * Creates the outline part of the dialog.
+     * 
+     * <p>
+     * The outline creates the following:
+     * <UL>
+     * <LI>ToolBar ({@link #createOutlineToolBar(Composite)})</LI>
+     * <LI>TreeViewer ({@link #createOutlineTreeViewer(Composite)})</LI>
+     * <LI>Context menu ({@link #createOutlineContextMenu()})</LI>
+     * </UL>
+     * </p>
+     * 
+     * @param container
+     *            The Composite within which the outline has to be created
+     * @return The newly created Control that has the outline
+     */
+    protected Control createOutline(Composite container) {
+        // Create the Composite that will contain the outline
+        Composite composite = new Composite(container, SWT.NONE);
+        composite.setFont(container.getFont());
+        GridLayout layout = new GridLayout();
+        layout.horizontalSpacing = 0;
+        layout.verticalSpacing = 0;
+        layout.marginHeight = 0;
+        layout.marginWidth = 0;
+        composite.setLayout(layout);
+
+        // Create the ToolBar
+        createOutlineToolBar(composite);
+
+        // Create the actual outline (TreeViewer)
+        treeviewer = createOutlineTreeViewer(composite);
+        tree = treeviewer.getTree();
+
+        // Create the context menu for the Tree
+        tree.setMenu(createOutlineContextMenu());
+
+        return composite;
+    }
+
+    /**
+     * Creates the actions that manipulate the palette model. These actions will populate the
+     * toolbar and the outline's context menu.
+     * 
+     * <p>
+     * IMPORTANT: All the elements in the returned List MUST be
+     * <code>PaletteCustomizationAction</code>s.
+     * </p>
+     * 
+     * @return A List of {@link PaletteCustomizationAction PaletteCustomizationActions}
+     */
+    protected List createOutlineActions() {
+        List actions = new ArrayList();
+        actions.add(new NewAction());
+        actions.add(new DeleteAction());
+        actions.add(new MoveDownAction());
+        actions.add(new MoveUpAction());
+        return actions;
+    }
+
+    /**
+     * Uses a <code>MenuManager</code> to create the context menu for the outline. The
+     * <code>IActions</code> used to create the context menu are those created in
+     * {@link #createOutlineActions()}.
+     * 
+     * @return The newly created Menu
+     */
+    protected Menu createOutlineContextMenu() {
+        // MenuManager for the tree's context menu
+        final MenuManager outlineMenu = new MenuManager();
+
+        List actions = getOutlineActions();
+        // Add all the actions to the context menu
+        for (Iterator iter = actions.iterator(); iter.hasNext();) {
+            IAction action = (IAction) iter.next();
+            if (action instanceof IMenuCreator)
+                outlineMenu.add(new ActionContributionItem(action) {
+                    public boolean isDynamic() {
+                        return true;
+                    }
+                });
+            else
+                outlineMenu.add(action);
+            // Add separators after new and delete
+            if (action instanceof NewAction || action instanceof DeleteAction) {
+                outlineMenu.add(new Separator());
+            }
+        }
+
+        outlineMenu.addMenuListener(new IMenuListener() {
+            public void menuAboutToShow(IMenuManager manager) {
+                outlineMenu.update(true);
+            }
+        });
+
+        outlineMenu.createContextMenu(tree);
+        return outlineMenu.getMenu();
+    }
+
+    /**
+     * Uses a ToolBarManager to create the ToolBar in the outline part of the dialog. The Actions
+     * used in the ToolBarManager are those that are created in {@link #createOutlineActions()}.
+     * 
+     * @param parent
+     *            The Composite to which the ToolBar is to be added
+     * @return The newly created ToolBar
+     */
+    protected Control createOutlineToolBar(Composite parent) {
+        // A customized composite for the toolbar
+        final Composite composite = new Composite(parent, SWT.NONE) {
+            public Rectangle getClientArea() {
+                Rectangle area = super.getClientArea();
+                area.x += 2;
+                area.y += 2;
+                area.height -= 2;
+                area.width -= 4;
+                return area;
+            }
+
+            public Point computeSize(int wHint, int hHint, boolean changed) {
+                Point size = super.computeSize(wHint, hHint, changed);
+                size.x += 4;
+                size.y += 2;
+                return size;
+            }
+        };
+        composite.setFont(parent.getFont());
+        composite.setLayout(new FillLayout());
+
+        // A paint listener that draws an etched border around the toolbar
+        composite.addPaintListener(new PaintListener() {
+            public void paintControl(PaintEvent e) {
+                Rectangle area = composite.getBounds();
+                GC gc = e.gc;
+                gc.setLineStyle(SWT.LINE_SOLID);
+                gc.setForeground(ColorConstants.buttonDarker);
+                gc.drawLine(area.x, area.y, area.x + area.width - 2, area.y);
+                gc.drawLine(area.x, area.y, area.x, area.y + area.height - 1);
+                gc.drawLine(area.x + area.width - 2, area.y, area.x
+                        + area.width - 2, area.y + area.height - 1);
+                gc.setForeground(ColorConstants.buttonLightest);
+                gc.drawLine(area.x + 1, area.y + 1, area.x + area.width - 3,
+                            area.y + 1);
+                gc.drawLine(area.x + area.width - 1, area.y + 1, area.x
+                        + area.width - 1, area.y + area.height - 1);
+                gc.drawLine(area.x + 1, area.y + 1, area.x + 1, area.y
+                        + area.height - 1);
+            }
+        });
+
+        // Create the ToolBarManager and add all the actions to it
+        ToolBarManager tbMgr = new ToolBarManager(SWT.FLAT | SWT.HORIZONTAL);
+        List actions = getOutlineActions();
+        for (int i = 0; i < actions.size(); i++) {
+            tbMgr.add(new ToolbarDropdownContributionItem(((IAction) actions
+                    .get(i))));
+        }
+        tbMgr.createControl(composite);
+        tbMgr.getControl().setFont(composite.getFont());
+
+        // By default, the ToolBarManager does not set text on ToolItems. Since,
+        // we want to display the text, we will have to do it manually.
+        ToolItem[] items = tbMgr.getControl().getItems();
+        for (int i = 0; i < items.length; i++) {
+            ToolItem item = items[i];
+            item.setText(((IAction) actions.get(i)).getText());
+        }
+
+        return tbMgr.getControl();
+    }
+
+    /**
+     * Creates the TreeViewer that is the outline of the model.
+     * 
+     * @param composite
+     *            The Composite to which the ToolBar is to be added
+     * @return The newly created TreeViewer
+     */
+    protected TreeViewer createOutlineTreeViewer(Composite composite) {
+        Tree treeForViewer = new Tree(composite, SWT.BORDER);
+        treeForViewer.setFont(composite.getFont());
+        GridData data = new GridData(GridData.FILL_VERTICAL
+                | GridData.HORIZONTAL_ALIGN_FILL);
+        data.widthHint = 185;
+        // Make the tree this tall even when there is nothing in it. This will
+        // keep the
+        // dialog from shrinking to an unusually small size.
+        data.heightHint = 200;
+        treeForViewer.setLayoutData(data);
+        TreeViewer viewer = new TreeViewer(treeForViewer) {
+            protected void preservingSelection(Runnable updateCode) {
+                if ((getTree().getStyle() & SWT.SINGLE) != 0)
+                    updateCode.run();
+                else
+                    super.preservingSelection(updateCode);
+            }
+        };
+        viewer.setContentProvider(new PaletteTreeProvider(viewer));
+        treeViewerLabelProvider = new PaletteLabelProvider(viewer);
+        viewer.setLabelProvider(treeViewerLabelProvider);
+        viewer.setInput(getPaletteRoot());
+        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+            public void selectionChanged(SelectionChangedEvent event) {
+                handleOutlineSelectionChanged();
+            }
+        });
+
+        return viewer;
+    }
+
+    /**
+     * Creates the part of the dialog where the properties of the element selected in the outline
+     * will be displayed.
+     * 
+     * <p>
+     * The properties panel contains the following:
+     * <UL>
+     * <LI>Title ({@link #createPropertiesPanelTitle(Composite)})</LI>
+     * </UL>
+     * The rest of the panel is constructed in this method.
+     * </p>
+     * 
+     * @param container
+     *            The Composite to which this part is to be added
+     * @return The properties panel
+     */
+    protected Control createPropertiesPanel(Composite container) {
+        Composite composite = new Composite(container, SWT.NONE);
+        composite.setFont(container.getFont());
+        GridLayout layout = new GridLayout(1, false);
+        layout.horizontalSpacing = 0;
+        layout.marginWidth = 0;
+        layout.marginHeight = 0;
+        layout.verticalSpacing = 0;
+        composite.setLayout(layout);
+
+        titleSwitcher = createPropertiesPanelTitle(composite);
+
+        propertiesPanelContainer = new PageBook(composite, SWT.NONE);
+        propertiesPanelContainer.setFont(composite.getFont());
+        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+                | GridData.FILL_VERTICAL);
+        data.horizontalSpan = 2;
+        propertiesPanelContainer.setLayoutData(data);
+        propertiesPanelContainer.addListener(SWT.Resize, new Listener() {
+            public void handleEvent(Event event) {
+                if (activePage != null) {
+                    propertiesPanelContainer.layout();
+                }
+            }
+        });
+
+        return composite;
+    }
+
+    /**
+     * Creates the title for the properties panel. It is a PageBook that can switch between showing
+     * the regular title (the selected entry's label and icon) and an error message if an error has
+     * occured.
+     * 
+     * @param parent
+     *            The parent composite
+     * @return The newly created PageBook title
+     */
+    protected PageBook createPropertiesPanelTitle(Composite parent) {
+        GridLayout layout;
+        PageBook book = new PageBook(parent, SWT.NONE);
+        book.setFont(parent.getFont());
+        book.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
+                | GridData.VERTICAL_ALIGN_FILL));
+
+        titlePage = new Composite(book, SWT.NONE);
+        titlePage.setFont(book.getFont());
+        layout = new GridLayout(2, false);
+        layout.horizontalSpacing = 0;
+        layout.marginWidth = 0;
+        layout.marginHeight = 0;
+        layout.verticalSpacing = 0;
+        titlePage.setLayout(layout);
+        title = createSectionTitle(titlePage,
+                                   PaletteMessages.NO_SELECTION_TITLE);
+
+        errorPage = new Composite(book, SWT.NONE);
+        errorPage.setFont(book.getFont());
+        layout = new GridLayout(1, false);
+        layout.horizontalSpacing = 0;
+        layout.marginWidth = 0;
+        layout.marginHeight = 0;
+        layout.verticalSpacing = 0;
+        errorPage.setLayout(layout);
+        Composite intermediary = new Composite(errorPage, SWT.NONE) {
+            public Point computeSize(int wHint, int hHint, boolean changed) {
+                Rectangle bounds = title.getBounds();
+                return new Point(bounds.width, bounds.height);
+            }
+        };
+        intermediary.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
+                | GridData.VERTICAL_ALIGN_FILL));
+        StackLayout stackLayout = new StackLayout();
+        intermediary.setLayout(stackLayout);
+        errorTitle = new MultiLineLabel(intermediary);
+        stackLayout.topControl = errorTitle;
+        errorTitle.setImage(JFaceResources.getImage(DLG_IMG_MESSAGE_ERROR));
+        errorTitle.setFont(errorPage.getFont());
+        Label separator = new Label(errorPage, SWT.SEPARATOR | SWT.HORIZONTAL);
+        separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        book.showPage(titlePage);
+        return book;
+    }
+
+    /**
+     * A convenient method to create CLabel titles (like the ones used in the Preferences dialog in
+     * the Eclipse workbench) throughout the dialog.
+     * 
+     * @param composite
+     *            The composite in which the title is to be created (it must have a GridLayout with
+     *            two columns).
+     * @param text
+     *            The title to be displayed
+     * @return The newly created CLabel for convenience
+     */
+    protected CLabel createSectionTitle(Composite composite, String text) {
+        CLabel cTitle = new CLabel(composite, SWT.LEFT);
+        Color background = JFaceColors.getBannerBackground(composite
+                .getDisplay());
+        Color foreground = JFaceColors.getBannerForeground(composite
+                .getDisplay());
+        JFaceColors.setColors(cTitle, foreground, background);
+        cTitle.setFont(JFaceResources.getBannerFont());
+        cTitle.setText(text);
+        cTitle.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
+                | GridData.VERTICAL_ALIGN_FILL));
+
+        if (titleImage == null) {
+            titleImage = new Image(composite.getDisplay(), ImageDescriptor
+                    .createFromFile(Internal.class,
+                                    "icons/customizer_dialog_title.gif") //$NON-NLS-1$
+                    .getImageData());
+            composite.addDisposeListener(new DisposeListener() {
+                public void widgetDisposed(DisposeEvent e) {
+                    titleImage.dispose();
+                    titleImage = null;
+                }
+            });
+        }
+
+        Label imageLabel = new Label(composite, SWT.LEFT);
+        imageLabel.setBackground(background);
+        imageLabel.setImage(titleImage);
+        imageLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL
+                | GridData.VERTICAL_ALIGN_FILL));
+
+        Label separator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
+        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+        data.horizontalSpan = 2;
+        separator.setLayoutData(data);
+
+        return cTitle;
+    }
+
+    /**
+     * Returns the Button with the given id; or <code>null</code> if none was found.
+     * 
+     * @see org.eclipse.jface.dialogs.Dialog#getButton(int)
+     */
+    protected Button getButton(int id) {
+        Button button = null;
+        Widget widget = getWidget(id);
+        if (widget instanceof Button) {
+            button = (Button) widget;
+        }
+
+        return button;
+    }
+
+    /**
+     * @return The customizer that is responsible for handling the various tasks and updating the
+     *         model.
+     */
+    protected PaletteCustomizer getCustomizer() {
+        return customizer;
+    }
+
+    /**
+     * Returns the <code>EntryPage</code> for the given <code>PaletteEntry</code>. The
+     * <code>EntryPage</code> is retrieved from the customizer. If the given entry is
+     * <code>null</code>, <code>null</code> will be returned. If the customizer returns
+     * <code>null</code> for the valid entry, a default page will be created and returned.
+     * 
+     * @param entry
+     *            The PaletteEntry whose properties need to be displayed
+     * @return The EntryPage with the properties of the given PaletteEntry
+     */
+    protected EntryPage getEntryPage(PaletteEntry entry) {
+        if (entry == null) {
+            return null;
+        }
+
+        if (entriesToPages.containsKey(entry)) {
+            return (EntryPage) entriesToPages.get(entry);
+        }
+
+        EntryPage page = getCustomizer().getPropertiesPage(entry);
+        if (page == null) {
+            page = new DefaultEntryPage();
+        }
+        page.createControl(propertiesPanelContainer, entry);
+        page.setPageContainer(this);
+        entriesToPages.put(entry, page);
+
+        return page;
+    }
+
+    /**
+     * Provides access to the actions that are used to manipulate the model. The actions will be
+     * created, if they haven't been yet.
+     * 
+     * @return the list of <code>PaletteCustomizationAction</code>s
+     * @see #createOutlineActions()
+     */
+    protected final List getOutlineActions() {
+        if (actions == null) {
+            actions = createOutlineActions();
+        }
+        return actions;
+    }
+
+    /**
+     * Provides sub-classes with access to the PaletteRoot
+     * 
+     * @return the palette root
+     */
+    protected PaletteRoot getPaletteRoot() {
+        return root;
+    }
+
+    /**
+     * @return The PaletteEntry that is currently selected in the Outline Tree; <code>null</code> if
+     *         none is selected
+     */
+    protected PaletteEntry getSelectedPaletteEntry() {
+        TreeItem item = getSelectedTreeItem();
+        if (item != null) {
+            return (PaletteEntry) item.getData();
+        }
+        return null;
+
+    }
+
+    /**
+     * @return The TreeItem that is currently selected in the Outline Tree; <code>null</code> if
+     *         none is selected
+     */
+    protected TreeItem getSelectedTreeItem() {
+        TreeItem[] items = tree.getSelection();
+        if (items.length > 0) {
+            return items[0];
+        }
+        return null;
+    }
+
+    /**
+     * The <code>Widget</code>s that were created with a unique ID and added to this class' internal
+     * map can be retrieved through this method.
+     * 
+     * @param id
+     *            The unique ID of the Widget that you wish to retrieve
+     * @return The Widget, if one with the given id exists; <code>null</code> otherwise
+     */
+    protected Widget getWidget(int id) {
+        Widget widget = (Widget) widgets.get(new Integer(id));
+        if (widget == null) {
+            widget = super.getButton(id);
+        }
+
+        return widget;
+    }
+
+    /**
+     * This method is invoked when the Apply button is pressed
+     * <p>
+     * IMPORTANT: It is recommended that you not override this method. Closing the dialog with the
+     * 'X' at the top right of the window, or by hitting 'Esc' or any other way, corresponds to a
+     * "Cancel." That will, however, not result in this method being invoked. To handle such cases,
+     * saving or rejecting the changes is handled in {@link #close()}. Override {@link #save()} and
+     * {@link #revertToSaved()} to add to what needs to be done when saving or cancelling.
+     * </p>
+     */
+    protected final void handleApplyPressed() {
+        save();
+    }
+
+    /**
+     * This method is called when the "Delete" action is run (either through the context menu or the
+     * toolbar). It deletes the selected palette entry.
+     */
+    protected void handleDelete() {
+        PaletteEntry entry = getSelectedPaletteEntry();
+        if (entry != null) {
+            getCustomizer().performDelete(entry);
+        }
+        handleOutlineSelectionChanged();
+    }
+
+    /**
+     * This method is called when the "Move Down" action is run (either through the context menu or
+     * the toolbar). It moves the selected palette entry down.
+     */
+    protected void handleMoveDown() {
+        PaletteEntry entry = getSelectedPaletteEntry();
+        if (entry != null) {
+            getCustomizer().performMoveDown(entry);
+            treeviewer.setSelection(new StructuredSelection(entry), true);
+        }
+        updateActions();
+    }
+
+    /**
+     * This method is called when the "Move Up" action is run (either through the context menu or
+     * the toolbar). It moves the selected entry up.
+     */
+    protected void handleMoveUp() {
+        PaletteEntry entry = getSelectedPaletteEntry();
+        if (entry != null) {
+            getCustomizer().performMoveUp(entry);
+            treeviewer.setSelection(new StructuredSelection(entry), true);
+        }
+        updateActions();
+    }
+
+    /**
+     * This is the method that is called everytime the selection in the outline (treeviewer)
+     * changes.
+     */
+    protected void handleOutlineSelectionChanged() {
+        PaletteEntry entry = getSelectedPaletteEntry();
+
+        if (activeEntry == entry) {
+            return;
+        }
+
+        if (errorMessage != null) {
+            MessageDialog dialog = new MessageDialog(getShell(),
+                                                     PaletteMessages.ERROR,
+                                                     null,
+                                                     PaletteMessages.ABORT_PAGE_FLIPPING_MESSAGE
+                                                             + "\n" + errorMessage, //$NON-NLS-1$
+                                                     MessageDialog.ERROR,
+                                                     new String[] { IDialogConstants.OK_LABEL }, 0);
+            dialog.open();
+            treeviewer.addPostSelectionChangedListener(pageFlippingPreventer);
+        } else {
+            setActiveEntry(entry);
+        }
+        updateActions();
+    }
+
+    /**
+     * This method is invoked when the changes made since the last save need to be cancelled.
+     */
+    protected void revertToSaved() {
+        getCustomizer().revertToSaved();
+    }
+
+    /**
+     * This method is invoked when the changes made since the last save need to be saved.
+     */
+    protected void save() {
+        if (activePage != null) {
+            activePage.apply();
+        }
+        getCustomizer().save();
+    }
+
+    /**
+     * This methods sets the active entry. Based on the selection, this method will appropriately
+     * enable or disable the ToolBar items, will change the CLabel heading of the propreties panel,
+     * and will show the properties of the selected item in the properties panel.
+     * 
+     * @param entry
+     *            The new active entry, i.e., the new selected entry (it can be <code>null</code>)
+     */
+    protected void setActiveEntry(PaletteEntry entry) {
+        if (activeEntry != null) {
+            activeEntry.removePropertyChangeListener(titleUpdater);
+        }
+
+        activeEntry = entry;
+
+        if (entry != null) {
+            title.setText(entry.getLabel());
+            Image img = treeViewerLabelProvider.getImage(entry);
+            if (img == null) { 
+                TreeItem treeItem = getSelectedTreeItem();
+                if (treeItem != null) {
+                    img = treeItem.getImage();
+                }
+            }
+            title.setImage(img);
+            entry.addPropertyChangeListener(titleUpdater);
+            EntryPage panel = getEntryPage(entry);
+            setActiveEntryPage(panel);
+        } else {
+            title.setImage(null);
+            title.setText(PaletteMessages.NO_SELECTION_TITLE);
+            // Lazy creation
+            if (noSelectionPage == null) {
+                noSelectionPage = new EntryPage() {
+                    private Text text;
+
+                    public void apply() {
+                    }
+
+                    public void createControl(Composite parent,
+                                              PaletteEntry entry) {
+                        text = new Text(parent, SWT.READ_ONLY);
+                        text.setFont(parent.getFont());
+                        text.setText(PaletteMessages.NO_SELECTION_MADE);
+                    }
+
+                    public Control getControl() {
+                        return text;
+                    }
+
+                    public void setPageContainer(
+                                                 EntryPageContainer pageContainer) {
+                    }
+                };
+                noSelectionPage.createControl(propertiesPanelContainer, null);
+            }
+            setActiveEntryPage(noSelectionPage);
+        }
+    }
+
+    /**
+     * Sets the given EntryPage as the top page in the PageBook that shows the properties of the
+     * item selected in the Outline. If the given EntryPage is null, nothing will be shown.
+     * 
+     * @param page
+     *            The EntryPage to be shown
+     */
+    protected void setActiveEntryPage(EntryPage page) {
+        // Have the currently displayed page save its changes
+        if (activePage != null) {
+            activePage.apply();
+        }
+
+        if (page == null) {
+            // No page available to display, so hide the panel container
+            propertiesPanelContainer.setVisible(false);
+        } else {
+            // Show the page and grow the shell, if necessary, so that the page
+            // is
+            // completely visible
+            Point oldSize = getShell().getSize();
+            propertiesPanelContainer.showPage(page.getControl());
+
+            /*
+             * Fix for bug #34748 There's no need to resize the Shell if initializeBounds() hasn't
+             * been called yet. It will automatically resize the Shell so that everything fits in
+             * the Dialog. After that, we can resize the Shell whenever there's an entry page that
+             * cannot fit in the dialog.
+             */
+            if (!isSetup) {
+                Point newSize = getShell().computeSize(SWT.DEFAULT,
+                                                       SWT.DEFAULT, true);
+                int x = newSize.x - oldSize.x;
+                x = (x < 0) ? 0 : x;
+                int y = newSize.y - oldSize.y;
+                y = (y < 0) ? 0 : y;
+                if (x > 0 || y > 0) {
+                    getShell().setSize(oldSize.x + x, oldSize.y + y);
+                }
+            }
+
+            // Show the property panel container if it was hidden
+            if (!propertiesPanelContainer.isVisible()) {
+                propertiesPanelContainer.setVisible(true);
+            }
+        }
+
+        activePage = page;
+    }
+
+    /**
+     * Sets the given PaletteEntry as the one to be selected when the dialog opens. It is discarded
+     * when the dialog is closed.
+     * 
+     * @param entry
+     *            The PaletteEntry that should be selected when the dialog is opened
+     */
+    public void setDefaultSelection(PaletteEntry entry) {
+        initialSelection = entry;
+    }
+
+    /**
+     * This method should be invoked by EntryPages when there is an error. It will show the given
+     * error in the title of the properties panel. OK and Apply buttons will be disabled. Selecting
+     * some other entry in the outline tree will not be allowed until the error is fixed.
+     * 
+     * @see org.eclipse.gef.ui.palette.customize.EntryPageContainer#showProblem(String)
+     */
+    public void showProblem(String error) {
+        Assert.isNotNull(error);
+        errorTitle.setText(error);
+        titleSwitcher.showPage(errorPage);
+        Button okBtn = getButton(IDialogConstants.OK_ID);
+        if (okBtn != null) {
+            okBtn.setEnabled(false);
+        }
+        Button applyBtn = getButton(APPLY_ID); 
+        if (applyBtn != null) {
+            applyBtn.setEnabled(false);
+        }
+
+        errorMessage = error;
+    }
+
+    /**
+     * Updates the actions created in {@link #createOutlineActions()}, enabling or disabling them as
+     * necessary.
+     */
+    protected void updateActions() {
+        List actions = getOutlineActions();
+        for (Iterator iter = actions.iterator(); iter.hasNext();) {
+            PaletteCustomizationAction action = (PaletteCustomizationAction) iter
+                    .next();
+            action.update();
+        }
+    }
+
+    /*
+     * Delete Action
+     */
+    private class DeleteAction extends PaletteCustomizationAction {
+        public DeleteAction() {
+            setEnabled(false);
+            setText(PaletteMessages.DELETE_LABEL);
+            ISharedImages sharedImages = PlatformUI.getWorkbench()
+                    .getSharedImages();
+            setImageDescriptor(sharedImages
+                    .getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
+            setDisabledImageDescriptor(sharedImages
+                    .getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
+        }
+
+        public void run() {
+            handleDelete();
+        }
+
+        public void update() {
+            boolean enabled = false;
+            PaletteEntry entry = getSelectedPaletteEntry();
+            if (entry != null) {
+                enabled = getCustomizer().canDelete(entry);
+            }
+            setEnabled(enabled);
+        }
+    }
+
+    /*
+     * Move Down Action
+     */
+    private class MoveDownAction extends PaletteCustomizationAction {
+        public MoveDownAction() {
+            setEnabled(false);
+            setText(PaletteMessages.MOVE_DOWN_LABEL);
+            setImageDescriptor(ImageDescriptor.createFromFile(Internal.class,
+                                                              "icons/next_nav.gif"));//$NON-NLS-1$
+            setDisabledImageDescriptor(ImageDescriptor.createFromFile(
+                                                                      Internal.class, "icons/move_down_disabled.gif"));//$NON-NLS-1$
+        }
+
+        public void run() {
+            handleMoveDown();
+        }
+
+        public void update() {
+            boolean enabled = false;
+            PaletteEntry entry = getSelectedPaletteEntry();
+            if (entry != null) {
+                enabled = getCustomizer().canMoveDown(entry);
+            }
+            setEnabled(enabled);
+        }
+    }
+
+    /*
+     * Move Up Action
+     */
+    private class MoveUpAction extends PaletteCustomizationAction {
+        public MoveUpAction() {
+            setEnabled(false);
+            setText(PaletteMessages.MOVE_UP_LABEL);
+            setImageDescriptor(ImageDescriptor.createFromFile(Internal.class,
+                                                              "icons/prev_nav.gif"));//$NON-NLS-1$
+            setDisabledImageDescriptor(ImageDescriptor.createFromFile(
+                                                                      Internal.class, "icons/move_up_disabled.gif")); //$NON-NLS-1$
+        }
+
+        public void run() {
+            handleMoveUp();
+        }
+
+        public void update() {
+            boolean enabled = false;
+            PaletteEntry entry = getSelectedPaletteEntry();
+            if (entry != null) {
+                enabled = getCustomizer().canMoveUp(entry);
+            }
+            setEnabled(enabled);
+        }
+    }
+
+    /*
+     * New Action
+     */
+    private class NewAction extends PaletteCustomizationAction implements
+            IMenuCreator {
+        private List factories;
+        private MenuManager menuMgr;
+
+        public NewAction() {
+            factories = wrap(getCustomizer().getNewEntryFactories());
+            if (factories.isEmpty()) {
+                setEnabled(false);
+            } else {
+                setMenuCreator(this);
+            }
+
+            setText(PaletteMessages.NEW_LABEL);
+            setImageDescriptor(ImageDescriptor.createFromFile(Internal.class,
+                                                              "icons/add.gif")); //$NON-NLS-1$
+            setDisabledImageDescriptor(ImageDescriptor.createFromFile(
+                                                                      Internal.class, "icons/add-disabled.gif")); //$NON-NLS-1$
+        }
+
+        private void addActionToMenu(Menu parent, IAction action) {
+            ActionContributionItem item = new ActionContributionItem(action);
+            item.fill(parent, -1);
+        }
+
+        public void dispose() {
+            if (menuMgr != null) {
+                menuMgr.dispose();
+                menuMgr = null;
+            }
+        }
+
+        public Menu getMenu(Control parent) {
+            // Create the menu manager and add all the NewActions to it
+            if (menuMgr == null) {
+                // Lazily create the manager
+                menuMgr = new MenuManager();
+                menuMgr.createContextMenu(parent);
+            }
+
+            updateMenuManager(menuMgr);
+            return menuMgr.getMenu();
+        }
+
+        public Menu getMenu(Menu parent) {
+            Menu menu = new Menu(parent);
+            for (Iterator iter = factories.iterator(); iter.hasNext();) {
+                FactoryWrapperAction action = (FactoryWrapperAction) iter
+                        .next();
+                if (action.isEnabled()) {
+                    addActionToMenu(menu, action);
+                }
+            }
+
+            return menu;
+        }
+
+        public void run() {
+        }
+
+        public void update() {
+            boolean enabled = false;
+            PaletteEntry entry = getSelectedPaletteEntry();
+            if (entry == null) {
+                entry = getPaletteRoot();
+            }
+            // Enable or disable the FactoryWrapperActions
+            for (Iterator iter = factories.iterator(); iter.hasNext();) {
+                FactoryWrapperAction action = (FactoryWrapperAction) iter
+                        .next();
+                action.setEnabled(action.canCreate(entry));
+                enabled = enabled || action.isEnabled();
+            }
+
+            // Enable this action IFF at least one of the new actions is enabled
+            setEnabled(enabled);
+        }
+
+        protected void updateMenuManager(MenuManager manager) {
+            manager.removeAll();
+            for (Iterator iter = factories.iterator(); iter.hasNext();) {
+                FactoryWrapperAction action = (FactoryWrapperAction) iter
+                        .next();
+                if (action.isEnabled()) {
+                    manager.add(action);
+                }
+            }
+        }
+
+        private List wrap(List list) {
+            List newList = new ArrayList();
+            if (list != null) {
+                for (Iterator iter = list.iterator(); iter.hasNext();) {
+                    PaletteEntryFactory element = (PaletteEntryFactory) iter
+                            .next();
+                    newList.add(new FactoryWrapperAction(element));
+                }
+            }
+
+            return newList;
+        }
+    }
+
+    /*
+     * FactoryWrapperAction class
+     */
+    private class FactoryWrapperAction extends Action {
+        private PaletteEntryFactory factory;
+
+        public FactoryWrapperAction(PaletteEntryFactory factory) {
+            this.factory = factory;
+            setText(factory.getLabel());
+            setImageDescriptor(factory.getImageDescriptor());
+            setHoverImageDescriptor(factory.getImageDescriptor());
+        }
+
+        public boolean canCreate(PaletteEntry entry) {
+            return factory.canCreate(entry);
+        }
+
+        public void run() {
+            PaletteEntry selected = getSelectedPaletteEntry();
+            if (selected == null)
+                selected = getPaletteRoot();
+            PaletteEntry newEntry = factory
+                    .createNewEntry(getShell(), selected);
+            treeviewer.setSelection(new StructuredSelection(newEntry), true);
+            updateActions();
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteDrawerFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteDrawerFactory.java
new file mode 100644 (file)
index 0000000..54f43d0
--- /dev/null
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteDrawer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteMessages;
+
+
+/**
+ * Factory to create {@link org.eclipse.gef.palette.PaletteDrawer categories}
+ * 
+ * @author Pratik Shah
+ */
+public class PaletteDrawerFactory extends PaletteContainerFactory {
+
+    /**
+     * Constructor
+     */
+    public PaletteDrawerFactory() {
+        setLabel(PaletteMessages.MODEL_TYPE_DRAWER);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#createNewEntry(Shell)
+     */
+    protected PaletteEntry createNewEntry(Shell shell) {
+        PaletteEntry entry = new PaletteDrawer(PaletteMessages.NEW_DRAWER_LABEL);
+        entry.setUserModificationPermission(PaletteEntry.PERMISSION_FULL_MODIFICATION);
+        return entry;
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#determineTypeForNewEntry(org.eclipse.gef.palette.PaletteEntry)
+     */
+    protected Object determineTypeForNewEntry(PaletteEntry selected) {
+        return PaletteDrawer.PALETTE_TYPE_DRAWER;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteEntryFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteEntryFactory.java
new file mode 100644 (file)
index 0000000..dc14cf7
--- /dev/null
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteContainer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteRoot;
+
+
+/**
+ * A PaletteEntryFactory creates certain type of {@link org.eclipse.gef.palette.PaletteEntry
+ * PaletteEntries}.
+ * 
+ * <p>
+ * This class only creates {@link org.eclipse.gef.palette.PaletteEntry PaletteEntries} in
+ * {@link org.eclipse.gef.palette.PaletteContainer PaletteContainers} and not directly in the
+ * {@link org.eclipse.gef.palette.PaletteRoot root}. It is recommended that sub-classes not do that
+ * either.
+ * </p>
+ * 
+ * <p>
+ * To keep palette customization consistent across different types of editors, it is recommended
+ * that a new entry be created after the currently selected entry. If the new entry needs to be
+ * created inside the currently selected entry (i.e., if the currently selected entry is a
+ * <code>PaletteContainer</code>), it should be added as the last child. Look at
+ * {@link #determineContainerForNewEntry(PaletteEntry)} and
+ * {@link #determineIndexForNewEntry(PaletteContainer, PaletteEntry)} in this class and
+ * {@link org.eclipse.gef.ui.palette.customize.PaletteContainerFactory} to see what the general
+ * guidelines are for creating containers and leaf entries.
+ * </p>
+ * 
+ * @author Pratik Shah
+ * @see org.eclipse.gef.ui.palette.PaletteCustomizer
+ * @see org.eclipse.gef.ui.palette.customize.PaletteCustomizerDialog
+ */
+public abstract class PaletteEntryFactory {
+
+    private String label;
+    private ImageDescriptor imageDescriptor;
+
+    /**
+     * This method is called when a new palette entry of the type supported by this
+     * <code>PaletteEntryFactory</code> is to be created.
+     * 
+     * @param shell
+     *            The <code>Shell</code> of the <code>PaletteCustomizerDialog</code>
+     * @param selected
+     *            The <code>PaletteEntry</code> that was selected in the outline when this action
+     *            was launched. Will never be <code>null</code> .
+     * @return PaletteEntry The newly created <code>PaletteEntry</code>
+     */
+    public PaletteEntry createNewEntry(Shell shell, PaletteEntry selected) {
+        PaletteContainer parent = determineContainerForNewEntry(selected);
+        int index = determineIndexForNewEntry(parent, selected);
+        PaletteEntry entry = createNewEntry(shell);
+        parent.add(index, entry);
+        return entry;
+    }
+
+    /**
+     * Create the PaletteEntry
+     * 
+     * @param shell
+     *            The <code>Shell</code> of the <code>PaletteCustomizerDialog</code>; it can be used
+     *            to create another warning or information dialog.
+     * @return The newly created entry
+     */
+    protected abstract PaletteEntry createNewEntry(Shell shell);
+
+    /**
+     * This method is called by the <code>PaletteCustomizerDialog</code> to determine whether to
+     * enable or disable this action on the toolbar and the context menu.
+     * <P>
+     * This default implementation allows the creation of a new entry only in
+     * <code>PaletteContainer</code>s with the following user permission:
+     * <code>PERMISSION_FULL_MODIFICATION</code>
+     * 
+     * @param selected
+     *            The selected <code>PaletteEntry</code> (Will never be <code>null</code>)
+     * @return <code>true</code> if, given the current selection, this
+     *         <code>PaletteEntryFactory</code> can create a new <code>PaletteEntry</code>
+     */
+    public boolean canCreate(PaletteEntry selected) {
+        if (selected instanceof PaletteRoot)
+            return false;
+
+        PaletteContainer parent;
+        if (selected instanceof PaletteContainer)
+            parent = (PaletteContainer) selected;
+        else
+            parent = selected.getParent();
+
+        return parent.getUserModificationPermission() == PaletteEntry.PERMISSION_FULL_MODIFICATION
+                && parent.acceptsType(determineTypeForNewEntry(selected));
+    }
+
+    /**
+     * Given the current selection, this method determines the parent for the new entry to be
+     * created.
+     * 
+     * <p>
+     * Sub-classes may override this method.
+     * </p>
+     * 
+     * @param selected
+     *            The selected entry
+     * @return The parent of the new entry to be created
+     */
+    protected PaletteContainer determineContainerForNewEntry(
+                                                             PaletteEntry selected) {
+        if (selected instanceof PaletteContainer)
+            return (PaletteContainer) selected;
+        return selected.getParent();
+    }
+
+    /**
+     * Given the current selection, this method determines the type of the new entry to be created.
+     * 
+     * <p>
+     * Sub-classes may override this method.
+     * </p>
+     * 
+     * @param selected
+     *            The selected entry
+     * @return The type of the new entry to be created
+     */
+    protected Object determineTypeForNewEntry(PaletteEntry selected) {
+        return PaletteEntry.PALETTE_TYPE_UNKNOWN;
+    }
+
+    /**
+     * Calculates the index at which the new entry is to be created, given the current selection.
+     * 
+     * <p>
+     * Sub-classes may override this method.
+     * </p>
+     * 
+     * @param c
+     *            The parent container
+     * @param selected
+     *            The selected entry
+     * @return the index at which the new entry should be added in the given container (-1 indicates
+     *         add at the end)
+     */
+    protected int determineIndexForNewEntry(PaletteContainer c,
+                                            PaletteEntry selected) {
+        return c.getChildren().indexOf(selected) + 1;
+    }
+
+    /**
+     * @return <code>ImageDescriptor</code> used to create the image to represent this factory
+     */
+    public ImageDescriptor getImageDescriptor() {
+        return imageDescriptor;
+    }
+
+    /**
+     * @return This factory's name
+     */
+    public String getLabel() {
+        return label;
+    }
+
+    /**
+     * Sets the <code>ImageDescriptor</code> used to create the image to represent this factory
+     * 
+     * @param imgDesc
+     *            The new ImageDescriptor
+     */
+    public void setImageDescriptor(ImageDescriptor imgDesc) {
+        imageDescriptor = imgDesc;
+    }
+
+    /**
+     * Sets this factory's name. It will be used to list this factory in the toolbar, context menu,
+     * etc.
+     * 
+     * @param newLabel
+     *            The new name for this factory
+     */
+    public void setLabel(String newLabel) {
+        label = newLabel;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteGroupFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteGroupFactory.java
new file mode 100644 (file)
index 0000000..39158ea
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteGroup;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteMessages;
+
+
+/**
+ * Factory to create {@link org.eclipse.gef.palette.PaletteGroup groups}
+ * 
+ * @author Pratik Shah
+ */
+public class PaletteGroupFactory extends PaletteContainerFactory {
+
+    /**
+     * Constructor
+     */
+    public PaletteGroupFactory() {
+        setLabel(PaletteMessages.MODEL_TYPE_GROUP);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#createNewEntry(Shell)
+     */
+    protected PaletteEntry createNewEntry(Shell shell) {
+        PaletteGroup group = new PaletteGroup(PaletteMessages.NEW_GROUP_LABEL);
+        group.setUserModificationPermission(PaletteEntry.PERMISSION_FULL_MODIFICATION);
+        return group;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteLabelProvider.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteLabelProvider.java
new file mode 100644 (file)
index 0000000..311ebf6
--- /dev/null
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.gef.internal.InternalImages;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IColorProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteContainer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteSeparator;
+
+
+/**
+ * This class is the ILabelProvider for the {@link org.eclipse.jface.viewers.TreeViewer} used in
+ * {@link org.eclipse.gef.ui.palette.customize.PaletteCustomizerDialog}.
+ * 
+ * @author Pratik Shah
+ */
+class PaletteLabelProvider implements ILabelProvider, IColorProvider {
+
+    private Map imageCache = new HashMap();
+
+    /**
+     * Constructor
+     * 
+     * @param viewer
+     *            The TreeViewer for which this instance is a LabelProvider
+     */
+    public PaletteLabelProvider(TreeViewer viewer) {
+    }
+
+    /**
+     * @see org.eclipse.jface.viewers.IColorProvider#getBackground(Object)
+     */
+    public Color getBackground(Object element) {
+        return null;
+    }
+
+    private Image getCachedImage(ImageDescriptor descriptor) {
+        Image image = (Image) imageCache.get(descriptor);
+        if (image == null) {
+            image = descriptor.createImage();
+            imageCache.put(descriptor, image);
+        }
+        return image;
+    }
+
+    /**
+     * @see org.eclipse.jface.viewers.IColorProvider#getForeground(Object)
+     */
+    public Color getForeground(Object element) {
+        PaletteEntry entry = (PaletteEntry) element;
+        if (!entry.isVisible() || !entry.getParent().isVisible()) {
+            return ColorConstants.gray;
+        }
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.jface.viewers.ILabelProvider#getImage(Object)
+     */
+    public Image getImage(Object element) {
+        PaletteEntry entry = (PaletteEntry) element;
+        ImageDescriptor descriptor = entry.getSmallIcon();
+        if (descriptor == null) {
+            if (entry instanceof PaletteContainer) {
+                descriptor = InternalImages.DESC_FOLDER_OPEN;
+            } else if (entry instanceof PaletteSeparator) {
+                descriptor = InternalImages.DESC_SEPARATOR;
+            } else {
+                return null;
+            }
+        }
+        return getCachedImage(descriptor);
+    }
+
+    /**
+     * @see org.eclipse.jface.viewers.ILabelProvider#getText(Object)
+     */
+    public String getText(Object element) {
+        return ((PaletteEntry) element).getLabel();
+    }
+
+    /**
+     * Not implemented
+     * 
+     * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(ILabelProviderListener)
+     */
+    public void addListener(ILabelProviderListener listener) {
+    }
+
+    /**
+     * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+     */
+    public void dispose() {
+        Iterator images = imageCache.values().iterator();
+        while (images.hasNext())
+            ((Image) images.next()).dispose();
+        imageCache = null;
+    }
+
+    /**
+     * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(Object, String)
+     */
+    public boolean isLabelProperty(Object element, String property) {
+        return false;
+    }
+
+    /**
+     * Not implemented
+     * 
+     * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(ILabelProviderListener)
+     */
+    public void removeListener(ILabelProviderListener listener) {
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteSeparatorFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteSeparatorFactory.java
new file mode 100644 (file)
index 0000000..7e312c9
--- /dev/null
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteSeparator;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteMessages;
+
+
+/**
+ * Factory to create {@link org.eclipse.gef.palette.PaletteSeparator PaletteSeparators}.
+ * 
+ * @author Pratik Shah
+ */
+public class PaletteSeparatorFactory extends PaletteEntryFactory {
+
+    /**
+     * Constructor
+     */
+    public PaletteSeparatorFactory() {
+        setLabel(PaletteMessages.MODEL_TYPE_SEPARATOR);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#createNewEntry(Shell)
+     */
+    public PaletteEntry createNewEntry(Shell shell) {
+        PaletteSeparator separator = new PaletteSeparator();
+        return separator;
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#determineTypeForNewEntry(org.eclipse.gef.palette.PaletteEntry)
+     */
+    protected Object determineTypeForNewEntry(PaletteEntry selected) {
+        return PaletteSeparator.PALETTE_TYPE_SEPARATOR;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteSettingsDialog.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteSettingsDialog.java
new file mode 100644 (file)
index 0000000..b2f8f28
--- /dev/null
@@ -0,0 +1,837 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import java.util.HashMap;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FontDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.part.PageBook;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteMessages;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerPreferences;
+
+
+/**
+ * @author Pratik Shah
+ */
+public class PaletteSettingsDialog extends Dialog {
+
+    private PaletteViewerPreferences prefs;
+    private Label fontName;
+    private PageBook book;
+    private Control columnsPanel, detailsPanel, iconsPanel, listPanel;
+    private HashMap widgets = new HashMap();
+
+    /**
+     * A HashMap to cache the various settings displayed in this dialog
+     */
+    protected HashMap settings = new HashMap();
+
+    /**
+     * HashMap keys used for caching the various settings displayed in this dialog.
+     */
+    protected static final String CACHE_LAYOUT = "layout setting", //$NON-NLS-1$
+            CACHE_COLUMNS_ICON_SIZE = "columns - use large icons", //$NON-NLS-1$
+            CACHE_LIST_ICON_SIZE = "list - use large icons", //$NON-NLS-1$
+            CACHE_ICONS_ICON_SIZE = "icons only - use large icons", //$NON-NLS-1$
+            CACHE_DETAILS_ICON_SIZE = "details - use large icons", //$NON-NLS-1$
+            CACHE_FONT = "font", //$NON-NLS-1$
+            CACHE_COLLAPSE = "auto-collapse setting"; //$NON-NLS-1$
+
+    /**
+     * The unique IDs for the various widgets. These IDs can be used to retrieve these widgets from
+     * the internal map (using {@link #getWidget(int)}), or to identify widgets in
+     * {@link #buttonPressed(int)}.
+     */
+    protected static final int LAYOUT_COLUMNS_VIEW_ID = IDialogConstants.CLIENT_ID + 1,
+            LAYOUT_LIST_VIEW_ID = IDialogConstants.CLIENT_ID + 2,
+            LAYOUT_ICONS_VIEW_ID = IDialogConstants.CLIENT_ID + 3,
+            LAYOUT_COLUMNS_ICON_SIZE_ID = IDialogConstants.CLIENT_ID + 4,
+            LAYOUT_LIST_ICON_SIZE_ID = IDialogConstants.CLIENT_ID + 5,
+            LAYOUT_ICONS_ICON_SIZE_ID = IDialogConstants.CLIENT_ID + 6,
+            LAYOUT_DETAILS_ICON_SIZE_ID = IDialogConstants.CLIENT_ID + 7,
+            COLLAPSE_NEVER_ID = IDialogConstants.CLIENT_ID + 8,
+            COLLAPSE_ALWAYS_ID = IDialogConstants.CLIENT_ID + 9,
+            COLLAPSE_NEEDED_ID = IDialogConstants.CLIENT_ID + 10,
+            APPLY_ID = IDialogConstants.CLIENT_ID + 11,
+            LAYOUT_DETAILS_VIEW_ID = IDialogConstants.CLIENT_ID + 12,
+            FONT_CHANGE_ID = IDialogConstants.CLIENT_ID + 13,
+            DEFAULT_FONT_ID = IDialogConstants.CLIENT_ID + 14;
+
+    /**
+     * Sub - classes that need to create their own unique IDs should do so by adding to this ID.
+     */
+    protected static final int CLIENT_ID = 16;
+
+    /**
+     * Constructor
+     * 
+     * @param parentShell
+     *            The parent shell, or <code>null</code> to create a top - level shell
+     * @param prefs
+     *            The PaletteViewerPreferences object that can provide access to and allow
+     *            modification of the palette's settings. It cannot be <code>null</code>.
+     */
+    public PaletteSettingsDialog(Shell parentShell,
+            PaletteViewerPreferences prefs) {
+        super(parentShell);
+        this.prefs = prefs;
+        setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX);
+    }
+
+    /**
+     * This method will be invoked whenever any <code>Button</code> created using
+     * {@link #createButton(Composite, int, String, int, ImageDescriptor)} or
+     * {@link Dialog#createButton(Composite, int, String, boolean)} is selected.
+     * 
+     * @see Dialog#buttonPressed(int)
+     */
+    protected void buttonPressed(int buttonId) {
+        Button b = getButton(buttonId);
+
+        if (FONT_CHANGE_ID == buttonId) {
+            handleChangeFontPressed();
+        } else if (COLLAPSE_ALWAYS_ID == buttonId) {
+            handleAutoCollapseSettingChanged(PaletteViewerPreferences.COLLAPSE_ALWAYS);
+        } else if (COLLAPSE_NEVER_ID == buttonId) {
+            handleAutoCollapseSettingChanged(PaletteViewerPreferences.COLLAPSE_NEVER);
+        } else if (COLLAPSE_NEEDED_ID == buttonId) {
+            handleAutoCollapseSettingChanged(PaletteViewerPreferences.COLLAPSE_AS_NEEDED);
+        } else if (LAYOUT_COLUMNS_VIEW_ID == buttonId) {
+            handleLayoutSettingChanged(PaletteViewerPreferences.LAYOUT_COLUMNS);
+        } else if (LAYOUT_ICONS_VIEW_ID == buttonId) {
+            handleLayoutSettingChanged(PaletteViewerPreferences.LAYOUT_ICONS);
+        } else if (LAYOUT_LIST_VIEW_ID == buttonId) {
+            handleLayoutSettingChanged(PaletteViewerPreferences.LAYOUT_LIST);
+        } else if (LAYOUT_DETAILS_VIEW_ID == buttonId) {
+            handleLayoutSettingChanged(PaletteViewerPreferences.LAYOUT_DETAILS);
+        } else if (LAYOUT_DETAILS_ICON_SIZE_ID == buttonId && b != null) {
+            handleIconSizeChanged(b.getSelection());
+        } else if (LAYOUT_COLUMNS_ICON_SIZE_ID == buttonId && b != null) {
+            handleIconSizeChanged(b.getSelection());
+        } else if (LAYOUT_ICONS_ICON_SIZE_ID == buttonId && b != null) {
+            handleIconSizeChanged(b.getSelection());
+        } else if (LAYOUT_LIST_ICON_SIZE_ID == buttonId && b != null) {
+            handleIconSizeChanged(b.getSelection());
+        } else if (DEFAULT_FONT_ID == buttonId) {
+            handleDefaultFontRequested();
+        } else {
+            super.buttonPressed(buttonId);
+        }
+    }
+
+    /**
+     * This method saves the various settings in this dialog, so that they can be restored later on
+     * if "Cancel" is pressed.
+     * 
+     * @see #restoreSettings()
+     */
+    protected void cacheSettings() {
+        settings.put(CACHE_LAYOUT, new Integer(prefs.getLayoutSetting()));
+        settings.put(CACHE_COLLAPSE,
+                     new Integer(prefs.getAutoCollapseSetting()));
+        settings.put(CACHE_FONT, prefs.getFontData());
+        settings.put(
+                     CACHE_DETAILS_ICON_SIZE,
+                     new Boolean(prefs
+                             .useLargeIcons(PaletteViewerPreferences.LAYOUT_DETAILS)));
+        settings.put(
+                     CACHE_ICONS_ICON_SIZE,
+                     new Boolean(prefs
+                             .useLargeIcons(PaletteViewerPreferences.LAYOUT_ICONS)));
+        settings.put(
+                     CACHE_COLUMNS_ICON_SIZE,
+                     new Boolean(prefs
+                             .useLargeIcons(PaletteViewerPreferences.LAYOUT_COLUMNS)));
+        settings.put(
+                     CACHE_LIST_ICON_SIZE,
+                     new Boolean(prefs
+                             .useLargeIcons(PaletteViewerPreferences.LAYOUT_LIST)));
+    }
+
+    /**
+     * @see org.eclipse.jface.window.Window#close()
+     */
+    public boolean close() {
+        // Save or dump changes
+        // This needs to be done here and not in the handle methods because the
+        // user can
+        // also close the dialog with the 'X' in the top right of the window
+        // (which
+        // corresponds to a cancel).
+        if (getReturnCode() != OK) {
+            handleCancelPressed();
+        }
+
+        return super.close();
+    }
+
+    /**
+     * @see org.eclipse.jface.window.Window#configureShell(Shell)
+     */
+    protected void configureShell(Shell newShell) {
+        newShell.setText(PaletteMessages.SETTINGS_DIALOG_TITLE);
+        super.configureShell(newShell);
+    }
+
+    /**
+     * This method should not be used to create buttons for the button bar. Use
+     * {@link Dialog#createButton(Composite, int, String, boolean)} for that. This method can be
+     * used to create any other button in the dialog. The parent <code>Composite</code> must have a
+     * GridLayout. These buttons will be available through {@link #getButton(int)} and
+     * {@link #getWidget(int)}. Ensure that the various buttons created by this method are given
+     * unique IDs. Pass in a null image descriptor if you don't want the button to have an icon.
+     * This method will take care of disposing the images that it creates.
+     * {@link #buttonPressed(int)} will be called when any of the buttons created by this method are
+     * clicked (selected).
+     * 
+     * @param parent
+     *            The composite in which the button is to be created
+     * @param id
+     *            The button's unique ID
+     * @param label
+     *            The button's text
+     * @param stylebits
+     *            The style bits for creating the button (eg., <code>SWT.PUSH</code) or <code>
+     *            SWT.CHECK</code>)
+     * @param descriptor
+     *            The ImageDescriptor from which the image/icon for this button should be created
+     * @return The newly created button for convenience
+     */
+    protected Button createButton(Composite parent, int id, String label,
+                                  int stylebits, ImageDescriptor descriptor) {
+        Button button = new Button(parent, stylebits);
+        button.setText(label);
+        button.setFont(parent.getFont());
+        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+        button.setLayoutData(data);
+
+        button.setData(new Integer(id));
+        button.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent event) {
+                buttonPressed(((Integer) event.widget.getData()).intValue());
+            }
+        });
+        widgets.put(new Integer(id), button);
+
+        if (descriptor != null) {
+            button.setImage(new Image(parent.getDisplay(), descriptor
+                    .getImageData()));
+            button.addDisposeListener(new DisposeListener() {
+                public void widgetDisposed(DisposeEvent e) {
+                    Image img = ((Button) e.getSource()).getImage();
+                    if (img != null && !img.isDisposed()) {
+                        img.dispose();
+                    }
+                }
+            });
+        }
+
+        return button;
+    }
+
+    /**
+     * Creates and initializes (i.e., loads the current value from the PaletteViewerPreferences) the
+     * part of the dialog where the options to close drawers will be displayed.
+     * 
+     * @param container
+     *            The parent composite
+     * @return The newly created Control which has the drawer collapse options
+     */
+    protected Control createDrawerCollapseOptions(Composite container) {
+        Composite composite = new Composite(container, SWT.NONE);
+        composite.setFont(container.getFont());
+        GridLayout layout = new GridLayout(1, false);
+        composite.setLayout(layout);
+
+        Label label = new Label(composite, SWT.NONE);
+        label.setFont(composite.getFont());
+        label.setText(PaletteMessages.COLLAPSE_OPTIONS_TITLE);
+        GridData data = new GridData();
+        label.setLayoutData(data);
+
+        Button b = createButton(composite, COLLAPSE_ALWAYS_ID,
+                                PaletteMessages.COLLAPSE_ALWAYS_LABEL, SWT.RADIO, null);
+        ((GridData) b.getLayoutData()).horizontalIndent = 5;
+
+        b = createButton(composite, COLLAPSE_NEEDED_ID,
+                         PaletteMessages.COLLAPSE_AS_NEEDED_LABEL, SWT.RADIO, null);
+        ((GridData) b.getLayoutData()).horizontalIndent = 5;
+
+        b = createButton(composite, COLLAPSE_NEVER_ID,
+                         PaletteMessages.COLLAPSE_NEVER_LABEL, SWT.RADIO, null);
+        ((GridData) b.getLayoutData()).horizontalIndent = 5;
+
+        // Load auto - collapse settings
+        b = null;
+        int collapse = prefs.getAutoCollapseSetting();
+        switch (collapse) {
+            case PaletteViewerPreferences.COLLAPSE_ALWAYS:
+                b = getButton(COLLAPSE_ALWAYS_ID);
+                break;
+            case PaletteViewerPreferences.COLLAPSE_AS_NEEDED:
+                b = getButton(COLLAPSE_NEEDED_ID);
+                break;
+            case PaletteViewerPreferences.COLLAPSE_NEVER:
+                b = getButton(COLLAPSE_NEVER_ID);
+        }
+        if (b == null) {
+            return null;
+        }
+        b.setSelection(true);
+
+        return composite;
+    }
+
+    /**
+     * Creates and initializes (i.e. loads the current settings from PaletteViewerPreferences) the
+     * options for details layout.
+     * 
+     * @param parent
+     *            the parent composite
+     * @return the newly created Control
+     */
+    protected Control createDetailsOptions(Composite parent) {
+        Control contents = createOptionsPage(parent,
+                                             PaletteMessages.SETTINGS_OPTIONS_DETAILS,
+                                             LAYOUT_DETAILS_ICON_SIZE_ID);
+
+        if (getButton(LAYOUT_DETAILS_ICON_SIZE_ID) != null) {
+            getButton(LAYOUT_DETAILS_ICON_SIZE_ID).setSelection(
+                                                                prefs.useLargeIcons(PaletteViewerPreferences.LAYOUT_DETAILS));
+        }
+        return contents;
+    }
+
+    /**
+     * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(Composite)
+     */
+    protected Control createDialogArea(Composite parent) {
+        Composite composite = (Composite) super.createDialogArea(parent);
+        GridLayout layout = (GridLayout) composite.getLayout();
+        layout.horizontalSpacing = 0;
+        layout.numColumns = 2;
+
+        Control child = createFontSettings(composite);
+        GridData data = new GridData(GridData.FILL_HORIZONTAL);
+        data.horizontalSpan = 2;
+        data.horizontalIndent = 5;
+        child.setLayoutData(data);
+
+        Label label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
+        data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+        data.horizontalSpan = 2;
+        label.setLayoutData(data);
+
+        child = createLayoutSettings(composite);
+        data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+                | GridData.FILL_VERTICAL);
+        data.horizontalSpan = 2;
+        data.horizontalIndent = 5;
+        child.setLayoutData(data);
+
+        label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
+        data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+        data.horizontalSpan = 2;
+        label.setLayoutData(data);
+
+        child = createDrawerCollapseOptions(composite);
+        if (child != null) {
+            data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+            data.horizontalSpan = 2;
+            data.horizontalIndent = 5;
+            child.setLayoutData(data);
+        }
+
+        label = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
+        data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+        data.horizontalSpan = 2;
+        label.setLayoutData(data);
+
+        cacheSettings();
+
+        return composite;
+    }
+
+    /**
+     * Creates and initializes (i.e. loads the current settings from PaletteViewerPreferences) the
+     * options for columns layout.
+     * 
+     * @param parent
+     *            the parent composite
+     * @return the newly created Control
+     */
+    protected Control createColumnsOptions(Composite parent) {
+        Composite contents = (Composite) createOptionsPage(parent,
+                                                           PaletteMessages.SETTINGS_OPTIONS_COLUMNS,
+                                                           LAYOUT_COLUMNS_ICON_SIZE_ID);
+
+        if (getButton(LAYOUT_COLUMNS_ICON_SIZE_ID) != null) {
+            getButton(LAYOUT_COLUMNS_ICON_SIZE_ID).setSelection(
+                                                                prefs.useLargeIcons(PaletteViewerPreferences.LAYOUT_COLUMNS));
+        }
+
+        // final Button button = createButton(contents, -1,
+        // PaletteMessages.SETTINGS_LAYOUT_COLUMNS_OVERRIDE_WIDTH, SWT.CHECK,
+        // null);
+        // ((GridData)button.getLayoutData()).horizontalSpan = 2;
+        //
+        // Composite container = new Composite(contents, SWT.NONE);
+        // container.setFont(contents.getFont());
+        // GridLayout layout = new GridLayout(2, false);
+        // container.setLayout(layout);
+        // GridData data = new GridData(GridData.FILL_HORIZONTAL |
+        // GridData.VERTICAL_ALIGN_FILL);
+        // data.horizontalSpan = 2;
+        // container.setLayoutData(data);
+        //
+        // final Label label = new Label(container, SWT.NONE);
+        // label.setFont(container.getFont());
+        // label.setText(PaletteMessages.SETTINGS_LAYOUT_COLUMNS_WIDTH);
+        // data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING
+        // | GridData.VERTICAL_ALIGN_BEGINNING);
+        // label.setLayoutData(data);
+        // label.setEnabled(false);
+        //
+        // final Text box = new Text(container, SWT.SINGLE | SWT.BORDER);
+        // box.setFont(container.getFont());
+        // // box.setText("30");
+        // box.setEnabled(false);
+        // data = new GridData(GridData.FILL_HORIZONTAL |
+        // GridData.VERTICAL_ALIGN_BEGINNING);
+        // data.widthHint = 50;
+        // box.setLayoutData(data);
+        //
+        // button.addSelectionListener(new SelectionListener() {
+        // public void widgetSelected(SelectionEvent e) {
+        // label.setEnabled(!label.isEnabled());
+        // box.setEnabled(!box.isEnabled());
+        // }
+        // public void widgetDefaultSelected(SelectionEvent e) {
+        // }
+        // });
+
+        return contents;
+    }
+
+    /**
+     * Creates and initializes (i.e. loads the current settings from PaletteViewerPreferences) the
+     * part of the dialog that displays the font settings.
+     * 
+     * @param parent
+     *            the parent composite
+     * @return the newly created Control
+     */
+    protected Control createFontSettings(Composite parent) {
+        Composite container = new Composite(parent, SWT.NONE);
+        container.setFont(parent.getFont());
+        GridLayout layout = new GridLayout(2, false);
+        container.setLayout(layout);
+
+        fontName = new Label(container, SWT.LEFT | SWT.WRAP);
+        fontName.setFont(container.getFont());
+        GridData data = new GridData(GridData.FILL_BOTH);
+        data.verticalSpan = 2;
+        fontName.setLayoutData(data);
+        updateFontName();
+
+        createButton(container, FONT_CHANGE_ID,
+                     PaletteMessages.SETTINGS_FONT_CHANGE, SWT.PUSH, null);
+
+        createButton(container, DEFAULT_FONT_ID,
+                     PaletteMessages.SETTINGS_DEFAULT_FONT, SWT.PUSH, null);
+
+        return container;
+    }
+
+    /**
+     * Creates and initializes (i.e. loads the current settings from PaletteViewerPreferences) the
+     * options for icons layout.
+     * 
+     * @param parent
+     *            the parent composite
+     * @return the newly created Control
+     */
+    protected Control createIconsOnlyOptions(Composite parent) {
+        Control contents = createOptionsPage(parent,
+                                             PaletteMessages.SETTINGS_OPTIONS_ICONS_ONLY,
+                                             LAYOUT_ICONS_ICON_SIZE_ID);
+
+        if (getButton(LAYOUT_ICONS_ICON_SIZE_ID) != null) {
+            getButton(LAYOUT_ICONS_ICON_SIZE_ID).setSelection(
+                                                              prefs.useLargeIcons(PaletteViewerPreferences.LAYOUT_ICONS));
+        }
+        return contents;
+    }
+
+    /**
+     * Creates the part of the dialog that displays the various options for the selected layout.
+     * 
+     * @param parent
+     *            the parent composite
+     * @return the newly created Control
+     */
+    protected Control createLayoutOptions(Composite parent) {
+        Composite composite = new Composite(parent, SWT.NONE);
+        composite.setFont(parent.getFont());
+        GridLayout layout = new GridLayout(1, false);
+        layout.marginWidth = 0;
+        layout.marginHeight = 0;
+        composite.setLayout(layout);
+
+        Label label = new Label(composite, SWT.NONE);
+        label.setFont(composite.getFont());
+        label.setText(PaletteMessages.SETTINGS_LAYOUT_TITLE);
+        GridData data = new GridData();
+        label.setLayoutData(data);
+
+        Button b = null;
+        int[] modes = prefs.getSupportedLayoutModes();
+        for (int i = 0; i < modes.length; i++) {
+            switch (modes[i]) {
+                case PaletteViewerPreferences.LAYOUT_COLUMNS:
+                    b = createButton(composite, LAYOUT_COLUMNS_VIEW_ID,
+                                     PaletteMessages.SETTINGS_COLUMNS_VIEW_LABEL, SWT.RADIO,
+                                     null);
+                    ((GridData) b.getLayoutData()).horizontalIndent = 5;
+                    break;
+                case PaletteViewerPreferences.LAYOUT_LIST:
+                    b = createButton(composite, LAYOUT_LIST_VIEW_ID,
+                                     PaletteMessages.SETTINGS_LIST_VIEW_LABEL, SWT.RADIO,
+                                     null);
+                    ((GridData) b.getLayoutData()).horizontalIndent = 5;
+                    break;
+                case PaletteViewerPreferences.LAYOUT_ICONS:
+                    b = createButton(composite, LAYOUT_ICONS_VIEW_ID,
+                                     PaletteMessages.SETTINGS_ICONS_VIEW_LABEL, SWT.RADIO,
+                                     null);
+                    ((GridData) b.getLayoutData()).horizontalIndent = 5;
+                    break;
+                case PaletteViewerPreferences.LAYOUT_DETAILS:
+                    b = createButton(composite, LAYOUT_DETAILS_VIEW_ID,
+                                     PaletteMessages.SETTINGS_DETAILS_VIEW_LABEL, SWT.RADIO,
+                                     null);
+                    ((GridData) b.getLayoutData()).horizontalIndent = 5;
+                    break;
+            }
+        }
+
+        // Load layout settings
+        int layoutSetting = prefs.getLayoutSetting();
+        switch (layoutSetting) {
+            case PaletteViewerPreferences.LAYOUT_COLUMNS:
+                b = getButton(LAYOUT_COLUMNS_VIEW_ID);
+                break;
+            case PaletteViewerPreferences.LAYOUT_ICONS:
+                b = getButton(LAYOUT_ICONS_VIEW_ID);
+                break;
+            case PaletteViewerPreferences.LAYOUT_LIST:
+                b = getButton(LAYOUT_LIST_VIEW_ID);
+                break;
+            case PaletteViewerPreferences.LAYOUT_DETAILS:
+                b = getButton(LAYOUT_DETAILS_VIEW_ID);
+                break;
+        }
+        if (b == null) {
+            return null;
+        }
+        b.setSelection(true);
+        b.setFocus();
+
+        return composite;
+    }
+
+    /**
+     * Creates the part of the dialog that displays the lists the available layout modes.
+     * 
+     * @param parent
+     *            the parent composite
+     * @return the newly created Control
+     */
+    protected Control createLayoutSettings(Composite parent) {
+        Composite composite = new Composite(parent, SWT.NONE);
+        composite.setFont(parent.getFont());
+        GridLayout layout = new GridLayout(2, false);
+        composite.setLayout(layout);
+
+        GridData data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
+        Control layoutOptions = createLayoutOptions(composite);
+        if (layoutOptions != null) {
+            layoutOptions.setLayoutData(data);
+        }
+
+        book = new PageBook(composite, SWT.NONE);
+        book.setFont(composite.getFont());
+        data = new GridData(GridData.FILL_BOTH);
+        book.setLayoutData(data);
+
+        columnsPanel = createColumnsOptions(book);
+        listPanel = createListOptions(book);
+        iconsPanel = createIconsOnlyOptions(book);
+        detailsPanel = createDetailsOptions(book);
+
+        // Show the right page in the book
+        handleLayoutSettingChanged(prefs.getLayoutSetting());
+
+        return composite;
+    }
+
+    /**
+     * Creates and initializes (i.e. loads the current settings from PaletteViewerPreferences) the
+     * options for list layout.
+     * 
+     * @param parent
+     *            the parent composite
+     * @return the newly created Control
+     */
+    protected Control createListOptions(Composite parent) {
+        Control composite = createOptionsPage(parent,
+                                              PaletteMessages.SETTINGS_OPTIONS_LIST, LAYOUT_LIST_ICON_SIZE_ID);
+        if (getButton(LAYOUT_LIST_ICON_SIZE_ID) != null) {
+            getButton(LAYOUT_LIST_ICON_SIZE_ID).setSelection(
+                                                             prefs.useLargeIcons(PaletteViewerPreferences.LAYOUT_LIST));
+        }
+        return composite;
+    }
+
+    /**
+     * This helper method is a result of code-factoring. It creates a Group displaying the given
+     * title and creates a "Use Large Icons" checkbox with the given buttonId in it. This method is
+     * used to create the options for the different layout modes.
+     * 
+     * @param parent
+     *            the parent composite
+     * @param title
+     *            The title for the group to be created.
+     * @param buttonId
+     *            The ID for the "Use Large Icons" checkbox to be created in the group.
+     * @return the newly created Group
+     */
+    protected Control createOptionsPage(Composite parent, String title,
+                                        int buttonId) {
+        Group contents = new Group(parent, SWT.NONE);
+        contents.setFont(parent.getFont());
+        GridLayout layout = new GridLayout(1, false);
+        contents.setLayout(layout);
+        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+                | GridData.VERTICAL_ALIGN_FILL);
+        data.heightHint = 0;
+        contents.setLayoutData(data);
+        contents.setText(title);
+
+        createButton(contents, buttonId,
+                     PaletteMessages.SETTINGS_USE_LARGE_ICONS_LABEL, SWT.CHECK, null);
+
+        return contents;
+    }
+
+    /**
+     * Returns the Button with the given id; or <code>null</code> if none was found.
+     * 
+     * @see org.eclipse.jface.dialogs.Dialog#getButton(int)
+     */
+    protected Button getButton(int id) {
+        Button button = null;
+        Widget widget = getWidget(id);
+        if (widget instanceof Button) {
+            button = (Button) widget;
+        }
+
+        return button;
+    }
+
+    /**
+     * The <code>Widget</code>s that were created with a unique ID and added to this class' internal
+     * map can be retrieved through this method.
+     * 
+     * @param id
+     *            The unique ID of the Widget that you wish to retrieve
+     * @return The Widget, if one with the given id exists. <code>null</code> otherwise.
+     */
+    protected Widget getWidget(int id) {
+        Widget widget = (Widget) widgets.get(new Integer(id));
+        if (widget == null) {
+            widget = super.getButton(id);
+        }
+
+        return widget;
+    }
+
+    /**
+     * Called when any one of the "Auto - Collapse" radio buttons is clicked. It changes the setting
+     * in the {@link org.eclipse.gef.ui.palette.PaletteViewerPreferences} object.
+     * 
+     * @param newSetting
+     *            The flag for the new setting
+     */
+    protected void handleAutoCollapseSettingChanged(int newSetting) {
+        prefs.setAutoCollapseSetting(newSetting);
+    }
+
+    /**
+     * This method is invoked when "Cancel" is invoked on the dialog. It simply restores the
+     * settings, thus undoing any changes made in this Dialog.
+     */
+    protected void handleCancelPressed() {
+        restoreSettings();
+    }
+
+    /**
+     * This method is invoked when the user selects the "Change" font button. It opens the
+     * FontDialog to allow the user to change the font.
+     */
+    protected void handleChangeFontPressed() {
+        FontDialog dialog = new FontDialog(getShell());
+        FontData data = prefs.getFontData();
+        dialog.setFontList(new FontData[] { data });
+        data = dialog.open();
+        if (data != null) {
+            prefs.setFontData(data);
+        }
+        updateFontName();
+    }
+
+    /**
+     * This method is invoked when the user selects the "Restore Default" font button. It changes
+     * the font, in case it was different, to the default one, which is the Workbench Dialog font.
+     */
+    protected void handleDefaultFontRequested() {
+        prefs.setFontData(JFaceResources.getDialogFont().getFontData()[0]);
+        updateFontName();
+    }
+
+    /**
+     * This method is invoked when the "Use Large Icons" checkbox is selected/deselected for the
+     * currently active layout mode.
+     * 
+     * @param selection
+     *            indicates whether large icons are to be used or not.
+     */
+    protected void handleIconSizeChanged(boolean selection) {
+        prefs.setCurrentUseLargeIcons(selection);
+    }
+
+    /**
+     * This method is called when any one of the "Layout" radio buttons is clicked. It changes the
+     * setting in the {@link org.eclipse.gef.ui.palette.PaletteViewerPreferences} object.
+     * 
+     * @param newSetting
+     *            The flag for the new setting
+     */
+    protected void handleLayoutSettingChanged(int newSetting) {
+        prefs.setLayoutSetting(newSetting);
+        switch (newSetting) {
+            case PaletteViewerPreferences.LAYOUT_COLUMNS:
+                showLayoutOptionsPage(columnsPanel);
+                break;
+            case PaletteViewerPreferences.LAYOUT_LIST:
+                showLayoutOptionsPage(listPanel);
+                break;
+            case PaletteViewerPreferences.LAYOUT_ICONS:
+                showLayoutOptionsPage(iconsPanel);
+                break;
+            case PaletteViewerPreferences.LAYOUT_DETAILS:
+                showLayoutOptionsPage(detailsPanel);
+                break;
+            default:
+                break;
+        }
+    }
+
+    /**
+     * Restores the cached settings, thus undoing any changes made since the last caching of
+     * settings.
+     * 
+     * @see #cacheSettings()
+     */
+    protected void restoreSettings() {
+        prefs.setFontData((FontData) settings.get(CACHE_FONT));
+        prefs.setAutoCollapseSetting(((Integer) settings.get(CACHE_COLLAPSE))
+                .intValue());
+        prefs.setLayoutSetting(((Integer) settings.get(CACHE_LAYOUT))
+                .intValue());
+        prefs.setUseLargeIcons(PaletteViewerPreferences.LAYOUT_DETAILS,
+                               ((Boolean) settings.get(CACHE_DETAILS_ICON_SIZE))
+                                       .booleanValue());
+        prefs.setUseLargeIcons(PaletteViewerPreferences.LAYOUT_ICONS,
+                               ((Boolean) settings.get(CACHE_ICONS_ICON_SIZE)).booleanValue());
+        prefs.setUseLargeIcons(PaletteViewerPreferences.LAYOUT_LIST,
+                               ((Boolean) settings.get(CACHE_LIST_ICON_SIZE)).booleanValue());
+        prefs.setUseLargeIcons(PaletteViewerPreferences.LAYOUT_COLUMNS,
+                               ((Boolean) settings.get(CACHE_COLUMNS_ICON_SIZE))
+                                       .booleanValue());
+    }
+
+    /**
+     * This helper method is mainly a result of code-factoring. It shows the given page (which
+     * should be one of the controls showing the layout options) in the PageBook and grows the
+     * dialog if necessary.
+     * 
+     * @param page
+     *            One of the controls showing the layout options that already belongs to the
+     *            PageBook book.
+     */
+    protected void showLayoutOptionsPage(Control page) {
+        // Show the page and grow the shell (if necessary) so that the page is
+        // completely
+        // visible
+        Point oldSize = getShell().getSize();
+        book.showPage(page);
+        Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+        int x = newSize.x - oldSize.x;
+        x = (x < 0) ? 0 : x;
+        int y = newSize.y - oldSize.y;
+        y = (y < 0) ? 0 : y;
+        if (x > 0 || y > 0) {
+            getShell().setSize(oldSize.x + x, oldSize.y + y);
+        }
+    }
+
+    /**
+     * Updates the label showing the font's name to show the name of the current font.
+     */
+    protected void updateFontName() {
+        String name;
+        if (prefs.getFontData().equals(
+                                       (JFaceResources.getDialogFont().getFontData()[0]))) {
+            name = PaletteMessages.SETTINGS_WORKBENCH_FONT_LABEL;
+        } else {
+            name = StringConverter.asString(prefs.getFontData());
+        }
+        fontName.setText(PaletteMessages.SETTINGS_FONT_CURRENT + name);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteStackFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteStackFactory.java
new file mode 100644 (file)
index 0000000..505b249
--- /dev/null
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteContainer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteStack;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.ToolEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteMessages;
+
+
+/**
+ * Factory to create {@link org.eclipse.gef.palette.PaletteStack}
+ * 
+ * @author Whitney Sorenson
+ * @since 3.0
+ */
+public class PaletteStackFactory extends PaletteEntryFactory {
+
+    /**
+     * Creates a new PaletteStackFactory with label PaletteMessages.MODEL_TYPE_STACK
+     */
+    public PaletteStackFactory() {
+        setLabel(PaletteMessages.MODEL_TYPE_STACK);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#canCreate(org.eclipse.gef.palette.PaletteEntry)
+     */
+    public boolean canCreate(PaletteEntry selected) {
+        if (!(selected instanceof ToolEntry)
+                || selected.getParent() instanceof PaletteStack)
+            return false;
+        return super.canCreate(selected);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#createNewEntry(Shell)
+     */
+    protected PaletteEntry createNewEntry(Shell shell) {
+        return new PaletteStack(PaletteMessages.NEW_STACK_LABEL, null, null);
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#createNewEntry(org.eclipse.swt.widgets.Shell,
+     *      org.eclipse.gef.palette.PaletteEntry)
+     */
+    public PaletteEntry createNewEntry(Shell shell, PaletteEntry selected) {
+        PaletteContainer parent = determineContainerForNewEntry(selected);
+        int index = determineIndexForNewEntry(parent, selected);
+        PaletteEntry entry = createNewEntry(shell);
+        parent.remove(selected);
+        parent.add(index - 1, entry);
+        ((PaletteStack) entry).add(selected);
+        entry.setUserModificationPermission(PaletteEntry.PERMISSION_FULL_MODIFICATION);
+        return entry;
+    }
+
+    /**
+     * @see org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#determineTypeForNewEntry(org.eclipse.gef.palette.PaletteEntry)
+     */
+    protected Object determineTypeForNewEntry(PaletteEntry selected) {
+        return PaletteStack.PALETTE_TYPE_STACK;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteTreeProvider.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/customize/PaletteTreeProvider.java
new file mode 100644 (file)
index 0000000..4c0f4f4
--- /dev/null
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.customize;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteContainer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteRoot;
+
+
+/**
+ * This is the {@link org.eclipse.jface.viewers.IContentProvider} for the
+ * {@link org.eclipse.jface.viewers.TreeViewer} used in
+ * {@link org.eclipse.gef.ui.palette.customize.PaletteCustomizerDialog}.
+ * 
+ * @author Pratik Shah
+ * @see org.eclipse.jface.viewer.TreeViewer
+ * @see org.eclipse.gef.ui.palette.customize.PaletteCustomizerDialog
+ */
+class PaletteTreeProvider implements ITreeContentProvider {
+
+    private TreeViewer viewer;
+    private PaletteRoot root;
+    private PropertyChangeListener modelListener = new PropertyChangeListener() {
+        public void propertyChange(PropertyChangeEvent evt) {
+            handlePropertyChanged(evt);
+        }
+    };
+
+    /**
+     * Constructor
+     * 
+     * @param treeviewer
+     *            The TreeViewer whose ContentProvider this PaletteTreeProvider is
+     */
+    public PaletteTreeProvider(TreeViewer treeviewer) {
+        this.viewer = treeviewer;
+    }
+
+    /**
+     * Stops listening to the model
+     * 
+     * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+     */
+    public void dispose() {
+        traverseModel(root, false);
+    }
+
+    /**
+     * If the given element does not have any children, this method should return <code>null</code>.
+     * This fixes the problem where a "+" sign is incorrectly placed next to an empty container in
+     * the tree.
+     * 
+     * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(Object)
+     */
+    public Object[] getChildren(Object parentElement) {
+        if (parentElement instanceof PaletteContainer) {
+            List children = ((PaletteContainer) parentElement).getChildren();
+            if (!children.isEmpty()) {
+                return children.toArray();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(Object)
+     */
+    public boolean hasChildren(Object element) {
+        return getChildren(element) != null;
+    }
+
+    /**
+     * This method should not return <code>null</code>.
+     * 
+     * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(Object)
+     */
+    public Object[] getElements(Object inputElement) {
+        Object[] elements = getChildren(inputElement);
+        if (elements == null) {
+            elements = new Object[0];
+        }
+        return elements;
+    }
+
+    /**
+     * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(Object)
+     */
+    public Object getParent(Object element) {
+        return ((PaletteEntry) element).getParent();
+    }
+
+    /**
+     * This method is invoked whenever there is any change in the model. It updates the viewer with
+     * the changes that were made to the model. Sub-classes may override this method to change or
+     * extend its functionality.
+     * 
+     * @param evt
+     *            The {@link PropertyChangeEvent} that was fired from the model
+     */
+    protected void handlePropertyChanged(PropertyChangeEvent evt) {
+        PaletteEntry entry = ((PaletteEntry) evt.getSource());
+        String property = evt.getPropertyName();
+        if (property.equals(PaletteEntry.PROPERTY_LABEL)
+                || property.equals(PaletteEntry.PROPERTY_SMALL_ICON)) {
+            viewer.update(entry, null);
+        } else if (property.equals(PaletteEntry.PROPERTY_VISIBLE)) {
+            viewer.refresh(entry);
+        } else if (property.equals(PaletteContainer.PROPERTY_CHILDREN)) {
+            viewer.refresh(entry);
+            List oldChildren = (List) evt.getOldValue();
+            for (Iterator iter = oldChildren.iterator(); iter.hasNext();) {
+                PaletteEntry child = (PaletteEntry) iter.next();
+                traverseModel(child, false);
+            }
+            traverseModel(entry, true);
+        }
+    }
+
+    /**
+     * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object)
+     */
+    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+        if (root != null)
+            traverseModel(root, false);
+        if (newInput != null) {
+            root = (PaletteRoot) newInput;
+            traverseModel(root, true);
+        }
+    }
+
+    private void traverseModel(PaletteEntry entry, boolean isHook) {
+        if (isHook) {
+            entry.addPropertyChangeListener(modelListener);
+        } else {
+            entry.removePropertyChangeListener(modelListener);
+        }
+
+        if (hasChildren(entry)) {
+            Object[] children = getChildren(entry);
+            for (int i = 0; i < children.length; i++) {
+                traverseModel((PaletteEntry) children[i], isHook);
+            }
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/IPinnableEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/IPinnableEditPart.java
new file mode 100644 (file)
index 0000000..920c7a0
--- /dev/null
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts;
+
+/**
+ * This interface is used to identify and work with a pinnable palette editpart (e.g. drawers,
+ * stacks).
+ * 
+ * @author crevells
+ * @since 3.4
+ */
+public interface IPinnableEditPart {
+
+    /**
+     * Returns <code>true</code> if the palette editpart is pinned open.
+     * 
+     * @return boolean
+     */
+    public boolean isPinnedOpen();
+
+    /**
+     * @return <code>true</code> if the palette editpart can be pinned open.
+     */
+    public boolean canBePinned();
+
+    /**
+     * Sets the palette editpart's pinned state to the specified value.
+     * 
+     * @param pinned
+     *            <code>true</code> if the palette editpart should be pinned when opened
+     */
+    public void setPinnedOpen(boolean pinned);
+
+    /**
+     * Returns the expansion state of the palette editpart
+     * 
+     * @return <code>true</code> if the palette editpart is expanded; false otherwise
+     */
+    public boolean isExpanded();
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/PaletteAnimator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/PaletteAnimator.java
new file mode 100644 (file)
index 0000000..42fd9b5
--- /dev/null
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.LayoutAnimator;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.DrawerEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.DrawerFigure;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerPreferences;
+
+
+/**
+ * An animator for the layout of the palette.
+ * 
+ * @author Randy Hudson, Pratik Shah
+ */
+public class PaletteAnimator extends LayoutAnimator {
+
+    private List drawers = new ArrayList();
+    private PaletteViewerPreferences prefs;
+
+    /**
+     * Constructor for a PaletteAnimator
+     * 
+     * @param prefs
+     *            The palette PaletteViewerPreferencesPreferences
+     */
+    public PaletteAnimator(PaletteViewerPreferences prefs) {
+        this.prefs = prefs;
+    }
+
+    /**
+     * Add a drawer to the palette.
+     * 
+     * @param drawer
+     *            the drawer.
+     */
+    public void addDrawer(DrawerEditPart drawer) {
+        drawers.add(drawer.getFigure());
+    }
+
+    /**
+     * Collapse the provided drawer if the automatoc collapse setting is enabled.
+     * 
+     * @param openDrawer
+     *            The drawer to collapse.
+     * @since 3.2
+     */
+    protected void autoCollapse(DrawerFigure openDrawer) {
+        int autoCollapseMode = prefs.getAutoCollapseSetting();
+
+        // Collapse never
+        if (autoCollapseMode == PaletteViewerPreferences.COLLAPSE_NEVER)
+            return;
+
+        DrawerFigure drawer;
+
+        // Collapse always
+        if (autoCollapseMode == PaletteViewerPreferences.COLLAPSE_ALWAYS) {
+            for (Iterator iter = drawers.iterator(); iter.hasNext();) {
+                drawer = (DrawerFigure) iter.next();
+                if (drawer != openDrawer)
+                    drawer.setExpanded(false);
+            }
+            return;
+        }
+
+        // Collapse as needed
+        int wHint = openDrawer.getParent().getClientArea().width;
+        int availableHeight = openDrawer.getParent().getSize().height;
+        int requiredHeight = 0;
+        List closable = new ArrayList();
+        for (Iterator iter = openDrawer.getParent().getChildren().iterator(); iter
+                .hasNext();) {
+            IFigure sibling = (IFigure) iter.next();
+            int height = sibling.getPreferredSize(wHint, -1).height;
+            requiredHeight += height;
+            if (!(sibling instanceof DrawerFigure) || sibling == openDrawer)
+                continue;
+            drawer = (DrawerFigure) sibling;
+            if (drawer.isExpanded() && !drawer.isPinnedOpen())
+                closable.add(drawer);
+        }
+
+        // Start closing until requiredHeight <= available
+        for (int i = closable.size() - 1; i >= 0
+                && requiredHeight > availableHeight; i--) {
+            drawer = (DrawerFigure) closable.get(i);
+            int expandedHeight = drawer.getPreferredSize(wHint, -1).height;
+            drawer.setExpanded(false);
+            int collapsedHeight = drawer.getPreferredSize(wHint, -1).height;
+            requiredHeight -= (expandedHeight - collapsedHeight);
+        }
+    }
+
+    /**
+     * @see org.eclipse.draw2d.Animator#playbackStarting(org.eclipse.draw2d.IFigure)
+     */
+    public void playbackStarting(IFigure figure) {
+        if (figure instanceof DrawerFigure)
+            ((DrawerFigure) figure).setAnimating(true);
+    }
+
+    /**
+     * Remove the drawer.
+     * 
+     * @param drawer
+     *            the drawer.
+     */
+    public void removeDrawer(DrawerEditPart drawer) {
+        drawers.remove(drawer.getFigure());
+    }
+
+    /**
+     * @see org.eclipse.draw2d.Animator#init(org.eclipse.draw2d.IFigure)
+     */
+    public void init(IFigure figure) {
+        if (figure instanceof DrawerFigure) {
+            DrawerFigure drawer = (DrawerFigure) figure;
+            if (drawer.isExpanded())
+                autoCollapse(drawer);
+            return;
+        }
+        super.init(figure);
+    }
+
+    /**
+     * @see org.eclipse.draw2d.Animator#tearDown(org.eclipse.draw2d.IFigure)
+     */
+    public void tearDown(IFigure figure) {
+        if (figure instanceof DrawerFigure)
+            ((DrawerFigure) figure).setAnimating(false);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/PaletteEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/PaletteEditPart.java
new file mode 100644 (file)
index 0000000..58a58e0
--- /dev/null
@@ -0,0 +1,491 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.draw2d.Border;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.text.FlowPage;
+import org.eclipse.draw2d.text.TextFlow;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
+import org.eclipse.gef.tools.SelectEditPartTracker;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IMemento;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteContainer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteSeparator;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteMessages;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerPreferences;
+
+
+/**
+ * The abstract implementation of palette edit parts. All edit parts used in the palette must extend
+ * this class.
+ */
+public abstract class PaletteEditPart extends AbstractGraphicalEditPart
+        implements PropertyChangeListener {
+
+    /**
+     * The name of each entry in the palette, used to restore the state.
+     */
+    public static final String XML_NAME = "entry"; //$NON-NLS-1$
+    private static final Border TOOLTIP_BORDER = new MarginBorder(0, 2, 1, 0);
+    private static ImageCache globalImageCache;
+    private AccessibleEditPart acc;
+    private PropertyChangeListener childListener = new PropertyChangeListener() {
+        public void propertyChange(PropertyChangeEvent evt) {
+            if (evt.getPropertyName().equals(PaletteEntry.PROPERTY_VISIBLE)) {
+                refreshChildren();
+            }
+        }
+    };
+    private Image image;
+    private ImageDescriptor imgDescriptor;
+
+    /**
+     * Constructor for the PaletteEditPart.
+     * 
+     * @param model
+     *            The model element for this edit part.
+     */
+    public PaletteEditPart(PaletteEntry model) {
+        setModel(model);
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#activate()
+     */
+    public void activate() {
+        super.activate();
+        PaletteEntry model = (PaletteEntry) getModel();
+        model.addPropertyChangeListener(this);
+        traverseChildren(model, true);
+    }
+
+    /**
+     * returns the AccessibleEditPart for this EditPart. This method is called lazily from
+     * {@link #getAccessibleEditPart()}.
+     * 
+     * @return the AccessibleEditPart.
+     */
+    protected AccessibleEditPart createAccessible() {
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractEditPart#createEditPolicies()
+     */
+    public void createEditPolicies() {
+    }
+
+    /**
+     * Create the tool tip for this palette edit part.
+     * 
+     * @return the tool tip figure.
+     */
+    protected IFigure createToolTip() {
+        String message = getToolTipText();
+        if (message == null || message.length() == 0)
+            return null;
+
+        FlowPage fp = new FlowPage() {
+            public Dimension getPreferredSize(int w, int h) {
+                Dimension d = super.getPreferredSize(-1, -1);
+                if (d.width > 150)
+                    d = super.getPreferredSize(150, -1);
+                return d;
+            }
+        };
+        fp.setOpaque(true);
+        fp.setBorder(TOOLTIP_BORDER);
+        TextFlow tf = new TextFlow();
+        tf.setText(message);
+        fp.add(tf);
+        return fp;
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#deactivate()
+     */
+    public void deactivate() {
+        PaletteEntry model = (PaletteEntry) getModel();
+        model.removePropertyChangeListener(this);
+        traverseChildren(model, false);
+        if (image != null) {
+            image.dispose();
+            image = null;
+        }
+        super.deactivate();
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractEditPart#getAccessibleEditPart()
+     */
+    protected AccessibleEditPart getAccessibleEditPart() {
+        if (acc == null)
+            acc = createAccessible();
+        return acc;
+    }
+
+    /**
+     * A selection tracker for the edit part.
+     */
+    public class SingleSelectionTracker extends SelectEditPartTracker {
+        /**
+         * Constructor for a SingleSelectionTracker.
+         */
+        public SingleSelectionTracker() {
+            super(PaletteEditPart.this);
+        }
+
+        /**
+         * @see org.eclipse.gef.tools.SelectEditPartTracker#performSelection()
+         */
+        protected void performSelection() {
+            if (hasSelectionOccurred())
+                return;
+            setFlag(FLAG_SELECTION_PERFORMED, true);
+            getCurrentViewer().select(getSourceEditPart());
+        }
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#getDragTracker(Request)
+     */
+    public DragTracker getDragTracker(Request request) {
+        return new SingleSelectionTracker();
+    }
+
+    /**
+     * Returns the image cache. The cache is global, and is shared by all palette edit parts. This
+     * has the disadvantage that once an image is allocated, it is never freed until the display is
+     * disposed. However, it has the advantage that the same image in different palettes is only
+     * ever created once.
+     * 
+     * @return the image cache.
+     */
+    protected static ImageCache getImageCache() {
+        ImageCache cache = globalImageCache;
+        if (cache == null) {
+            globalImageCache = cache = new ImageCache();
+            Display display = Display.getDefault();
+            if (display != null) {
+                display.disposeExec(new Runnable() {
+                    public void run() {
+                        if (globalImageCache != null) {
+                            globalImageCache.dispose();
+                            globalImageCache = null;
+                        }
+                    }
+                });
+            }
+        }
+        return cache;
+    }
+
+    /**
+     * @see org.eclipse.gef.editparts.AbstractEditPart#getModelChildren()
+     */
+    public List getModelChildren() {
+        List modelChildren;
+        if (getModel() instanceof PaletteContainer)
+            modelChildren = new ArrayList(
+                                          ((PaletteContainer) getModel()).getChildren());
+        else
+            return Collections.EMPTY_LIST;
+
+        PaletteEntry prevVisibleEntry = null;
+        for (Iterator iter = modelChildren.iterator(); iter.hasNext();) {
+            PaletteEntry entry = (PaletteEntry) iter.next();
+            if (!entry.isVisible())
+                // not visible
+                iter.remove();
+            else if (entry instanceof PaletteSeparator
+                    && prevVisibleEntry == null)
+                // first visible item in a group is a separator, don't need it
+                iter.remove();
+            else if (entry instanceof PaletteSeparator
+                    && prevVisibleEntry instanceof PaletteSeparator)
+                // previous visible entry was a separator, don't need it
+                iter.remove();
+            else
+                prevVisibleEntry = entry;
+        }
+        // check to see if last visible entry was a separator, and thus should
+        // be hidden
+        if (prevVisibleEntry instanceof PaletteSeparator)
+            modelChildren.remove(prevVisibleEntry);
+
+        return modelChildren;
+    }
+
+    /**
+     * Get the model element for this palette edit part.
+     * 
+     * @return the model element.
+     */
+    protected PaletteEntry getPaletteEntry() {
+        return (PaletteEntry) getModel();
+    }
+
+    /**
+     * Get the palette viewer for this palette edit part.
+     * 
+     * @return the palette viewer.
+     */
+    protected PaletteViewer getPaletteViewer() {
+        return (PaletteViewer) getViewer();
+    }
+
+    /**
+     * Get the palette viewer preferences for this palette edit part.
+     * 
+     * @return the palette viewer preferences.
+     */
+    protected PaletteViewerPreferences getPreferenceSource() {
+        return ((PaletteViewer) getViewer()).getPaletteViewerPreferences();
+    }
+
+    /**
+     * Get the tool tip figure for this palette edit part.
+     * 
+     * @return the tool tip figure.
+     */
+    protected IFigure getToolTipFigure() {
+        return getFigure();
+    }
+
+    /**
+     * Get the tool tip text for this palette edit part.
+     * 
+     * @return the tool tip text.
+     */
+    protected String getToolTipText() {
+        String text = null;
+        PaletteEntry entry = (PaletteEntry) getModel();
+        String desc = entry.getDescription();
+        boolean needName = nameNeededInToolTip();
+        if (desc == null || desc.trim().equals(entry.getLabel())
+                || desc.trim().equals("")) { //$NON-NLS-1$
+            if (needName)
+                text = entry.getLabel();
+        } else {
+            if (needName)
+                text = entry.getLabel()
+                        + " " //$NON-NLS-1$
+                        + PaletteMessages.NAME_DESCRIPTION_SEPARATOR
+                        + " " + desc; //$NON-NLS-1$
+            else
+                text = desc;
+        }
+        if (text != null && text.trim().equals(""))//$NON-NLS-1$
+            return null;
+        return text;
+    }
+
+    // /**
+    // * Overwritten because palette edit parts are not bound to the constraint
+    // * that their figure has to be visible (they may get selected while being
+    // * stacked).
+    // *
+    // * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#isSelectable()
+    // */
+    // public boolean isSelectable() {
+    // return true;
+    // }
+
+    /**
+     * Determine if the name is needed in the tool tip.
+     * 
+     * @return <code>true</code> if the name is needed in the tool tip.
+     * @since 3.2
+     */
+    protected boolean nameNeededInToolTip() {
+        return getLayoutSetting() == PaletteViewerPreferences.LAYOUT_ICONS;
+    }
+
+    /**
+     * @see java.beans.PropertyChangeListener#propertyChange(PropertyChangeEvent)
+     */
+    public void propertyChange(PropertyChangeEvent evt) {
+        String property = evt.getPropertyName();
+        if (property.equals(PaletteContainer.PROPERTY_CHILDREN)) {
+            traverseChildren((List) evt.getOldValue(), false);
+            refreshChildren();
+            traverseChildren((List) evt.getNewValue(), true);
+        } else if (property.equals(PaletteEntry.PROPERTY_LABEL)
+                || property.equals(PaletteEntry.PROPERTY_SMALL_ICON)
+                || property.equals(PaletteEntry.PROPERTY_LARGE_ICON)
+                || property.equals(PaletteEntry.PROPERTY_DESCRIPTION))
+            refreshVisuals();
+    }
+
+    /**
+     * Restore the state of the palette entry.
+     * 
+     * @param memento
+     *            the saved state of the palette entry.
+     */
+    public void restoreState(IMemento memento) {
+        Iterator iter = getChildren().iterator();
+        IMemento[] childMementos = memento.getChildren(XML_NAME);
+        int index = 0;
+        while (iter.hasNext())
+            ((PaletteEditPart) iter.next())
+                    .restoreState(childMementos[index++]);
+    }
+
+    /**
+     * Save the state of the palette entry.
+     * 
+     * @param memento
+     *            the saved state of the palette entry.
+     */
+    public void saveState(IMemento memento) {
+        Iterator iter = getChildren().iterator();
+        while (iter.hasNext())
+            ((PaletteEditPart) iter.next()).saveState(memento
+                    .createChild(XML_NAME));
+    }
+
+    /**
+     * Set the image for this palette edit part.
+     * 
+     * @param desc
+     *            the image descriptor.
+     */
+    protected void setImageDescriptor(ImageDescriptor desc) {
+        if (desc == imgDescriptor)
+            return;
+        imgDescriptor = desc;
+        setImageInFigure(getImageCache().getImage(imgDescriptor));
+    }
+
+    /**
+     * Set the image to be used in the figure for this edit edit.
+     * 
+     * @param image
+     *            the image
+     */
+    protected void setImageInFigure(Image image) {
+    }
+
+    private void traverseChildren(PaletteEntry parent, boolean add) {
+        if (!(parent instanceof PaletteContainer))
+            return;
+        PaletteContainer container = (PaletteContainer) parent;
+        traverseChildren(container.getChildren(), add);
+    }
+
+    private void traverseChildren(List children, boolean add) {
+        for (Iterator iter = children.iterator(); iter.hasNext();) {
+            PaletteEntry entry = (PaletteEntry) iter.next();
+            if (add) {
+                entry.addPropertyChangeListener(childListener);
+            } else {
+                entry.removePropertyChangeListener(childListener);
+            }
+        }
+    }
+
+    /**
+     * The image cache for this edit part.
+     */
+    protected static class ImageCache {
+        /** Map from ImageDescriptor to Image */
+        private Map images = new HashMap(11);
+
+        Image getImage(ImageDescriptor desc) {
+            if (desc == null) {
+                return null;
+            }
+            Image img = null;
+            Object obj = images.get(desc);
+            if (obj != null) {
+                img = (Image) obj;
+            } else {
+                img = desc.createImage();
+                images.put(desc, img);
+            }
+            return img;
+        }
+
+        Image getMissingImage() {
+            return getImage(ImageDescriptor.getMissingImageDescriptor());
+        }
+
+        void dispose() {
+            for (Iterator i = images.values().iterator(); i.hasNext();) {
+                Image img = (Image) i.next();
+                img.dispose();
+            }
+            images.clear();
+        }
+    }
+
+    /**
+     * Returns the current layout setting.
+     * 
+     * @return the current layout setting.
+     * @see PaletteViewerPreferences#getLayoutSetting()
+     * @since 3.4
+     */
+    protected int getLayoutSetting() {
+        if (getParent() instanceof PaletteEditPart) {
+            return ((PaletteEditPart) getParent()).getLayoutSetting();
+        }
+        return getPreferenceSource().getLayoutSetting();
+    }
+
+    /**
+     * Overwritten to ensure palette entries are always selectable, even if their figure is not
+     * showing).
+     * 
+     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#isSelectable()
+     */
+    public boolean isSelectable() {
+        // bug #349124
+        return true;
+    }
+
+    /**
+     * Returns true if this item is on the palette toolbar.
+     * 
+     * @return true if this item is on the palette toolbar; false otherwise
+     * @since 3.4
+     */
+    public boolean isToolbarItem() {
+        if (getParent() instanceof PaletteEditPart) {
+            return ((PaletteEditPart) getParent()).isToolbarItem();
+        }
+        return false;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/PaletteToolbarLayout.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/editparts/PaletteToolbarLayout.java
new file mode 100644 (file)
index 0000000..224635d
--- /dev/null
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.editparts;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.DrawerFigure;
+
+
+/**
+ * A ToolbarLayout-like layout for the palette. This layout only works when vertically oriented.
+ * 
+ * @author Pratik Shah
+ */
+public class PaletteToolbarLayout extends ToolbarLayout {
+
+    /**
+     * A figure is growing if it's an expanded drawer.
+     * 
+     * @param child
+     *            The figure that is to be marked as growing or non-growing
+     * @return <code>true</code> if the given child is considered growing
+     */
+    protected boolean isChildGrowing(IFigure child) {
+        return child instanceof DrawerFigure
+                && ((DrawerFigure) child).isExpanded();
+    }
+
+    /**
+     * @see org.eclipse.draw2d.ToolbarLayout#layout(org.eclipse.draw2d.IFigure)
+     */
+    public void layout(IFigure parent) {
+        List children = parent.getChildren();
+        List childrenGrabbingVertical = new ArrayList();
+        int numChildren = children.size();
+        Rectangle clientArea = parent.getClientArea();
+        int x = clientArea.x;
+        int y = clientArea.y;
+        int availableHeight = clientArea.height;
+        boolean stretching;
+        Dimension prefSizes[] = new Dimension[numChildren];
+        Dimension minSizes[] = new Dimension[numChildren];
+        int totalHeight = 0, totalMinHeight = 0, heightOfNonGrowingChildren = 0, heightPerChild = 0, excessHeight = 0;
+
+        /*
+         * Determine hints.
+         */
+        int wHint = clientArea.width;
+        int hHint = -1;
+
+        /*
+         * Store the preferred and minimum sizes of all figures. Determine which figures can be
+         * stretched/shrunk.
+         */
+        for (int i = 0; i < numChildren; i++) {
+            IFigure child = (IFigure) children.get(i);
+
+            prefSizes[i] = child.getPreferredSize(wHint, hHint);
+            minSizes[i] = child.getMinimumSize(wHint, hHint);
+
+            totalHeight += prefSizes[i].height;
+            totalMinHeight += minSizes[i].height;
+
+            if (isChildGrowing(child)) {
+                childrenGrabbingVertical.add(child);
+            } else {
+                heightOfNonGrowingChildren += prefSizes[i].height;
+            }
+        }
+        totalHeight += (numChildren - 1) * getSpacing();
+        totalMinHeight += (numChildren - 1) * getSpacing();
+
+        /*
+         * This is the algorithm that determines which figures need to be compressed/stretched and
+         * by how much.
+         */
+        stretching = totalHeight - Math.max(availableHeight, totalMinHeight) < 0;
+        if (stretching) {
+            /*
+             * We only want the last child to stretch. So, we mark all but the last growing child as
+             * non-growing.
+             */
+            for (int i = 0; i < childrenGrabbingVertical.size() - 1; i++) {
+                int index = children.indexOf(childrenGrabbingVertical.get(i));
+                heightOfNonGrowingChildren += prefSizes[index].height;
+            }
+            if (!childrenGrabbingVertical.isEmpty()) {
+                Object last = childrenGrabbingVertical
+                        .get(childrenGrabbingVertical.size() - 1);
+                childrenGrabbingVertical.clear();
+                childrenGrabbingVertical.add(last);
+                heightPerChild = availableHeight - heightOfNonGrowingChildren;
+            }
+        } else if (!childrenGrabbingVertical.isEmpty()) {
+            /*
+             * So long as there is at least one child that can be grown, figure out how much height
+             * should be given to each growing child.
+             */
+            boolean childrenDiscarded;
+            // spaceToConsume is the space height available on the palette that
+            // is to be
+            // shared by the growing children.
+            int spaceToConsume = availableHeight - heightOfNonGrowingChildren;
+            // heightPerChild is the height that each growing child is to be
+            // grown up to
+            heightPerChild = spaceToConsume / childrenGrabbingVertical.size();
+            // excessHeight is the space leftover at the bottom of the palette
+            // after each
+            // growing child has been grown by heightPerChild.
+            excessHeight = spaceToConsume
+                    - (heightPerChild * childrenGrabbingVertical.size());
+            do {
+                childrenDiscarded = false;
+                for (Iterator iter = childrenGrabbingVertical.iterator(); iter
+                        .hasNext();) {
+                    IFigure childFig = (IFigure) iter.next();
+                    int i = childFig.getParent().getChildren()
+                            .indexOf(childFig);
+                    // In the case of shrinking, if the child's height is less
+                    // than
+                    // heightPerChild, mark that child as non-growing
+                    if (prefSizes[i].height < heightPerChild) {
+                        spaceToConsume -= prefSizes[i].height;
+                        heightOfNonGrowingChildren += prefSizes[i].height;
+                        iter.remove();
+                        if (!childrenGrabbingVertical.isEmpty()) {
+                            childrenDiscarded = true;
+                            heightPerChild = spaceToConsume
+                                    / childrenGrabbingVertical.size();
+                            excessHeight = spaceToConsume
+                                    - (heightPerChild * childrenGrabbingVertical
+                                            .size());
+                        }
+                        break;
+                    }
+                }
+            } while (childrenDiscarded);
+        }
+
+        /*
+         * Do the actual layout, i.e. set the bounds of all the figures.
+         */
+        for (int i = 0; i < numChildren; i++) {
+            IFigure child = (IFigure) children.get(i);
+            Rectangle newBounds = new Rectangle(x, y, prefSizes[i].width,
+                                                prefSizes[i].height);
+
+            if (childrenGrabbingVertical.contains(child)) {
+                // Set the height of growing children. If this is the last one,
+                // give it
+                // the excess height.
+                childrenGrabbingVertical.remove(child);
+                if (childrenGrabbingVertical.isEmpty())
+                    newBounds.height = heightPerChild + excessHeight;
+                else
+                    newBounds.height = heightPerChild;
+            }
+
+            if (getStretchMinorAxis())
+                newBounds.width = clientArea.width;
+            else
+                newBounds.width = Math
+                        .min(prefSizes[i].width, clientArea.width);
+
+            int adjust = clientArea.width - newBounds.width;
+            switch (getMinorAlignment()) {
+                case ALIGN_TOPLEFT:
+                    adjust = 0;
+                    break;
+                case ALIGN_CENTER:
+                    adjust /= 2;
+                    break;
+                case ALIGN_BOTTOMRIGHT:
+                    break;
+            }
+            newBounds.x += adjust;
+            child.setBounds(newBounds);
+            y += newBounds.height + getSpacing();
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/messages.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/messages.properties
new file mode 100644 (file)
index 0000000..e91b510
--- /dev/null
@@ -0,0 +1,78 @@
+###############################################################################
+# Copyright (c) 2002, 2008 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#       1. Internalization of Code in Tizen SDK
+#         - update message (LAYOUT_MENU_LABEL=&Layout -> LAYOUT_MENU_LABEL=&View)
+###############################################################################
+CUSTOMIZE_DIALOG_TITLE=Customize Palette
+COLLAPSE_OPTIONS_TITLE=Drawer options:  
+SETTINGS_LAYOUT_OPTIONS_TITLE=Layout options
+MOVE_UP_LABEL=Move &Up
+MOVE_DOWN_LABEL=Move Do&wn
+DELETE_LABEL=&Delete
+NEW_LABEL=&New
+SETTINGS_COLUMNS_VIEW_LABEL=&Columns
+SETTINGS_LIST_VIEW_LABEL=&List
+SETTINGS_USE_LARGE_ICONS_LABEL=&Use large icons
+SETTINGS_USE_LARGE_ICONS_LABEL_CAPS=&Use Large Icons
+SETTINGS_ICONS_VIEW_LABEL=&Icons only
+COLLAPSE_NEVER_LABEL=&Never close
+COLLAPSE_ALWAYS_LABEL=&Always close when opening another drawer
+COLLAPSE_AS_NEEDED_LABEL=Close automatically &when there is not enough room
+NO_SELECTION_TITLE=Nothing selected
+NAME_LABEL=Na&me:  
+DESCRIPTION_LABEL=Des&cription:  
+HIDDEN_LABEL=&Hide
+NO_DESCRIPTION_AVAILABLE=No description is available.
+NO_SELECTION_MADE=Select a node from the tree on the left.
+MENU_OPEN_CUSTOMIZE_DIALOG=Cus&tomize...
+MODEL_TYPE_DRAWER=Drawer
+MODEL_TYPE_SEPARATOR=Separator
+MODEL_TYPE_STACK=Stack
+NEW_SEPARATOR_DESC=Separates entries in a palette container
+NEW_DRAWER_LABEL=New Drawer
+NEW_SEPARATOR_LABEL=[Separator]
+NEW_STACK_LABEL=New Stack
+APPLY_LABEL=&Apply
+MODEL_TYPE_GROUP=Group
+NEW_GROUP_LABEL=New Group
+LAYOUT_MENU_LABEL=&View
+ERROR=Could Not Accept Changes
+ABORT_PAGE_FLIPPING_MESSAGE=The currently displayed page contains invalid values.
+MENU_OPEN_SETTINGS_DIALOG=&Settings...
+SETTINGS_DIALOG_TITLE=Palette Settings
+SETTINGS_DETAILS_VIEW_LABEL=&Details
+SETTINGS_FONT_TITLE=Font
+SETTINGS_FONT_CHANGE=C&hange...
+SETTINGS_FONT_CURRENT=Font:  
+SETTINGS_LAYOUT_TITLE=Layout:  
+SETTINGS_DRAWER_OPTIONS_TITLE=Drawer Options
+EXPAND_DRAWER_AT_STARTUP_LABEL=&Open drawer at start-up
+SETTINGS_OPTIONS_DETAILS=Details layout options
+SETTINGS_OPTIONS_ICONS_ONLY=Icons only layout options
+SETTINGS_OPTIONS_LIST=List layout options
+SETTINGS_OPTIONS_COLUMNS=Columns layout options
+SETTINGS_LAYOUT_COLUMNS_WIDTH=Colu&mn width (in pixels):  
+SETTINGS_LAYOUT_COLUMNS_OVERRIDE_WIDTH=&Override default column width settings
+DRAWER_PIN_AT_STARTUP=&Pin drawer open at start-up
+SETTINGS_DEFAULT_FONT=&Restore Default
+SETTINGS_WORKBENCH_FONT_LABEL=<Using Workbench Dialog Font>
+NAME_DESCRIPTION_SEPARATOR=-
+SETTINGS_ICONS_VIEW_LABEL_CAPS=&Icons Only
+PINNED=&Pinned
+TOOLTIP_PIN_FIGURE=Pin Open
+TOOLTIP_UNPIN_FIGURE=Unpin
+DOCK_LABEL=&Dock On
+LEFT_LABEL=&Left
+RIGHT_LABEL=&Right
+RESIZE_LABEL=&Resize
+PALETTE_SHOW=Show Palette
+PALETTE_HIDE=Hide Palette
+ACC_DESC_PALETTE_BUTTON=Press to show or hide the palette
+ACC_DESC_PALETTE_TITLE=Use the context menu to move or resize the Palette
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/package.html b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/palette/package.html
new file mode 100644 (file)
index 0000000..ef6f058
--- /dev/null
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+
+<head>
+<!--
+/**
+ * <copyright>
+ *
+ * (C) COPYRIGHT International Business Machines Corporation 2000.
+ *
+ * </copyright>
+ */
+-->
+
+</head>
+
+<body>
+
+</body>
+
+</html>
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/parts/PaletteViewerKeyHandler.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/parts/PaletteViewerKeyHandler.java
new file mode 100644 (file)
index 0000000..b7c0ca7
--- /dev/null
@@ -0,0 +1,335 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.parts;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.DrawerEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.GroupEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.IPaletteStackEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.PaletteStackEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.PinnablePaletteStackEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.TemplateEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.ToolEntryEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteStack;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+
+
+/**
+ * KeyHandler for the {@link org.eclipse.gef.ui.palette.PaletteViewer Palette}. Handles selection
+ * traversal of Palette entries and collapse/expand of categories.
+ */
+public class PaletteViewerKeyHandler extends GraphicalViewerKeyHandler {
+
+    /**
+     * Constructs a key handler for the specified palette viewer.
+     * 
+     * @param viewer
+     *            the palette viewer
+     */
+    public PaletteViewerKeyHandler(PaletteViewer viewer) {
+        super(viewer);
+    }
+
+    private boolean acceptCollapseDrawer(KeyEvent event) {
+        boolean result = isViewerMirrored() ? event.keyCode == SWT.ARROW_RIGHT
+                : event.keyCode == SWT.ARROW_LEFT;
+        return result && isExpandedDrawer(getFocusEditPart());
+    }
+
+    private boolean acceptExpandDrawer(KeyEvent event) {
+        boolean result = isViewerMirrored() ? event.keyCode == SWT.ARROW_LEFT
+                : event.keyCode == SWT.ARROW_RIGHT;
+        return result && isCollapsedDrawer(getFocusEditPart());
+    }
+
+    private boolean acceptIntoExpandedDrawer(KeyEvent event) {
+        boolean result = event.keyCode == SWT.ARROW_DOWN;
+        result = result
+                || (isViewerMirrored() ? event.keyCode == SWT.ARROW_LEFT
+                        : event.keyCode == SWT.ARROW_RIGHT);
+        return result && isExpandedDrawer(getFocusEditPart());
+    }
+
+    private boolean acceptExpandStack(KeyEvent event) {
+        return event.keyCode == SWT.ARROW_DOWN
+                && (event.stateMask & SWT.ALT) > 0
+                && isCollapsedStack(getFocusEditPart());
+    }
+
+    private boolean acceptCollapseStack(KeyEvent event) {
+        return event.keyCode == SWT.ARROW_UP && (event.stateMask & SWT.ALT) > 0
+                && isExpandedStack(getFocusEditPart());
+    }
+
+    private boolean acceptSetFocusOnDrawer(KeyEvent event) {
+        boolean result = isViewerMirrored() ? event.keyCode == SWT.ARROW_RIGHT
+                : event.keyCode == SWT.ARROW_LEFT;
+        return (result || event.keyCode == SWT.ARROW_UP)
+                && (getFocusEditPart().getParent() instanceof DrawerEditPart || (getFocusEditPart()
+                        .getParent() instanceof IPaletteStackEditPart && getFocusEditPart()
+                                .getParent().getParent() instanceof DrawerEditPart));
+    }
+
+    private boolean acceptNextContainer(KeyEvent event) {
+        return event.keyCode == SWT.ARROW_DOWN;
+    }
+
+    private void buildNavigationList(EditPart palettePart, EditPart exclusion,
+                                     ArrayList navList, EditPart stackPart) {
+        if (palettePart != exclusion) {
+            if (isCollapsedDrawer(palettePart)) {
+                navList.add(palettePart);
+                return;
+            } else if (stackPart instanceof PaletteStackEditPart
+                    && stackPart.getChildren().contains(palettePart)) {
+                // we only want to add the top level item to the navlist
+                if (((PaletteStack) stackPart.getModel()).getActiveEntry()
+                        .equals(palettePart.getModel()))
+                    navList.add(palettePart);
+            } else if (stackPart instanceof PinnablePaletteStackEditPart
+                    && stackPart.getChildren().contains(palettePart)) {
+                // we only want to add the top level item to the navlist unless
+                // the palette stack is expanded
+                if (((PinnablePaletteStackEditPart) stackPart).isExpanded()
+                        || ((PaletteStack) stackPart.getModel())
+                                .getActiveEntry()
+                                .equals(palettePart.getModel())) {
+                    navList.add(palettePart);
+                }
+            } else if ((palettePart instanceof ToolEntryEditPart
+                    || palettePart instanceof DrawerEditPart || palettePart instanceof TemplateEditPart)) {
+                navList.add(palettePart);
+            }
+        }
+
+        List children = palettePart.getChildren();
+        for (int k = 0; k < children.size(); k++) {
+            EditPart ep = (EditPart) children.get(k);
+            if (ep instanceof IPaletteStackEditPart)
+                stackPart = ep;
+            buildNavigationList(ep, exclusion, navList, stackPart);
+        }
+    }
+
+    private void collapseDrawer() {
+        DrawerEditPart drawer = (DrawerEditPart) getFocusEditPart();
+        drawer.setExpanded(false);
+    }
+
+    private void expandDrawer() {
+        DrawerEditPart drawer = (DrawerEditPart) getFocusEditPart();
+        drawer.setExpanded(true);
+    }
+
+    /**
+     * Figures' navigation points are used to determine their direction compared to one another, and
+     * the distance between them.
+     * 
+     * @param figure
+     *            the figure whose navigation point is to be returned
+     * @return the top-left of the given figure
+     */
+    protected Point getNavigationPoint(IFigure figure) {
+        return figure.getBounds().getTopLeft();
+    }
+
+    /**
+     * @return a list of {@link org.eclipse.gef.EditPart EditParts} that can be traversed to from
+     *         the current {@link GraphicalViewerKeyHandler#getFocusEditPart() focus part}
+     */
+    protected List getNavigationSiblings() {
+        ArrayList siblingsList = new ArrayList();
+        EditPart focusPart = getFocusEditPart();
+        EditPart parent = focusPart.getParent();
+        if (parent == null) {
+            siblingsList.add(focusPart);
+            return siblingsList;
+        }
+        if (parent instanceof GroupEditPart
+                || parent instanceof IPaletteStackEditPart) {
+            EditPart grandParent = parent.getParent();
+            buildNavigationList(grandParent, grandParent, siblingsList,
+                                grandParent);
+        } else
+            buildNavigationList(parent, parent, siblingsList, parent);
+        return siblingsList;
+    }
+
+    /**
+     * Returns <code>true</code> if the passed Editpart is a collapsed
+     * {@link org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.DrawerEditPart
+     * Drawer}, false otherwise.
+     */
+    boolean isCollapsedDrawer(EditPart part) {
+        return part instanceof DrawerEditPart
+                && !((DrawerEditPart) part).isExpanded();
+    }
+
+    /**
+     * Returns <code>true</code> if the passed Editpart is an expanded
+     * {@link org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.DrawerEditPart
+     * Drawer}, false otherwise.
+     */
+    boolean isExpandedDrawer(EditPart part) {
+        return part instanceof DrawerEditPart
+                && ((DrawerEditPart) part).isExpanded();
+    }
+
+    /**
+     * Returns <code>true</code> if the passed focusPart is a collapsed pinnable palette stack,
+     * false otherwise.
+     */
+    boolean isCollapsedStack(EditPart focusPart) {
+        EditPart parent = focusPart.getParent();
+        return parent instanceof PaletteStackEditPart
+                || (parent instanceof PinnablePaletteStackEditPart && !((PinnablePaletteStackEditPart) parent)
+                        .isExpanded());
+    }
+
+    /**
+     * Returns <code>true</code> if the passed focusPart is an expanded pinnable palette stack,
+     * false otherwise.
+     */
+    boolean isExpandedStack(EditPart focusPart) {
+        EditPart parent = focusPart.getParent();
+        return parent instanceof PaletteStackEditPart
+                || (parent instanceof PinnablePaletteStackEditPart && ((PinnablePaletteStackEditPart) parent)
+                        .isExpanded());
+    }
+
+    /**
+     * Extends keyPressed to look for palette navigation keys.
+     * 
+     * @see org.eclipse.gef.KeyHandler#keyPressed(org.eclipse.swt.events.KeyEvent)
+     */
+    public boolean keyPressed(KeyEvent event) {
+
+        if (acceptExpandDrawer(event)) {
+            expandDrawer();
+            return true;
+        }
+        if (acceptCollapseDrawer(event)) {
+            collapseDrawer();
+            return true;
+        }
+        if (acceptExpandStack(event)) {
+            expandStack();
+            return true;
+        }
+        if (acceptCollapseStack(event)) {
+            collapseStack(event);
+            return true;
+        }
+        if (acceptIntoExpandedDrawer(event)) {
+            if (navigateIntoExpandedDrawer(event))
+                return true;
+        }
+        if (super.keyPressed(event))
+            return true;
+        if (acceptSetFocusOnDrawer(event)) {
+            if (navigateToDrawer(event))
+                return true;
+        }
+        if (acceptNextContainer(event)) {
+            if (navigateToNextContainer(event))
+                return true;
+        }
+        return false;
+    }
+
+    private boolean navigateIntoExpandedDrawer(KeyEvent event) {
+        ArrayList potentials = new ArrayList();
+        EditPart focusPart = getFocusEditPart();
+        buildNavigationList(focusPart, focusPart, potentials, focusPart);
+        if (!potentials.isEmpty()) {
+            navigateTo((EditPart) potentials.get(0), event);
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * @see GraphicalViewerKeyHandler#navigateTo(EditPart, KeyEvent)
+     */
+    protected void navigateTo(EditPart part, KeyEvent event) {
+        if (part == null)
+            return;
+        if (part instanceof IPaletteStackEditPart) {
+            PaletteEntry activeEntry = ((PaletteStack) part.getModel())
+                    .getActiveEntry();
+            part = (EditPart) getViewer().getEditPartRegistry()
+                    .get(activeEntry);
+        }
+        getViewer().select(part);
+        getViewer().reveal(part);
+    }
+
+    private boolean navigateToDrawer(KeyEvent event) {
+        boolean found = false;
+        EditPart parent = getFocusEditPart().getParent();
+        while (parent != null && !found) {
+            if (parent instanceof DrawerEditPart) {
+                navigateTo(parent, event);
+                found = true;
+            }
+            parent = parent.getParent();
+        }
+        return false;
+    }
+
+    private boolean navigateToNextContainer(KeyEvent event) {
+        EditPart current = getFocusEditPart();
+        while (current != null) {
+            if (current instanceof DrawerEditPart
+                    || current instanceof GroupEditPart) {
+                List siblings = current.getParent().getChildren();
+                int index = siblings.indexOf(current);
+                if (index != -1 && siblings.size() > index + 1) {
+                    EditPart part = (EditPart) siblings.get(index + 1);
+                    if (part instanceof GroupEditPart
+                            && part.getChildren().size() > 0) {
+                        EditPart child = (EditPart) part.getChildren().get(0);
+                        navigateTo(child, event);
+                    } else
+                        navigateTo(part, event);
+                    return true;
+                }
+                return false;
+            }
+            current = current.getParent();
+        }
+        return false;
+    }
+
+    private void expandStack() {
+        ((IPaletteStackEditPart) getFocusEditPart().getParent()).openMenu();
+    }
+
+    private void collapseStack(KeyEvent event) {
+        ((PinnablePaletteStackEditPart) getFocusEditPart().getParent())
+                .setExpanded(false);
+        navigateTo(getFocusEditPart().getParent(), event);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/parts/package.html b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/parts/package.html
new file mode 100644 (file)
index 0000000..ef6f058
--- /dev/null
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+
+<head>
+<!--
+/**
+ * <copyright>
+ *
+ * (C) COPYRIGHT International Business Machines Corporation 2000.
+ *
+ * </copyright>
+ */
+-->
+
+</head>
+
+<body>
+
+</body>
+
+</html>
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/views/palette/PalettePage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/views/palette/PalettePage.java
new file mode 100644 (file)
index 0000000..35d2720
--- /dev/null
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.views.palette;
+
+import org.eclipse.ui.part.IPageBookViewPage;
+
+
+/**
+ * An interface representing a page to be used in the PaletteView. PalettePage.class is passed as
+ * the argument to the getAdapter(Object) method of a GEF-based editor (or view) to retrieve the
+ * page to be displayed in the PaletteView.
+ * 
+ * @author Pratik Shah
+ * @since 3.0
+ */
+public interface PalettePage extends IPageBookViewPage {
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/views/palette/PaletteView.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/views/palette/PaletteView.java
new file mode 100644 (file)
index 0000000..dc157ef
--- /dev/null
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.views.palette;
+
+import org.eclipse.gef.internal.GEFMessages;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IPerspectiveListener;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.part.IPage;
+import org.eclipse.ui.part.IPageBookViewPage;
+import org.eclipse.ui.part.MessagePage;
+import org.eclipse.ui.part.PageBook;
+import org.eclipse.ui.part.PageBookView;
+
+
+/**
+ * The GEF palette view
+ * 
+ * @author Pratik Shah
+ * @since 3.0
+ */
+public class PaletteView extends PageBookView {
+
+    private boolean viewInPage = true;
+
+    /**
+     * The ID for this view. This is the same as the String used to register this view with the
+     * platform's extension point.
+     */
+    public static final String ID = "org.eclipse.gef.ui.palette_view"; //$NON-NLS-1$
+    // public static final String ID =
+    // "org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette_view"; //$NON-NLS-1$
+
+    private IPerspectiveListener perspectiveListener = new IPerspectiveListener() {
+        public void perspectiveChanged(IWorkbenchPage page,
+                                       IPerspectiveDescriptor perspective, String changeId) {
+        }
+
+        // fix for bug 109245 and 69098 - fake a partActivated when the
+        // perpsective is switched
+        public void perspectiveActivated(IWorkbenchPage page,
+                                         IPerspectiveDescriptor perspective) {
+            viewInPage = page.findViewReference(ID) != null;
+            // getBootstrapPart could return null; but isImportant() can handle
+            // null
+            partActivated(getBootstrapPart());
+        }
+    };
+
+    /**
+     * Creates a default page saying that a palette is not available.
+     * 
+     * @see org.eclipse.ui.part.PageBookView#createDefaultPage(org.eclipse.ui.part.PageBook)
+     */
+    protected IPage createDefaultPage(PageBook book) {
+        MessagePage page = new MessagePage();
+        initPage(page);
+        page.createControl(book);
+        page.setMessage(GEFMessages.Palette_Not_Available);
+        return page;
+    }
+
+    /**
+     * Add a perspective listener so the palette view can be updated when the perspective is
+     * switched.
+     * 
+     * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createPartControl(Composite parent) {
+        super.createPartControl(parent);
+        getSite().getPage().getWorkbenchWindow()
+                .addPerspectiveListener(perspectiveListener);
+    }
+
+    /**
+     * Remove the perspective listener.
+     * 
+     * @see org.eclipse.ui.IWorkbenchPart#dispose()
+     */
+    public void dispose() {
+        getSite().getPage().getWorkbenchWindow()
+                .removePerspectiveListener(perspectiveListener);
+        super.dispose();
+    }
+
+    /**
+     * @see org.eclipse.ui.part.PageBookView#doCreatePage(org.eclipse.ui.IWorkbenchPart)
+     */
+    protected PageRec doCreatePage(IWorkbenchPart part) {
+        // Try to get a custom palette page
+        Object obj = part.getAdapter(PalettePage.class);
+
+        if (obj != null && obj instanceof IPage) {
+            IPage page = (IPage) obj;
+            page.createControl(getPageBook());
+            initPage((IPageBookViewPage) page);
+            return new PageRec(part, page);
+        }
+        // Use the default page by returning null
+        return null;
+    }
+
+    /**
+     * @see PageBookView#doDestroyPage(org.eclipse.ui.IWorkbenchPart,
+     *      org.eclipse.ui.part.PageBookView.PageRec)
+     */
+    protected void doDestroyPage(IWorkbenchPart part, PageRec rec) {
+        rec.page.dispose();
+    }
+
+    /**
+     * The view shows the palette associated with the active editor.
+     * 
+     * @see PageBookView#getBootstrapPart()
+     */
+    protected IWorkbenchPart getBootstrapPart() {
+        IWorkbenchPage page = getSite().getPage();
+        if (page != null)
+            return page.getActiveEditor();
+        return null;
+    }
+
+    /**
+     * Only editors in the same perspective as the view are important.
+     * 
+     * @see PageBookView#isImportant(org.eclipse.ui.IWorkbenchPart)
+     */
+    protected boolean isImportant(IWorkbenchPart part) {
+        // Workaround for Bug# 69098 -- This should be removed when/if Bug#
+        // 70510 is fixed
+        // We only want a palette page to be created when this view is visible
+        // in the current
+        // perspective, i.e., when both this view and the given editor are on
+        // the same page.
+        return viewInPage && part instanceof IEditorPart;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/views/palette/PaletteViewerPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/internal/gef/ui/views/palette/PaletteViewerPage.java
new file mode 100644 (file)
index 0000000..f29a9bc
--- /dev/null
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  1. Internalization of Code in Tizen SDK
+ *   - update package name
+ *******************************************************************************/
+
+
+package org.tizen.efluibuilder.ui.editor.internal.gef.ui.views.palette;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.part.Page;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerProvider;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.TizenEditDomain;
+
+
+/**
+ * The default page for the PaletteView that works in conjunction with a PaletteViewerProvider.
+ * 
+ * @author Pratik Shah
+ * @since 3.0
+ */
+public class PaletteViewerPage extends Page implements PalettePage, IAdaptable {
+
+    /**
+     * The PaletteViewerProvider that is used to create the PaletteViewer
+     */
+    protected PaletteViewerProvider provider;
+
+    /**
+     * The PaletteViewer created for this page
+     */
+    protected PaletteViewer viewer;
+
+    /**
+     * Constructor
+     * 
+     * @param pvProvider
+     *            the provider used to create the palette viewer
+     */
+    public PaletteViewerPage(PaletteViewerProvider pvProvider) {
+        Assert.isNotNull(pvProvider);
+        provider = pvProvider;
+    }
+
+    /**
+     * Creates the palette viewer and its control.
+     * 
+     * @see Page#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createControl(Composite parent) {
+        viewer = provider.createPaletteViewer(parent);
+    }
+
+    /**
+     * Releases the palette viewer from the edit domain
+     * 
+     * @see Page#dispose()
+     */
+    public void dispose() {
+        TizenEditDomain tizenEditDomain = null;
+        if (!(provider.getEditDomain() instanceof TizenEditDomain)) {
+            return;
+        }
+        tizenEditDomain = (TizenEditDomain) provider.getEditDomain();
+
+        if (tizenEditDomain.getTizenPaletteViewer() == viewer)
+            provider.getEditDomain().setPaletteViewer(null);
+        super.dispose();
+        viewer = null;
+    }
+
+    /**
+     * @see IAdaptable#getAdapter(java.lang.Class)
+     */
+    public Object getAdapter(Class adapter) {
+        if (adapter == EditPart.class && viewer != null)
+            return viewer.getEditPartRegistry().get(viewer.getPaletteRoot());
+        if (adapter == IFigure.class && viewer != null) {
+            Object obj = viewer.getEditPartRegistry().get(
+                                                          viewer.getPaletteRoot());
+            if (obj instanceof GraphicalEditPart)
+                return ((GraphicalEditPart) obj).getFigure();
+        }
+        return null;
+    }
+
+    /**
+     * @return the palette viewer's control
+     * @see Page#getControl()
+     */
+    public Control getControl() {
+        return viewer.getControl();
+    }
+
+    /**
+     * Sets focus on the palette's control
+     * 
+     * @see Page#setFocus()
+     */
+    public void setFocus() {
+        getControl().setFocus();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/ContextMenu.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/ContextMenu.java
new file mode 100644 (file)
index 0000000..70d5ec4
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.palette;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.ui.actions.GEFActionConstants;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.ui.actions.ActionFactory;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.ui.editor.Messages;
+import org.tizen.efluibuilder.ui.editor.action.DeleteSnippetAction;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.CombinedTemplateCreationEntry;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteDrawer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.LayoutAction;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteContextMenuProvider;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+
+
+public final class ContextMenu extends PaletteContextMenuProvider {
+    public static final String PALETTE_ENTRY = "Palette Entry"; //$NON-NLS-1$
+    public static final String PALETTE_ENTRY2 = PALETTE_ENTRY + BuilderConstants.SPACE + BuilderConstants.OPEN_BRACKET;
+
+    public ContextMenu(PaletteViewer palette) {
+        super(palette);
+    }
+
+    private EditPart getSelectedEditPart() {
+        // Design Editor Palette has only single selection
+        EditPart editPart = (EditPart) getPaletteViewer().getSelectedEditParts().get(0);
+        return editPart;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.ui.palette.PaletteContextMenuProvider#buildContextMenu
+     * (org.eclipse.jface.action.IMenuManager)
+     */
+    @Override
+    public void buildContextMenu(IMenuManager menu) {
+        GEFActionConstants.addStandardActionGroups(menu);
+        EditPart editPart = getSelectedEditPart();
+        Object model = editPart.getModel();
+        Assert.notNull(model);
+
+        PaletteViewer paletteViewer = getPaletteViewer();
+        // Layout
+        menu.appendToGroup(GEFActionConstants.GROUP_VIEW, new LayoutAction(paletteViewer.getPaletteViewerPreferences()));
+
+        /*
+         * if (model instanceof PaletteDrawer) { // group menu // Pined // IPinnableEditPart
+         * pinnablePart = editPart.getAdapter(IPinnableEditPart.class); //
+         * Assert.notNull(pinnablePart); // Assert.isTrue(pinnablePart.canBePinned());
+         * 
+         * // menu.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new //
+         * PinDrawerAction(pinnablePart)); // disabled PinDraweraction
+         * 
+         * // ImportSnippetAction importAction = new ImportSnippetAction(appManager); //
+         * ExportSnippetAction exportAction = new ExportSnippetAction(); //
+         * menu.appendToGroup(GEFActionConstants.GROUP_REST, importAction); //
+         * menu.appendToGroup(GEFActionConstants.GROUP_REST, exportAction); } else
+         */
+        if (model instanceof CombinedTemplateCreationEntry) { // entry menu
+            EditPart parentEditPart = editPart.getParent();
+            Object parentModel = parentEditPart.getModel();
+            Assert.isTrue(parentModel instanceof PaletteDrawer);
+            PaletteDrawer paletteDrawer = (PaletteDrawer) parentModel;
+            if (paletteDrawer.getDescription().equals(Messages.PALETTE_GROUP_SNIPPET)) {
+                DeleteSnippetAction deleteAction = new DeleteSnippetAction(paletteViewer);
+                deleteAction.setId(ActionFactory.DELETE.getId());
+                deleteAction.setText(Messages.ACTION_DELETE_SNIPPET);
+                deleteAction.update();
+                menu.appendToGroup(GEFActionConstants.GROUP_REST, deleteAction);
+            }
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/DesignEditorPaletteViewer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/DesignEditorPaletteViewer.java
new file mode 100644 (file)
index 0000000..3a3b921
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.palette;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+
+
+public final class DesignEditorPaletteViewer extends PaletteViewer {
+
+    private KeyAdapter keyAdaptor = null;
+
+    public DesignEditorPaletteViewer() {
+        super();
+    }
+
+    @Override
+    public void setControl(Control control) {
+        removeKeyEventListener();
+        super.setControl(control);
+        if (control != null) {
+            addKeyEventListener();
+        }
+    }
+
+    @Override
+    protected void createDefaultRoot() {
+        setRootEditPart(new PaletteRootEditPart());
+    }
+
+    private void addKeyEventListener() {
+        if (getControl() != null) {
+            this.keyAdaptor = new KeyAdapter() {
+                @Override
+                public void keyPressed(KeyEvent e) {
+                    if (e.keyCode == SWT.ESC) {
+                        setActiveTool(getPaletteRoot().getDefaultEntry());
+                    }
+                }
+            };
+            getControl().addKeyListener(keyAdaptor);
+        }
+    }
+
+    private void removeKeyEventListener() {
+        if (this.keyAdaptor != null && this.getControl() != null) {
+            this.getControl().removeKeyListener(keyAdaptor);
+            this.keyAdaptor = null;
+        }
+    }
+
+    @Override
+    protected void handleDispose(DisposeEvent event) {
+        super.handleDispose(event);
+        removeKeyEventListener();
+    }
+
+    public void setEnabled(boolean enabled) {
+        ((PaletteRootEditPart) getRootEditPart()).setEnabled(enabled);
+        getControl().setEnabled(enabled);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/DesignEditorPaletteViewerProvider.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/DesignEditorPaletteViewerProvider.java
new file mode 100644 (file)
index 0000000..cc7f848
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.palette;
+
+import org.eclipse.gef.EditDomain;
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewerProvider;
+
+
+public final class DesignEditorPaletteViewerProvider extends PaletteViewerProvider {
+
+    public DesignEditorPaletteViewerProvider(EditDomain domain) {
+        super(domain);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.eclipse.gef.ui.palette.PaletteViewerProvider#createPaletteViewer(org.eclipse.swt.widgets
+     * .Composite)
+     */
+    public PaletteViewer createPaletteViewer(Composite parent) {
+        PaletteViewer pViewer = new DesignEditorPaletteViewer(); // advux start
+        pViewer.createControl(parent);
+        configurePaletteViewer(pViewer);
+        hookPaletteViewer(pViewer);
+        return pViewer;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.eclipse.gef.ui.palette.PaletteViewerProvider#configurePaletteViewer(org.eclipse.gef.ui
+     * .palette.PaletteViewer)
+     */
+    @Override
+    protected void configurePaletteViewer(PaletteViewer viewer) {
+        viewer.setContextMenu(new ContextMenu(viewer));
+        viewer.setKeyHandler(new KeyHandler(viewer));
+        viewer.addDragSourceListener(new PaletteTemplateTransferDragSourceListener(viewer));
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/KeyHandler.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/KeyHandler.java
new file mode 100644 (file)
index 0000000..9bd99b6
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.palette;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.tizen.efluibuilder.ui.editor.action.AbstractPaletteAction;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.palette.PaletteViewer;
+import org.tizen.efluibuilder.ui.editor.internal.gef.ui.parts.PaletteViewerKeyHandler;
+
+
+public final class KeyHandler extends PaletteViewerKeyHandler {
+    public KeyHandler(PaletteViewer viewer) {
+        super(viewer);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * 
+     * org.eclipse.gef.ui.parts.PaletteViewerKeyHandler#keyPressed(org.eclipse.swt.events.KeyEvent)
+     */
+    public boolean keyReleased(KeyEvent event) {
+        if (acceptDelete(event)) {
+            delete();
+            return true;
+        }
+
+        return super.keyReleased(event);
+    }
+
+    protected void perform(AbstractPaletteAction action) {
+        action.update();
+        if (!action.isEnabled()) {
+            return;
+        }
+        action.run();
+        return;
+    }
+
+    private void delete() {
+        // GraphicalViewer viewer = getViewer();
+        // Assert.isTrue(viewer instanceof PaletteViewer);
+        // PaletteViewer paletteViewer = (PaletteViewer) viewer;
+        // DeleteSnippetAction action = new DeleteSnippetAction(paletteViewer);
+        // perform(action);
+    }
+
+    private boolean acceptDelete(KeyEvent event) {
+        return (event.character == SWT.DEL);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/PaletteConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/PaletteConstants.java
new file mode 100644 (file)
index 0000000..e29ffe7
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.palette;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.tizen.efluibuilder.BuilderPlugin;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+/**
+ * A OutlinePage constants
+ */
+public final class PaletteConstants {
+    // dependency on
+    // "org.tizen.efluibuilder.descriptor/res/$profile-$version/tizen.uicomponent.categories.xml"
+    public static final String CATEGORY_NAME_UI_VIEWS = "Views"; //$NON-NLS-1$
+    public static final String CATEGORY_NAME_UI_CONTAINERS = "UI containers"; //$NON-NLS-1$
+    public static final String CATEGORY_NAME_UI_COMPONENTS = "UI components"; //$NON-NLS-1$
+    public static final String CATEGORY_NAME_UI_SNIPPETS = "Snippets"; //$NON-NLS-1$
+
+    public enum CATEGORY_ICON {
+        UI_VIEW(ImageResources.PALETTE_CATEGORY_ICON_UI_VIEW, ImageResources.PALETTE_CATEGORY_ICON_UI_VIEW_SELECTED,
+                CATEGORY_NAME_UI_VIEWS),
+        UI_CONTAINER(ImageResources.PALETTE_CATEGORY_ICON_UI_CONTAINER, ImageResources.PALETTE_CATEGORY_ICON_UI_CONTAINER_SELECTED,
+                CATEGORY_NAME_UI_CONTAINERS),
+        UI_COMPONENT(ImageResources.PALETTE_CATEGORY_ICON_UI_COMPONENT,
+                        ImageResources.PALETTE_CATEGORY_ICON_UI_COMPONENT_SELECTED,
+                        CATEGORY_NAME_UI_COMPONENTS),
+        UI_SNIPPET(ImageResources.PALETTE_CATEGORY_ICON_UI_SNIPPET,
+                                ImageResources.PALETTE_CATEGORY_ICON_UI_SNIPPET_SELECTED, CATEGORY_NAME_UI_SNIPPETS);
+
+        private final ImageDescriptor cache;
+        private final String category;
+
+        CATEGORY_ICON(String path, String selectedImagePath, String category) {
+            this.cache = AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID, path);
+            AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID, selectedImagePath);
+            this.category = category;
+        }
+
+        public ImageDescriptor getImageDescriptor(boolean isSelected) {
+            return this.cache;
+        }
+
+        public String getCategoryName() {
+            return this.category;
+        }
+
+        public static CATEGORY_ICON get(String category) {
+            for (CATEGORY_ICON ui : CATEGORY_ICON.values()) {
+                if (ui.getCategoryName().equals(category)) {
+                    return ui;
+                }
+            }
+
+            return null;
+        }
+        /*
+         * caller: CATEGORY_ICON_UI.UI_COMPONENT.getImageDescriptor()
+         */
+
+    }
+
+    public static final ImageDescriptor imgDescTitle = AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID, ImageResources.PALETTE_TITLE_ICON);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/PaletteRootEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/PaletteRootEditPart.java
new file mode 100644 (file)
index 0000000..3812c3a
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.editor.palette;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.gef.editparts.SimpleRootEditPart;
+
+
+public class PaletteRootEditPart extends SimpleRootEditPart {
+    private boolean enabled = true;
+
+    @Override
+    public IFigure createFigure() {
+        IFigure figure = new Figure() {
+            @Override
+            public void paintBorder(Graphics graphics) {
+                if (!enabled) {
+                    graphics.setAlpha(90);
+                    graphics.setBackgroundColor(ColorConstants.white);
+                    graphics.fillRectangle(this.getClientArea());
+                }
+            }
+        };
+        figure.setLayoutManager(new StackLayout());
+        return figure;
+    }
+
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+        getFigure().repaint();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/PaletteTemplateTransferDragSourceListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/PaletteTemplateTransferDragSourceListener.java
new file mode 100644 (file)
index 0000000..54e7481
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.palette;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.dnd.AbstractTransferDragSourceListener;
+import org.eclipse.gef.dnd.TemplateTransfer;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.tizen.efluibuilder.ui.editor.internal.gef.dnd.TemplateTransferDragSourceListener;
+import org.tizen.efluibuilder.ui.editor.internal.gef.internal.ui.palette.editparts.ToolEntryEditPart;
+import org.tizen.efluibuilder.ui.editor.internal.gef.palette.PaletteTemplateEntry;
+
+
+public class PaletteTemplateTransferDragSourceListener extends
+        TemplateTransferDragSourceListener {
+
+    /**
+     * Constructs a new listener for the specified EditPartViewer. The provided Viewer should be one
+     * that is displaying a Palette. The TemplateTransferDragSourceListener will only be enabled
+     * when a single EditPart is selected, and the EditPart's model is a
+     * {@link PaletteTemplateEntry}.
+     * 
+     * @param viewer
+     *            the EditPartViewer that is the drag source
+     */
+    public PaletteTemplateTransferDragSourceListener(EditPartViewer viewer) {
+        super(viewer, TemplateTransfer.getInstance());
+    }
+
+    /**
+     * Cancels the drag if the selected item does not represent a PaletteTemplateEntry.
+     * 
+     * @see org.eclipse.swt.dnd.DragSourceListener#dragStart(DragSourceEvent)
+     */
+    public void dragStart(DragSourceEvent event) {
+        Object template = getTemplate();
+        if (template == null) {
+            event.doit = false;
+        } else {
+            EditPart editpart = (EditPart) getViewer().getSelectedEditParts().get(0);
+            if (editpart instanceof ToolEntryEditPart) {
+                ToolEntryEditPart toolEntryEditpart = (ToolEntryEditPart) editpart;
+                toolEntryEditpart.setSelected(EditPart.SELECTED_PRIMARY);
+                event.image = toolEntryEditpart.getCachedImage();
+            }
+        }
+        TemplateTransfer.getInstance().setTemplate(template);
+    }
+
+    /**
+     * @see AbstractTransferDragSourceListener#dragFinished(DragSourceEvent)
+     */
+    @Override
+    public void dragFinished(DragSourceEvent event) {
+        EditPart editpart = (EditPart) getViewer().getSelectedEditParts().get(0);
+        if (editpart instanceof ToolEntryEditPart) {
+            ToolEntryEditPart toolEntryEditpart = (ToolEntryEditPart) editpart;
+            toolEntryEditpart.setSelected(EditPart.SELECTED_NONE);
+            toolEntryEditpart.setFocus(false);
+        }
+        event.image = null;
+        super.dragFinished(event);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/internal/ArrowButton.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/palette/internal/ArrowButton.java
new file mode 100644 (file)
index 0000000..286844c
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.palette.internal;
+
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.ImageFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.graphics.Image;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class ArrowButton extends Figure {
+
+    public static final int TRIANGLE_SIZE = 11;
+    private static final Dimension ARROW_SIZE = new Dimension(TRIANGLE_SIZE, TRIANGLE_SIZE);
+
+    public static final int DIRECTION_EXPANDED = PositionConstants.SOUTH;
+    public static final int DIRECTION_COLLAPSED = PositionConstants.EAST;
+
+    public static final int DIRECTION_DOWN = DIRECTION_EXPANDED; // for scrollbar
+    public static final int DIRECTION_UP = DIRECTION_COLLAPSED; // for scrollbar
+
+    private Image imgExpanded = null;
+    private Image imgcollapsed = null;
+
+    private ImageFigure triangle;
+
+    /**
+     * Creates a new instance
+     * 
+     * @param direction
+     *            the direction the arrow should face (PositionConstants.RIGHT or
+     *            PositionConstants.LEFT)
+     */
+    public ArrowButton(int direction) {
+        super();
+
+        imgExpanded = ImageResources.getImage(ImageResources.PALETTE_ICON_FILE_ARROW_DOWN);
+        imgcollapsed = ImageResources.getImage(ImageResources.PALETTE_ICON_FILE_ARROW_UP);
+
+        triangle = new ImageFigure();
+        setDirection(direction);
+
+        setLayoutManager(new StackLayout());
+        add(triangle);
+    }
+
+    public void dispose() {
+        if (triangle != null) {
+            this.remove(triangle);
+            triangle = null;
+        }
+    }
+
+    public void setDirection(int direction) {
+        if (triangle != null) {
+            if (direction == DIRECTION_EXPANDED) {
+                triangle.setImage(imgExpanded);
+            } else {
+                triangle.setImage(imgcollapsed);
+            }
+        }
+    }
+
+    protected void layout() {
+        Rectangle clientArea = getBounds();
+
+        triangle.setBounds(new Rectangle(clientArea.getCenter().getTranslated(-ARROW_SIZE.width / 2, -ARROW_SIZE.height / 2), ARROW_SIZE));
+    }
+
+    public void setLayout() {
+        this.layout();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignEditorRulerEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignEditorRulerEditPart.java
new file mode 100644 (file)
index 0000000..9753a47
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.ruler;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.internal.ui.rulers.RulerEditPart;
+
+
+public class DesignEditorRulerEditPart extends RulerEditPart {
+
+    public DesignEditorRulerEditPart(Object model) {
+        super(model);
+    }
+
+    @Override
+    protected IFigure createFigure() {
+        DesignEditorRulerFigure ruler = new DesignEditorRulerFigure(isHorizontal(), getRulerProvider().getUnit());
+        if (ruler.getUnit() == 2)
+            ruler.setInterval(100, 2);
+        return ruler;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignEditorRulerEditPartFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignEditorRulerEditPartFactory.java
new file mode 100644 (file)
index 0000000..e080844
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.ruler;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.internal.ui.rulers.RulerEditPartFactory;
+
+
+public class DesignEditorRulerEditPartFactory extends RulerEditPartFactory {
+
+    public DesignEditorRulerEditPartFactory(GraphicalViewer primaryViewer) {
+        super(primaryViewer);
+    }
+
+    @Override
+    protected EditPart createRulerEditPart(EditPart parentEditPart, Object model) {
+        return new DesignEditorRulerEditPart(model);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignEditorRulerFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignEditorRulerFigure.java
new file mode 100644 (file)
index 0000000..c4b9072
--- /dev/null
@@ -0,0 +1,284 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.ruler;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.FigureUtilities;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.ImageUtilities;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.internal.ui.rulers.RulerFigure;
+import org.eclipse.gef.rulers.RulerProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.RGB;
+import org.tizen.common.util.cache.ColorCache;
+
+
+public class DesignEditorRulerFigure extends RulerFigure {
+
+    public static final RGB COLOR_RULER = new RGB(0xc0, 0xc0, 0xc0);
+
+    // for paintFigure()
+    private static final int BORDER_WIDTH = 3;
+    private int interval, divisions;
+
+    public DesignEditorRulerFigure(boolean isHorizontal, int measurementUnit) {
+        super(isHorizontal, measurementUnit);
+
+        setForegroundColor(ColorCache.getColorFromRGB(COLOR_RULER));
+    }
+
+    /*
+     * This method have some contributions in the original code
+     */
+    @Override
+    protected void paintFigure(Graphics graphics) {
+        /*
+         * @TODO:Pratik maybe you can break this method into a few methods. that might
+         * make it a little easier to read and understand. plus, sub-classes could customize
+         * certain parts.
+         */
+        double dotsPerUnit = getDPU();
+        Rectangle clip = transposer.t(graphics.getClip(Rectangle.SINGLETON));
+        Rectangle figClientArea = transposer.t(getClientArea());
+        // Use the x and width of the client area, but the y and height of the clip as the
+        // bounds of the area which is to be repainted. This will increase performance as the
+        // entire ruler will not be repainted everytime.
+        Rectangle clippedBounds = clip;
+        clippedBounds.x = figClientArea.x;
+        clippedBounds.width = figClientArea.width - BORDER_WIDTH;
+
+        // Paint the background
+        if (isOpaque()) {
+            graphics.fillRectangle(transposer.t(clippedBounds));
+        }
+
+        /*
+         * A major mark is one that goes all the way from the left edge to the right edge of
+         * a ruler and for which a number is displayed. Determine the minimum number of
+         * pixels that are to be left between major marks. This will, in turn, help
+         * determine how many units are to be displayed per major mark. A major mark should
+         * have at least enough pixels to display the text and its padding. We take into the
+         * consideration the max of text's width and height so that for horizontal and
+         * vertical rulers that are of the same height, the number of units per major mark is
+         * the same.
+         */
+        int unitsPerMajorMark = (int) (minPixelsBetweenMajorMarks / dotsPerUnit);
+        if (minPixelsBetweenMajorMarks % dotsPerUnit != 0.0) {
+            unitsPerMajorMark++;
+        }
+        if (interval > 0) {
+            /*
+             * If the client specified how many units are to be displayed per major mark, use
+             * that. If, however, showing that many units wouldn't leave enough room for the
+             * text, than take its smallest multiple that would leave enough room.
+             */
+            int intervalMultiple = interval;
+            while (intervalMultiple < unitsPerMajorMark) {
+                intervalMultiple += interval;
+            }
+            unitsPerMajorMark = intervalMultiple;
+        } else if (unitsPerMajorMark != 1 && unitsPerMajorMark % 2 != 0) {
+            // if the number of units per major mark is calculated dynamically, ensure that
+            // it is an even number.
+            unitsPerMajorMark++;
+        }
+
+        /*
+         * divsPerMajorMark indicates the number of divisions that a major mark should be
+         * divided into. for eg., a value of 2 would mean that a major mark would be shown
+         * as having two parts. that means that there would be a marker showing the beginning
+         * and end of the major marker and another right in the middle.
+         */
+        int divsPerMajorMark;
+        if (divisions > 0
+                && dotsPerUnit * unitsPerMajorMark / divisions >= minPixelsBetweenMarks) {
+            /*
+             * If the client has specified the number of divisions per major mark, use that
+             * unless it would cause the minimum space between marks to be less than
+             * minPixelsBetweenMarks
+             */
+            divsPerMajorMark = divisions;
+        } else {
+            /*
+             * If the client hasn't specified the number of divisions per major mark or the
+             * one that the client has specified is invalid, then calculate it dynamically.
+             * This algorithm will try to display 10 divisions per CM, and 16 per INCH.
+             * However, if that puts the marks too close together (i.e., the space between
+             * them is less than minPixelsBetweenMarks), then it keeps decreasing the number
+             * of divisions by a factor of 2 until there is enough space between them.
+             */
+            divsPerMajorMark = 2;
+            if (getUnit() == RulerProvider.UNIT_CENTIMETERS) {
+                divsPerMajorMark = 10;
+            } else if (getUnit() == RulerProvider.UNIT_INCHES) {
+                divsPerMajorMark = 8;
+            }
+            while (dotsPerUnit * unitsPerMajorMark / divsPerMajorMark < minPixelsBetweenMarks) {
+                divsPerMajorMark /= 2;
+                if (divsPerMajorMark == 0) {
+                    break;
+                }
+            }
+            // This should never happen unless the client has specified a
+            // minPixelsBetweenMarks that is larger than minPixelsBetweenMajorMarks (which
+            // is calculated using the text's size -- size of the largest number to be
+            // displayed).
+            if (divsPerMajorMark == 0) {
+                divsPerMajorMark = 1;
+            }
+        }
+
+        /*
+         * mediumMarkerDivNum is used to determine which mark (line drawn to indicate a
+         * point on the ruler) in a major mark will be of medium size. If its value is 1 then
+         * every mark will be of medium size. If its value is 5, then every 5th mark will
+         * be of medium size (the rest being of small size).
+         */
+        int mediumMarkerDivNum = 1;
+        switch (divsPerMajorMark) {
+            case 20:
+            case 10:
+            case 5:
+                mediumMarkerDivNum = 5;
+                break;
+            case 16:
+            case 8:
+                mediumMarkerDivNum = 4;
+                break;
+            case 4:
+                mediumMarkerDivNum = 2;
+                break;
+            case 2:
+                mediumMarkerDivNum = 1;
+        }
+
+        /*
+         * dotsPerDivision = number of pixels between each mark = number of pixels in a
+         * division
+         */
+        double dotsPerDivision = dotsPerUnit * unitsPerMajorMark / divsPerMajorMark;
+        /*
+         * startMark is the division/mark from which we are going to start painting. It
+         * should be the last major mark (one for which a number is displayed) that is before
+         * the top of the clip rectangle.
+         */
+        int startMark = (int) (clippedBounds.y / (dotsPerUnit * unitsPerMajorMark))
+                * divsPerMajorMark;
+        if (clippedBounds.y < 0) {
+            // -2 / 10 = 0, not -1. so, if the top of the clip is negative, we need to move
+            // the startMark back by a whole major mark.
+            startMark -= divsPerMajorMark;
+        }
+        // endMark is the first non-visible mark (doesn't have to be a major mark) that is
+        // beyond the end of the clip region
+        int endMark = (int) (((clippedBounds.y + clippedBounds.height) / dotsPerDivision)) + 1;
+        int leading = FigureUtilities.getFontMetrics(getFont()).getLeading();
+        Rectangle forbiddenZone = new Rectangle();
+        for (int div = startMark; div <= endMark; div++) {
+            // y is the vertical position of the mark
+            int y = (int) (div * dotsPerDivision);
+            if (div % divsPerMajorMark == 0) {
+                String num = "" + (div / divsPerMajorMark) * unitsPerMajorMark; //$NON-NLS-1$
+                if (isHorizontal()) {
+                    Dimension numSize = FigureUtilities.getStringExtents(num, getFont());
+                    /*
+                     * If the width is even, we want to increase it by 1. This will ensure
+                     * that when marks are erased because they are too close to the
+                     * number, they are erased from both sides of that number.
+                     */
+                    if (numSize.width % 2 == 0)
+                        numSize.width++;
+                    Point textLocation = new Point(y - (numSize.width / 2),
+                                                   clippedBounds.x + textMargin - leading);
+                    forbiddenZone.setLocation(textLocation);
+                    forbiddenZone.setSize(numSize);
+                    forbiddenZone.expand(1, 1);
+                    graphics.fillRectangle(forbiddenZone);
+                    // Uncomment the following line of code if you want to see a line at
+                    // the exact position of the major mark
+
+                    // Tizen: Contribute an exact position in text
+                    graphics.drawLine(y, clippedBounds.x, y, clippedBounds.x + 2);
+                    graphics.drawLine(y, clippedBounds.x + clippedBounds.width - 2, y, clippedBounds.x + clippedBounds.width);
+
+                    graphics.drawText(num, textLocation);
+                } else {
+                    Image numImage = ImageUtilities.createRotatedImageOfString(num, getFont(),
+                                                                               getForegroundColor(), getBackgroundColor());
+                    Point textLocation = new Point(clippedBounds.x + textMargin,
+                                                   y - (numImage.getBounds().height / 2));
+                    forbiddenZone.setLocation(textLocation);
+                    forbiddenZone.setSize(numImage.getBounds().width,
+                                          numImage.getBounds().height);
+                    forbiddenZone.expand(1, 1 + (numImage.getBounds().height % 2 == 0 ? 1 : 0));
+                    graphics.fillRectangle(forbiddenZone);
+                    graphics.drawImage(numImage, textLocation);
+
+                    // Tizen: Contribute an exact position in text
+                    graphics.drawLine(clippedBounds.x, y, clippedBounds.x + 2, y);
+                    graphics.drawLine(clippedBounds.x + clippedBounds.width - 2, y, clippedBounds.x + clippedBounds.width, y);
+
+                    numImage.dispose();
+                }
+            } else if ((div % divsPerMajorMark) % mediumMarkerDivNum == 0) {
+                // this is a medium mark, so its length should be longer than the small marks
+                Point start = transposer.t(
+                                           new Point((clippedBounds.getRight().x - mediumMarkWidth) / 2, y));
+                Point end = transposer.t(new Point(((clippedBounds.getRight().x
+                        - mediumMarkWidth) / 2) + mediumMarkWidth, y));
+                if (!forbiddenZone.contains(start)) {
+                    graphics.drawLine(start, end);
+                }
+            } else {
+                // small mark
+                Point start = transposer.t(
+                                           new Point((clippedBounds.getRight().x - smallMarkWidth) / 2, y));
+                Point end = transposer.t(new Point(((clippedBounds.getRight().x
+                        - smallMarkWidth) / 2) + smallMarkWidth, y));
+                if (!forbiddenZone.contains(start)) {
+                    graphics.drawLine(start, end);
+                }
+            }
+        }
+        // paint the border
+        clippedBounds.expand(BORDER_WIDTH, 0);
+        graphics.setForegroundColor(ColorConstants.buttonDarker);
+        graphics.drawLine(transposer.t(clippedBounds.getTopRight().translate(-1, -1)),
+                          transposer.t(clippedBounds.getBottomRight().translate(-1, -1)));
+    }
+
+    /*
+     * for paintFigure()
+     */
+    @Override
+    public void setInterval(int unitsPerMajorMark, int divisionsPerMajorMark) {
+        interval = unitsPerMajorMark;
+        divisions = divisionsPerMajorMark;
+        repaint();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignerGuide.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignerGuide.java
new file mode 100644 (file)
index 0000000..bcefad1
--- /dev/null
@@ -0,0 +1,216 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.ruler;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.io.Serializable;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+public class DesignerGuide implements Serializable {
+
+    /**
+     * Property used to notify listeners when the parts attached to a guide are changed
+     */
+    public static final String PROPERTY_CHILDREN = "subparts changed";
+    /**
+     * Property used to notify listeners when the guide is re-positioned
+     */
+    public static final String PROPERTY_POSITION = "position changed";
+
+    static final long serialVersionUID = 1;
+
+    protected PropertyChangeSupport listeners = new PropertyChangeSupport(this);
+    private Map map;
+    private int position;
+    private boolean horizontal;
+
+    /**
+     * Empty default constructor
+     */
+    public DesignerGuide() {
+        // empty constructor
+    }
+
+    /**
+     * Constructor
+     * 
+     * @param isHorizontal
+     *            <code>true</code> if the guide is horizontal (i.e., placed on a vertical ruler)
+     */
+    public DesignerGuide(boolean isHorizontal) {
+        setHorizontal(isHorizontal);
+    }
+
+    /**
+     * @see PropertyChangeSupport#addPropertyChangeListener(java.beans.PropertyChangeListener)
+     */
+    public void addPropertyChangeListener(PropertyChangeListener listener) {
+        listeners.addPropertyChangeListener(listener);
+    }
+
+    /*
+     * @TODO:Pratik use PositionConstants here
+     */
+    /**
+     * Attaches the given part along the given edge to this guide. The LogicSubpart is also updated
+     * to reflect this attachment.
+     * 
+     * @param part
+     *            The part that is to be attached to this guide; if the part is already attached,
+     *            its alignment is updated
+     * @param alignment
+     *            -1 is left or top; 0, center; 1, right or bottom
+     */
+    public void attachElement(Part element, int alignment) {
+        if (getMap().containsKey(element) && getAlignment(element) == alignment)
+            return;
+
+        // getMap().put(element, alignment);
+        // DesignerGuide parent = isHorizontal() ? element.getHorizontalGuide()
+        // : element
+        // .getVerticalGuide();
+        // if (parent != null && parent != this) {
+        // parent.detachElement(element);
+        // }
+        // if (isHorizontal()) {
+        // element.setHorizontalGuide(this);
+        // } else {
+        // element.setVerticalGuide(this);
+        // }
+        listeners.firePropertyChange(PROPERTY_CHILDREN, null, element);
+    }
+
+    /**
+     * Detaches the given part from this guide. The LogicSubpart is also updated to reflect this
+     * change.
+     * 
+     * @param part
+     *            the part that is to be detached from this guide
+     */
+    public void detachElement(Part element) {
+        if (getMap().containsKey(element)) {
+            // getMap().remove(element);
+            // if (isHorizontal()) {
+            // element.setHorizontalGuide(null);
+            // } else {
+            // element.setVerticalGuide(null);
+            // }
+            listeners.firePropertyChange(PROPERTY_CHILDREN, null, element);
+        }
+    }
+
+    /**
+     * This methods returns the edge along which the given part is attached to this guide. This
+     * information is used by
+     * {@link org.eclipse.gef.examples.logicdesigner.edit.LogicXYLayoutEditPolicy
+     * LogicXYLayoutEditPolicy} to determine whether to attach or detach a part from a guide during
+     * resize operations.
+     * 
+     * @param part
+     *            The part whose alignment has to be found
+     * @return an int representing the edge along which the given part is attached to this guide; 1
+     *         is bottom or right; 0, center; -1, top or left; -2 if the part is not attached to
+     *         this guide
+     * @see org.eclipse.gef.examples.logicdesigner.edit.LogicXYLayoutEditPolicy#createChangeConstraintCommand(ChangeBoundsRequest,
+     *      EditPart, Object)
+     */
+    public int getAlignment(Part element) {
+        if (getMap().get(element) != null)
+            return ((Integer) getMap().get(element)).intValue();
+        return -2;
+    }
+
+    /**
+     * @return The Map containing all the parts attached to this guide, and their alignments; the
+     *         keys are LogicSubparts and values are Integers
+     */
+    public Map getMap() {
+        if (map == null) {
+            map = new Hashtable();
+        }
+        return map;
+    }
+
+    /**
+     * @return the set of all the parts attached to this guide; a set is used because a part can
+     *         only be attached to a guide along one edge.
+     */
+    public Set getParts() {
+        return getMap().keySet();
+    }
+
+    /**
+     * @return the position/location of the guide (in pixels)
+     */
+    public int getPosition() {
+        return position;
+    }
+
+    /**
+     * @return <code>true</code> if the guide is horizontal (i.e., placed on a vertical ruler)
+     */
+    public boolean isHorizontal() {
+        return horizontal;
+    }
+
+    /**
+     * @see PropertyChangeSupport#removePropertyChangeListener(java.beans.PropertyChangeListener)
+     */
+    public void removePropertyChangeListener(PropertyChangeListener listener) {
+        listeners.removePropertyChangeListener(listener);
+    }
+
+    /**
+     * Sets the orientation of the guide
+     * 
+     * @param isHorizontal
+     *            <code>true</code> if this guide is to be placed on a vertical ruler
+     */
+    public void setHorizontal(boolean isHorizontal) {
+        horizontal = isHorizontal;
+    }
+
+    /**
+     * Sets the location of the guide
+     * 
+     * @param offset
+     *            The location of the guide (in pixels)
+     */
+    public void setPosition(int offset) {
+        if (position != offset) {
+            int oldValue = position;
+            position = offset;
+            listeners.firePropertyChange(PROPERTY_POSITION, Integer.valueOf(oldValue), Integer.valueOf(position));
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignerRuler.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignerRuler.java
new file mode 100644 (file)
index 0000000..edce8c2
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.ruler;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.rulers.RulerProvider;
+
+
+public class DesignerRuler implements Serializable {
+
+    public static final String PROPERTY_CHILDREN = "children changed";
+    public static final String PROPERTY_UNIT = "units changed";
+
+    static final long serialVersionUID = 1;
+
+    protected PropertyChangeSupport listeners = new PropertyChangeSupport(this);
+    private int unit;
+    private boolean horizontal;
+    private List<DesignerGuide> guides = new ArrayList<DesignerGuide>();
+
+    public DesignerRuler(boolean isHorizontal) {
+        this(isHorizontal, RulerProvider.UNIT_PIXELS);
+    }
+
+    public DesignerRuler(boolean isHorizontal, int unit) {
+        horizontal = isHorizontal;
+        setUnit(unit);
+    }
+
+    public void addGuide(DesignerGuide guide) {
+        if (!guides.contains(guide)) {
+            guide.setHorizontal(!isHorizontal());
+            guides.add(guide);
+            listeners.firePropertyChange(PROPERTY_CHILDREN, null, guide);
+        }
+    }
+
+    public void addPropertyChangeListener(PropertyChangeListener listener) {
+        listeners.addPropertyChangeListener(listener);
+    }
+
+    // the returned list should not be modified
+    public List<DesignerGuide> getGuides() {
+        return guides;
+    }
+
+    public int getUnit() {
+        return unit;
+    }
+
+    public boolean isHidden() {
+        return false;
+    }
+
+    public boolean isHorizontal() {
+        return horizontal;
+    }
+
+    public void removeGuide(DesignerGuide guide) {
+        if (guides.remove(guide)) {
+            listeners.firePropertyChange(PROPERTY_CHILDREN, null, guide);
+        }
+    }
+
+    public void removePropertyChangeListener(PropertyChangeListener listener) {
+        listeners.removePropertyChangeListener(listener);
+    }
+
+    public void setHidden(boolean isHidden) {
+    }
+
+    public void setUnit(int newUnit) {
+        if (unit != newUnit) {
+            int oldUnit = unit;
+            unit = newUnit;
+            listeners.firePropertyChange(PROPERTY_UNIT, oldUnit, newUnit);
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignerRulerProvider.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/DesignerRulerProvider.java
new file mode 100644 (file)
index 0000000..dd2fb4b
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.ruler;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.rulers.RulerChangeListener;
+import org.eclipse.gef.rulers.RulerProvider;
+import org.tizen.efluibuilder.ui.editor.ruler.commands.CreateGuideCommand;
+import org.tizen.efluibuilder.ui.editor.ruler.commands.DeleteGuideCommand;
+import org.tizen.efluibuilder.ui.editor.ruler.commands.MoveGuideCommand;
+
+
+public class DesignerRulerProvider extends RulerProvider {
+
+    private DesignerRuler ruler;
+    private PropertyChangeListener rulerListener = new PropertyChangeListener() {
+        @Override
+        public void propertyChange(PropertyChangeEvent evt) {
+            if (evt.getPropertyName().equals(DesignerRuler.PROPERTY_CHILDREN)) {
+                DesignerGuide guide = (DesignerGuide) evt.getNewValue();
+                if (getGuides().contains(guide)) {
+                    guide.addPropertyChangeListener(guideListener);
+                } else {
+                    guide.removePropertyChangeListener(guideListener);
+                }
+                for (int i = 0; i < listeners.size(); i++) {
+                    ((RulerChangeListener) listeners.get(i)).notifyGuideReparented(guide);
+                }
+            } else {
+                for (int i = 0; i < listeners.size(); i++) {
+                    ((RulerChangeListener) listeners.get(i)).notifyUnitsChanged(ruler.getUnit());
+                }
+            }
+        }
+    };
+    private PropertyChangeListener guideListener = new PropertyChangeListener() {
+        @Override
+        public void propertyChange(PropertyChangeEvent evt) {
+            if (evt.getPropertyName().equals(DesignerGuide.PROPERTY_CHILDREN)) {
+                for (int i = 0; i < listeners.size(); i++) {
+                    ((RulerChangeListener) listeners.get(i)).notifyPartAttachmentChanged(evt.getNewValue(), evt.getSource());
+                }
+            } else {
+                for (int i = 0; i < listeners.size(); i++) {
+                    ((RulerChangeListener) listeners.get(i)).notifyGuideMoved(evt.getSource());
+                }
+            }
+        }
+    };
+
+    public DesignerRulerProvider(DesignerRuler ruler) {
+        this.ruler = ruler;
+        this.ruler.addPropertyChangeListener(rulerListener);
+        List guides = getGuides();
+        for (int i = 0; i < guides.size(); i++) {
+            ((DesignerGuide) guides.get(i)).addPropertyChangeListener(guideListener);
+        }
+    }
+
+    @Override
+    public List getAttachedModelObjects(Object guide) {
+        return new ArrayList(((DesignerGuide) guide).getParts());
+    }
+
+    @Override
+    public Command getCreateGuideCommand(int position) {
+        return new CreateGuideCommand(ruler, position);
+    }
+
+    @Override
+    public Command getDeleteGuideCommand(Object guide) {
+        return new DeleteGuideCommand((DesignerGuide) guide, ruler);
+    }
+
+    @Override
+    public Command getMoveGuideCommand(Object guide, int pDelta) {
+        return new MoveGuideCommand((DesignerGuide) guide, pDelta);
+    }
+
+    @Override
+    public int[] getGuidePositions() {
+        List guides = getGuides();
+        int[] result = new int[guides.size()];
+        for (int i = 0; i < guides.size(); i++) {
+            result[i] = ((DesignerGuide) guides.get(i)).getPosition();
+        }
+        return result;
+    }
+
+    @Override
+    public Object getRuler() {
+        return ruler;
+    }
+
+    @Override
+    public int getUnit() {
+        return ruler.getUnit();
+    }
+
+    @Override
+    public void setUnit(int newUnit) {
+        ruler.setUnit(newUnit);
+    }
+
+    @Override
+    public int getGuidePosition(Object guide) {
+        return ((DesignerGuide) guide).getPosition();
+    }
+
+    @Override
+    public List getGuides() {
+        return ruler.getGuides();
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/commands/CreateGuideCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/commands/CreateGuideCommand.java
new file mode 100644 (file)
index 0000000..97dbbb9
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.ruler.commands;
+
+import org.eclipse.gef.commands.Command;
+import org.tizen.efluibuilder.ui.editor.ruler.DesignerGuide;
+import org.tizen.efluibuilder.ui.editor.ruler.DesignerRuler;
+
+
+public class CreateGuideCommand extends Command {
+
+    private DesignerGuide guide;
+    private DesignerRuler parent;
+    private int position;
+
+    public CreateGuideCommand(DesignerRuler parent, int position) {
+        super("Create guide");
+        this.parent = parent;
+        this.position = position;
+    }
+
+    @Override
+    public boolean canUndo() {
+        return true;
+    }
+
+    @Override
+    public void execute() {
+        if (guide == null)
+            guide = new DesignerGuide(!parent.isHorizontal());
+        guide.setPosition(position);
+        parent.addGuide(guide);
+    }
+
+    @Override
+    public void undo() {
+        parent.removeGuide(guide);
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/commands/DeleteGuideCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/commands/DeleteGuideCommand.java
new file mode 100644 (file)
index 0000000..44ef990
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.ruler.commands;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.gef.commands.Command;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.editor.ruler.DesignerGuide;
+import org.tizen.efluibuilder.ui.editor.ruler.DesignerRuler;
+
+
+public class DeleteGuideCommand extends Command {
+
+    private DesignerRuler parent;
+    private DesignerGuide guide;
+    private Map oldParts;
+
+    public DeleteGuideCommand(DesignerGuide guide, DesignerRuler parent) {
+        super("Delete guide");
+        this.guide = guide;
+        this.parent = parent;
+    }
+
+    @Override
+    public boolean canUndo() {
+        return true;
+    }
+
+    @Override
+    public void execute() {
+        oldParts = new HashMap(guide.getMap());
+        Iterator iter = oldParts.keySet().iterator();
+        while (iter.hasNext()) {
+            guide.detachElement((Part) iter.next());
+        }
+        parent.removeGuide(guide);
+    }
+
+    @Override
+    public void undo() {
+        parent.addGuide(guide);
+        Iterator iter = oldParts.keySet().iterator();
+        while (iter.hasNext()) {
+            Part element = (Part) iter.next();
+            guide.attachElement(element, ((Integer) oldParts.get(element)).intValue());
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/commands/MoveGuideCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/ruler/commands/MoveGuideCommand.java
new file mode 100644 (file)
index 0000000..97e792d
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.ruler.commands;
+
+import org.eclipse.gef.commands.Command;
+import org.tizen.efluibuilder.ui.editor.ruler.DesignerGuide;
+
+
+public class MoveGuideCommand extends Command {
+
+    private int pDelta;
+    private DesignerGuide guide;
+
+    public MoveGuideCommand(DesignerGuide guide, int positionDelta) {
+        super("Move guide");
+        this.guide = guide;
+        pDelta = positionDelta;
+    }
+
+    @Override
+    public void execute() {
+        guide.setPosition(guide.getPosition() + pDelta);
+        /*
+         * Iterator iter = guide.getParts().iterator(); while (iter.hasNext()) { Part element =
+         * (Part) iter.next(); Rectangle layout = element.getPositionProperty().getCopy(); if
+         * (guide.isHorizontal()) { layout.y += pDelta; } else { layout.x += pDelta; }
+         * element.setPosition(layout); }
+         */
+
+    }
+
+    @Override
+    public void undo() {
+        guide.setPosition(guide.getPosition() - pDelta);
+        /*
+         * Iterator iter = guide.getParts().iterator();
+         * 
+         * while (iter.hasNext()) { Part element = (Part) iter.next(); Rectangle layout =
+         * element.getPositionProperty().getCopy(); if (guide.isHorizontal()) { layout.y -= pDelta;
+         * } else { layout.x -= pDelta; } element.setPosition(layout); }
+         */
+
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/DOM2PartAdapter.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/DOM2PartAdapter.java
new file mode 100644 (file)
index 0000000..e468522
--- /dev/null
@@ -0,0 +1,490 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
+import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
+import org.eclipse.wst.xml.core.internal.document.AttrImpl;
+import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
+import org.eclipse.wst.xml.core.internal.document.ElementImpl;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.MScreenPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditCommandStack;
+import org.tizen.efluibuilder.utility.DOMUtil;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+public class DOM2PartAdapter implements INodeAdapter {
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
+
+    private NotificationWatchDog watchDog;
+
+    public DOM2PartAdapter(NotificationWatchDog watchDog) {
+        this.watchDog = watchDog;
+    }
+
+    @Override
+    public boolean isAdapterForType(Object type) {
+        return this.getClass().equals(type);
+    }
+
+    public void updatePartFromWYSIWYG(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue,
+                                      Object newValue) {
+        Node parentNode = (Node) notifier;
+
+        Part parentPart = PartUtil.getPartFrom(parentNode); // It can be NULL
+        Part childPart = null;
+
+        switch (eventType) {
+            case INodeNotifier.CHANGE:
+                if (parentPart != null) {
+                    if (changedFeature instanceof IDOMAttr) {
+                        IDOMAttr changedAttr = (IDOMAttr) changedFeature;
+
+                        String key = changedAttr.getName();
+                        if (newValue == null) {
+                            // if newValue is null , property is removed.
+                            parentPart.removeProperty(key);
+                        } else if (newValue instanceof String) {
+                            // if newValue is not null, property is added or
+                            // updated.
+                            parentPart.setPropertyValue(key, (String) newValue);
+                        }
+                    }
+                }
+                break;
+            case INodeNotifier.ADD:
+                if (parentPart != null) {
+                    if (newValue instanceof ElementImpl) {
+                        ElementImpl newElementImpl = (ElementImpl) newValue;
+                        childPart = PartUtil.getPartFrom(newElementImpl);
+                        if (childPart == null) {
+                            ComponentDescriptor descriptor = getComponentDescriptor(parentPart);
+                            childPart = writePartbyElement(newElementImpl, parentPart.getOwnerDocumentPart(), parentPart,
+                                                           descriptor);
+                        }
+
+                        if (childPart != null && childPart != parentPart
+                                && parentPart.getChildren().contains(childPart) == false) {
+                            if (newElementImpl.isClosed()) {
+                                Part nextSiblingPart = getNextPart(newElementImpl.getNextSibling());
+                                parentPart.insertChildBefore(childPart, nextSiblingPart);
+                            }
+                        }
+                    }
+                }
+                break;
+            case INodeNotifier.REMOVE:
+                if (parentPart != null) {
+                    if (oldValue instanceof Element) {
+                        Element oldElement = (Element) oldValue;
+                        childPart = PartUtil.getPartFrom(oldElement);
+                        if (childPart != null) {
+                            Document document = DOMUtil.getDocument(parentNode);
+                            if (childPart == PartUtil.getPartFrom(document)) { // Remove
+                                                                               // <Document>
+                                for (int i = 0; i < childPart.getChildren().size(); i++) {
+                                    Part part = childPart.getChildren().get(i);
+                                    if (part instanceof MScreenPart || part instanceof ViewsPart) {
+                                        part.removeAllChildren();
+                                    }
+                                }
+                            } else if (childPart instanceof MScreenPart || childPart instanceof ViewsPart) {
+                                childPart.removeAllChildren();
+                            } else {
+                                parentPart.removeChild(childPart);
+                            }
+                        }
+                    }
+                }
+                break;
+            default:
+                break;
+        }
+    }
+
+    public void updatePartFromXMLEditor(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue,
+                                        Object newValue) {
+        Node parentNode = (Node) notifier;
+        Part parentPart = PartUtil.getPartFrom(parentNode);
+        if (parentPart == null) {
+            return;
+        }
+
+        switch (eventType) {
+            case INodeNotifier.CHANGE:
+                if (changedFeature instanceof IDOMAttr) {
+                    IDOMAttr changedAttr = (IDOMAttr) changedFeature;
+
+                    String key = changedAttr.getName();
+                    if (newValue == null) {
+                        // if newValue is null , property is removed.
+                        parentPart.removeProperty(key);
+                    } else if (newValue instanceof String) {
+                        // if newValue is not null, property is added or
+                        // updated.
+                        parentPart.setPropertyValue(key, (String) newValue);
+                    }
+                }
+                break;
+            case INodeNotifier.STRUCTURE_CHANGED:
+                if (parentPart instanceof DocumentPart) {
+                    for (int i = 0; i < parentPart.getChildren().size(); i++) {
+                        Part part = parentPart.getChildren().get(i);
+                        if (part instanceof MScreenPart || part instanceof ViewsPart) {
+                            part.removeAllChildren();
+                        }
+                    }
+                } else {
+                    parentPart.removeAllChildren();
+                }
+
+                ComponentDescriptor descriptor = getComponentDescriptor(parentPart);
+                NodeList childrenNodes = parentNode.getChildNodes();
+                for (int i = 0; i < childrenNodes.getLength(); i++) {
+                    Node childNode = childrenNodes.item(i);
+                    if (childNode instanceof ElementImpl) {
+                        Part childPart = writePartbyElement((ElementImpl) childNode, parentPart.getOwnerDocumentPart(), parentPart,
+                                                            descriptor);
+                        if (childPart != null && childPart != parentPart) {
+                            parentPart.insertChildBefore(childPart, null);
+                        }
+                    }
+                }
+                break;
+            default:
+                break;
+        }
+    }
+
+    @Override
+    public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue,
+                              Object newValue, int pos) {
+        // For debug, uncomment.
+        // printLog(notifier, eventType, changedFeature, oldValue, newValue, pos);
+        Node parentNode = (Node) notifier;
+
+        switch (eventType) {
+            case INodeNotifier.ADD:
+                if (newValue instanceof ElementImpl) {
+                    addAdapter((IDOMNode) newValue, true);
+                }
+                break;
+            case INodeNotifier.REMOVE:
+                if (oldValue instanceof ElementImpl) {
+                    removeAdapter((IDOMNode) oldValue, true);
+                }
+                break;
+        }
+
+        if (DesignEditCommandStack.isPartCommandMode(parentNode)) {
+            updatePartFromWYSIWYG(notifier, eventType, changedFeature, oldValue, newValue);
+        } else {
+            Document document = DOMUtil.getDocument(parentNode);
+
+            List<DOMChangeInfo> domChangeInfoList = (List<DOMChangeInfo>) document.getUserData("DOM_CHANGE_INFO_LIST");
+            if (domChangeInfoList == null) {
+                domChangeInfoList = new ArrayList<DOMChangeInfo>();
+                document.setUserData("DOM_CHANGE_INFO_LIST", domChangeInfoList, null);
+            }
+
+            DOMChangeInfo domChangeInfo = new DOMChangeInfo(notifier, eventType, changedFeature, oldValue, newValue,
+                                                            pos);
+            /*
+             * Extract useful DOM change event.
+             */
+            boolean isUseful = true;
+            switch (eventType) {
+                case INodeNotifier.ADD:
+                case INodeNotifier.REMOVE:
+                    if ((INodeNotifier.ADD == eventType && newValue instanceof ElementImpl == false) ||
+                            (INodeNotifier.REMOVE == eventType && oldValue instanceof ElementImpl == false)) {
+                        isUseful = false;
+                    } else {
+                        Part parentPart = PartUtil.getPartFrom((Node) notifier);
+                        if (parentPart != null) {
+                            Iterator<DOMChangeInfo> iter = domChangeInfoList.iterator();
+                            while (iter.hasNext()) {
+                                DOMChangeInfo changeInfo = iter.next();
+                                Part changePart = PartUtil.getPartFrom((Node) changeInfo.notifier);
+                                if (changeInfo.eventType == INodeNotifier.STRUCTURE_CHANGED) {
+                                    if (isAncestorPart(changePart, parentPart) && changePart != parentPart) {
+                                        isUseful = false;
+                                    } else if (isAncestorPart(parentPart, changePart)) {
+                                        iter.remove();
+                                    }
+                                } else if (changeInfo.eventType == INodeNotifier.CHANGE) {
+                                    if (isAncestorPart(parentPart, changePart) && parentPart != changePart) {
+                                        iter.remove();
+                                    }
+                                }
+                            }
+                            domChangeInfo.eventType = INodeNotifier.STRUCTURE_CHANGED;
+                        } else {
+                            isUseful = false;
+                        }
+                    }
+                    break;
+                case INodeNotifier.CHANGE:
+                    if (changedFeature instanceof AttrImpl == false) {
+                        isUseful = false;
+                    } else {
+                        Part parentPart = PartUtil.getPartFrom((Node) notifier);
+                        if (parentPart != null) {
+                            Iterator<DOMChangeInfo> iter = domChangeInfoList.iterator();
+                            while (iter.hasNext()) {
+                                DOMChangeInfo changeInfo = iter.next();
+                                if (changeInfo.eventType == INodeNotifier.STRUCTURE_CHANGED) {
+                                    Part changePart = PartUtil.getPartFrom((Node) changeInfo.notifier);
+                                    if (isAncestorPart(changePart, parentPart) && changePart != parentPart) {
+                                        isUseful = false;
+                                    }
+                                } else if (changeInfo.eventType == INodeNotifier.CHANGE) {
+                                    if (changeInfo.notifier == notifier && changeInfo.changedFeature == changedFeature) {
+                                        iter.remove();
+                                    }
+                                }
+                            }
+                        } else {
+                            isUseful = false;
+                        }
+                    }
+                    break;
+                default:
+                    isUseful = false;
+                    break;
+            }
+            if (isUseful) {
+                domChangeInfoList.add(domChangeInfo);
+            }
+            this.watchDog.resetWatchDog(document, this);
+        }
+    }
+
+    private boolean isAncestorPart(Part ancestorPart, Part childPart) {
+        if (ancestorPart == null) {
+            return false;
+        }
+        Part currentPart = childPart;
+        while (currentPart != null) {
+            if (currentPart == ancestorPart) {
+                return true;
+            }
+            currentPart = currentPart.getParent();
+        }
+        return false;
+    }
+
+    private Part getNextPart(Node node) {
+        if (node == null) {
+            return null;
+        } else if (node instanceof ElementImpl) {
+            return PartUtil.getPartFrom(node);
+        }
+        return getNextPart(node.getNextSibling());
+    }
+
+    private ComponentDescriptor getComponentDescriptor(Part part) {
+        DocumentPart documentPart = part.getOwnerDocumentPart();
+        if (documentPart != null) {
+            return documentPart.getComponentDescriptor();
+        }
+
+        return null;
+    }
+
+    public void addAdapter(IDOMNode node, boolean traverseChild) {
+        if (node.getExistingAdapter(this) == null) {
+            node.addAdapter(this);
+        }
+
+        if (traverseChild) {
+            for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) {
+                if (child instanceof IDOMNode) {
+                    this.addAdapter((IDOMNode) child, traverseChild);
+                }
+            }
+        }
+    }
+
+    public void removeAdapter(IDOMNode node, boolean traverseChild) {
+        if (traverseChild) {
+            for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) {
+                if (child instanceof IDOMNode) {
+                    this.removeAdapter((IDOMNode) child, traverseChild);
+                }
+            }
+        }
+
+        if (node.getExistingAdapter(this) != null) {
+            node.removeAdapter(this);
+        }
+    }
+
+    private void copyAttributesToPart(Node node, Part part) {
+        NamedNodeMap attrList = node.getAttributes();
+        for (int i = 0, length = attrList.getLength(); i < length; i++) {
+            Attr attr = (Attr) attrList.item(i);
+            part.setPropertyValue(attr.getName(), attr.getValue());
+        }
+    }
+
+    private Part writePartbyElement(Element element, DocumentPart docPart, Part parentPart,
+                                    ComponentDescriptor descriptor) {
+        String tagName = element.getTagName();
+
+        Part part = null;
+
+        if (tagName.equals(LayoutSchemaConstants.DOCUMENT)) {
+            part = docPart;
+        } else if (tagName.equals(LayoutSchemaConstants.MSCREEN)) {
+            if (parentPart != null && parentPart instanceof DocumentPart) {
+                // Find MScreenPart from documentPart
+                for (int i = 0; i < parentPart.getChildren().size(); i++) {
+                    if (parentPart.getChildren().get(i) instanceof MScreenPart) {
+                        part = parentPart.getChildren().get(i);
+                        break;
+                    }
+                }
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.VIEWS)) {
+            if (parentPart != null && parentPart instanceof DocumentPart) {
+                // Find ViewsPart from documentPart
+                for (int i = 0; i < parentPart.getChildren().size(); i++) {
+                    if (parentPart.getChildren().get(i) instanceof ViewsPart) {
+                        part = parentPart.getChildren().get(i);
+                        break;
+                    }
+                }
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.CONFIGURATION)) {
+            if (parentPart == null || parentPart instanceof MScreenPart) {
+                part = PartUtil.createPartWithInitValue(docPart, PartType.CONFIGURATION, parentPart, tagName);
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.VIEW)) {
+            if (parentPart == null || parentPart instanceof ViewsPart) {
+                part = PartUtil.createPartWithInitValue(docPart, PartType.VIEW, parentPart, tagName);
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.EVENT)) {
+            if (parentPart == null || parentPart instanceof ComponentPart) {
+                part = PartUtil.createPartWithInitValue(docPart, PartType.EVENT, parentPart, tagName);
+            }
+        } else if (tagName.equals(LayoutSchemaConstants.VARIATION)) {
+            if (parentPart == null || parentPart instanceof ComponentPart) {
+                part = PartUtil.createPartWithInitValue(docPart, PartType.VARIATION, parentPart, tagName);
+            }
+        } else {
+            // assume component
+            if (parentPart == null || (parentPart instanceof ViewPart) || (parentPart instanceof ComponentPart)) {
+                if (docPart == null) {
+                    return null;
+                }
+                if (docPart.getComponentDescriptor().getWidgetDescriptor(tagName) != null) {
+                    part = PartUtil.createPartWithInitValue(docPart, PartType.COMPONENT, parentPart, tagName);
+                }
+            }
+        }
+
+        if (part == null)
+            return null;
+
+        copyAttributesToPart(element, part);
+
+        // traverse child
+        for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) {
+            if (child instanceof ElementImpl) {
+                ElementImpl childElementImpl = (ElementImpl) child;
+                Part childPart = writePartbyElement(childElementImpl, docPart, part, descriptor);
+
+                if (childPart != null && part.getChildren().contains(childPart) == false) {
+                    if (childElementImpl.isClosed()) {
+                        // connect part tree
+                        part.insertChildBefore(childPart, null);
+                    }
+                }
+            }
+        }
+
+        part.setElement(element);
+        PartUtil.setPartToElement(element, part);
+
+        return part;
+    }
+
+    // For Debug
+    private void printLog(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue,
+                          Object newValue, int pos) {
+        if (!(notifier instanceof ElementImpl || notifier instanceof DocumentImpl)) {
+            return;
+        }
+        logger.debug("==============================================");
+        logger.debug("notifier : " + notifier.getClass().getName() + " (" + notifier + ")" + " ("
+                + notifier.hashCode() + ")");
+        if (notifier instanceof ElementImpl) {
+            logger.debug("\tElementName : " + ((ElementImpl) notifier).getNodeName());
+        }
+        logger.debug("event : " + eventType);
+        logger.debug("changedFeature : " + ((changedFeature == null) ? "null"
+                : changedFeature.getClass().getName() + " (" + changedFeature + ")" + " (" + changedFeature.hashCode()
+                        + ")"));
+        if (changedFeature instanceof ElementImpl) {
+            logger.debug("\tElementName : " + ((ElementImpl) changedFeature).getNodeName());
+        }
+        logger.debug("oldValue : " + ((oldValue == null) ? "null"
+                : oldValue.getClass().getName() + " (" + oldValue + ")" + " (" + oldValue.hashCode() + ")"));
+        if (oldValue instanceof ElementImpl) {
+            logger.debug("\tElementName : " + ((ElementImpl) oldValue).getNodeName());
+            logger.debug("\tEndTag : " + ((ElementImpl) oldValue).isStartTagClosed());
+        }
+        logger.debug("newValue : " + ((newValue == null) ? "null"
+                : newValue.getClass().getName() + " (" + newValue + ")" + " (" + newValue.hashCode() + ")"));
+        if (newValue instanceof ElementImpl) {
+            logger.debug("\tElementName : " + ((ElementImpl) newValue).getNodeName());
+            logger.debug("\tEndTag : " + ((ElementImpl) newValue).isEndTag());
+        }
+        logger.debug("pos : " + pos);
+        logger.debug("==============================================");
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/DOMChangeInfo.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/DOMChangeInfo.java
new file mode 100644 (file)
index 0000000..524fc74
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor;
+
+import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
+
+
+class DOMChangeInfo {
+    INodeNotifier notifier;
+    int eventType;
+    Object changedFeature;
+    Object oldValue;
+    Object newValue;
+    int pos;
+
+    DOMChangeInfo(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
+        this.notifier = notifier;
+        this.eventType = eventType;
+        this.changedFeature = changedFeature;
+        this.oldValue = oldValue;
+        this.newValue = newValue;
+        this.pos = pos;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/DataBindingModelListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/DataBindingModelListener.java
new file mode 100644 (file)
index 0000000..9aa0182
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.editor.texteditor;
+
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.model.part.IPartChangedListener;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartMutation;
+import org.tizen.efluibuilder.model.part.PartObserver;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+@SuppressWarnings("restriction")
+public final class DataBindingModelListener implements IPartChangedListener {
+
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
+
+    private PartObserver observer = null;
+
+    public void initContents(Part documentPart, Document model) {
+
+        // Assert.notNull(model);
+
+        observer = new PartObserver(this);
+        observer.observe(documentPart);
+    }
+
+    public void dispose() {
+    }
+
+    private void addChild(Element parentElement, Part childPart) {
+        Part siblingPart = childPart.getNextSibling();
+        Element siblingElement = null;
+        if (siblingPart != null)
+            siblingElement = siblingPart.getElement();
+
+        TextEditorUtil.insertElement(parentElement, siblingElement, childPart);
+    }
+
+    private void removeChild(Element parentElement, Part childPart) {
+        Element removedElement = childPart.getElement();
+        // TODO FIXME : add for undo/redo
+        childPart.setElement(null);
+
+        NodeList nodes = parentElement.getChildNodes();
+        for (int i = 0; i < nodes.getLength(); i++) {
+            if (!(nodes.item(i) instanceof Element))
+                continue;
+
+            Element childElement = (Element) nodes.item(i);
+            if (childElement.getNodeName() != null && childElement.getNodeName().equals(removedElement.getNodeName())
+                    && childElement.getAttribute(LayoutSchemaConstants.ID).equals(removedElement.getAttribute(LayoutSchemaConstants.ID))) {
+                parentElement.removeChild(childElement);
+
+                // remove unnecessary line region
+                if (i > 0) {
+                    removeEmptyText(nodes.item(i - 1));
+                }
+                break;
+            }
+        }
+    }
+
+    private void removeEmptyText(Node node) {
+        if (node instanceof Text) { // It must be the text node
+            String textContent = ((Text) node).getTextContent();
+            if (textContent != null && textContent.trim().isEmpty()) { // It must be unnecessary
+                Node parentTextNode = node.getParentNode();
+                if (parentTextNode != null) { // It must have a parent
+                    parentTextNode.removeChild(node);
+                }
+            }
+        }
+    }
+
+    @Override
+    public void partsChanged(List<PartMutation> mutations, PartObserver observer, String sender) {
+
+        for (PartMutation mutation : mutations) {
+            Part targetPart = mutation.getTargetPart();
+            if (targetPart == null) {
+                continue;
+            }
+
+            String mutationType = mutation.getType();
+            Element parentElement = targetPart.getElement();
+            if (PartMutation.PARTS_ADDED.equals(mutationType) || PartMutation.CONFIGURES_ADDED.equals(mutationType)) {
+                for (Part child : mutation.getAddedParts()) {
+                    addChild(parentElement, child);
+                }
+            } else if (PartMutation.PARTS_REMOVED.equals(mutationType) || PartMutation.CONFIGURES_REMOVED.equals(mutationType)) {
+                for (Part child : mutation.getRemovedParts()) {
+                    removeChild(parentElement, child);
+                }
+            } else if (PartMutation.PROPERTY_CHANGED.equals(mutationType) || PartMutation.CONFIGURE_PROPERTY_CHANGED.equals(mutationType)) {
+                if (parentElement != null) {
+                    parentElement.setAttribute(mutation.getPropertyName(), mutation.getOldValue());
+                }
+            } else if (PartMutation.PARTS_ORDER_CHANGED.equals(mutationType)) {
+                for (Part child : mutation.getOrderChangedParts()) {
+                    removeChild(parentElement, child);
+                    addChild(parentElement, child);
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/NotificationWatchDog.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/NotificationWatchDog.java
new file mode 100644 (file)
index 0000000..ce1352b
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.util.List;
+
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.eclipse.wst.xml.core.internal.validation.XMLValidationReport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartObserver;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.editor.texteditor.TextEditorWatchdog.IWatchdocRunner;
+import org.tizen.efluibuilder.ui.editor.texteditor.validation.LayoutValidator;
+import org.tizen.efluibuilder.ui.editor.texteditor.validation.NonSchemaBasedLayoutValidator;
+import org.w3c.dom.Document;
+
+
+public class NotificationWatchDog implements IWatchdocRunner {
+
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
+
+    private final long delay = 500; // 500ms
+
+    private TextEditorWatchdog asyncChecker = new TextEditorWatchdog(this);
+    private Document ownerDocument;
+    private DOM2PartAdapter adapter;
+
+    public NotificationWatchDog() {
+        this.asyncChecker.start(this.delay);
+    }
+
+    public void dispose() {
+        this.asyncChecker.stop();
+    }
+
+    public void resetWatchDog(Document ownerDocument, DOM2PartAdapter adapter) {
+        logger.debug("Reset NotificationWatchDog");
+
+        this.ownerDocument = ownerDocument;
+        this.adapter = adapter;
+
+        this.asyncChecker.reset();
+        this.asyncChecker.enableModified();
+    }
+
+    @Override
+    public void processJob() {
+        logger.debug("Run watchDog");
+        Part documentPart = PartUtil.getPartFrom(ownerDocument);
+        if (documentPart == null) {
+            logger.warn("documentPart is null.");
+            return;
+        }
+        // PartUpdate
+        if (isValidDocument()) {
+            if (PartUtil.findViewsPart(documentPart).getChildren().isEmpty()) {
+                // Case: After invalid layout.xml is opened, the xml is fixed. 
+                adapter.updatePartFromXMLEditor((DocumentImpl)ownerDocument, INodeNotifier.STRUCTURE_CHANGED, null, null, null);
+            } else {
+                List<DOMChangeInfo> domChangeInfoList = (List<DOMChangeInfo>) ownerDocument.getUserData("DOM_CHANGE_INFO_LIST");
+                if (domChangeInfoList != null) {
+                    for (int i = 0; i < domChangeInfoList.size(); i++) {
+                        DOMChangeInfo info = domChangeInfoList.get(i);
+                        adapter.updatePartFromXMLEditor(info.notifier, info.eventType, info.changedFeature, info.oldValue, info.newValue);
+                    }
+                    domChangeInfoList.clear();
+                }
+            }
+            ((DocumentPart)documentPart).setValidDocument(true);
+            documentPart.notifyObservers(PartObserver.MESSAGE_VALID_XML);
+            ((DocumentPart)documentPart).updateID();
+        } else {
+            ((DocumentPart)documentPart).setValidDocument(false);
+            documentPart.notifyObservers(PartObserver.MESSAGE_INVALID_XML);
+            logger.debug("Invalid XML!!!!!");
+        }
+    }
+
+    private boolean isValidDocument() {
+        IDOMModel model = ((DocumentImpl) ownerDocument).getModel();
+
+        if (model == null) {
+            return false;
+        }
+
+        // get current XML
+        IStructuredDocument structuredDocument = model.getStructuredDocument();
+        InputStream is = new ByteArrayInputStream(structuredDocument.get().getBytes());
+
+        String fileBaseLocation = model.getResolver().getFileBaseLocation();
+        String uri = URIUtil.toUnencodedString(new File(fileBaseLocation).toURI());
+
+        // validate
+        XMLValidationReport report = LayoutValidator.validateXml(uri, is);
+        boolean isValid = report.isValid();
+        if (isValid) {
+            String errorMsg = new NonSchemaBasedLayoutValidator().validate(structuredDocument);
+            isValid = (errorMsg != null && errorMsg.isEmpty());
+        }
+        return isValid;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditor.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditor.java
new file mode 100644 (file)
index 0000000..7d72f4c
--- /dev/null
@@ -0,0 +1,351 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.MouseWheelHandler;
+import org.eclipse.gef.SnapToGrid;
+import org.eclipse.gef.ui.parts.SelectionSynchronizer;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.eclipse.wst.xml.core.internal.validation.XMLValidationReport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.model.util.PartUnmarshaller;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.editor.MouseWheelZoomHandler;
+import org.tizen.efluibuilder.ui.editor.texteditor.TextEditorWatchdog.IWatchdocRunner;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.PreviewComposite;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.PreviewViewer;
+import org.tizen.efluibuilder.ui.editor.texteditor.validation.LayoutValidator;
+import org.tizen.efluibuilder.ui.editor.texteditor.validation.NonSchemaBasedLayoutValidator;
+import org.tizen.efluibuilder.ui.editor.toolbar.PreviewToolbar;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import graphicalDataManager.GraphicalDataManager;
+
+
+@SuppressWarnings("restriction")
+public class TextEditor extends StructuredTextEditor implements IWatchdocRunner, ISelectionChangedListener {
+
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
+
+    private PreviewViewer previewViewer = new PreviewViewer(this);
+    private PreviewToolbar previewToolbar = null;
+    private NotificationWatchDog notiWatchDog = new NotificationWatchDog();
+
+    private DOM2PartAdapter adapter;
+
+    private Part currentFocusedPart = null;
+
+    private TextEditorWatchdog asyncChecker = null;
+    private static final long AnalyzeDelayTime = 500;
+
+    private SelectionSynchronizer selectionSynchronizer = null;
+    private CombineEditorPart parentEditor = null;
+    Composite toolbarComposite = null;
+
+    public TextEditor() {
+        super();
+        this.asyncChecker = new TextEditorWatchdog(this);
+        this.asyncChecker.start(AnalyzeDelayTime);
+    }
+
+    public void initContents(CombineEditorPart editorPart, Part documentPart, IEditorInput editorInput, EditDomain editDomain,
+                             SelectionSynchronizer selectionSynchronizer, GraphicalDataManager graphicalDataManager) {
+        this.selectionSynchronizer = selectionSynchronizer;
+
+        previewViewer.initContents(documentPart, editorInput, editDomain, graphicalDataManager);
+        // editorPart.addProjectResourceChangeListener(previewViewer);
+        this.parentEditor = editorPart;
+        selectionSynchronizer.addViewer(previewViewer);
+
+        previewToolbar = new PreviewToolbar(toolbarComposite, parentEditor, previewViewer);
+        // previewToolbar.createToolItem();
+        previewToolbar.initContents(previewViewer);
+
+        IDOMDocument document = getDomModel().getDocument();
+        PartUtil.setPartToElement(document, documentPart);
+
+        if (((DocumentPart) documentPart).isValidDocument() == false) {
+            previewViewer.setEnabled(false);
+        }
+    }
+
+    @Override
+    public void dispose() {
+        stopDoDocumentProcess();
+
+        removePostSelectionProvider();
+        // removeModelStateListener();
+
+        if (selectionSynchronizer != null) {
+            selectionSynchronizer.removeViewer(previewViewer);
+        }
+
+        if (this.notiWatchDog != null) {
+            this.notiWatchDog.dispose();
+        }
+
+        if (this.adapter != null) {
+            IDOMNode rootElement = getDomModel().getDocument();
+            this.adapter.removeAdapter(rootElement, true);
+        }
+
+        super.dispose();
+    }
+
+    private void createPreviewViewer(Composite parent) {
+        toolbarComposite = new Composite(parent, SWT.NONE);
+        toolbarComposite.setLayout(new FormLayout());
+        FormData data = new FormData();
+        data.top = new FormAttachment(parent, 0);
+        data.bottom = new FormAttachment(100, 0);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+
+        // previewToolbar = new PreviewToolbar(toolbarComposite, parentEditor, previewViewer);
+        // previewToolbar.createToolItem();
+
+        Composite previewComposite = new Composite(parent, SWT.NONE);
+        previewComposite.setLayout(new FillLayout());
+
+        // You can set configurations of viewer
+        boolean bGridEnable = false;
+        previewViewer.setProperty(SnapToGrid.PROPERTY_GRID_ENABLED, bGridEnable);
+        previewViewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, bGridEnable);
+        // if (bGridEnable)
+        // previewViewer.setProperty(SnapToGrid.PROPERTY_GRID_SPACING, new Dimension(50, 50));
+
+        previewViewer.createControl(previewComposite);
+        previewViewer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.MOD1), MouseWheelZoomHandler.SINGLETON);
+    }
+
+    private void setCurrentPart(Part target) {
+        this.currentFocusedPart = target;
+    }
+
+    private void addPostSelectionProvider() {
+        ITextViewer textViewer = getTextViewer();
+        if (textViewer != null) {
+            ((IPostSelectionProvider) textViewer).addPostSelectionChangedListener(this);
+        }
+    }
+
+    private void removePostSelectionProvider() {
+        ITextViewer textViewer = getTextViewer();
+        if (textViewer != null) {
+            ((IPostSelectionProvider) textViewer).removePostSelectionChangedListener(this);
+        }
+    }
+
+    @Override
+    public void createPartControl(Composite parent) {
+        TextEditorComposite rootComposite = new TextEditorComposite(parent, SWT.HORIZONTAL);
+        PreviewComposite previewPane = new PreviewComposite(rootComposite, SWT.VERTICAL);
+        Composite editorPane = new Composite(rootComposite, SWT.NONE);
+        editorPane.setLayout(new FillLayout());
+
+        super.createPartControl(editorPane);
+        createPreviewViewer(previewPane);
+
+        // addModelStateListener();
+        addPostSelectionProvider();
+    }
+
+    public boolean isValidDocument() {
+        IDOMModel model = getDomModel();
+        if (model == null) {
+            return false;
+        }
+
+        // get current XML
+        IStructuredDocument structuredDocument = model.getStructuredDocument();
+        InputStream is = new ByteArrayInputStream(structuredDocument.get().getBytes());
+
+        String fileBaseLocation = model.getResolver().getFileBaseLocation();
+        String uri = URIUtil.toUnencodedString(new File(fileBaseLocation).toURI());
+
+        // validate
+        XMLValidationReport report = LayoutValidator.validateXml(uri, is);
+        boolean isValid = report.isValid();
+        if (isValid) {
+            String errorMsg = new NonSchemaBasedLayoutValidator().validate(structuredDocument);
+            isValid = (errorMsg != null && errorMsg.isEmpty());
+        }
+
+        return isValid;
+    }
+
+    public void setSelection(Part model) {
+        if (!model.equals(currentFocusedPart)) {
+            Element targetElement = model.getElement();
+            if (targetElement instanceof IDOMNode) {
+                int offset = ((IDOMNode) targetElement).getStartOffset();
+                setCurrentPart(model);
+                getTextViewer().setSelection(new TextSelection(getTextViewer().getDocument(), offset, 0));
+            }
+        }
+    }
+
+    public Part createLayoutModel(Part documentPart) {
+        IDOMModel domModel = getDomModel();
+        if (domModel != null) {
+            IDOMDocument domDoc = domModel.getDocument(); // This is not null always.
+            Element element = domDoc.getDocumentElement();
+            if (element != null) {
+                Document document = element.getOwnerDocument();
+                if (document != null) {
+                    PartUnmarshaller unmarshaller = new PartUnmarshaller();
+                    unmarshaller.unmarshall((DocumentPart) documentPart, document, true);
+                    ((DocumentPart) documentPart).updateID();
+                }
+            }
+        }
+
+        return documentPart;
+    }
+
+    /**
+     * Get DOMModel from DocumentProvider
+     * 
+     * @return It can return null.
+     */
+    private IDOMModel getDomModel() {
+        return (IDOMModel) getModel();
+    }
+
+    @Override
+    public void processJob() {
+        Part focusedPart = null;
+
+        // find a part of selected element
+        // FIXED: Improve inaccurate and slow logic
+        ISelection selection = getSelectionProvider().getSelection();
+        if (selection instanceof IStructuredSelection) {
+            Iterator elementIter = ((IStructuredSelection) selection).iterator();
+            Element element = null;
+            while (elementIter.hasNext()) {
+                Object iter = elementIter.next();
+                if (iter instanceof Attr) {
+                    element = ((Attr) iter).getOwnerElement();
+                    break;
+                } else if (iter instanceof Element) {
+                    element = (Element) iter;
+                }
+            }
+            if (element != null) {
+                Object userData = element.getUserData(ModelConstants.ELEMENT_UD_PART_KEY);
+                if (userData instanceof Part) {
+                    focusedPart = (Part) userData;
+                }
+            }
+        }
+
+        if (focusedPart == null || focusedPart instanceof ComponentPart == false) {
+            previewViewer.setInitCurrentActivatedView();
+        }
+
+        // select to viewer
+        if (focusedPart != null) {
+            if (!focusedPart.equals(currentFocusedPart)) {
+                EditPart focusedEditPart = (EditPart) previewViewer.getEditPartRegistry().get(focusedPart.getUniqueId());
+                if (focusedEditPart != null) {
+                    setCurrentPart(focusedPart);
+                    previewViewer.select(focusedEditPart);
+                }
+            }
+        } else if (this.currentFocusedPart != null) {
+            setCurrentPart(null);
+            previewViewer.deselectAll();
+        }
+    }
+
+    public void resetDoDocumentProcess() {
+        this.asyncChecker.reset();
+        this.asyncChecker.enableModified();
+    }
+
+    private void stopDoDocumentProcess() {
+        if (this.asyncChecker != null) {
+            this.asyncChecker.stop();
+        }
+    }
+
+    @Override
+    public void selectionChanged(SelectionChangedEvent event) {
+        if (parentEditor.getDocumentPart() != null && ((DocumentPart) parentEditor.getDocumentPart()).isValidDocument()) {
+            if (event.getSelection() instanceof TextSelection) {
+                resetDoDocumentProcess();
+            }
+        }
+    }
+
+    @Override
+    public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+        super.init(site, input);
+
+        IDOMNode rootElement = getDomModel().getDocument();
+        this.adapter = new DOM2PartAdapter(this.notiWatchDog);
+        this.adapter.addAdapter(rootElement, true);
+    }
+
+    public void setPreviewToolbarEnabled(boolean enabled) {
+        previewToolbar.setEnabled(enabled);
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditorComposite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditorComposite.java
new file mode 100644 (file)
index 0000000..ca9a7fb
--- /dev/null
@@ -0,0 +1,248 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Sash;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class TextEditorComposite extends Composite {
+
+    private static final int DEFAULT_SASH_WIDTH = 5;
+    private static final int DRAG_MINIMUM = 50;
+    private static final String MAINTAIN_SIZE = "maintain size"; //$NON-NLS-1$
+
+    private int fixedSize = 50;
+    private int orientation = SWT.HORIZONTAL;
+    private Sash[] sashes = new Sash[0];
+    private Control[] controls = new Control[0];
+    private Listener sashListener;
+
+    class SashPainter implements Listener {
+        public void handleEvent(Event e) {
+            paint((Sash) e.widget, e.gc);
+        }
+    }
+
+    public TextEditorComposite(final Composite parent, int style) {
+        super(parent, style & SWT.BORDER);
+
+        if ((style & SWT.HORIZONTAL) != 0)
+            orientation = SWT.HORIZONTAL;
+
+        this.addListener(SWT.Resize, new Listener() {
+            public void handleEvent(Event e) {
+                layout(true);
+            }
+        });
+        sashListener = new Listener() {
+            public void handleEvent(Event event) {
+                onDragSash(event);
+            }
+        };
+    }
+
+    private void setFixedSize(int newSize) {
+        if (newSize == fixedSize) {
+            return;
+        }
+    }
+
+    private Control[] getControls(boolean onlyVisible) {
+        Control[] children = getChildren();
+        Control[] controls = new Control[0];
+        for (int i = 0; i < children.length; i++) {
+            if (children[i] instanceof Sash)
+                continue;
+            if (onlyVisible && !children[i].getVisible())
+                continue;
+
+            Control[] newControls = new Control[controls.length + 1];
+            System.arraycopy(controls, 0, newControls, 0, controls.length);
+            newControls[controls.length] = children[i];
+            controls = newControls;
+        }
+        return controls;
+    }
+
+    private void paint(Sash sash, GC gc) {
+        Point size = sash.getSize();
+        if (getOrientation() == SWT.HORIZONTAL) {
+            gc.setForeground(ColorResources.PREVIEW_SPLITTER);
+            gc.drawLine(DEFAULT_SASH_WIDTH - 1, 0, DEFAULT_SASH_WIDTH - 1, size.y);
+            gc.setForeground(ColorConstants.buttonLightest);
+            gc.drawLine(0, 0, 0, size.y);
+        } else {
+            gc.setForeground(ColorConstants.buttonDarker);
+            gc.drawLine(0, 0, size.x, 0);
+            gc.drawLine(0, DEFAULT_SASH_WIDTH - 1, size.x, DEFAULT_SASH_WIDTH - 1);
+            gc.setForeground(ColorConstants.buttonLightest);
+            gc.drawLine(0, 1, size.x, 1);
+        }
+    }
+
+    private void onDragSash(Event event) {
+        if (event.detail == SWT.DRAG) {
+            // constrain feedback
+            Rectangle area = getClientArea();
+            if (orientation == SWT.HORIZONTAL) {
+                if (controls[0].getData(MAINTAIN_SIZE) != null) {
+                    event.x = Math.max(event.x, DRAG_MINIMUM);
+                } else {
+                    event.x = Math.min(event.x, area.width - DRAG_MINIMUM - DEFAULT_SASH_WIDTH);
+                }
+            } else {
+                event.y = Math.min(event.y, area.height - DRAG_MINIMUM - DEFAULT_SASH_WIDTH);
+            }
+            return;
+        }
+
+        Sash sash = (Sash) event.widget;
+        int sashIndex = -1;
+        for (int i = 0; i < sashes.length; i++) {
+            if (sashes[i] == sash) {
+                sashIndex = i;
+                break;
+            }
+        }
+        if (sashIndex == -1)
+            return;
+
+        Control c1 = controls[sashIndex];
+        Control c2 = controls[sashIndex + 1];
+        Rectangle b1 = c1.getBounds();
+        Rectangle b2 = c2.getBounds();
+        controls = getControls(true);
+
+        Rectangle sashBounds = sash.getBounds();
+        if (orientation == SWT.HORIZONTAL) {
+            int shift = event.x - sashBounds.x;
+            b1.width += shift;
+            b2.x += shift;
+            b2.width -= shift;
+        } else {
+            int shift = event.y - sashBounds.y;
+            b1.height += shift;
+            b2.y += shift;
+            b2.height -= shift;
+        }
+
+        c1.setBounds(b1);
+        sash.setBounds(event.x, event.y, event.width, event.height);
+        c2.setBounds(b2);
+
+        if (c1.getData(MAINTAIN_SIZE) != null) {
+            setFixedSize(c1.getBounds().width);
+        } else {
+            setFixedSize(c2.getBounds().width);
+        }
+    }
+
+    @Override
+    public int getOrientation() {
+        return orientation;
+    }
+
+    @Override
+    public void layout(boolean changed) {
+        Rectangle area = getClientArea();
+        if (area.width == 0 || area.height == 0)
+            return;
+
+        Control[] newControls = getControls(true);
+        if (controls.length == 0 && newControls.length == 0)
+            return;
+        controls = newControls;
+
+        if (sashes.length < controls.length - 1) {
+            Sash[] newSashes = new Sash[controls.length - 1];
+            System.arraycopy(sashes, 0, newSashes, 0, sashes.length);
+            int sashOrientation = (orientation == SWT.HORIZONTAL) ? SWT.VERTICAL : SWT.HORIZONTAL;
+            for (int i = sashes.length; i < newSashes.length; i++) {
+                newSashes[i] = new Sash(this, sashOrientation);
+                newSashes[i].setBackground(ColorConstants.button);
+                newSashes[i].addListener(SWT.Paint, new SashPainter());
+                newSashes[i].addListener(SWT.Selection, sashListener);
+            }
+            sashes = newSashes;
+        }
+        if (sashes.length > controls.length - 1) {
+            if (controls.length == 0) {
+                for (int i = 0; i < sashes.length; i++) {
+                    sashes[i].dispose();
+                }
+                sashes = new Sash[0];
+            } else {
+                Sash[] newSashes = new Sash[controls.length - 1];
+                System.arraycopy(sashes, 0, newSashes, 0, newSashes.length);
+                for (int i = controls.length - 1; i < sashes.length; i++) {
+                    sashes[i].dispose();
+                }
+                sashes = newSashes;
+            }
+        }
+
+        if (controls.length == 0)
+            return;
+        int x = area.x;
+        int width = 0;
+        for (int i = 0; i < controls.length; i++) {
+
+            Control control = controls[i];
+
+            // if (i == 0) {
+            // width = (area.width / 3) - DEFAULT_SASH_WIDTH;
+            // control.setBounds(x, area.y, width, area.height);
+            // } else if (i == 1) {
+            // x += (width + DEFAULT_SASH_WIDTH);
+            // width = (area.width / 3) * 2 - DEFAULT_SASH_WIDTH;
+            // control.setBounds(x, area.y, width, area.height);
+            // } else {
+            // break;
+            // }
+
+            if (i == 0) {
+                width = (area.width / 2) - DEFAULT_SASH_WIDTH;
+                control.setBounds(x, area.y, width, area.height);
+            } else if (i == 1) {
+                x += (width + DEFAULT_SASH_WIDTH);
+                width = (area.width / 2) - DEFAULT_SASH_WIDTH;
+                control.setBounds(x, area.y, width, area.height);
+            } else {
+                break;
+            }
+        }
+        if (sashes.length > 0)
+            sashes[0].setBounds(controls[0].getBounds().x + controls[0].getBounds().width, area.y, DEFAULT_SASH_WIDTH, area.height);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditorUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditorUtil.java
new file mode 100644 (file)
index 0000000..cc74a5b
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor;
+
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.model.util.PartMarshaller;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+@SuppressWarnings("restriction")
+public class TextEditorUtil {
+
+    // public static void replaceConnectionElement(Connection connection) {
+    // Element sourceParentElement = connection.getSource().getParent().getElement();
+    // replaceElement(sourceParentElement, connection.getSource());
+    // }
+
+    public static void insertElement(Element parentElement, Element refElement, Part childPart) {
+        if (parentElement == null) {
+            return;
+        }
+
+        // APPEND
+        // Element newElement = PartSerializer.write(childPart, parentElement.getOwnerDocument(),
+        // true);
+        PartMarshaller marshller = new PartMarshaller();
+        Element newElement = marshller.marshall(parentElement.getOwnerDocument(), childPart);
+
+        // Uniqueness must be guaranteed for the signal attribute for event element
+        String uniqueAttr = (childPart instanceof EventPart)
+                ? LayoutSchemaConstants.EVENT_SIGNAL
+                : LayoutSchemaConstants.ID;
+        String nodeName = newElement.getNodeName();
+        String attribute = newElement.getAttribute(uniqueAttr);
+
+        // find existing element and reuse it.
+        NodeList nodes = parentElement.getChildNodes();
+        for (int i = 0, length = nodes.getLength(); i < length; i++) {
+            Node item = nodes.item(i);
+            if (item instanceof Element) {
+                Element childElement = (Element) item;
+
+                // if same tag & ID,
+                if (childElement.getNodeName().equals(nodeName)
+                        && childElement.getAttribute(uniqueAttr).equals(attribute)) {
+                    // assign existing element
+                    assignElement(childPart, childElement);
+                    return;
+                }
+            }
+        }
+
+        // insert new element
+        if (refElement != null) {
+            parentElement.insertBefore(newElement, refElement);
+        } else {
+            parentElement.appendChild(newElement);
+        }
+
+        // assign new element
+        assignElement(childPart, newElement);
+
+        // FIXED: (sw83.shim@samsung.com) New child elements are not assigned to each part
+        assignChildElements(newElement, childPart);
+    }
+
+    private static void assignElement(Part part, Element element) {
+        part.setElement(element);
+        element.setUserData(ModelConstants.ELEMENT_UD_PART_KEY, part, null);
+    }
+
+    private static void assignChildElements(Element element, Part part) {
+        NodeList childNodes = element.getChildNodes();
+        for (int i = 0, length = childNodes.getLength(); i < length; i++) {
+            Node item = childNodes.item(i);
+            if (item instanceof Element) {
+                Element childElement = (Element) item;
+
+                for (Part child : part.getChildren()) {
+                    if (child.isSameWith(childElement)) {
+                        // assign existing element
+                        assignElement(child, childElement);
+
+                        // traverse childs
+                        assignChildElements(childElement, child);
+                    }
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditorWatchdog.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/TextEditorWatchdog.java
new file mode 100644 (file)
index 0000000..81224be
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor;
+
+import java.util.Timer;
+import java.util.TimerTask;
+
+import org.eclipse.swt.widgets.Display;
+
+
+class ProcessValidateTask extends TimerTask {
+
+    TextEditorWatchdog validator = null;
+
+    @Override
+    public void run() {
+        validator.checkJob();
+    }
+
+    ProcessValidateTask(TextEditorWatchdog validator) {
+        this.validator = validator;
+    }
+}
+
+
+class TextEditorWatchdog {
+    public interface IWatchdocRunner {
+        public void processJob();
+    }
+
+    long until = System.currentTimeMillis();
+    long checkDelay = 0;
+    long timerTick = 200;// 0.2S
+    IWatchdocRunner runner;
+    private Timer analyzeTimer = new Timer();
+    private ProcessValidateTask analyzeTimerTask = null;
+    private boolean bModified = false;
+
+    public void reset() {
+        this.until = System.currentTimeMillis() + this.checkDelay;
+    }
+
+    public void enableModified() {
+        this.bModified = true;
+    }
+
+    public void start(long checkDelay) {
+        this.checkDelay = checkDelay;
+        this.analyzeTimerTask = new ProcessValidateTask(this);
+        this.reset();
+        this.analyzeTimer.scheduleAtFixedRate(this.analyzeTimerTask, 0, timerTick);
+
+    }
+
+    public void processJob() {
+        final IWatchdocRunner runner = this.runner;
+        Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                runner.processJob();
+            }
+        });
+        bModified = false;
+    }
+
+    public void checkJob() {
+        if (System.currentTimeMillis() >= this.until && bModified) {
+            this.processJob();
+            this.reset();
+        }
+    }
+
+    public void stop() {
+        if (this.analyzeTimerTask != null) {
+            this.analyzeTimerTask.cancel();
+            this.analyzeTimer.purge();
+            this.analyzeTimerTask = null;
+        }
+    }
+
+    TextEditorWatchdog(IWatchdocRunner runner) {
+        this.analyzeTimer = new Timer();
+        this.runner = runner;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/PreviewComposite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/PreviewComposite.java
new file mode 100644 (file)
index 0000000..729e3d7
--- /dev/null
@@ -0,0 +1,321 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.preview;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Sash;
+import org.tizen.efluibuilder.ui.editor.toolbar.ToolBarConstants;
+
+
+public class PreviewComposite extends Composite {
+
+    private static final int DEFAULT_SASH_WIDTH = 5;
+    private static final int DRAG_MINIMUM = 50;
+    private static final String MAINTAIN_SIZE = "maintain size"; //$NON-NLS-1$
+
+    private int fixedSize = 50;
+    private int orientation = SWT.VERTICAL;
+    private Sash[] sashes = new Sash[0];
+    private Control[] controls = new Control[0];
+    private Listener sashListener;
+
+    class SashPainter implements Listener {
+        public void handleEvent(Event e) {
+            paint((Sash) e.widget, e.gc);
+        }
+    }
+
+    public PreviewComposite(Composite parent, int style) {
+        super(parent, style & SWT.BORDER);
+
+        if ((style & SWT.VERTICAL) != 0)
+            orientation = SWT.VERTICAL;
+
+        this.addListener(SWT.Resize, new Listener() {
+            public void handleEvent(Event e) {
+                layout(true);
+            }
+        });
+
+        sashListener = new Listener() {
+            public void handleEvent(Event e) {
+                onDragSash(e);
+            }
+        };
+    }
+
+    private void setFixedSize(int newSize) {
+        if (newSize == fixedSize) {
+            return;
+        }
+    }
+
+    private Control[] getControls(boolean onlyVisible) {
+        Control[] children = getChildren();
+        Control[] controls = new Control[0];
+        for (int i = 0; i < children.length; i++) {
+            if (children[i] instanceof Sash)
+                continue;
+            if (onlyVisible && !children[i].getVisible())
+                continue;
+
+            Control[] newControls = new Control[controls.length + 1];
+            System.arraycopy(controls, 0, newControls, 0, controls.length);
+            newControls[controls.length] = children[i];
+            controls = newControls;
+        }
+        return controls;
+    }
+
+    private void paint(Sash sash, GC gc) {
+        Point size = sash.getSize();
+        if (getOrientation() == SWT.HORIZONTAL) {
+            gc.setForeground(ColorConstants.red);
+            gc.drawLine(DEFAULT_SASH_WIDTH - 1, 0, DEFAULT_SASH_WIDTH - 1, size.y);
+            gc.setForeground(ColorConstants.buttonLightest);
+            gc.drawLine(0, 0, 0, size.y);
+        } else {
+            gc.setForeground(ColorConstants.buttonDarker);
+            gc.drawLine(0, 0, size.x, 0);
+            gc.drawLine(0, DEFAULT_SASH_WIDTH - 1, size.x, DEFAULT_SASH_WIDTH - 1);
+            gc.setForeground(ColorConstants.buttonLightest);
+            gc.drawLine(0, 1, size.x, 1);
+        }
+    }
+
+    private void onDragSash(Event event) {
+        if (event.detail == SWT.DRAG) {
+            // constrain feedback
+            Rectangle area = getClientArea();
+            if (orientation == SWT.HORIZONTAL) {
+                if (controls[0].getData(MAINTAIN_SIZE) != null) {
+                    event.x = Math.max(event.x, DRAG_MINIMUM);
+                } else {
+                    event.x = Math.min(event.x, area.width - DRAG_MINIMUM - DEFAULT_SASH_WIDTH);
+                }
+            } else {
+                event.y = Math.min(event.y, area.height - DRAG_MINIMUM - DEFAULT_SASH_WIDTH);
+            }
+            return;
+        }
+
+        Sash sash = (Sash) event.widget;
+        int sashIndex = -1;
+        for (int i = 0; i < sashes.length; i++) {
+            if (sashes[i] == sash) {
+                sashIndex = i;
+                break;
+            }
+        }
+        if (sashIndex == -1)
+            return;
+
+        Control c1 = controls[sashIndex];
+        Control c2 = controls[sashIndex + 1];
+        Rectangle b1 = c1.getBounds();
+        Rectangle b2 = c2.getBounds();
+        controls = getControls(true);
+
+        Rectangle sashBounds = sash.getBounds();
+        if (orientation == SWT.HORIZONTAL) {
+            int shift = event.x - sashBounds.x;
+            b1.width += shift;
+            b2.x += shift;
+            b2.width -= shift;
+        } else {
+            int shift = event.y - sashBounds.y;
+            b1.height += shift;
+            b2.y += shift;
+            b2.height -= shift;
+        }
+
+        c1.setBounds(b1);
+        sash.setBounds(event.x, event.y, event.width, event.height);
+        c2.setBounds(b2);
+
+        if (c1.getData(MAINTAIN_SIZE) != null) {
+            setFixedSize(c1.getBounds().width);
+        } else {
+            setFixedSize(c2.getBounds().width);
+        }
+    }
+
+    @Override
+    public int getOrientation() {
+        return orientation;
+    }
+
+    @Override
+    public void layout(boolean changed) {
+        Rectangle area = getClientArea();
+        if (area.width == 0 || area.height == 0)
+            return;
+
+        Control[] newControls = getControls(true);
+        if (controls.length == 0 && newControls.length == 0)
+            return;
+        controls = newControls;
+
+        if (sashes.length < controls.length - 1) {
+            Sash[] newSashes = new Sash[controls.length - 1];
+            System.arraycopy(sashes, 0, newSashes, 0, sashes.length);
+            int sashOrientation = (orientation == SWT.HORIZONTAL) ? SWT.VERTICAL : SWT.HORIZONTAL;
+            for (int i = sashes.length; i < newSashes.length; i++) {
+                newSashes[i] = new Sash(this, sashOrientation);
+                newSashes[i].setBackground(ColorConstants.button);
+                newSashes[i].addListener(SWT.Paint, new SashPainter());
+                newSashes[i].addListener(SWT.Selection, sashListener);
+            }
+            sashes = newSashes;
+        }
+        if (sashes.length > controls.length - 1) {
+            if (controls.length == 0) {
+                for (int i = 0; i < sashes.length; i++) {
+                    sashes[i].dispose();
+                }
+                sashes = new Sash[0];
+            } else {
+                Sash[] newSashes = new Sash[controls.length - 1];
+                System.arraycopy(sashes, 0, newSashes, 0, newSashes.length);
+                for (int i = controls.length - 1; i < sashes.length; i++) {
+                    sashes[i].dispose();
+                }
+                sashes = newSashes;
+            }
+        }
+
+        if (controls.length == 0)
+            return;
+        int y = area.y;
+        int height = 0;
+        for (int i = 0; i < controls.length; i++) {
+
+            Control control = controls[i];
+
+            if (i == 0) {
+                height = ToolBarConstants.TOOLBAR_HEIGHT;
+                control.setBounds(area.x, y, area.width, height);
+            } else if (i == 1) {
+                y += (height + DEFAULT_SASH_WIDTH);
+                height = (area.height - ToolBarConstants.TOOLBAR_HEIGHT) - DEFAULT_SASH_WIDTH;
+                control.setBounds(area.x, y, area.width, height);
+            } else {
+                break;
+            }
+
+        }
+        if (sashes.length > 0)
+            sashes[0].setBounds(controls[0].getBounds().x + controls[0].getBounds().width, area.y, DEFAULT_SASH_WIDTH, area.height);
+
+    }
+
+    public void layout1(boolean changed) {
+        Rectangle area = getClientArea();
+        if (area.width == 0 || area.height == 0)
+            return;
+
+        Control[] newControls = getControls(true);
+        if (controls.length == 0 && newControls.length == 0)
+            return;
+        controls = newControls;
+
+        // keep just the right number of sashes
+        if (sashes.length < controls.length - 1) {
+            Sash[] newSashes = new Sash[controls.length - 1];
+            System.arraycopy(sashes, 0, newSashes, 0, sashes.length);
+            int sashOrientation = (orientation == SWT.HORIZONTAL) ? SWT.VERTICAL : SWT.HORIZONTAL;
+            for (int i = sashes.length; i < newSashes.length; i++) {
+                newSashes[i] = new Sash(this, sashOrientation);
+                newSashes[i].setBackground(ColorConstants.button);
+                newSashes[i].addListener(SWT.Paint, new SashPainter());
+                newSashes[i].addListener(SWT.Selection, sashListener);
+            }
+            sashes = newSashes;
+        }
+        if (sashes.length > controls.length - 1) {
+            if (controls.length == 0) {
+                for (int i = 0; i < sashes.length; i++) {
+                    sashes[i].dispose();
+                }
+                sashes = new Sash[0];
+            } else {
+                Sash[] newSashes = new Sash[controls.length - 1];
+                System.arraycopy(sashes, 0, newSashes, 0, newSashes.length);
+                for (int i = controls.length - 1; i < sashes.length; i++) {
+                    sashes[i].dispose();
+                }
+                sashes = newSashes;
+            }
+        }
+
+        if (controls.length == 0)
+            return;
+        int x = area.x;
+        int width;
+        for (int i = 0; i < controls.length; i++) {
+            Control control = controls[i];
+            if (control.getData(MAINTAIN_SIZE) != null) {
+                width = fixedSize;
+                if (width > area.width) {
+                    width = area.width - DEFAULT_SASH_WIDTH;
+                }
+                control.setBounds(x, area.y, width, area.height);
+                x += width + DEFAULT_SASH_WIDTH;
+            } else {
+                width = Math.max(area.width - fixedSize - DEFAULT_SASH_WIDTH, 0);
+                control.setBounds(x, area.y, width, area.height);
+                x += (width + DEFAULT_SASH_WIDTH);
+            }
+        }
+        if (sashes.length > 0)
+            sashes[0].setBounds(controls[0].getBounds().x + controls[0].getBounds().width, area.y, DEFAULT_SASH_WIDTH, area.height);
+    }
+
+    // @Override
+    // public void setOrientation(int orientation) {
+    // if (this.orientation == orientation)
+    // return;
+    // if (orientation != SWT.HORIZONTAL && orientation != SWT.VERTICAL) {
+    // SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+    // }
+    // this.orientation = orientation;
+    //
+    // int sashOrientation = (orientation == SWT.HORIZONTAL) ? SWT.VERTICAL : SWT.HORIZONTAL;
+    // for (int i = 0; i < sashes.length; i++) {
+    // sashes[i].dispose();
+    // sashes[i] = new Sash(this, sashOrientation);
+    // sashes[i].setBackground(ColorConstants.buttonLightest);
+    // sashes[i].addListener(SWT.Selection, sashListener);
+    // }
+    // layout();
+    // }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/PreviewViewer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/PreviewViewer.java
new file mode 100644 (file)
index 0000000..5ae387e
--- /dev/null
@@ -0,0 +1,554 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.preview;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.draw2d.FigureCanvas;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.ui.parts.ScrollingGraphicalViewer;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.ui.IEditorInput;
+import org.tizen.efluibuilder.core.configuration.device.Device;
+import org.tizen.efluibuilder.gef.layers.CustomLayerConstants;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.IPartChangedListener;
+import org.tizen.efluibuilder.model.part.MScreenPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartMutation;
+import org.tizen.efluibuilder.model.part.PartObserver;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.mscreen.configurator.IScreenConfigurationSelectionChangedListener;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+import org.tizen.efluibuilder.mscreen.configurator.MscreenConstants;
+import org.tizen.efluibuilder.renderer.Position;
+import org.tizen.efluibuilder.ui.editor.IProjectResourceFileChangeListener;
+import org.tizen.efluibuilder.ui.editor.texteditor.TextEditor;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.editparts.PreviewEditPartFactory;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.editparts.PreviewRootEditPart;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.editparts.UIComponentEditPart;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.figures.DeviceImageFigure;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.figures.PreviewImageFigure;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+import graphicalDataManager.ComponentGraphicalData;
+import graphicalDataManager.GraphicalDataChangedEvent;
+import graphicalDataManager.GraphicalDataInitializeFailedException;
+import graphicalDataManager.GraphicalDataManager;
+import graphicalDataManager.IGraphicalDataChangedListener;
+
+
+public final class PreviewViewer extends ScrollingGraphicalViewer implements Listener, IGraphicalDataChangedListener,
+        IScreenConfigurationSelectionChangedListener, ISelectionChangedListener, IPartChangedListener, IProjectResourceFileChangeListener {
+
+    private int PADDING_SIZE = 100;
+    private GraphicalDataManager graphicalDataManager = null;
+    private MScreenQualifierManager screenQualifierMgr = null;
+    private EditPart currentActivatedViewEditPart = null;
+    private TextEditor parentEditor = null;
+
+    private Device currentDevice = null;
+    private String currentOrientation = null;
+    private String currentLocale = null;
+
+    private PartObserver observer = null;
+    private boolean enabled = true;
+
+    public PreviewViewer(TextEditor parentEditor) {
+        this.parentEditor = parentEditor;
+
+        this.setEditPartFactory(new PreviewEditPartFactory());
+    }
+
+    public void initContents(Part documentPart, IEditorInput editorInput, EditDomain editDomain, GraphicalDataManager graphicalDataManager) {
+        this.observer = new PartObserver(this);
+        observer.observe(documentPart);
+
+        setEditDomain(editDomain);
+
+        createMScreenQualifierManager(editorInput, documentPart);
+        setGraphicalDataManager(graphicalDataManager);
+        setContents(documentPart);
+
+        reqNewPageGraphicData();
+
+        updateDeviceSize();
+        updateViewLocation();
+        updateAutoZoom();
+
+        addSelectionChangedListener(this);
+    }
+
+    private void createMScreenQualifierManager(IEditorInput editorInput, Part documentPart) {
+        Part doc = documentPart;
+        for (Part part : doc.getChildren()) {
+            if (part instanceof MScreenPart) {
+                screenQualifierMgr = new MScreenQualifierManager((MScreenPart) part, editorInput);
+                screenQualifierMgr.addConfigureSelectionChangedListener(this);
+            }
+        }
+
+        currentDevice = screenQualifierMgr.getCurrentDevice();
+        currentOrientation = screenQualifierMgr.getCurrentOrientation();
+        currentLocale = screenQualifierMgr.getCurrentLocale();
+    }
+
+    private void reqNewPageGraphicData(boolean bForce) {
+        if ((graphicalDataManager != null) && (this.getCurrentViewPart() != null)) {
+            try {
+                ComponentGraphicalData graphicalData =
+                        graphicalDataManager.getGraphicalData(getCurrentViewPart().getUniqueId(), currentDevice, currentOrientation, currentLocale, bForce);
+                if (graphicalData != null) {
+                    if (graphicalData.imageDescriptor != null) {
+                        this.updatePageImageData(graphicalData.imageDescriptor);
+                    }
+
+                    if (graphicalData.componentPositionMap != null) {
+                        this.updataPageComponentPositions(graphicalData.componentPositionMap);
+                    }
+                }
+            } catch (GraphicalDataInitializeFailedException e) {
+                // TODO : IMPL
+            }
+        }
+    }
+
+    private void reqNewPageGraphicData() {
+        reqNewPageGraphicData(false);
+    }
+
+    private void bindToGraphicalDataManager() {
+        if (this.graphicalDataManager != null) {
+            this.graphicalDataManager.addEventListener(this);
+        }
+    }
+
+    private void unbindFromGraphicalDataManager() {
+        if (this.graphicalDataManager != null) {
+            this.graphicalDataManager.removeEventListener(this);
+            this.graphicalDataManager = null;
+        }
+    }
+
+    private void updateDeviceSize() {
+        Point screenSize = this.getCurrentScreenSize();
+        int width = screenSize.x;
+        int height = screenSize.y;
+
+        DeviceImageFigure deviceFigure = (DeviceImageFigure) ((UIComponentEditPart) getContents()).getFigure();
+        deviceFigure.setViewBounds(new org.eclipse.draw2d.geometry.Rectangle(0, 0, width, height));
+        deviceFigure.setProfile(getProfile());
+    }
+
+    private void setPaddingSizeByDeviceCondition() {
+        String calculatedDeviceName = currentDevice.getName().toLowerCase();
+        if (calculatedDeviceName.contains(ModelConstants.SHAPE_SQUARE) || calculatedDeviceName.contains(ModelConstants.SHAPE_CIRCLE)) {
+            PADDING_SIZE = 100;
+        } else {
+            PADDING_SIZE = 300;
+        }
+    }
+
+    private void updateViewLocation() {
+        if (getControl() == null)
+            return;
+        Point screenSize = this.getCurrentScreenSize();
+        int srcW = screenSize.x;
+        int srcH = screenSize.y;
+        int dstW = getControl().getSize().x;
+        int dstH = getControl().getSize().y;
+
+        PreviewRootEditPart rootEditPart = (PreviewRootEditPart) getRootEditPart();
+
+        if (rootEditPart != null) {
+            rootEditPart.updateBrowserSize(srcW, srcH, dstW, dstH);
+
+            Rectangle editorBound = new Rectangle(0, 0, dstW, dstH);
+            double zoomValue = rootEditPart.getZoomManager().getZoom();
+            int x = 0, y = 0;
+
+            x = (int) ((zoomValue * srcW - editorBound.width) / 2);
+            y = (int) ((zoomValue * srcH - editorBound.height) / 2);
+            rootEditPart.getZoomManager().setViewLocation(new Point(x, y));
+        }
+    }
+
+    public void updateAutoZoom() {
+        setPaddingSizeByDeviceCondition();
+
+        Point screenSize = this.getCurrentScreenSize();
+        int srcW = screenSize.x + PADDING_SIZE;
+        int srcH = screenSize.y + PADDING_SIZE;
+        int dstW = getControl().getSize().x;
+        int dstH = getControl().getSize().y;
+        if ((dstW != 0) || (dstH != 0)) {
+            double zoomValue = (double) dstW / (double) srcW;
+            if (srcH * zoomValue > dstH) {
+                zoomValue = (double) dstH / (double) srcH;
+            }
+            ((PreviewRootEditPart) getRootEditPart()).getZoomManager().setZoom(zoomValue);
+        }
+    }
+
+    private void setGraphicalDataManager(GraphicalDataManager graphicalDataManager) {
+        if (this.graphicalDataManager != null) {
+            this.unbindFromGraphicalDataManager();
+        }
+        this.graphicalDataManager = graphicalDataManager;
+        this.bindToGraphicalDataManager();
+    }
+
+    @Override
+    protected void handleDispose(DisposeEvent e) {
+        removeSelectionChangedListener(this);
+        unbindFromGraphicalDataManager();
+        super.handleDispose(e);
+    }
+
+    @Override
+    protected void createDefaultRoot() {
+        setRootEditPart(new PreviewRootEditPart());
+    }
+
+    @Override
+    public void setContents(Object contents) {
+        Part viewsPart = PartUtil.findViewsPart((Part) contents);
+        super.setContents(viewsPart);
+
+        // FIXME
+        if (getRootEditPart().getContents().getChildren().isEmpty() == false) {
+            currentActivatedViewEditPart = (EditPart) getRootEditPart().getContents().getChildren().get(0);
+        }
+    }
+
+    public void setInitCurrentActivatedView() {
+        if (getRootEditPart().getContents().getChildren().contains(currentActivatedViewEditPart) == false) {
+            currentActivatedViewEditPart = (EditPart) getRootEditPart().getContents().getChildren().get(0);
+            this.reqNewPageGraphicData();
+        }
+    }
+
+    @Override
+    public void setControl(Control control) {
+        super.setControl(control);
+
+        if (control != null) {
+            control.setBackground(ColorResources.PREVIEW_BACKGROUND);
+            control.addListener(SWT.Resize, this);
+
+            this.addSelectionChangedListener(new ISelectionChangedListener() {
+
+                @Override
+                public void selectionChanged(SelectionChangedEvent event) {
+                    for (Object child : ((StructuredSelection) event.getSelection()).toList()) {
+                        EditPart editPart = (EditPart) child;
+                        Part part = (Part) editPart.getModel();
+                        Part viewPart;
+                        viewPart = PartUtil.findViewPart(part);
+                        if (viewPart != null) {
+                            EditPart newViewEdit = (EditPart) getEditPartRegistry().get(viewPart.getUniqueId());
+                            if (!newViewEdit.equals(currentActivatedViewEditPart)
+                                    && ((Part) newViewEdit.getModel()).getParent() != null // prevent
+                                                                                           // dangling
+                            ) {
+                                if (currentActivatedViewEditPart != null) {
+                                    ((UIComponentEditPart) currentActivatedViewEditPart).getFigure().setVisible(false);
+                                }
+                                currentActivatedViewEditPart = newViewEdit;
+                                reqNewPageGraphicData();
+                            }
+                            break;
+                        }
+                    }
+                }
+            });
+        }
+    }
+
+    @Override
+    public void handleEvent(Event event) {
+        if (SWT.Resize == event.type) {
+            updateAutoZoom();
+            updateDeviceSize();
+            updateViewLocation();
+        }
+    }
+
+    private UIComponentEditPart getCurrentViewEditPart() {
+        return (UIComponentEditPart) currentActivatedViewEditPart;
+    }
+
+    private Part getCurrentViewPart() {
+        UIComponentEditPart viewEditPart = this.getCurrentViewEditPart();
+        if (viewEditPart != null) {
+            return (Part) viewEditPart.getModel();
+        }
+        return null;
+    }
+
+    private boolean isMyGraphicalData(GraphicalDataChangedEvent event) {
+        UIComponentEditPart viewEditPart = this.getCurrentViewEditPart();
+        if (viewEditPart != null) {
+            Part viewPart = (Part) viewEditPart.getModel();
+            if (viewPart.getUniqueId().equals(event.viewId) && event.deviceName.equals(currentDevice.getName()) && event.orientation.equals(currentOrientation)
+                    && event.locale.equals(currentLocale)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private void updatePageImageData(ImageDescriptor imageDescriptor) {
+        UIComponentEditPart viewEditPart = this.getCurrentViewEditPart();
+        ((PreviewImageFigure) viewEditPart.getFigure()).setImageDescriptor(imageDescriptor);
+    }
+
+    private void updataPageComponentPositions(final Map<String, Position> componentPositionMap) {
+        final UIComponentEditPart viewEditPart = getCurrentViewEditPart();
+        // TODO Need to check what is viewEditPart
+        Display.getDefault().syncExec(new Runnable() {
+            public void run() {
+                if (null != viewEditPart) {
+                    PreviewImageFigure figure = (PreviewImageFigure) viewEditPart.getFigure();
+                    figure.setVisible(false); // To refresh a ViewFigure (false -> true)
+                    updateComponentPosition(viewEditPart, componentPositionMap, true);
+
+                    figure.setVisible(true);
+                }
+            }
+        });
+    }
+
+    private void updateComponentPosition(UIComponentEditPart editPart, Map<String, Position> componentPositionMap, boolean isFireEvent) {
+        if (editPart != null) {
+            Part part = (Part) editPart.getModel();
+            if (part.getUniqueId() != null && !part.getUniqueId().isEmpty()) {
+                Position componentPosition = componentPositionMap.get(part.getUniqueId());
+                if (componentPosition != null) {
+                    editPart.setPosition(componentPosition);
+                    editPart.refresh();
+                }
+            }
+
+            List<?> children = editPart.getChildren();
+            for (int i = 0; i < children.size(); i++) {
+                UIComponentEditPart childEditPart = (UIComponentEditPart) children.get(i);
+                updateComponentPosition(childEditPart, componentPositionMap, isFireEvent);
+            }
+        }
+    }
+
+    private void handleComponentImageDataChanged(GraphicalDataChangedEvent event) {
+        if (isMyGraphicalData(event) == true) {
+            this.updatePageImageData(event.graphicData.imageDescriptor);
+        }
+    }
+
+    private void handleComponentPositionDataChanged(GraphicalDataChangedEvent event) {
+        if (isMyGraphicalData(event) == true) {
+            updataPageComponentPositions(event.graphicData.componentPositionMap);
+        }
+    }
+
+    @Override
+    public void componentImageDataChanged(GraphicalDataChangedEvent event) {
+        this.handleComponentImageDataChanged(event);
+    }
+
+    @Override
+    public void componentPositionDataChanged(GraphicalDataChangedEvent event) {
+        this.handleComponentPositionDataChanged(event);
+
+    }
+
+    @Override
+    public void placeholderPositionDataChanged(GraphicalDataChangedEvent event) {
+    }
+
+    public String getProfile() {
+        if (currentDevice != null) {
+            return currentDevice.getName().toLowerCase();
+        }
+        return "";
+    }
+
+    private Point getCurrentScreenSize() {
+        if (currentDevice == null) {
+            return new Point(1, 1);
+        }
+        if (currentOrientation.equals(MscreenConstants.ORIENTATION_PORTRAIT)) {
+            return new Point(currentDevice.getWidth(), currentDevice.getHeight());
+        } else {
+            return new Point(currentDevice.getHeight(), currentDevice.getWidth());
+        }
+    }
+
+    public MScreenQualifierManager getScreenQualifierManager() {
+        return this.screenQualifierMgr;
+    }
+
+    public void reqNewPageGraphicDataFromQualifiers(Device device, String orientation, String locale) {
+        if (device == null || orientation == null || locale == null) {
+            return;
+        }
+        currentDevice = device;
+        currentOrientation = orientation;
+        currentLocale = locale;
+
+        updateAutoZoom();
+
+        updateDeviceSize();
+        updateViewLocation();
+        this.reqNewPageGraphicData();
+
+    }
+
+    @Override
+    public void configurationSelected(MScreenQualifierManager mscreenManager) {
+        this.reqNewPageGraphicData();
+    }
+
+    @Override
+    public void selectionChanged(SelectionChangedEvent event) {
+        StructuredSelection selection = (StructuredSelection) event.getSelection();
+        // Must have to check size of selection
+        if (selection.size() == 1) {
+            EditPart editPart = (EditPart) selection.getFirstElement();
+
+            // FIXED: If remove a selected part, the cursor of TextEditor is moved suddenly
+            // because selection was changed to parent.
+            if (editPart != null) {
+                Object model = editPart.getModel();
+                if (model instanceof Part) {
+                    int type = ((Part) model).getType();
+                    if (type == PartType.COMPONENT || type == PartType.VIEW) {
+                        parentEditor.setSelection((Part) editPart.getModel());
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public void partsChanged(List<PartMutation> mutations, PartObserver observer, String sender) {
+        if (sender.equals(PartObserver.MESSAGE_VALID_XML)) {
+            setEnabled(true);
+        } else if (sender.equals(PartObserver.MESSAGE_INVALID_XML)) {
+            setEnabled(false);
+            return;
+        }
+
+        Map<Part, String> partMapToRefresh = new HashMap<Part, String>();
+        boolean isViewChanged = false;
+
+        for (PartMutation mutation : mutations) {
+            String mutationType = mutation.getType();
+            if (mutationType.equals(PartMutation.PARTS_ADDED)) {
+                for (Part part : mutation.getAddedParts()) {
+                    if (part instanceof ViewPart) {
+                        isViewChanged = true;
+                        break;
+                    }
+                }
+            } else if (mutationType.equals(PartMutation.PARTS_REMOVED)) {
+                for (Part part : mutation.getRemovedParts()) {
+                    if (part instanceof ViewPart) {
+                        isViewChanged = true;
+                        break;
+                    }
+                }
+            }
+            if (mutationType.equals(PartMutation.PARTS_ADDED) ||
+                    mutationType.equals(PartMutation.PARTS_REMOVED)
+                    || mutationType.equals(PartMutation.PARTS_ORDER_CHANGED)) {
+                if (mutation.getTargetPart() instanceof ComponentPart) {
+                    partMapToRefresh.put(mutation.getTargetPart(), "");
+                }
+            }
+        }
+
+        if (isViewChanged) {
+            getContents().refresh();
+        }
+        for (Part child : partMapToRefresh.keySet()) {
+            UIComponentEditPart editPart = (UIComponentEditPart) getEditPartRegistry().get(child.getUniqueId());
+            if (editPart != null) {
+                refreshEditPart(editPart);
+            }
+        }
+        reqNewPageGraphicData();
+    }
+
+    @Override
+    public void projectResourceFileChanged(ArrayList<String> changedFiles) {
+        // TODO FIXME
+        this.reqNewPageGraphicData();
+
+    }
+
+    private void refreshEditPart(EditPart editPart) {
+        editPart.refresh();
+        List<?> children = editPart.getChildren();
+        for (int i = 0; i < children.size(); i++) {
+            UIComponentEditPart childEditPart = (UIComponentEditPart) children.get(i);
+            refreshEditPart(childEditPart);
+        }
+
+    }
+
+    public Device getCurrentDevice() {
+        return currentDevice;
+    }
+
+    public void setEnabled(boolean enabled) {
+        if (this.enabled == enabled) {
+            return;
+        }
+        this.enabled = enabled;
+        getLayerManager().getLayer(CustomLayerConstants.BLOCK_LAYER).setVisible(!enabled);
+        getControl().setEnabled(enabled);
+        parentEditor.setPreviewToolbarEnabled(enabled);
+        int isScrollBarShown = enabled ? FigureCanvas.AUTOMATIC : FigureCanvas.NEVER;
+        this.getFigureCanvas().setScrollBarVisibility(isScrollBarShown);
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/editparts/PreviewEditPartFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/editparts/PreviewEditPartFactory.java
new file mode 100644 (file)
index 0000000..c87c36d
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.preview.editparts;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+
+
+public class PreviewEditPartFactory implements EditPartFactory {
+
+    @Override
+    public EditPart createEditPart(EditPart context, Object model) {
+        UIComponentEditPart retValue = null;
+        if (model instanceof Part) {
+            Part partModel = (Part) model;
+
+            if (partModel.getType() == PartType.VIEWS || partModel.getType() == PartType.VIEW || partModel.getType() == PartType.COMPONENT) {
+                retValue = new UIComponentEditPart();
+                retValue.setModel(model);
+            }
+
+        }
+
+        return retValue;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/editparts/PreviewRootEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/editparts/PreviewRootEditPart.java
new file mode 100644 (file)
index 0000000..9258828
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.preview.editparts;
+
+import org.eclipse.draw2d.DelegatingLayout;
+import org.eclipse.draw2d.FigureCanvas;
+import org.eclipse.draw2d.Layer;
+import org.eclipse.draw2d.LayeredPane;
+import org.eclipse.draw2d.ScalableFreeformLayeredPane;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
+import org.tizen.efluibuilder.gef.editparts.utility.VirtualLayer;
+import org.tizen.efluibuilder.gef.layers.BlockLayer;
+import org.tizen.efluibuilder.gef.layers.CustomLayerConstants;
+import org.tizen.efluibuilder.ui.editor.ZoomUtil;
+
+
+public class PreviewRootEditPart extends ScalableFreeformRootEditPart {
+
+    private static final String NAME_VIRTUAL_LAYER = "virtual";
+
+    public PreviewRootEditPart() {
+        super();
+        getZoomManager().setZoomLevels(ZoomUtil.zoomLevels);
+        ((BlockLayer)getLayer(CustomLayerConstants.BLOCK_LAYER)).setViewPort(getZoomManager().getViewport());
+    }
+
+    @Override
+    protected void createLayers(LayeredPane layeredPane) {
+        super.createLayers(layeredPane);
+
+        BlockLayer blockLayer = new BlockLayer();
+        blockLayer.setVisible(false);
+        layeredPane.add(blockLayer, CustomLayerConstants.BLOCK_LAYER);
+
+        Layer layer = (Layer) getLayer(HANDLE_LAYER);
+        layer.setLayoutManager(new DelegatingLayout());
+    }
+
+    @Override
+    protected ScalableFreeformLayeredPane createScaledLayers() {
+        ScalableFreeformLayeredPane layers = super.createScaledLayers();
+        VirtualLayer layer = new VirtualLayer();
+        layers.add(layer, NAME_VIRTUAL_LAYER);
+        return layers;
+    }
+
+    public void updateBrowserSize(int srcW, int srcH, int dstW, int dstH) {
+        VirtualLayer virtualLayer = (VirtualLayer) getLayer(NAME_VIRTUAL_LAYER);
+        Rectangle bounds = new Rectangle(-(srcW / 2), -(srcH / 2), srcW * 2, srcH * 2);
+        virtualLayer.setVirtualSize(bounds);
+        virtualLayer.revalidate();
+        virtualLayer.repaint();
+        getScaledLayers().revalidate();
+    }
+
+    public void updateScrollbar(int srcW, int srcH, int dstW, int dstH) {
+        Rectangle contentBounds = new Rectangle(0, 0, srcW, srcH);
+        contentBounds.performScale(getZoomManager().getZoom());
+
+        FigureCanvas canvas = (FigureCanvas) getViewer().getControl();
+        if ((dstW < contentBounds.width()) || (dstH < contentBounds.height())) {
+            canvas.setHorizontalScrollBarVisibility(FigureCanvas.AUTOMATIC);
+            canvas.setVerticalScrollBarVisibility(FigureCanvas.AUTOMATIC);
+        } else {
+            canvas.setHorizontalScrollBarVisibility(FigureCanvas.NEVER);
+            canvas.setVerticalScrollBarVisibility(FigureCanvas.NEVER);
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/editparts/UIComponentEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/editparts/UIComponentEditPart.java
new file mode 100644 (file)
index 0000000..bc1a9c5
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.preview.editparts;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.Disposable;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.renderer.Position;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.PreviewViewer;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.figures.DeviceImageFigure;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.figures.PreviewImageFigure;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.figures.ProfileFigure;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.figures.UIComponentFigure;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.policies.PreviewSelectionPolicy;
+
+
+public class UIComponentEditPart extends AbstractGraphicalEditPart {
+
+    Position position = null;
+
+    @Override
+    public void activate() {
+        super.activate();
+    }
+
+    @Override
+    public void deactivate() {
+        IFigure iFigure = getFigure();
+        if (iFigure instanceof Disposable) {
+            ((Disposable) iFigure).dispose();
+        }
+
+        super.deactivate();
+    }
+
+    @Override
+    protected IFigure createFigure() {
+        Part part = (Part) getModel();
+        if (part instanceof ViewsPart) {
+            DeviceImageFigure figure = new DeviceImageFigure();
+            figure.setProfile(((PreviewViewer) getViewer()).getProfile());
+            return figure;
+        } else if (part instanceof ViewPart) {
+            return new PreviewImageFigure();
+        } else {
+            return new UIComponentFigure();
+        }
+    }
+
+    private String getId() {
+        Part part = ((Part) getModel());
+        if (part != null) {
+            return part.getUniqueId();
+        } else {
+            return null;
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    protected void registerModel() {
+        getViewer().getEditPartRegistry().put(getId(), this);
+    }
+
+    @Override
+    protected void createEditPolicies() {
+        installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new PreviewSelectionPolicy());
+    }
+
+    @Override
+    protected List<Part> getModelChildren() {
+        if (getModel() instanceof Part) {
+            return ((Part) getModel()).getComponentChildren();
+        }
+        return new ArrayList<Part>();
+    }
+
+    @Override
+    protected void refreshVisuals() {
+        super.refreshVisuals();
+
+        IFigure figure = getFigure();
+        if (figure != null && position != null)
+            figure.setBounds(position.getBounds());
+
+        if (figure instanceof ProfileFigure) {
+            // FIXED: NPE problem. viewer can be null.
+            EditPartViewer viewer = getViewer();
+            if (viewer instanceof PreviewViewer) {
+                ((ProfileFigure) figure).setProfile(((PreviewViewer) viewer).getProfile());
+            }
+        }
+    }
+
+    @Override
+    public void setSelected(int value) {
+        super.setSelected(value);
+
+        if (getFigure() instanceof UIComponentFigure) {
+            UIComponentFigure figure = (UIComponentFigure) getFigure();
+            boolean bSelected = false;
+            if (value != EditPart.SELECTED_NONE)
+                bSelected = true;
+            figure.setSelect(bSelected);
+            figure.repaint();
+        }
+    }
+
+    public Position getPosition() {
+        return position;
+    }
+
+    public void setPosition(Position position) {
+        this.position = position;
+    }
+
+    @Override
+    public boolean isSelectable() {
+        return true;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/DeviceImageFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/DeviceImageFigure.java
new file mode 100644 (file)
index 0000000..fea61fe
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.preview.figures;
+
+import org.eclipse.draw2d.FreeformLayer;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class DeviceImageFigure extends FreeformLayer {
+    private Rectangle viewBounds = null;
+    private String profile = null;
+
+    public void setViewBounds(Rectangle bounds) {
+        viewBounds = bounds;
+        repaint();
+    }
+
+    @Override
+    protected void paintFigure(Graphics graphics) {
+        graphics.pushState();
+        if (ImageFigureConstants.WEARABLE_CIRCLE_DPI.equals(profile)) {
+            paintWearableMobile(graphics, ImageResources.PREVIEW_CIRCLE);
+        } else if (ImageFigureConstants.WEARABLE_RECTANGLE_HDPI_DPI.equals(profile)) {
+            paintWearableMobile(graphics, ImageResources.PREVIEW_WEARABLE_RECT_320);
+        } else if (ImageFigureConstants.WEARABLE_RECTANGLE_MDPI_DPI.equals(profile)) {
+            paintWearableMobile(graphics, ImageResources.PREVIEW_WEARABLE_RECT_360);
+        } else if (ImageFigureConstants.MOBILE_HD_DPI.equals(profile)) {
+            if (viewBounds.width() <= viewBounds.height()) {
+                paintWearableMobile(graphics, ImageResources.PREVIEW_MOBILE_HD_PORTRAIT);
+            } else {
+                paintWearableMobile(graphics, ImageResources.PREVIEW_MOBILE_HD_LANDSCAPE);
+            }
+        } else if (ImageFigureConstants.MOBILE_WVGA_DPI.equals(profile)) {
+            if (viewBounds.width() <= viewBounds.height()) {
+                paintWearableMobile(graphics, ImageResources.PREVIEW_MOBILE_WVGA_PORTRAT);
+            } else {
+                paintWearableMobile(graphics, ImageResources.PREVIEW_MOBILE_WVGA_LANDSCAPE);
+
+            }
+        }
+
+        graphics.popState();
+    }
+
+    private void paintWearableMobile(Graphics graphics, String imageResourcePath) {
+        if (viewBounds == null) {
+            return;
+        }
+        graphics.setAntialias(SWT.ON);
+        Image backgroundImage = ImageResources.getImage(imageResourcePath);
+        if (backgroundImage != null) {
+            int destX = -(backgroundImage.getImageData().width - viewBounds.width()) / 2;
+            int destY = -(backgroundImage.getImageData().height - viewBounds.height()) / 2;
+            graphics.drawImage(backgroundImage, destX, destY);
+        }
+    }
+
+    public void setProfile(String profile) {
+        this.profile = profile;
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/ImageFigureConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/ImageFigureConstants.java
new file mode 100644 (file)
index 0000000..9030578
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.preview.figures;
+
+public class ImageFigureConstants {
+    public static final String WEARABLE_CIRCLE_DPI = "circle_360x360";//$NON-NLS-1$
+    public static final String WEARABLE_RECTANGLE_HDPI_DPI = "square_320x320";//$NON-NLS-1$
+    public static final String WEARABLE_RECTANGLE_MDPI_DPI = "square_360x480";//$NON-NLS-1$
+    public static final String MOBILE_HD_DPI = "hd";//$NON-NLS-1$
+    public static final String MOBILE_WVGA_DPI = "wvga";//$NON-NLS-1$
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/PreviewImageFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/PreviewImageFigure.java
new file mode 100644 (file)
index 0000000..f8dc6ce
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.preview.figures;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.Disposable;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Path;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.utility.CachedImage;
+import org.tizen.efluibuilder.utility.ImageUtil;
+
+
+public class PreviewImageFigure extends ProfileFigure implements Disposable {
+
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    private ImageDescriptor imageDescriptor = null;
+    private final CachedImage cache = new CachedImage();
+
+    public void setImageDescriptor(ImageDescriptor imageDescriptor) {
+        this.imageDescriptor = imageDescriptor;
+    }
+
+    @Override
+    protected void paintFigure(Graphics graphics) {
+        if (imageDescriptor == null) {
+            return;
+        }
+
+        Image image = this.cache.get(imageDescriptor);
+        if (image == null) {
+            logger.error(this.getClass().getName() + " image is not created.");
+            return;
+        }
+
+        graphics.pushState();
+        if (getProfile().equals(ImageFigureConstants.WEARABLE_CIRCLE_DPI)) {
+            Path circlePath = ImageUtil.createCirclePath(getBounds().x, getBounds().y, getBounds().width(), getBounds().height());
+            graphics.clipPath(circlePath);
+        }
+        graphics.drawImage(image, new Rectangle(image.getBounds()), getBounds());
+        graphics.popState();
+    }
+
+    @Override
+    public void dispose() {
+        this.cache.dispose();
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/ProfileFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/ProfileFigure.java
new file mode 100644 (file)
index 0000000..b6d4bf4
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.preview.figures;
+
+import org.eclipse.draw2d.Figure;
+
+
+public abstract class ProfileFigure extends Figure {
+
+    private String devProfile = null;
+
+    public void setProfile(String devProfile) {
+        this.devProfile = devProfile;
+    }
+
+    protected String getProfile() {
+        return this.devProfile;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/UIComponentFigure.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/figures/UIComponentFigure.java
new file mode 100644 (file)
index 0000000..bf01966
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.preview.figures;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+
+public class UIComponentFigure extends Figure {
+
+    boolean isSelected = false;
+
+    public void setSelect(boolean value) {
+        this.isSelected = value;
+    }
+
+    @Override
+    protected void paintFigure(Graphics graphics) {
+        if (isSelected) {
+            graphics.setBackgroundColor(ColorConstants.black);
+            graphics.setLineStyle(Graphics.LINE_DOT);
+            graphics.setLineWidth(3);
+            Rectangle bounds = getBounds().getCopy();
+            bounds.x += 2;
+            bounds.y += 2;
+            bounds.width -= 4;
+            bounds.height -= 4;
+            graphics.drawRectangle(bounds);
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/policies/PreviewSelectionPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/preview/policies/PreviewSelectionPolicy.java
new file mode 100644 (file)
index 0000000..073e006
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.preview.policies;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.editpolicies.SelectionEditPolicy;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.editparts.PreviewRootEditPart;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.figures.DeviceImageFigure;
+
+
+public class PreviewSelectionPolicy extends SelectionEditPolicy {
+
+    private RectangleFigure hoverFeedback;
+
+    public PreviewSelectionPolicy() {
+        super();
+    }
+
+    @Override
+    public void activate() {
+        super.activate();
+
+        if (hoverFeedback == null) {
+            hoverFeedback = new RectangleFigure();
+            hoverFeedback.setAlpha(50);
+            hoverFeedback.setFill(true);
+            hoverFeedback.setOutline(true);
+            hoverFeedback.setLineWidth(3);
+            hoverFeedback.setLineStyle(Graphics.LINE_DOT);
+            hoverFeedback.setBounds(new Rectangle(0, 0, 0, 0));
+            hoverFeedback.setVisible(false);
+            hoverFeedback.setBackgroundColor(ColorConstants.blue);
+            getFeedbackLayer().add(hoverFeedback);
+        }
+    }
+
+    @Override
+    public void deactivate() {
+        if (hoverFeedback != null) {
+            getFeedbackLayer().remove(hoverFeedback);
+            hoverFeedback = null;
+        }
+        super.deactivate();
+    }
+
+    @Override
+    public void showTargetFeedback(Request request) {
+
+        GraphicalEditPart targetEditPart = (GraphicalEditPart) getHost();
+        if (targetEditPart != null && targetEditPart.getFigure() != null) {
+            if (targetEditPart.getFigure() instanceof DeviceImageFigure)
+                return;
+
+            Rectangle figureBounds = targetEditPart.getFigure().getBounds().getCopy();
+            double zoomSize = ((PreviewRootEditPart) getHost().getRoot()).getZoomManager().getZoom();
+            figureBounds.performScale(zoomSize);
+            hoverFeedback.setBounds(figureBounds);
+            hoverFeedback.setVisible(true);
+        }
+        return;
+    }
+
+    @Override
+    public void eraseTargetFeedback(Request request) {
+        hoverFeedback.setVisible(false);
+        return;
+    }
+
+    @Override
+    protected void hideSelection() {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    protected void showSelection() {
+        // TODO Auto-generated method stub
+
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/LayoutSchemaProvider.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/LayoutSchemaProvider.java
new file mode 100644 (file)
index 0000000..52df703
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.validation;
+
+import java.io.File;
+import java.net.URI;
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.IExternalSchemaLocationProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.BuilderPlugin;
+import org.tizen.efluibuilder.model.app.AppManager;
+import org.tizen.efluibuilder.utility.ResourceUtil;
+
+
+@SuppressWarnings("restriction")
+public class LayoutSchemaProvider implements IExternalSchemaLocationProvider {
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
+
+    private final static String schemaFile = "layout.xsd"; //$NON-NLS-1$
+    private final static String layoutFile = "layout.xml"; //$NON-NLS-1$
+
+    private boolean isLayoutFile(URI fileUri) {
+        String filename = new File(fileUri).getName();
+        return layoutFile.equalsIgnoreCase(filename);
+    }
+
+    private IProject getProjectFrom(URI fileUri) {
+        // find a folder in workspace
+        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+        IContainer[] containers = root.findContainersForLocationURI(fileUri);
+        if (containers.length == 0) {
+            return null;
+        }
+
+        return containers[0].getProject();
+    }
+
+    private Map<String, String> createLocationMap(URI uri) {
+        // FIXED: The URI argument type of Map MUST be String for XMLValidator.
+        Map<String, String> value = new HashMap<String, String>();
+        value.put(SCHEMA_LOCATION, URIUtil.toUnencodedString(uri));
+        value.put(NO_NAMESPACE_SCHEMA_LOCATION, URIUtil.toUnencodedString(uri));
+        return value;
+    }
+
+    @Override
+    public Map getExternalSchemaLocation(URI fileURI) {
+        // check 'layout.xml'
+        if (!isLayoutFile(fileURI)) {
+            return null;
+        }
+
+        // find a project of 'layout.xml'
+        IProject project = getProjectFrom(fileURI);
+        if (project == null) {
+            String msg = MessageFormat.format("[{0}] Failed to find a project from URI: {1}",
+                                              getClass().getSimpleName(), fileURI);
+            logger.debug(msg);
+            return null;
+        }
+
+        // find a schema file of the project from this plugin
+        String schemaLocation = AppManager.getAppManager(project).getSchemaLocation();
+        if (schemaLocation == null) {
+            return null;
+        }
+
+        // BugFix: Extract included schemas in Plugin
+        // TODO: If schemas will be moved to platform directory, remove this code.
+        ResourceUtil.getURI(BuilderPlugin.PLUGIN_ID, schemaLocation);
+
+        IPath path = new Path(schemaLocation).append(schemaFile);
+        URI schemaFileURI = ResourceUtil.getURI(BuilderPlugin.PLUGIN_ID, path.toString());
+        if (schemaFileURI == null) {
+            String msg = MessageFormat.format("[{0}] Failed to find a schema file from plugin: {1}",
+                                              getClass().getSimpleName(), path);
+            logger.debug(msg);
+            return null;
+        }
+        return createLocationMap(schemaFileURI.normalize());
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/LayoutValidator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/LayoutValidator.java
new file mode 100644 (file)
index 0000000..a114793
--- /dev/null
@@ -0,0 +1,283 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.validation;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.ui.internal.reconcile.validator.ISourceValidator;
+import org.eclipse.wst.validation.internal.core.Message;
+import org.eclipse.wst.validation.internal.core.ValidationException;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+import org.eclipse.wst.xml.core.internal.validation.XMLValidationConfiguration;
+import org.eclipse.wst.xml.core.internal.validation.XMLValidationReport;
+import org.eclipse.wst.xml.core.internal.validation.XMLValidator;
+import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+
+
+@SuppressWarnings("restriction")
+public class LayoutValidator implements ISourceValidator, IValidator {
+
+    private static Logger logger = LoggerFactory.getLogger(LayoutValidator.class);
+
+    // Internal class
+    protected static class LocalizedMessage extends Message {
+
+        private String _message = null;
+
+        public LocalizedMessage(int severity, String messageText) {
+            this(severity, messageText, null);
+        }
+
+        public LocalizedMessage(int severity, String messageText, IResource targetObject) {
+            this(severity, messageText, (Object) targetObject);
+        }
+
+        public LocalizedMessage(int severity, String messageText, Object targetObject) {
+            super(null, severity, null);
+            setLocalizedMessage(messageText);
+            setTargetObject(targetObject);
+        }
+
+        public void setLocalizedMessage(String message) {
+            _message = message;
+        }
+
+        public String getLocalizedMessage() {
+            return _message;
+        }
+
+        public String getText() {
+            return getLocalizedMessage();
+        }
+
+        public String getText(ClassLoader cl) {
+            return getLocalizedMessage();
+        }
+
+        public String getText(Locale l) {
+            return getLocalizedMessage();
+        }
+
+        public String getText(Locale l, ClassLoader cl) {
+            return getLocalizedMessage();
+        }
+    }
+
+    // Attributes
+    private static XMLValidator validator = new XMLValidator();
+    private static XMLValidationConfiguration valConfig = new XMLValidationConfiguration();
+
+    /**
+     * Constructor
+     */
+    static {
+        try {
+            validator.setURIResolver(new SchemaURIResolver());
+            // FIXED: No grammar warning is shown always at first line. Remove it.
+            valConfig.setFeature(XMLValidationConfiguration.INDICATE_NO_GRAMMAR, 0);
+
+            // FIXED: No document element warning is not shown always. Add it.
+            valConfig.setFeature(XMLValidationConfiguration.INDICATE_NO_DOCUMENT_ELEMENT, 1);
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public void connect(IDocument document) {
+    }
+
+    @Override
+    public void disconnect(IDocument document) {
+    }
+
+    public static synchronized XMLValidationReport validateXml(String uriPath, InputStream is) {
+        XMLValidationReport report = validator.validate(uriPath, is, valConfig);
+        logger.debug("Layout validation result: " + report.isValid());
+        return report;
+    }
+
+    public static List<ValidationInfo> validateXml(IFile layoutMetaFile) {
+        List<ValidationInfo> validationInfo = new ArrayList<ValidationInfo>();
+        String uriPath = URIUtil.toUnencodedString(layoutMetaFile.getLocationURI());
+        IStructuredModel model = null;
+        InputStream is = null;
+        try {
+            model = StructuredModelManager.getModelManager().getModelForRead(layoutMetaFile);
+            IStructuredDocument structuredDoc = model.getStructuredDocument();
+            String content = structuredDoc.get();
+            is = new ByteArrayInputStream(content.getBytes());
+
+            XMLValidationReport report = validator.validate(uriPath, is, valConfig);
+            for (ValidationMessage message : report.getValidationMessages()) {
+                validationInfo.add(new ValidationInfo(message.getLineNumber(), message.getMessage()));
+            }
+            if (report.isValid()) {
+                String errorMsg = new NonSchemaBasedLayoutValidator().validate(structuredDoc);
+                if (errorMsg != null && errorMsg.isEmpty() == false) {
+                    int offset = structuredDoc.getText().indexOf(LayoutSchemaConstants.MSCREEN);
+                    validationInfo.add(new ValidationInfo(structuredDoc.getLineOfOffset(offset), errorMsg));
+                }
+            }
+        } catch (IOException | CoreException e) {
+            logger.error(e.getMessage(), e);
+        } finally {
+            if(is != null) {
+                try {
+                    is.close();
+                } catch (IOException e) {
+                    logger.error(e.getMessage(), e);
+                }
+            }
+            if (model != null) {
+                model.releaseFromRead();
+            }
+        }
+        return validationInfo;
+    }
+
+    @Override
+    public void validate(IRegion dirtyRegion, IValidationContext helper, IReporter reporter) {
+    }
+
+    @Override
+    public void cleanup(IReporter reporter) {
+        reporter.removeAllMessages(this);
+    }
+
+    @Override
+    public void validate(IValidationContext helper, IReporter reporter) throws ValidationException {
+        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+        for (String uri : helper.getURIs()) {
+            String uriPath = "file://layout.xml"; // old default path
+
+            // find current uri
+            IResource member = root.findMember(new Path(uri));
+            IFile file = null;
+            if (member instanceof IFile) {
+                file = (IFile) member;
+                uriPath = URIUtil.toUnencodedString(file.getLocationURI());
+            } else {
+                logger.warn("Stopped validation. URI is not file: " + uri);
+                continue;
+            }
+
+            IStructuredModel model = null;
+            try {
+                // load model
+                model = StructuredModelManager.getModelManager().getModelForRead(file);
+                if (model == null) {
+                    logger.error("Stopped validation. Cannot load structured model.");
+                    continue;
+                }
+
+                // convert to InputStream
+                IStructuredDocument structuredDoc = model.getStructuredDocument();
+                String content = structuredDoc.get();
+                final InputStream is = new ByteArrayInputStream(content.getBytes());
+
+                // validate
+                XMLValidationReport report = validateXml(uriPath, is);
+
+                // add messages
+                for (ValidationMessage message : report.getValidationMessages()) {
+                    // FIXED: When XML header was incorrect and then it is corrected,
+                    // problem info is not hided.
+                    IMessage m = new LocalizedMessage(IMessage.HIGH_SEVERITY, message.getMessage());
+
+                    int docLine = structuredDoc.getNumberOfLines();
+                    int messageLine = message.getLineNumber();
+
+                    IStructuredDocumentRegion region = null;
+                    if (messageLine >= docLine) {
+                        region = structuredDoc.getLastStructuredDocumentRegion();
+                    } else {
+                        region = structuredDoc.getRegionAtCharacterOffset(structuredDoc.getLineOffset(messageLine) - 2);
+                    }
+                    int startOffset = region != null ? region.getStartOffset() : 0;
+                    int length = region != null ? region.getLength() : 0;
+                    m.setOffset(startOffset);
+                    m.setLength(length);
+                    m.setLineNo(messageLine);
+
+                    logger.debug(MessageFormat.format("[Line: {0}, Offset: {1}, Length: {2}] {3}",
+                                                      m.getLineNumber(),
+                                                      m.getOffset(),
+                                                      m.getLength(),
+                                                      m.getText()));
+                    reporter.addMessage(this, m);
+                }
+
+                if (report.isValid()) {
+                    String errorMsg = new NonSchemaBasedLayoutValidator().validate(structuredDoc);
+                    if (errorMsg != null && errorMsg.isEmpty() == false) {
+                        IMessage m = new LocalizedMessage(IMessage.HIGH_SEVERITY, errorMsg);
+                        int offset = structuredDoc.getText().indexOf(LayoutSchemaConstants.MSCREEN);
+                        IStructuredDocumentRegion region = structuredDoc.getRegionAtCharacterOffset(offset);
+                        m.setOffset(region.getStartOffset());
+                        m.setLength(region.getLength());
+                        m.setLineNo(structuredDoc.getLineOfOffset(offset));
+                        reporter.addMessage(this, m);
+                    }
+                }
+            } catch (IOException e) {
+                logger.error(e.getMessage(), e);
+            } catch (CoreException e) {
+                logger.error(e.getMessage(), e);
+            } catch (BadLocationException e) {
+                logger.error(e.getMessage(), e);
+            } finally {
+                if (model != null) {
+                    model.releaseFromRead();
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/Messages.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/Messages.java
new file mode 100644 (file)
index 0000000..1313d4b
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.validation;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.tizen.efluibuilder.ui.editor.texteditor.validation.messages"; //$NON-NLS-1$
+    public static String NonSchemaBasedLayoutValidator_DuplicatedCommonType;
+    public static String NonSchemaBasedLayoutValidator_NoCommonType;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/NonSchemaBasedLayoutValidator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/NonSchemaBasedLayoutValidator.java
new file mode 100644 (file)
index 0000000..b31163d
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.validation;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.jface.text.IDocument;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+
+public class NonSchemaBasedLayoutValidator {
+
+    private Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    private Document getDocument(IDocument doc) throws SAXException, IOException, ParserConfigurationException {
+        DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+        InputStream bais = new ByteArrayInputStream(doc.get().getBytes());
+        return docBuilder.parse(bais);
+    }
+
+    private Element[] getElement(Element parent, String tagName) {
+        NodeList nodeList = parent.getElementsByTagName(tagName);
+
+        int length = nodeList.getLength();
+
+        Element[] childs = new Element[length];
+        for (int i = 0; i < length; i++) {
+            childs[i] = (Element) nodeList.item(i);
+        }
+
+        return childs;
+    }
+
+    private boolean hasAttributeValue(Element element, String attr, String value) {
+        return value.equals(element.getAttribute(attr));
+    }
+
+    public String validate(IDocument doc) {
+        Document document = null;
+        try {
+            document = getDocument(doc);
+        } catch (SAXException e) {
+            logger.error(e.getMessage(), e);
+            return null; // In this case, XML structure is broken.
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+            return null; // In this case, XML structure is broken.
+        } catch (ParserConfigurationException e) {
+            logger.error(e.getMessage(), e);
+            return null;
+        }
+
+        // <document>
+        Element documentElement = document.getDocumentElement();
+        /* documentElement is not null by schema based validation */
+
+        // <mscreen>
+        Element[] mscreenElements = getElement(documentElement, LayoutSchemaConstants.MSCREEN);
+        /* mscreenElements has at least one mscreen element by schema based validation */
+
+        // <configuration>
+        Element[] configElements = getElement(mscreenElements[0], LayoutSchemaConstants.CONFIGURATION);
+        /* configElements has at least one configuration element by schema based validation */
+
+        // POLICY: Children of mscreen MUST have a configuration with a common type attribute.
+        boolean hasCommonConfiguration = false;
+        for (Element configElement : configElements) {
+            if (hasAttributeValue(configElement,
+                                  LayoutSchemaConstants.TYPE,
+                                  LayoutSchemaConstants.CONFIGURATION_TYPE_COMMON)) {
+                if (hasCommonConfiguration) { // if has common type already
+                    return Messages.NonSchemaBasedLayoutValidator_DuplicatedCommonType;
+                }
+                hasCommonConfiguration = true;
+            }
+        }
+        if (hasCommonConfiguration == false) { // if no common type
+            return Messages.NonSchemaBasedLayoutValidator_NoCommonType;
+        }
+
+        return ""; // No error
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/SchemaURIResolver.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/SchemaURIResolver.java
new file mode 100644 (file)
index 0000000..4ce9bcf
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.editor.texteditor.validation;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+@SuppressWarnings("restriction")
+public final class SchemaURIResolver implements URIResolver {
+
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
+    private String SCHEMA_EXTENSION = ".xsd";
+
+    @Override
+    public String resolve(String baseLocation, String publicId, String systemId) {
+        // baseLocation is the location of the resource that contains the uri
+        // systemId is relative path for xsd that is included in baseLocation
+        if (baseLocation == null) {
+            return null;
+        }
+
+        if (!baseLocation.contains(SCHEMA_EXTENSION)) {
+            return null;
+        }
+        IPath path = new Path(baseLocation);
+        IPath xsdDirectory = path.removeLastSegments(1); // get directory's absolute path from
+                                                         // paramString1
+        IPath absolutePath = xsdDirectory.append(systemId);
+
+        return absolutePath.toString();
+    }
+
+    @Override
+    public String resolvePhysicalLocation(String baseLocation, String publicId, String systemId ) {
+        // just return systemId
+        return systemId;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/ValidationInfo.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/ValidationInfo.java
new file mode 100644 (file)
index 0000000..ea23abc
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.texteditor.validation;
+
+public class ValidationInfo {
+    public final int lineNum;
+    public final String message;
+
+    public ValidationInfo(int lineNum, String message) {
+        this.lineNum = lineNum;
+        this.message = message;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/messages.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/texteditor/validation/messages.properties
new file mode 100644 (file)
index 0000000..59a9beb
--- /dev/null
@@ -0,0 +1,2 @@
+NonSchemaBasedLayoutValidator_DuplicatedCommonType='type' attribute with 'common' value is duplicated in configuration elements
+NonSchemaBasedLayoutValidator_NoCommonType=No 'type' attribute with 'common' value in configuration elements
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/AbstractToolbar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/AbstractToolbar.java
new file mode 100644 (file)
index 0000000..56a5a57
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.toolbar;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.ToolBar;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+
+
+public abstract class AbstractToolbar {
+
+    private ToolBar toolBar = null;
+    private CombineEditorPart editor = null;
+
+    public AbstractToolbar(Composite parent, CombineEditorPart editor) {
+        super();
+        this.editor = editor;
+        this.toolBar = new ToolBar(parent, SWT.FLAT);
+    }
+
+    protected ToolBar getControl() {
+        return toolBar;
+    }
+
+    protected CombineEditorPart getEditor() {
+        return editor;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/DesignEditorToolbar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/DesignEditorToolbar.java
new file mode 100644 (file)
index 0000000..bcb5926
--- /dev/null
@@ -0,0 +1,211 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.toolbar;
+
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.layout.RowLayoutFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Layout;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.ui.IEditorActionBarContributor;
+import org.tizen.common.util.SWTUtil;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditorActionBarContributor;
+
+
+public class DesignEditorToolbar extends AbstractToolbar {
+    private static final int UNKNOWN = -1;
+
+    private ZoomControlToolbar designZoomControlToolbar = null;
+    private ZoomControlToolbar storyboardZoomControlToolbar = null;
+    private ScreenDesignToolbar mscreenDesignToolbar = null;
+    private EditorModeToolbar editorModeToolbar = null;
+    private StoryboardAutoLayoutToolbar storyboardAutoLayoutToolbar = null;
+
+    private ToolBar actionsToolbar = null;
+    private int type = UNKNOWN;
+
+    private Composite parent = null;
+
+    public DesignEditorToolbar(Composite parent, CombineEditorPart editor) {
+        super(parent, editor);
+        this.parent = parent;
+    }
+
+    public void setType(int type) {
+        this.type = type;
+    }
+
+    public int getType() {
+        return this.type;
+    }
+
+    public Composite create() {
+        // replace parent layout
+        Layout parentLayout = this.parent.getLayout();
+        this.parent.setLayout(new FormLayout());
+
+        // FIXME: The bottom margin of ToolBar for Windows is different with other OS.
+        // It should find a better solution.
+
+        // toolbar layout data
+        FormData formData = new FormData();
+        formData.top = new FormAttachment(0, ToolBarConstants.TOOLBAR_TOP_MARGIN);
+        formData.left = new FormAttachment(0);
+        formData.height = ToolBarConstants.TOOLBAR_HEIGHT;
+        formData.right = new FormAttachment(100);
+        getControl().setLayoutData(formData);
+
+        RowLayoutFactory fillDefaults = RowLayoutFactory.fillDefaults();
+        fillDefaults.wrap(false);
+        RowLayout rowLayout = fillDefaults.create();
+        rowLayout.center = true;
+        getControl().setLayout(rowLayout);
+
+        // line seperator
+        Label lineSeperator = new Label(this.parent, SWT.HORIZONTAL | SWT.SEPARATOR);
+        formData = new FormData();
+        formData.top = new FormAttachment(getControl());
+        formData.left = new FormAttachment(0, 0);
+        formData.right = new FormAttachment(100, 0);
+        lineSeperator.setLayoutData(formData);
+
+        // another layout data
+        Composite childComposite = new Composite(this.parent, SWT.NONE);
+        formData = new FormData();
+        formData.top = new FormAttachment(lineSeperator);
+        formData.left = new FormAttachment(0, 0);
+        formData.right = new FormAttachment(100, 0);
+        formData.bottom = new FormAttachment(100, 0);
+        childComposite.setLayoutData(formData);
+        childComposite.setLayout(parentLayout); // restore parent layout
+
+        initialize();
+
+        return childComposite;
+    }
+
+    private void initialize() {
+        switch (getType()) {
+            case CombineEditorPart.DESIGN_TAB:
+                this.editorModeToolbar = new EditorModeToolbar(getControl(), getEditor());
+                editorModeToolbar.setType(type);
+                editorModeToolbar.createControl();
+                ToolbarUtil.addBlankItem(this.editorModeToolbar.getControl(), new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+                ToolbarUtil.addSeparatorItem(this.editorModeToolbar.getControl());
+
+                this.designZoomControlToolbar = new ZoomControlToolbar(getControl(), getEditor());
+                ToolbarUtil.addBlankItem(this.designZoomControlToolbar.getControl(), new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+                ToolbarUtil.addSeparatorItem(this.designZoomControlToolbar.getControl());
+
+                this.mscreenDesignToolbar = new ScreenDesignToolbar(getControl(), getEditor());
+                ToolbarUtil.addBlankItem(this.mscreenDesignToolbar.getControl(), new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+                ToolbarUtil.addSeparatorItem(this.mscreenDesignToolbar.getControl());
+                getEditor().getDesignEditor().getViewer().addMScreenToolbar(mscreenDesignToolbar);
+
+                this.storyboardAutoLayoutToolbar = new StoryboardAutoLayoutToolbar(getControl(), getEditor());
+                ToolbarUtil.addBlankItem(this.storyboardAutoLayoutToolbar.getControl(), new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+                ToolbarUtil.addSeparatorItem(this.storyboardAutoLayoutToolbar.getControl());
+
+                this.actionsToolbar = new ToolBar(getControl(), SWT.FLAT);
+                this.actionsToolbar.setLayoutData(new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+
+                boolean useColorIconsInToolbars = ActionContributionItem.getUseColorIconsInToolbars();
+                try {
+                    // set UseColorIcons preferences setting for hover image.
+                    ActionContributionItem.setUseColorIconsInToolbars(false);
+
+                    IToolBarManager actionsToolbarManager = new ToolBarManager(this.actionsToolbar);
+                    IEditorActionBarContributor editorActionBarContributor = getEditor().getEditorSite().getActionBarContributor();
+                    if (editorActionBarContributor instanceof DesignEditorActionBarContributor) {
+                        DesignEditorActionBarContributor actionBarContributor = (DesignEditorActionBarContributor) editorActionBarContributor;
+                        actionBarContributor.contributeToCustomToolBar(actionsToolbarManager);
+                        actionsToolbarManager.update(true);
+                    }
+                } finally {
+                    // This is a global setting. Restore it.
+                    ActionContributionItem.setUseColorIconsInToolbars(useColorIconsInToolbars);
+                }
+                break;
+            default:
+        }
+
+        // mscreenPreviewToolbar = new ScreenPreviewToolbar(parent, getEditor());
+    }
+
+    public void dispose() {
+        if (mscreenDesignToolbar != null) {
+            mscreenDesignToolbar.dispose();
+            mscreenDesignToolbar = null;
+        }
+
+        if (designZoomControlToolbar != null) {
+            designZoomControlToolbar.dispose();
+            designZoomControlToolbar = null;
+        }
+
+        if (storyboardZoomControlToolbar != null) {
+            storyboardZoomControlToolbar.dispose();
+            storyboardZoomControlToolbar = null;
+        }
+
+        if (editorModeToolbar != null) {
+            editorModeToolbar.dispose();
+            editorModeToolbar = null;
+        }
+
+        if (storyboardAutoLayoutToolbar != null) {
+            storyboardAutoLayoutToolbar.dispose();
+            storyboardAutoLayoutToolbar = null;
+        }
+
+        SWTUtil.tryDispose(this.actionsToolbar);
+    }
+
+    public void initContents() {
+        switch (getType()) {
+            case CombineEditorPart.DESIGN_TAB:
+                this.designZoomControlToolbar.setViewer(getEditor().getDesignEditor().getViewer());
+                break;            
+            default:
+                break;
+        }
+    }
+
+    public void setEnabled(boolean enabled) {
+        mscreenDesignToolbar.setEnabled(enabled);
+        designZoomControlToolbar.setEnabled(enabled);
+        editorModeToolbar.setEnabled(enabled);
+        storyboardAutoLayoutToolbar.setEnabled(enabled);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/EditorModeToolbar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/EditorModeToolbar.java
new file mode 100644 (file)
index 0000000..4e78dac
--- /dev/null
@@ -0,0 +1,107 @@
+
+
+package org.tizen.efluibuilder.ui.editor.toolbar;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.ToolItem;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class EditorModeToolbar extends AbstractToolbar {
+    private static final int UNKNOWN = -1;
+    private ToolItem designModeItem = null;
+    private ToolItem sourceModeItem = null;
+    private int type = UNKNOWN;
+    private Button sourceMode = null;
+    private Button designMode = null;
+    private static final int MODE_BUTTON_WIDTH = 36;
+
+    public EditorModeToolbar(Composite parent, CombineEditorPart editor) {
+        super(parent, editor);
+    }
+
+    public void setType(int type) {
+        this.type = type;
+    }
+
+    public int getType() {
+        return this.type;
+    }
+
+    public void createControl() {
+        if (getControl() == null) {
+            return;
+        }
+
+        getControl().setLayoutData(new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+
+        // FIXME: If Combobox height can change using pack function(this function cannot work),
+        // Change this code(From now this code used fakeImage).
+        ToolItem tempToolItem = new ToolItem(getControl(), SWT.PUSH);
+        tempToolItem.setEnabled(false);
+        tempToolItem.setImage(ImageResources.getImage(ImageResources.PREVIEW_TOOLBAR_DUMMY));
+
+        ToolbarUtil.addBlankItem(getControl(), 18, new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+
+        sourceMode = new Button(getControl(), SWT.PUSH);
+        sourceMode.setToolTipText(BuilderMessages.SOURCE_MODE);
+
+        sourceModeItem = new ToolItem(getControl(), SWT.SEPARATOR);
+        sourceModeItem.setControl(sourceMode);
+        sourceModeItem.setWidth(MODE_BUTTON_WIDTH);
+
+        designMode = new Button(getControl(), SWT.PUSH);
+        designMode.setToolTipText(BuilderMessages.DESIGN_MODE);
+
+        designModeItem = new ToolItem(getControl(), SWT.SEPARATOR);
+        designModeItem.setControl(designMode);
+        designModeItem.setWidth(MODE_BUTTON_WIDTH);
+
+        switch (getType()) {
+            case CombineEditorPart.DESIGN_TAB:
+                designMode.setBackground(ColorResources.TOOLBAR_EDITOR_SWITCH_BACKGROUND);
+                designMode.setImage(ImageResources.getImage(ImageResources.TOOLBAR_DESIGN_SEL));
+                sourceMode.setImage(ImageResources.getImage(ImageResources.TOOLBAR_SOURCE_NOR));
+                break;
+            case CombineEditorPart.TEXTEDITOR_TAB:
+                sourceMode.setBackground(ColorResources.TOOLBAR_EDITOR_SWITCH_BACKGROUND);
+                sourceMode.setImage(ImageResources.getImage(ImageResources.TOOLBAR_SOURCE_SEL));
+                designMode.setImage(ImageResources.getImage(ImageResources.TOOLBAR_DESIGN_NOR));
+                break;
+        }
+
+        widgetEvent();
+    }
+
+    private void widgetEvent() {
+
+        this.sourceMode.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                getEditor().setActivePage(CombineEditorPart.TEXTEDITOR_TAB);
+            }
+        });
+
+        this.designMode.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                getEditor().setActivePage(CombineEditorPart.DESIGN_TAB);
+            }
+        });
+    }
+
+    public void dispose() {
+    }
+
+    public void setEnabled(boolean enabled) {
+
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/IZoomToolbar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/IZoomToolbar.java
new file mode 100644 (file)
index 0000000..34c8d01
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.editor.toolbar;
+
+import org.eclipse.gef.editparts.ZoomListener;
+import org.tizen.efluibuilder.gef.viewer.IScalableViewer;
+
+
+public interface IZoomToolbar extends ZoomListener {
+    public boolean isFitMode();
+
+    public void setFitMode(boolean isFit);
+
+    public void setViewer(IScalableViewer viewer);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/PreviewToolbar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/PreviewToolbar.java
new file mode 100644 (file)
index 0000000..7643226
--- /dev/null
@@ -0,0 +1,339 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.toolbar;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.ToolItem;
+import org.tizen.efluibuilder.core.configuration.device.Device;
+import org.tizen.efluibuilder.model.app.AppManager;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+import org.tizen.efluibuilder.mscreen.configurator.MscreenConstants;
+import org.tizen.efluibuilder.mscreen.rm.ResourceManagerUtil;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.editor.texteditor.preview.PreviewViewer;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class PreviewToolbar extends AbstractToolbar {
+
+    private ToolItem locale = null;
+    private Combo localeCombo;
+    private String localeText = "Locale"; //$NON-NLS-1$
+
+    private ToolItem device = null;
+    private Combo deviceCombo;
+    private String deviceText = "Device"; //$NON-NLS-1$
+
+    private ToolItem orientation = null;
+    private Combo orientationCombo;
+    private String orientationText = "Orientation"; //$NON-NLS-1$
+
+    private PreviewViewer previewViewer = null;
+    private EditorModeToolbar editorModeToolbar = null;
+
+    private MScreenQualifierManager mscreenQualifierManager = null;
+
+    private Collection<Device> devices = null;
+    private String[] locales = null;
+
+    private int comboBoxTopMargin = 1;
+    private int editorModeButtonTopMargin = 1;
+
+    // FIXME: The top margin of Toolbar for windows is differenct each OS(Windows, Mac, Ubuntu)
+    // It should find a better solution.
+    private void setPreviewToolItemTopMargin() {
+        if (Platform.OS_WIN32.equals(Platform.getOS())) {
+            editorModeButtonTopMargin = 6;
+            comboBoxTopMargin = 6;
+        } else if (Platform.OS_MACOSX.equals(Platform.getOS())) {
+            editorModeButtonTopMargin = 5;
+            comboBoxTopMargin = 5;
+        } else { // Ubuntu Case
+            editorModeButtonTopMargin = 1;
+            comboBoxTopMargin = 1;
+        }
+    }
+
+    public PreviewToolbar(Composite parent, CombineEditorPart parentEditor, PreviewViewer previewViewer) {
+        super(parent, parentEditor);
+
+        devices = AppManager.getAppManager(parentEditor.getProject()).getDeviceManager().getDevices();
+        locales = getLocales();
+
+        editorModeToolbar = new EditorModeToolbar(parent, parentEditor);
+        editorModeToolbar.setType(CombineEditorPart.TEXTEDITOR_TAB);
+        editorModeToolbar.createControl();
+    }
+
+    private String[] getLocales() {
+        CombineEditorPart editor = getEditor();
+        if (editor == null) {
+            return null;
+        }
+        ResourceManagerUtil resourceManager = new ResourceManagerUtil(editor.getProject());
+        String[] locales = resourceManager.getLocales();
+
+        // translate "ALL" to "All Locales"
+        final String allLocales = ResourceManagerUtil.RM_LOCALE_ALL.getName();
+        for (int i = 0; i < locales.length; i++) {
+            if (allLocales.equals(locales[i])) {
+                locales[i] = ToolBarConstants.ALL_LOCALES;
+            }
+        }
+
+        return locales;
+    }
+
+    private void createItemLocale() {
+        localeCombo = new Combo(getControl(), SWT.DROP_DOWN | SWT.READ_ONLY);
+        localeCombo.setToolTipText(BuilderMessages.MS_PREVIEW_LOCALE);
+        localeCombo.setVisibleItemCount(5);
+        localeCombo.setText(localeText);
+        localeCombo.setItems(locales);
+        localeCombo.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Combo combo = (Combo) e.widget;
+                String text = combo.getText();
+
+                // translate "All Locales" to "ALL"
+                if (ToolBarConstants.ALL_LOCALES.equals(text)) {
+                    text = ResourceManagerUtil.RM_LOCALE_ALL.getName();
+                }
+
+                mscreenQualifierManager.setLocale(text);
+                localeText = combo.getText();
+                setConfiguration();
+            }
+        });
+        localeCombo.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusGained(FocusEvent e) {
+                locales = getLocales();
+                localeCombo.setItems(locales);
+                localeCombo.setText(localeText);
+            }
+        });
+        locale = new ToolItem(getControl(), SWT.SEPARATOR);
+        locale.setControl(localeCombo);
+        setItemWidth(localeCombo, locale);
+    }
+
+    private void setItemWidth(Control control, ToolItem item) {
+        control.pack();
+        item.setWidth(control.getSize().x);
+    }
+
+    private void createItemOrientation() {
+        orientationCombo = new Combo(getControl(), SWT.DROP_DOWN | SWT.READ_ONLY);
+        orientationCombo.setToolTipText(BuilderMessages.MS_PREVIEW_ORIENTATION);
+        orientationCombo.setVisibleItemCount(5);
+        orientationCombo.setText(orientationText);
+        orientationCombo.setItems(MscreenConstants.ORIENTATIONS);
+
+        orientationCombo.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Combo combo = (Combo) e.widget;
+                orientationText = combo.getText();
+                setConfiguration();
+            }
+        });
+
+        orientation = new ToolItem(getControl(), SWT.SEPARATOR);
+        orientation.setControl(orientationCombo);
+        setItemWidth(orientationCombo, orientation);
+    }
+
+    private void createItemDevice() {
+        deviceCombo = new Combo(getControl(), SWT.DROP_DOWN | SWT.READ_ONLY);
+        deviceCombo.setToolTipText(BuilderMessages.MS_PREVIEW_DEVICE);
+        deviceCombo.setVisibleItemCount(5);
+        for (Device device : devices) {
+            deviceCombo.add(device.getDisplayName());
+
+        }
+
+        if (previewViewer.getCurrentDevice() != null) {
+            deviceCombo.setText(previewViewer.getCurrentDevice().getDisplayName());
+        }
+
+        deviceCombo.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Combo combo = (Combo) e.widget;
+                deviceText = combo.getText();
+                setConfiguration();
+            }
+        });
+
+        device = new ToolItem(getControl(), SWT.SEPARATOR);
+        device.setControl(deviceCombo);
+        setItemWidth(deviceCombo, device);
+    }
+
+    private void resetMenuText() {
+        if (devices.size() > 0) {
+            Iterator<Device> iterator = devices.iterator();
+            Device device = iterator.next();
+            deviceText = device.getDisplayName();
+        } else {
+            deviceText = "";
+        }
+
+        if (locales.length > 0) {
+            localeText = locales[0];
+        } else {
+            localeText = "";
+        }
+        orientationText = MscreenConstants.ORIENTATIONS[0];
+    }
+
+    private void setOrientationComboDisabledByCondition() {
+        ConfigurationPart configPart = mscreenQualifierManager.getCurrentConfigurePart();
+        if ((configPart == null) || (configPart.getProperties().containsKey(MscreenConstants.DEVICE) == false)) {
+            return;
+        }
+
+        String orientationValue = mscreenQualifierManager.getCurrentConfigurePart().getProperties().get(MscreenConstants.DEVICE).toLowerCase();
+        if (orientationValue.contains(ModelConstants.SHAPE_SQUARE) || orientationValue.contains(ModelConstants.SHAPE_CIRCLE)) {
+            orientationCombo.setEnabled(false);
+        } else {
+            orientationCombo.setEnabled(true);
+        }
+    }
+
+    private void setConfiguration() {
+        deviceCombo.setText(deviceText);
+        orientationCombo.setText(orientationText);
+        deviceCombo.getParent().pack();
+        orientationCombo.getParent().pack();
+        localeCombo.getParent().pack();
+
+        setOrientationComboDisabledByCondition();
+        this.previewViewer.reqNewPageGraphicDataFromQualifiers(this.getCurrentDevice(), this.getCurrentOrientation(), this.getCurrentLocale());
+
+        getControl().getParent().pack();
+    }
+
+    private void createToolItem() {
+        if (getControl() == null) {
+            return;
+        }
+        getControl().setLayoutData(new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+
+        ToolbarUtil.addBlankItem(this.editorModeToolbar.getControl(), new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+        ToolbarUtil.addSeparatorItem(this.editorModeToolbar.getControl());
+        ToolbarUtil.addBlankItem(this.editorModeToolbar.getControl(), new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+
+        setPreviewToolItemTopMargin();
+        createItemDevice();
+        createItemOrientation();
+        createItemLocale();
+
+        // FIXME: If Combobox height can change using pack function(this function cannot work),
+        // Change this code(From now this code used fakeImage).
+        ToolItem tempToolItem = new ToolItem(getControl(), SWT.NONE);
+        tempToolItem.setEnabled(false);
+        Image changeComboboxHeightImage = ImageResources.getImage(ImageResources.PREVIEW_TOOLBAR_DUMMY);
+        tempToolItem.setImage(changeComboboxHeightImage);
+
+        resetMenuText();
+
+        deviceCombo.setText(deviceText);
+        orientationCombo.setText(orientationText);
+        localeCombo.setText(localeText);
+
+        setOrientationComboDisabledByCondition();
+        FormData data = new FormData();
+
+        // editorSwitchToolbarLayout(Left)
+        data.top = new FormAttachment(0, editorModeButtonTopMargin);
+        data.height = ToolBarConstants.TOOLBAR_HEIGHT;
+        data.left = new FormAttachment(0);
+        editorModeToolbar.getControl().setLayoutData(data);
+
+        // comboBoxlayout(center)
+        data = new FormData();
+        data.top = new FormAttachment(0, comboBoxTopMargin);
+        data.height = ToolBarConstants.TOOLBAR_HEIGHT;
+        data.left = new FormAttachment(editorModeToolbar.getControl(), 0);
+        getControl().setLayoutData(data);
+    }
+
+    public String getCurrentLocale() {
+        return this.localeText;
+    }
+
+    public Device getCurrentDevice() {
+        for (Device device : devices) {
+            if (device.getDisplayName().equals(deviceText)) {
+                return device;
+            }
+        }
+        return null;
+    }
+
+    public String getCurrentOrientation() {
+        return this.orientationText;
+    }
+
+    public ConfigurationPart getCurrentConfigurationPart() {
+        return this.mscreenQualifierManager.getCurrentConfigurePart();
+    }
+
+    public void initContents(PreviewViewer previewViewer) {
+        this.previewViewer = previewViewer;
+        mscreenQualifierManager = previewViewer.getScreenQualifierManager();
+        createToolItem();
+    }
+
+    public void setEnabled(boolean enabled) {
+        localeCombo.setEnabled(enabled);
+        deviceCombo.setEnabled(enabled);
+        orientationCombo.setEnabled(enabled);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ScreenDesignToolbar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ScreenDesignToolbar.java
new file mode 100644 (file)
index 0000000..3a74367
--- /dev/null
@@ -0,0 +1,300 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.toolbar;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.ToolItem;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+import org.tizen.efluibuilder.mscreen.configurator.MsConfiguratorWizard;
+import org.tizen.efluibuilder.mscreen.configurator.ScreenConfiguration;
+import org.tizen.efluibuilder.mscreen.rm.ResourceManagerUtil;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class ScreenDesignToolbar extends AbstractToolbar {
+
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
+
+    private MScreenQualifierManager mscreenManager = null;
+
+    private Combo msConfigCombo;
+    private ToolItem mscreenConfiguration = null;
+    private Combo localeCombo;
+    private ToolItem locale = null;
+    private MsConfiguratorWizard msConfiguratorWizard = null;
+
+    public ScreenDesignToolbar(Composite parent, CombineEditorPart editor) {
+        super(parent, editor);
+        draw();
+    }
+
+    public void dispose() {
+    }
+
+    public void setMscreenManager(MScreenQualifierManager mscreenManager) {
+        this.mscreenManager = mscreenManager;
+
+        setScreenConfigurationItems();
+        setLocaleComboItems();
+    }
+
+    private void setLocaleComboItems() {
+        ResourceManagerUtil resUtil = new ResourceManagerUtil(this.getEditor().getProject());
+        String[] locales = resUtil.getLocales();
+
+        // translate "ALL" to "All Locales"
+        final String allLocales = ResourceManagerUtil.RM_LOCALE_ALL.getName();
+        for (int i = 0; i < locales.length; i++) {
+            if (allLocales.equals(locales[i])) {
+                locales[i] = ToolBarConstants.ALL_LOCALES;
+            }
+        }
+
+        this.localeCombo.setItems(locales);
+    }
+
+    private void draw() {
+        if (getControl() == null) {
+            return;
+        }
+
+        getControl().setLayoutData(new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+
+        // FIXME: If Combobox height can change using pack function(this function cannot work),
+        // Change this code(From now this code used fakeImage).
+        ToolItem tempToolItem = new ToolItem(getControl(), SWT.PUSH);
+        tempToolItem.setEnabled(false);
+        tempToolItem.setImage(ImageResources.getImage(ImageResources.PREVIEW_TOOLBAR_DUMMY));
+
+        this.msConfigCombo = new Combo(getControl(), SWT.DROP_DOWN | SWT.READ_ONLY);
+        this.msConfigCombo.setToolTipText(BuilderMessages.MS_DESIGN_CONFIGURATION);
+        this.msConfigCombo.setVisibleItemCount(5);
+
+        this.msConfigCombo.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Combo combo = (Combo) e.widget;
+                // for new GUI [START]
+                if (combo.getSelectionIndex() == combo.getItemCount() - 1) {
+                    ConfigurationPart configPart = mscreenManager.getCurrentConfigurePart();
+                    if (configPart == null) {
+                        return;
+                    }
+                    String configName = configPart.getName();
+                    for (ScreenConfiguration config : mscreenManager.getScreenConfiguration()) {
+                        if (configName != null && configName.equals(config.getName())) {
+                            msConfigCombo.setText(config.getDisplayName());
+                            openMsConfiguratorWizard();
+                            return;
+                        }
+                    }
+                }
+                // for new GUI [END]
+
+                String selectedConfig = combo.getItem(combo.getSelectionIndex());
+                ScreenConfiguration config = getScreenConfiguration(selectedConfig);
+                if (config != null) {
+                    ConfigurationPart configurePart = mscreenManager.getConfigurePartFromScreenConfiguration(config);
+                    if (configurePart != null) {
+                        mscreenManager.setCurrentConfigurePart(configurePart);
+                    }
+                }
+
+                layout(combo, mscreenConfiguration);
+            }
+
+            private ScreenConfiguration getScreenConfiguration(String selectedConfig) {
+                for (ScreenConfiguration config : mscreenManager.getScreenConfiguration()) {
+                    if (config.getDisplayName().equals(selectedConfig)) {
+                        return config;
+                    }
+                }
+
+                return null;
+            }
+        });
+
+        mscreenConfiguration = new ToolItem(getControl(), SWT.SEPARATOR);
+        mscreenConfiguration.setControl(this.msConfigCombo);
+        setItemWidth(this.msConfigCombo, mscreenConfiguration);
+
+        this.localeCombo = new Combo(getControl(), SWT.DROP_DOWN | SWT.READ_ONLY);
+        this.localeCombo.setToolTipText(BuilderMessages.MS_PREVIEW_LOCALE);
+        this.localeCombo.setVisibleItemCount(5);
+        this.localeCombo.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Combo combo = (Combo) e.widget;
+                String text = combo.getText();
+
+                // translate "All Locales" to "ALL"
+                if (ToolBarConstants.ALL_LOCALES.equals(text)) {
+                    text = ResourceManagerUtil.RM_LOCALE_ALL.getName();
+                }
+
+                mscreenManager.setLocale(text);
+
+                layout(combo, locale);
+            }
+        });
+
+        locale = new ToolItem(getControl(), SWT.SEPARATOR);
+        locale.setControl(this.localeCombo);
+        localeCombo.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusGained(FocusEvent e) {
+                setLocaleComboItems();
+                updateLocaleItem(mscreenManager.getCurrentLocale());
+            }
+        });
+        setItemWidth(this.localeCombo, locale);
+    }
+
+    public void refreshContents(ConfigurationPart configurePart) {
+        if (configurePart == null) {
+            logger.warn("Cannot refresh ScreenDesignToolbar for part");
+            return;
+        }
+
+        ScreenConfiguration configuration = new ScreenConfiguration(configurePart);
+
+        String currentConfigurationDisplayName = configuration.getDisplayName();
+        updateScreenConfigurationItem(currentConfigurationDisplayName);
+        updateLocaleItem(this.mscreenManager.getCurrentLocale());
+        setScreenConfigurationItems();
+    }
+
+    public void setEnabled(boolean enabled) {
+        getControl().setEnabled(enabled);
+        msConfigCombo.setEnabled(enabled);
+        localeCombo.setEnabled(enabled);
+    }
+
+    // for new GUI
+    private void openMsConfiguratorWizard() {
+        if (msConfiguratorWizard != null) {
+            return;
+        }
+
+        msConfigCombo.getDisplay().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                msConfiguratorWizard = new MsConfiguratorWizard();
+                try {
+                    msConfiguratorWizard.setModel(mscreenManager.getMScreenPart());
+
+                    Shell shell = Display.getDefault().getActiveShell();
+                    WizardDialog dialog = new WizardDialog(shell, msConfiguratorWizard);
+                    int result = dialog.open();
+
+                    if (result == Dialog.OK) {
+                        Command cmd = msConfiguratorWizard.getCommand();
+                        if (cmd != null) {
+                            getEditor().getDesignEditor().getViewer().getEditDomain().getCommandStack().execute(cmd);
+                            setScreenConfigurationItems();
+                        }
+                    }
+                } finally {
+                    msConfiguratorWizard.dispose();
+                    msConfiguratorWizard = null;
+                }
+            }
+        });
+    }
+
+    private void updateLocaleItem(String item) {
+        if (this.localeCombo == null || this.locale == null) {
+            return;
+        }
+
+        // translate "ALL" to "All Locales"
+        final String allLocales = ResourceManagerUtil.RM_LOCALE_ALL.getName();
+        if (allLocales.equals(item)) {
+            item = ToolBarConstants.ALL_LOCALES;
+        }
+
+        this.localeCombo.setText(item);
+        layout(this.localeCombo, this.locale);
+    }
+
+    private void updateScreenConfigurationItem(String item) {
+        if (this.msConfigCombo == null || this.mscreenConfiguration == null) {
+            return;
+        }
+
+        this.msConfigCombo.setText(item);
+        layout(this.msConfigCombo, this.mscreenConfiguration);
+    }
+
+    private void setScreenConfigurationItems() {
+        if (this.msConfigCombo == null || this.mscreenManager == null) {
+            return;
+        }
+
+        String currentSelection = this.msConfigCombo.getText();
+        this.msConfigCombo.setItems(getScreenConfigurations(this.mscreenManager));
+        this.msConfigCombo.add(BuilderMessages.MS_DESIGN_LAUNCH_CONFIGURATION); // for new GUI
+        this.msConfigCombo.setText(currentSelection);
+    }
+
+    private String[] getScreenConfigurations(MScreenQualifierManager mscreenManager) {
+        List<String> configList = new ArrayList<String>();
+        for (ScreenConfiguration config : mscreenManager.getScreenConfiguration()) {
+            configList.add(config.getDisplayName());
+        }
+
+        return configList.toArray(new String[0]);
+    }
+
+    private void setItemWidth(Control control, ToolItem item) {
+        control.pack();
+        item.setWidth(control.getSize().x);
+    }
+
+    private void layout(Control control, ToolItem item) {
+        setItemWidth(control, item);
+        getControl().getParent().layout();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ScreenPreviewToolbar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ScreenPreviewToolbar.java
new file mode 100644 (file)
index 0000000..1eab82a
--- /dev/null
@@ -0,0 +1,252 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+//
+// package org.tizen.efluibuilder.ui.editor.toolbar;
+//
+// import java.util.Collection;
+// import java.util.HashMap;
+// import java.util.Iterator;
+// import java.util.Map;
+//
+// import org.eclipse.jface.resource.ImageDescriptor;
+// import org.eclipse.swt.SWT;
+// import org.eclipse.swt.custom.CLabel;
+// import org.eclipse.swt.events.SelectionAdapter;
+// import org.eclipse.swt.events.SelectionEvent;
+// import org.eclipse.swt.graphics.Image;
+// import org.eclipse.swt.widgets.Composite;
+// import org.eclipse.swt.widgets.Menu;
+// import org.eclipse.swt.widgets.MenuItem;
+// import org.eclipse.swt.widgets.ToolItem;
+// import org.eclipse.ui.plugin.AbstractUIPlugin;
+// import org.tizen.efluibuilder.BuilderPlugin;
+// import org.tizen.efluibuilder.core.configuration.device.Device;
+// import org.tizen.efluibuilder.internal.renderer.command.GetAllWidgetPositionsCommand;
+// import org.tizen.efluibuilder.model.app.AppManager;
+// import org.tizen.efluibuilder.mscreen.configurator.MscreenConstants;
+// import org.tizen.efluibuilder.mscreen.configurator.ScreenConfiguration;
+// import org.tizen.efluibuilder.nl.BuilderMessages;
+// import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+//
+//
+// public class ScreenPreviewToolbar extends AbstractToolbar {
+//
+// public ScreenPreviewToolbar(Composite parent, CombineEditorPart editor) {
+// super(parent, editor);
+// appManager = AppManager.getAppManager(editor.getEditorInput());
+// draw();
+// resetMenuText();
+// // TODO Auto-generated constructor stub
+// }
+//
+// private ToolItem locale = null;
+// private ToolItem localeItem = null;
+// private CLabel localeText = null;
+//
+// private ToolItem device = null;
+// private ToolItem deviceItem = null;
+// private CLabel deviceText = null;
+//
+// private ToolItem orientation = null;
+// private ToolItem orientationItem = null;
+// private CLabel orientationText = null;
+// private AppManager appManager = null;
+//
+// public void dispose() {
+// // TODO Auto-generated method stub
+//
+// }
+//
+// private void draw() {
+// if (getControl() == null) {
+// return;
+// }
+//
+// ToolItem separator = null;
+//
+// separator = new ToolItem(getControl(), SWT.SEPARATOR);
+// separator.setWidth(5);
+//
+// ImageDescriptor imageDescriptor = null;
+// Image image = null;
+//
+// // == draw orientation
+// orientation = new ToolItem(getControl(), SWT.PUSH);
+// // FIXME : temporary ICON
+// imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID,
+/// "res/icons/editor/down_arrow.png");
+// image = imageDescriptor.createImage();
+// orientation.setImage(image);
+// orientation.setToolTipText(BuilderMessages.MS_PREVIEW_ORIENTATION);
+//
+// orientationText = new CLabel(getControl(), SWT.LEFT_TO_RIGHT | SWT.RIGHT);
+// orientationText.pack();
+// orientationItem = new ToolItem(getControl(), SWT.SEPARATOR);
+// orientationItem.setControl(orientationText);
+// orientationItem.setWidth(90);
+// orientation.setEnabled(true);
+// orientation.addSelectionListener(new SelectionAdapter() {
+// @Override
+// public void widgetSelected(SelectionEvent e) {
+// Menu menu = ToolbarUtil.drawMenu(getControl(), orientationText, orientationItem);
+// insertOrientation(menu);
+// }
+// });
+//
+// // == draw device
+// device = new ToolItem(getControl(), SWT.PUSH);
+// // FIXME : temporary ICON
+// imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID,
+/// "res/icons/editor/down_arrow.png");
+// image = imageDescriptor.createImage();
+// device.setImage(image);
+// device.setToolTipText(BuilderMessages.MS_PREVIEW_DEVICE);
+//
+// deviceText = new CLabel(getControl(), SWT.LEFT_TO_RIGHT | SWT.RIGHT);
+// deviceText.pack();
+// deviceItem = new ToolItem(getControl(), SWT.SEPARATOR);
+// deviceItem.setControl(deviceText);
+// deviceItem.setWidth(100);
+// device.setEnabled(true);
+// device.addSelectionListener(new SelectionAdapter() {
+// @Override
+// public void widgetSelected(SelectionEvent e) {
+// Menu menu = ToolbarUtil.drawMenu(getControl(), deviceText, deviceItem);
+// insertDevices(menu);
+// }
+// });
+//
+// // == draw locale
+// locale = new ToolItem(getControl(), SWT.PUSH);
+// // FIXME : temporary ICON
+// imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID,
+/// "res/icons/editor/down_arrow.png");
+// image = imageDescriptor.createImage();
+// locale.setImage(image);
+// locale.setToolTipText(BuilderMessages.MS_PREVIEW_LOCALE);
+//
+// localeText = new CLabel(getControl(), SWT.LEFT_TO_RIGHT | SWT.RIGHT);
+// localeText.pack();
+// localeItem = new ToolItem(getControl(), SWT.SEPARATOR);
+// localeItem.setControl(localeText);
+// localeItem.setWidth(90);
+// locale.setEnabled(true);
+// locale.addSelectionListener(new SelectionAdapter() {
+// @Override
+// public void widgetSelected(SelectionEvent e) {
+// Menu menu = ToolbarUtil.drawMenu(getControl(), localeText, localeItem);
+// insertLocale(menu);
+// }
+// });
+//
+// separator = new ToolItem(getControl(), SWT.SEPARATOR);
+// separator.setWidth(5);
+// }
+//
+//
+// private void resetMenuText() {
+// Collection<Device> devices = appManager.getDeviceManager().getDevices();
+//
+//// Collection<Device> devices = getEditor().getViewManager().getDevices();
+// Iterator<Device> iterator = devices.iterator();
+// Device device = iterator.next();
+// deviceText.setText(device.getName());
+// orientationText.setText(MscreenConstants.ORIENTATION_PORTRAIT);
+//// localeText.setText(MscreenConstants.DEFAULT_LOCALE);
+// }
+//
+// private void insertLocale(Menu menu) {
+// // insert po/rm locale
+//// String[] locales =
+/// getEditor().getViewManager().getMscreenManager().getRmWrapper().getLocales();
+//// for (int i = 0; i < locales.length; i++) {
+//// insertLocale(menu, locales[i]);
+//// }
+// }
+//
+// private void insertLocale(Menu menu, String locale) {
+// final MenuItem item = new MenuItem(menu, SWT.PUSH);
+// item.setData(locale);
+// item.setText(locale);
+// item.addSelectionListener(new SelectionAdapter() {
+// @Override
+// public void widgetSelected(SelectionEvent e) {
+// String locale = (String) item.getData();
+// localeText.setText(locale);
+// setConfiguration();
+// }
+// });
+// }
+//
+// private void insertDevices(Menu menu) {
+//// Collection<Device> devices = getEditor().getViewManager().getDevices();
+//// for (Device device : devices) {
+//// final MenuItem item = new MenuItem(menu, SWT.PUSH);
+//// item.setData(device.getName());
+//// item.setText(device.getDisplayName());
+//// item.addSelectionListener(new SelectionAdapter() {
+//// @Override
+//// public void widgetSelected(SelectionEvent e) {
+//// String device = (String) item.getData();
+//// deviceText.setText(device);
+//// setConfiguration();
+//// }
+//// });
+//// }
+// }
+//
+// private void insertOrientation(Menu menu) {
+//// for (int i = 0; i < MscreenManager.ORIENTATION.length; i++) {
+//// final MenuItem item = new MenuItem(menu, SWT.PUSH);
+//// item.setData(MscreenManager.ORIENTATION[i]);
+//// item.setText(MscreenManager.ORIENTATION[i]);
+//// item.addSelectionListener(new SelectionAdapter() {
+//// @Override
+//// public void widgetSelected(SelectionEvent e) {
+//// String orientation = (String) item.getData();
+//// orientationText.setText(orientation);
+//// setConfiguration();
+//// }
+//// });
+//// }
+// }
+//
+// private void setConfiguration() {
+//// IViewManager iViewManager = getEditor().getViewManager();
+//// if (iViewManager instanceof AbstractViewManager) {
+//// AbstractViewManager viewManager = (AbstractViewManager) iViewManager;
+//// viewManager.setConfiguration(getQualifiers());
+//// }
+// }
+//
+// public Map<String, String> getQualifiers() {
+// Map<String, String> qualifiers = new HashMap<String, String>();
+// qualifiers.put(ScreenConfiguration.LOCALE, localeText.getText());
+// qualifiers.put(ScreenConfiguration.DEVICE, deviceText.getText());
+// qualifiers.put(ScreenConfiguration.ORIENTATION, orientationText.getText());
+// return qualifiers;
+// }
+// }
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/StoryboardAutoLayoutToolbar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/StoryboardAutoLayoutToolbar.java
new file mode 100644 (file)
index 0000000..d88bf46
--- /dev/null
@@ -0,0 +1,72 @@
+
+
+package org.tizen.efluibuilder.ui.editor.toolbar;
+
+import org.eclipse.gef.RootEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.ToolItem;
+import org.tizen.efluibuilder.gef.editparts.DesignRootEditPart;
+import org.tizen.efluibuilder.gef.viewer.DesignStoryboardUtil;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class StoryboardAutoLayoutToolbar extends AbstractToolbar {
+
+    private ToolItem autoLayoutBtn = null;
+
+    public StoryboardAutoLayoutToolbar(Composite parent, CombineEditorPart editor) {
+        super(parent, editor);
+        createControl();
+        widgetEvent();
+    }
+
+    private void createControl() {
+        getControl().setLayoutData(new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+        this.autoLayoutBtn = new ToolItem(getControl(), SWT.PUSH);
+        this.autoLayoutBtn.setImage(ImageResources.getImage(ImageResources.TOOLBAR_AUTO_LAYOUT_NOR));
+        this.autoLayoutBtn.setDisabledImage(ImageResources.getImage(ImageResources.TOOLBAR_AUTO_LAYOUT_DIM));
+        this.autoLayoutBtn.setHotImage(ImageResources.getImage(ImageResources.TOOLBAR_AUTO_LAYOUT_MV));
+        this.autoLayoutBtn.setToolTipText(BuilderMessages.AUTO_LAYOUT);
+    }
+
+    private void widgetEvent() {
+        this.autoLayoutBtn.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                DesignViewer viewer = getEditor().getDesignEditor().getViewer();
+                RootEditPart rootEditPart = viewer.getRootEditPart();
+
+                if (((DesignRootEditPart) rootEditPart).getContents().getChildren().size() > 0) {
+                    Command cmd =
+                            DesignStoryboardUtil.getStoryboardReconstructCommand((Part) ((DesignRootEditPart) rootEditPart).getContents().getModel(),
+                                                                                 viewer.getMScreenQualifierManager().getScreenSize());
+                    if (cmd != null) {
+                        CommandStack cmdStack = rootEditPart.getViewer().getEditDomain().getCommandStack();
+                        cmdStack.execute(cmd);
+                    }
+                    if (rootEditPart.getViewer() instanceof DesignViewer) {
+                        ((DesignViewer) rootEditPart.getViewer()).setFitMode(true);
+                    }
+                }
+            }
+        });
+    }
+
+    public void setEnabled(boolean enabled) {
+        autoLayoutBtn.setEnabled(enabled);
+    }
+
+    public void dispose() {
+
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ToolBarConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ToolBarConstants.java
new file mode 100644 (file)
index 0000000..b44b144
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.toolbar;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+
+public class ToolBarConstants {
+
+    public static final String ALL_LOCALES = "All locales";
+
+    public static final int TOOLBAR_HEIGHT = 35; // UX Guide is 32, but clipped.
+    public static final int TOOLBAR_TOP_MARGIN; // for Windows
+
+    public static final int TOOLITEM_WIDTH_MARGIN; // for Windows
+    public static final int TOOLITEM_SCALE_WIDTH = 100;
+    public static final int TOOLITEM_SEPARATOR_WIDTH; // UX Guide is 20 * 2
+    public static final int TOOLITEM_BLANK_WIDTH = 10; // closed blank is 10,
+                                                       // category blank is 18 or 20
+
+    public static final RGB COLOR_NORMAL = new RGB(0x58, 0x58, 0x58);
+    public static final RGB COLOR_SELECT = new RGB(0x00, 0x8a, 0xee);
+
+    static {
+        String currentOs = Platform.getOS();
+
+        if (Platform.OS_WIN32.equals(currentOs)) {
+            TOOLBAR_TOP_MARGIN = 4;
+            TOOLITEM_WIDTH_MARGIN = 3;
+            TOOLITEM_SEPARATOR_WIDTH = 10;
+        } else if (Platform.OS_MACOSX.equals(currentOs)) {
+            TOOLBAR_TOP_MARGIN = 4;
+            TOOLITEM_WIDTH_MARGIN = 3;
+            TOOLITEM_SEPARATOR_WIDTH = 10;
+        } else {
+            TOOLBAR_TOP_MARGIN = 0;
+            TOOLITEM_WIDTH_MARGIN = 0;
+            TOOLITEM_SEPARATOR_WIDTH = 20;
+        }
+    }
+
+    public static int getFontSize() {
+        String currentOs = Platform.getOS();
+
+        Font font = Display.getDefault().getSystemFont();
+        int systemFontSize = font.getFontData()[0].getHeight();
+
+        if (Platform.OS_WIN32.equals(currentOs)) {
+            return systemFontSize - 2;
+        } else if (Platform.OS_MACOSX.equals(currentOs)) {
+            return systemFontSize + 4;
+        } else {
+            return systemFontSize;
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ToolbarUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ToolbarUtil.java
new file mode 100644 (file)
index 0000000..4eb51cf
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.editor.toolbar;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+public class ToolbarUtil {
+
+    public static Menu drawMenu(Composite composite, Rectangle parentBounds) {
+        Point menuPoint = composite.toDisplay(new Point((parentBounds.x + parentBounds.width - 18), parentBounds.y + parentBounds.height));
+        Menu menu = new Menu(composite.getShell(), SWT.NONE);
+        menu.setLocation(menuPoint);
+        menu.setVisible(true);
+        return menu;
+    }
+
+    public static Menu drawMenu(Composite composite, CLabel parentText, ToolItem parent) {
+        Menu menu = null;
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_MACOSX)) {
+            menu = drawDetailMenu(composite, parent);
+        } else {
+            menu = drawDetailMenu(composite, parentText);
+        }
+        return menu;
+    }
+
+    public static Menu drawDetailMenu(Composite composite, CLabel parentText) {
+        Rectangle rect = parentText.getBounds();
+        Point menuPoint = composite.toDisplay(new Point(rect.x + rect.width, rect.y + rect.height));
+        Menu menu = new Menu(composite.getShell(), SWT.POP_UP);
+        menu.setLocation(menuPoint);
+        menu.setVisible(true);
+        return menu;
+    }
+
+    public static Menu drawDetailMenu(Composite composite, ToolItem parent) {
+        Rectangle rect = parent.getBounds();
+        Point menuPoint = composite.toDisplay(new Point(rect.x, rect.y + rect.height));
+        Menu menu = new Menu(composite.getShell(), SWT.POP_UP);
+        menu.setLocation(menuPoint);
+        menu.setVisible(true);
+        return menu;
+    }
+
+    public static void addSeparatorItem(ToolBar toolBar) {
+        ToolItem separator = new ToolItem(toolBar, SWT.SEPARATOR);
+        separator.setWidth(ToolBarConstants.TOOLITEM_SEPARATOR_WIDTH);
+    }
+
+    public static void addBlankItem(ToolBar toolBar, int width, Object layoutData) {
+        Canvas blank = new Canvas(toolBar, SWT.NONE);
+        blank.setSize(width, ToolBarConstants.TOOLBAR_HEIGHT);
+        blank.setLayout(new FillLayout());
+        blank.setLayoutData(layoutData);
+
+        ToolItem separator = new ToolItem(toolBar, SWT.SEPARATOR);
+        separator.setControl(blank);
+        separator.setWidth(width);
+    }
+
+    public static void addBlankItem(ToolBar toolBar, Object layoutData) {
+        addBlankItem(toolBar, ToolBarConstants.TOOLITEM_BLANK_WIDTH, layoutData);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ViewNavigationToolbar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ViewNavigationToolbar.java
new file mode 100644 (file)
index 0000000..61874cd
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.toolbar;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.ToolItem;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.FontResources;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class ViewNavigationToolbar extends AbstractToolbar {
+
+    public static final int PREV_VIEW = -1;
+    public static final int NEXT_VIEW = 1;
+
+    private ToolItem prevButton = null;
+    private ToolItem nextButton = null;
+    private ToolItem viewCombo = null;
+    private ToolItem viewItem = null;
+    private CLabel viewTextLabel = null;
+
+    private Part viewsPart = null;
+
+    public ViewNavigationToolbar(Composite parent, CombineEditorPart editor) {
+        super(parent, editor);
+
+        nextButton = new ToolItem(getControl(), SWT.PUSH);
+
+        nextButton.setImage(ImageResources.getImage(ImageResources.TOOLBAR_NAVI_RIGHT_ARROW));
+        nextButton.setData(NEXT_VIEW);
+        nextButton.setToolTipText(BuilderMessages.NEXT_VIEW);
+
+        prevButton = new ToolItem(getControl(), SWT.PUSH);
+        prevButton.setImage(ImageResources.getImage(ImageResources.TOOLBAR_NAVI_LEFT_ARROW));
+        prevButton.setData(PREV_VIEW);
+        prevButton.setToolTipText(BuilderMessages.PREV_VIEW);
+
+        ToolItem separator = new ToolItem(getControl(), SWT.SEPARATOR);
+        separator.setWidth(5);
+
+        viewCombo = new ToolItem(getControl(), SWT.PUSH);
+        viewCombo.setImage(ImageResources.getImage(ImageResources.TOOLBAR_NAVI_DOWN_ARROW));
+        viewCombo.setToolTipText(BuilderMessages.SELECT_VIEW);
+
+        viewTextLabel = new CLabel(getControl(), SWT.CENTER);
+        viewTextLabel.setBackground(ColorResources.TOOLBAR_VIEW_TEXT_LABEL);
+        viewTextLabel.pack();
+        viewTextLabel.setFont(FontResources.TOOLBAR_VIEW_NAVIGATION_LABEL);
+
+        viewItem = new ToolItem(getControl(), SWT.SEPARATOR);
+        viewItem.setControl(viewTextLabel);
+        viewItem.setWidth(80);
+        addListeners();
+    }
+
+    public void dispose() {
+        removeListeners();
+    }
+
+    public void refreshContents() {
+        Part viewPart = getViewer().getCurrentViewPart();
+        if (viewPart != null) {
+            viewTextLabel.setText(viewPart.getPropertyValue(LayoutSchemaConstants.ID));
+        }
+    }
+
+    public void initContents(ViewsPart viewsPart) {
+        this.viewsPart = viewsPart;
+        this.refreshContents();
+    }
+
+    private DesignViewer getViewer() {
+        return getEditor().getDesignEditor().getViewer();
+    }
+
+    private void addListeners() {
+
+        prevButton.addSelectionListener(buttonSelectionListener);
+        nextButton.addSelectionListener(buttonSelectionListener);
+        viewCombo.addSelectionListener(comboSelectionListener);
+    }
+
+    private void removeListeners() {
+
+        if (!prevButton.isDisposed()) {
+            prevButton.removeSelectionListener(buttonSelectionListener);
+        }
+
+        if (!nextButton.isDisposed()) {
+            nextButton.removeSelectionListener(buttonSelectionListener);
+        }
+
+        if (!viewCombo.isDisposed()) {
+            viewCombo.removeSelectionListener(comboSelectionListener);
+        }
+
+    }
+
+    private SelectionListener comboSelectionListener = new SelectionListener() {
+        @Override
+        public void widgetSelected(SelectionEvent arg0) {
+            Menu menu = ToolbarUtil.drawMenu(getControl(), viewTextLabel, viewCombo);
+            insertViews(menu);
+        }
+
+        @Override
+        public void widgetDefaultSelected(SelectionEvent e) {
+        }
+    };
+
+    private SelectionListener buttonSelectionListener = new SelectionListener() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            ToolItem item = (ToolItem) e.widget;
+            int data = (Integer) item.getData();
+            if (viewsPart == null) {
+                return;
+            }
+            Part currentViewPart = getEditor().getDesignEditor().getViewer().getCurrentViewPart();
+            DesignViewer viewer = getEditor().getDesignEditor().getViewer();
+            if (currentViewPart != null) {
+                if (data == PREV_VIEW && (currentViewPart.getPreviousSibling() != null)) {
+                    viewer.selectView((ViewPart) currentViewPart.getPreviousSibling());
+                } else if (data == NEXT_VIEW && (currentViewPart.getNextSibling() != null)) {
+                    viewer.selectView((ViewPart) currentViewPart.getNextSibling());
+                }
+            }
+        }
+
+        @Override
+        public void widgetDefaultSelected(SelectionEvent e) {
+        }
+    };
+
+    private void insertViews(Menu menu) {
+        if ((null == menu) || (viewsPart == null)) {
+            return;
+        }
+        for (Part view : viewsPart.getChildren()) {
+            final MenuItem item = new MenuItem(menu, SWT.PUSH);
+            item.setText(view.getPropertyValue(LayoutSchemaConstants.ID));
+            item.setData(view);
+            item.addSelectionListener(new SelectionAdapter() {
+                @Override
+                public void widgetSelected(SelectionEvent e) {
+                    ViewPart viewPart = (ViewPart) item.getData();
+                    getEditor().getDesignEditor().getViewer().selectView(viewPart);
+                }
+            });
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ZoomControlToolbar.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/editor/toolbar/ZoomControlToolbar.java
new file mode 100644 (file)
index 0000000..bf422b2
--- /dev/null
@@ -0,0 +1,344 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.editor.toolbar;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseTrackAdapter;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolItem;
+import org.tizen.efluibuilder.gef.viewer.IScalableViewer;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.editor.ZoomUtil;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.widgets.TizenScale;
+
+
+public class ZoomControlToolbar extends AbstractToolbar implements IZoomToolbar {
+
+    // private static final String ICON_FIT = "res/icons/editor/fit.png";
+    // //$NON-NLS-1$
+
+    // private static final int FIT_ITEM_WIDTH = 30;
+
+    private TizenScale scale;
+    private ToolItem scaleItem;
+    private ToolItem fitItem;
+
+    private ToolItem zoomValueItem;
+    private Text zoomValueText;
+
+    private String oldZoom = null;
+
+    private IScalableViewer viewer = null;
+
+    public ZoomControlToolbar(Composite parent, CombineEditorPart editor) {
+        super(parent, editor);
+        draw();
+        // layout(); // It is replaced to RowLayout
+        widgetEvent();
+    }
+
+    public void updateZoomControl(double value) {
+
+        int zoom = (int) Math.round(value * 100);
+
+        scale.setSelection(zoom);
+        zoomValueText.setText(Integer.toString(zoom));
+        oldZoom = Integer.toString(zoom);
+    }
+
+    public void dispose() {
+    }
+
+    private void draw() {
+        if (getControl() == null) {
+            return;
+        }
+
+        getControl().setLayoutData(new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+
+        fitItem = new ToolItem(getControl(), SWT.BUTTON1);
+        fitItem.setToolTipText(BuilderMessages.AUTO_FIT);
+        fitItem.setImage(ImageResources.getImage(ImageResources.TOOLBAR_AUTO_FIT_NOR));
+        fitItem.setDisabledImage(ImageResources.getImage(ImageResources.TOOLBAR_AUTO_FIT_DIM));
+        fitItem.setHotImage(ImageResources.getImage(ImageResources.TOOLBAR_AUTO_FIT_MV));
+
+        ToolbarUtil.addBlankItem(getControl(), new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+
+        Label minusLabel = new Label(getControl(), SWT.NONE);
+        minusLabel.setImage(ImageResources.getImage(ImageResources.TOOLBAR_ZOOM_OUT_NOR));
+        minusLabel.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseDown(MouseEvent e) {
+                String text = zoomValueText.getText();
+                int nextScale = Integer.parseInt(text) - ZoomUtil.ZOOM_INCREMENT;
+                setZoomScale(Integer.toString(nextScale));
+            }
+        });
+        minusLabel.addMouseTrackListener(new MouseTrackAdapter() {
+            private Image oldImage = null;
+
+            @Override
+            public void mouseEnter(MouseEvent e) {
+                Label label = (Label) e.widget;
+                if (this.oldImage == null) {
+                    this.oldImage = label.getImage();
+                    label.setImage(ImageResources.getImage(ImageResources.TOOLBAR_ZOOM_OUT_MV));
+                }
+            }
+
+            @Override
+            public void mouseExit(MouseEvent e) {
+                Label label = (Label) e.widget;
+                if (this.oldImage != null) {
+                    label.setImage(this.oldImage);
+                    this.oldImage = null;
+                }
+            }
+        });
+        ToolItem minusItem = new ToolItem(getControl(), SWT.SEPARATOR);
+        minusItem.setControl(minusLabel);
+        minusItem.setWidth(minusLabel.getSize().x);
+
+        scale = new TizenScale(getControl(), SWT.HORIZONTAL);
+        scale.setMaximum(ZoomUtil.MAX_ZOOM_PERCENT);
+        scale.setMinimum(ZoomUtil.MIN_ZOOM_PERCENT);
+        scale.setPageIncrement(ZoomUtil.ZOOM_INCREMENT);
+        scale.setOrientation(SWT.LEFT_TO_RIGHT);
+        scaleItem = new ToolItem(getControl(), SWT.SEPARATOR);
+        scaleItem.setControl(scale);
+        scaleItem.setWidth(ToolBarConstants.TOOLITEM_SCALE_WIDTH);
+
+        Label plusLabel = new Label(getControl(), SWT.NONE);
+        plusLabel.setImage(ImageResources.getImage(ImageResources.TOOLBAR_ZOOM_IN_NOR));
+        plusLabel.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseDown(MouseEvent e) {
+                String text = zoomValueText.getText();
+                int nextScale = Integer.parseInt(text) + ZoomUtil.ZOOM_INCREMENT;
+                setZoomScale(Integer.toString(nextScale));
+            }
+        });
+        plusLabel.addMouseTrackListener(new MouseTrackAdapter() {
+            private Image oldImage = null;
+
+            @Override
+            public void mouseEnter(MouseEvent e) {
+                Label label = (Label) e.widget;
+                if (this.oldImage == null) {
+                    this.oldImage = label.getImage();
+                    label.setImage(ImageResources.getImage(ImageResources.TOOLBAR_ZOOM_IN_MV));
+                }
+            }
+
+            @Override
+            public void mouseExit(MouseEvent e) {
+                Label label = (Label) e.widget;
+                if (this.oldImage != null) {
+                    label.setImage(this.oldImage);
+                    this.oldImage = null;
+                }
+            }
+        });
+        ToolItem plusItem = new ToolItem(getControl(), SWT.SEPARATOR);
+        plusItem.setControl(plusLabel);
+        plusItem.setWidth(plusLabel.getSize().x);
+
+        ToolbarUtil.addBlankItem(getControl(), 10, new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+
+        zoomValueText = new Text(getControl(), SWT.LEFT_TO_RIGHT | SWT.RIGHT | SWT.BORDER);
+        zoomValueText.pack();
+        zoomValueItem = new ToolItem(getControl(), SWT.SEPARATOR);
+        zoomValueItem.setControl(zoomValueText);
+        zoomValueItem.setWidth(40);
+
+        ToolbarUtil.addBlankItem(getControl(), 5, new RowData(SWT.DEFAULT, ToolBarConstants.TOOLBAR_HEIGHT));
+
+        Label percentLabel = new Label(getControl(), SWT.NONE);
+        percentLabel.setImage(ImageResources.getImage(ImageResources.TOOLBAR_PERCENT_NOR));
+        percentLabel.pack();
+        ToolItem percentItem = new ToolItem(getControl(), SWT.SEPARATOR);
+        percentItem.setControl(percentLabel);
+        percentItem.setWidth(percentLabel.getSize().x + ToolBarConstants.TOOLITEM_WIDTH_MARGIN);
+    }
+
+    private void widgetEvent() {
+        if (getControl() == null) {
+            return;
+        }
+
+        zoomValueText.addSelectionListener(new SelectionAdapter() {
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent event) {
+                String text = ((Text) event.widget).getText();
+                setZoomScale(text);
+            }
+        });
+
+        zoomValueText.addFocusListener(new FocusAdapter() {
+
+            @Override
+            public void focusLost(FocusEvent event) {
+                zoomValueText.setText(oldZoom);
+            }
+        });
+
+        zoomValueText.addVerifyListener(new VerifyListener() {
+            @Override
+            public void verifyText(VerifyEvent event) {
+                char character = event.character;
+                if (character == '\0') {
+                    return;
+                }
+
+                if (event.keyCode == SWT.BS || event.keyCode == SWT.DEL || Character.isDigit(character)) {
+                    event.doit = true;
+                } else {
+                    event.doit = false;
+                }
+            }
+        });
+
+        scale.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                int sel = ((TizenScale) e.getSource()).getSelection();
+                setZoomScale(Integer.toString(sel));
+            }
+        });
+
+        fitItem.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                if (viewer != null) {
+                    viewer.setFitMode(true);
+                }
+                // updateFitButtonToolTip();
+            }
+        });
+    }
+
+    private boolean isValidate(String zoom) {
+        if (zoom == null || zoom.isEmpty()) {
+            zoomValueText.setText(oldZoom);
+            return false;
+        }
+
+        if (!zoom.matches(ModelConstants.INTEGERVALUE)) {
+            return false;
+        }
+
+        if (oldZoom.equals(ZoomUtil.getMinZoom()) && ZoomUtil.isLTMinZoom(zoom)) {
+            zoomValueText.setText(oldZoom);
+            return false;
+        }
+
+        if (oldZoom.equals(ZoomUtil.getMaxZoom()) && ZoomUtil.isGTMaxZoom(zoom)) {
+            zoomValueText.setText(oldZoom);
+            return false;
+        }
+
+        return true;
+    }
+
+    private void setZoomScale(String zoom) {
+        if (viewer == null) {
+            return;
+        }
+
+        if (!isValidate(zoom)) {
+            return;
+        }
+
+        if (isFitMode()) {
+            setFitMode(false);
+        }
+
+        double value = Double.parseDouble(zoom) / 100;
+        viewer.setZoomScale(value);
+    }
+
+    // private void updateFitButtonToolTip() {
+    // String toolTip = null;
+    // if (isFitMode()) {
+    // toolTip = BuilderMessages.AUTO_FIT_OFF;
+    // } else {
+    // toolTip = BuilderMessages.AUTO_FIT_ON;
+    // }
+    // fitItem.setToolTipText(toolTip);
+    //
+    // }
+
+    @Override
+    public void setFitMode(boolean isFit) {
+        fitItem.setSelection(isFit);
+        // updateFitButtonToolTip();
+        if (viewer != null) {
+            viewer.setFitMode(isFit);
+        }
+    }
+
+    @Override
+    public boolean isFitMode() {
+        return viewer.getFitMode();
+    }
+
+    @Override
+    public void zoomChanged(double value) {
+        updateZoomControl(value);
+    }
+
+    @Override
+    public void setViewer(IScalableViewer viewer) {
+        if (this.viewer != null) {
+            this.viewer.removeZoomScaleChangedListener(this);
+        }
+        this.viewer = viewer;
+        if (this.viewer != null) {
+            this.viewer.addZoomScaleChangedListener(this);
+            this.viewer.setZoomControlToolbar(this);
+            this.updateZoomControl(viewer.getZoomScale());
+        }
+    }
+
+    public void setEnabled(boolean enabled) {
+        getControl().setEnabled(enabled);
+        scale.setEnabled(enabled);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/resources/ColorResources.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/resources/ColorResources.java
new file mode 100644 (file)
index 0000000..110df65
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.resources;
+
+import org.eclipse.jface.resource.ColorRegistry;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.RGBA;
+
+
+public class ColorResources {
+    private static ColorRegistry colorRegistry = new ColorRegistry();
+    private static int key;
+
+    /*
+     * Do not dispose following Colors explicitly
+     */
+    /*
+     * GEF Policy
+     */
+    public static final Color POLICY_INFO_FEEDBACK = getColor(new RGB(0xff, 0xff, 0xff));
+    public static final Color POLICY_HOVER_FEEDBACK = getColor(new RGB(0x00, 0x00, 0xff));
+
+    /*
+     * M-Screen
+     */
+    public static final Color MSCREEN_CONFIGURATOR_ORIENT_BG = getColor(new RGB(0xff, 0xff, 0xff));// $NON-NLS-1$
+
+    /*
+     * WYSIWYG Toolbar
+     */
+    public static final Color TOOLBAR_VIEW_TEXT_LABEL = getColor(new RGB(0xff, 0xff, 0xff));// $NON-NLS-1$
+    public static final Color TOOLBAR_EDITOR_SWITCH_BACKGROUND = getColor(new RGB(0x00, 0x8a, 0xee));// $NON-NLS-1$
+
+    /*
+     * WYSIWYG Palette
+     */
+    public static final Color PALETTE_TITLE = getColor(new RGB(0x00, 0x8a, 0xee));// $NON-NLS-1$
+    public static final Color PALETTE_TITLE_BACKGROUND = getColor(new RGB(0xff, 0xff, 0xff));// $NON-NLS-1$
+    public static final Color PALETTE_CATEGORY_NORMAL = getColor(new RGB(0x58, 0x58, 0x58));// $NON-NLS-1$
+    public static final Color PALETTE_CATEGORY_SELECT = PALETTE_CATEGORY_NORMAL;// $NON-NLS-1$
+    public static final Color PALETTE_CATEGORY_TRIANGLE = PALETTE_CATEGORY_NORMAL;// $NON-NLS-1$
+    public static final Color PALETTE_CATEGORY_BACKGROUND = getColor(new RGB(0xe1, 0xe1, 0xe1));// $NON-NLS-1$
+    public static final Color PALETTE_UI_COMPONENT_NORMAL = PALETTE_CATEGORY_NORMAL;// $NON-NLS-1$
+    public static final Color PALETTE_UI_COMPONENT_SELECT = getColor(new RGB(0x00, 0x8a, 0xee));// $NON-NLS-1$
+    public static final Color PALETTE_SCROLLBAR_TRIANGLE_BACKGROUND = getColor(new RGB(0x33, 0x33, 0x33));// $NON-NLS-1$
+
+    /*
+     * Preview
+     */
+    public static final Color PREVIEW_BACKGROUND = getColor(new RGB(0xd7, 0xd7, 0xd7));// $NON-NLS-1$
+    public static final Color PREVIEW_SPLITTER = getColor(new RGB(0x58, 0x58, 0x58));// $NON-NLS-1$
+
+    /*
+     * Outline view
+     */
+    public static final Color OUTLINE_BACKGROUND = getColor(new RGB(0xf8, 0xf8, 0xf8));// $NON-NLS-1$
+
+    /*
+     * Properties view
+     */
+    public static final Color PROPERTIES_TITLE_BG = getColor(new RGB(0xe1, 0xe1, 0xe1));// $NON-NLS-1$
+    public static final Color PROPERTIES_CONTENT_BG = getColor(new RGB(0xf8, 0xf8, 0xf8));// $NON-NLS-1$
+    public static final Color PROPERTIES_SEPERARTOR = getColor(new RGB(0xaa, 0xaa, 0xaa));// $NON-NLS-1$
+    public static final Color PROPERTIES_ATTR_SEPERATOR = getColor(new RGB(0xd1, 0xd1, 0xd1));// $NON-NLS-1$
+    public static final Color PROPERTIES_EVENT_LABEL = getColor(new RGB(0x46, 0x46, 0x46));// $NON-NLS-1$
+    public static final Color PROPERTIES_ATTR_LABEL = getColor(new RGB(0x46, 0x46, 0x46));// $NON-NLS-1$
+    public static final Color PROPERTIES_ATTR_LABEL_DIM = getColor(new RGB(0xd0, 0xd0, 0xd0));// $NON-NLS-1$
+    public static final Color PROPERTIES_CD_DESCRIPTOR = getColor(new RGB(0x33, 0x33, 0x33));// $NON-NLS-1$
+
+    /*
+     * Tizen Scale
+     */
+    public static final Color TIZEN_SCALE_THUMB_NOR = getColor(new RGB(0x00, 0x8a, 0xee));// $NON-NLS-1$
+    public static final Color TIZEN_SCALE_THUMB_DIM = getColor(new RGB(0xd0, 0xd0, 0xd0));// $NON-NLS-1$
+    public static final Color TIZEN_SCALE_AREA_NOR = getColor(new RGB(0xa6, 0xa6, 0xa6));// $NON-NLS-1$
+    public static final Color TIZEN_SCALE_AREA_DIM = getColor(new RGB(0xd0, 0xd0, 0xd0));// $NON-NLS-1$
+
+    /*
+     * Dialog View
+     */
+    public static final Color DIALOG_TABLE_BG = getColor(new RGB(0xff, 0xff, 0xff));// $NON-NLS-1$
+    public static final Color DIALOG_IMAGECOMPOSITE_BG_COLOR = getColor(new RGB(0xd7, 0xd7, 0xd7));// $NON-NLS-1$
+    public static final Color DIALOG_IMAGE_BORDER_COLOR = getColor(new RGB(0xCC, 0xCC, 0xCC));// $NON-NLS-1$
+    public static final Color DIALOG_NEW_VIEW_ID_LABEL = getColor(new RGB(0x33, 0x33, 0x33));// $NON-NLS-1$
+    public static final Color DIALOG_NEW_VIEW_NAME_TEXT_BG = getColor(new RGB(0xf8, 0xf8, 0xf8));// $NON-NLS-1$
+    public static final Color DIALOG_NEW_VIEW_TEMPLATE_LINE = getColor(new RGB(0xaa, 0xaa, 0xaa));// $NON-NLS-1$
+
+    /*
+     * WYSIWYG Design Editor
+     */
+    public static final Color DESIGN_EDITOR_SELECTION_LINE_COLOR = getColor(new RGB(0x00, 0x88, 0xEE));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_REISIZE_HANDLE_FILL_COLOR = getColor(new RGB(0xFF, 0xFF, 0xFF));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_REISIZE_HANDLE_LINE_COLOR = DESIGN_EDITOR_SELECTION_LINE_COLOR;// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_CONTAINER_LINE_COLOR = getColor(new RGB(0xFF, 0xF8, 0x80));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_COMPONENT_HOVER_COLOR = getColor(new RGB(0x00, 0x7F, 0xD6));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_PLACEHOLDER_LINE_COLOR = getColor(new RGB(0xFF, 0xFF, 0xFF));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_CHANGE_BOUND_FEEDBACK_LINE_COLOR = getColor(new RGB(0x00, 0x8A, 0xEE));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_CHANGE_BOUND_FEEDBACK_FILL_COLOR = new Color(null, new RGBA(0x00, 0x7F, 0xD6, 0x33));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_SNAP_FEEDBACK_LINE_COLOR = getColor(new RGB(0xFF, 0x58, 0xDA));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_CREATION_BOUND_FEEDBACK_COLOR = getColor(new RGB(0x00, 0x8A, 0xEE));// $NON-NLS-1$
+    
+    public static final Color DESIGN_EDITOR_VIEW_FIGURE_BG_NORMAL_COLOR = getColor(new RGB(0x4B, 0x4B, 0x4B));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_VIEW_FIGURE_BG_SELECTED_COLOR = getColor(new RGB(0x00, 0x8A, 0xEE));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_VIEW_FIGURE_FONT_NORMAL_COLOR = getColor(new RGB(0xFF, 0xFF, 0xFF));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_VIEW_FIGURE_FONT_SELECTED_COLOR = getColor(new RGB(0xFF, 0xFF, 0xFF));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_CONNECTION_SELECTED_COLOR = getColor(new RGB(0x00, 0x8A, 0xEE));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_CONNECTION_UNSELECTED_COLOR = getColor(new RGB(0x4B, 0x4B, 0x4B));// $NON-NLS-1$
+    public static final Color DESIGN_EDITOR_BACKGROUND = getColor(new RGB(0xd7, 0xd7, 0xd7));// $NON-NLS-1$
+
+    /*
+     * Project Migration Wizard
+     */
+    public static final Color PROJECT_MIGRATER_USERVIEW_ERROR_COLOR = getColor(new RGB(0xff, 0x01, 0x01));// $NON-NLS-1$
+
+    private static Color getColor(RGB rgb) {
+        String key_ = Integer.toString(++key);
+        colorRegistry.put(key_, rgb);
+        return colorRegistry.get(key_);
+    }
+
+    /*
+     * Invalid XML dialog
+     */
+    public static final Color DIALOG_INVALID_XML_BG = getColor(new RGB(0x00, 0x00, 0x00));// $NON-NLS-1$
+    public static final Color DIALOG_INVALID_XML_LABEL = getColor(new RGB(0xff, 0xff, 0xff));// $NON-NLS-1$
+    public static final Color EDITOR_INVALID_XML_BG = getColor(new RGB(0xff, 0x00, 0x00));// $NON-NLS-1$
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/resources/FontResources.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/resources/FontResources.java
new file mode 100644 (file)
index 0000000..4285ba0
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.resources;
+
+import org.eclipse.jface.resource.FontRegistry;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.ui.PlatformUI;
+
+
+public class FontResources {
+    private static FontRegistry fontRegistry = new FontRegistry();
+    private static final Font defaultFont = getDefaultFont();
+    private static int key;
+
+    /*
+     * Do not dispose following Fonts explicitly
+     */
+    /*
+     * Common
+     */
+    public static final Font BOLD = getFont(SWT.BOLD);
+
+    /*
+     * WYSIWYG Palette
+     */
+    public static final Font PALETTE_COMPONENT_NORMAL = getFont(SWT.NONE, (int) (11.0f * 0.75));// $NON-NLS-1$
+    public static final Font PALETTE_COMPONENT_BOLD = getFont(SWT.BOLD, (int) (11.0f * 0.75));// $NON-NLS-1$
+    public static final Font PALETTE_CATEGORY_NORMAL = getFont(SWT.NONE, (int) (13.0f * 0.75));// $NON-NLS-1$
+    public static final Font PALETTE_CATEGORY_BOLD = getFont(SWT.BOLD, (int) (13.0f * 0.75));// $NON-NLS-1$
+    public static final Font PALETTE_TITLE_BOLD = getFont(SWT.BOLD, (int) (13.0f * 0.75));// $NON-NLS-1$
+    public static final Font TOOLBAR_VIEW_NAVIGATION_LABEL = getFont(SWT.BOLD | SWT.ITALIC, 9);// $NON-NLS-1$
+    public static final Font WYSIWYG_INVALID_XML_TITLE = getFont(SWT.BOLD, (int) (13.0f * .75));// $NON-NLS-1$
+    public static final Font WYSIWYG_INVALID_XML_TITLE_DESCRIPTION = getFont(SWT.NONE, (int) (13.0f * 0.75));// $NON-NLS-1$
+
+    /**
+     * Gets default(System) font.
+     * 
+     * Do not dispose this System fonts. The System fonts will be disposing in a release method of
+     * the Display.
+     * 
+     * @return default(System) font
+     * @see org.eclipse.swt.graphics.Device#release()
+     */
+    public static Font getDefaultFont() {
+        return PlatformUI.getWorkbench().getDisplay().getSystemFont();
+    }
+
+    private static Font getFont(int style) {
+        return getFont(null, style, -1);
+    }
+
+    private static Font getFont(int style, int size) {
+        return getFont(null, style, size);
+    }
+
+    private static Font getFont(String name, int style, int size) {
+        String key_ = Integer.toString(key++);
+        FontData[] fontData = getFontDataFromDefault(name, style, size);
+        fontRegistry.put(key_, fontData);
+        return fontRegistry.get(key_);
+    }
+
+    private static FontData[] getFontDataFromDefault(String name, int style, int size) {
+        FontData[] fontData = defaultFont.getFontData().clone();
+        for (int i = 0; i < fontData.length; i++) {
+            fontData[i].setStyle(style);
+            if (size >= 0) {
+                fontData[i].setHeight(size);
+            }
+            if (name != null) {
+                fontData[i].setName(name);
+            }
+        }
+        return fontData;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/resources/ImageResources.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/resources/ImageResources.java
new file mode 100644 (file)
index 0000000..df22ad6
--- /dev/null
@@ -0,0 +1,277 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.resources;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.BuilderPlugin;
+
+
+public class ImageResources {
+    private static ImageRegistry imageRegistry = BuilderPlugin.getDefault().getImageRegistry();
+    /*
+     * WYSIWYG Toolbar
+     */
+    public static final String TOOLBAR_AUTO_FIT_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_autofit_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_AUTO_FIT_DIM = BuilderConstants.ICON_DIR + "editor/toolbar/tool_autofit_dim.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_AUTO_FIT_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_autofit_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_AUTO_FIT_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_autofit_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ZOOM_IN_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_zoom_in_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ZOOM_IN_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_zoom_in_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ZOOM_IN_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_zoom_in_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ZOOM_OUT_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_zoom_out_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ZOOM_OUT_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_zoom_out_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ZOOM_OUT_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_zoom_out_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_DESIGN_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_design_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_DESIGN_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_design_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_SOURCE_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_source_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_SOURCE_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_source_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_AUTO_LAYOUT_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_auto_layout_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_AUTO_LAYOUT_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_auto_layout_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_AUTO_LAYOUT_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_auto_layout_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_AUTO_LAYOUT_DIM = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_auto_layout_dim.png"; //$NON-NLS-1$
+
+    // Action
+    public static final String TOOLBAR_ALIGN_LEFT_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_left_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_LEFT_DIM = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_left_dim.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_LEFT_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_left_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_LEFT_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_left_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_CENTER_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_center_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_CENTER_DIM = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_center_dim.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_CENTER_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_center_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_CENTER_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_center_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_RIGHT_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_right_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_RIGHT_DIM = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_right_dim.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_RIGHT_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_right_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_RIGHT_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_right_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_TOP_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_top_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_TOP_DIM = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_top_dim.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_TOP_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_top_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_TOP_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_top_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_MIDDLE_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_middle_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_MIDDLE_DIM = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_middle_dim.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_MIDDLE_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_middle_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_MIDDLE_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_middle_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_BOTTOM_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_bottom_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_BOTTOM_DIM = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_bottom_dim.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_BOTTOM_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_bottom_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_BOTTOM_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_align_bottom_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_WIDTH_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_width_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_WIDTH_DIM = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_width_dim.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_WIDTH_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_width_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_WIDTH_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_width_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_HEIGHT_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_height_nor.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_HEIGHT_DIM = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_height_dim.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_HEIGHT_MV = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_height_mv.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_ALIGN_HEIGHT_SEL = BuilderConstants.ICON_DIR + "editor/toolbar/tool_match_height_sel.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_PERCENT_NOR = BuilderConstants.ICON_DIR + "editor/toolbar/tool_percent_nor.png"; //$NON-NLS-1$
+    // View navigation
+    public static final String TOOLBAR_NAVI_RIGHT_ARROW = BuilderConstants.ICON_DIR + "editor/right_arrow.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_NAVI_LEFT_ARROW = BuilderConstants.ICON_DIR + "editor/toolbar/left_arrow.png"; //$NON-NLS-1$
+    public static final String TOOLBAR_NAVI_DOWN_ARROW = BuilderConstants.ICON_DIR + "editor/toolbar/down_arrow.png"; //$NON-NLS-1$
+    // editor
+    public static final String EDITOR_OPEN_EDC_EDITOR = BuilderConstants.ICON_DIR + "editor/icon_link_to_edc.png"; //$NON-NLS-1$
+    public static final String EDITOR_CONNECTION_END_POINT_SEL_V = BuilderConstants.ICON_DIR + "editor/connection_line_sel_v.png"; //$NON-NLS-1$
+    public static final String EDITOR_CONNECTION_END_POINT_SEL_H = BuilderConstants.ICON_DIR + "editor/connection_line_sel_h.png"; //$NON-NLS-1$
+    public static final String EDITOR_CONNECTION_END_POINT_NOR_V = BuilderConstants.ICON_DIR + "editor/connection_line_nor_v.png"; //$NON-NLS-1$
+    public static final String EDITOR_CONNECTION_END_POINT_NOR_H = BuilderConstants.ICON_DIR + "editor/connection_line_nor_h.png"; //$NON-NLS-1$
+    public static final String EDITOR_STARTUP_VIEW_HOME_B = BuilderConstants.ICON_DIR + "editor/ic_view_startup_b.png"; //$NON-NLS-1$
+    public static final String EDITOR_STARTUP_VIEW_HOME_W = BuilderConstants.ICON_DIR + "editor/ic_view_startup_w.png"; //$NON-NLS-1$
+
+    /*
+     * WYSIWYG Palette
+     */
+    public static final String PALETTE_TITLE_ICON = BuilderConstants.ICON_DIR + "editor/palette/pal_title.png"; //$NON-NLS-1$
+    public static final String PALETTE_CATEGORY_ICON_UI_VIEW = BuilderConstants.ICON_DIR + "editor/palette/pal_title_view_nor.png"; //$NON-NLS-1$
+    public static final String PALETTE_CATEGORY_ICON_UI_CONTAINER = BuilderConstants.ICON_DIR + "editor/palette/pal_title_uicontainer_nor.png"; //$NON-NLS-1$
+    public static final String PALETTE_CATEGORY_ICON_UI_COMPONENT = BuilderConstants.ICON_DIR + "editor/palette/pal_title_uicomponent_nor.png"; //$NON-NLS-1$
+    public static final String PALETTE_CATEGORY_ICON_UI_SNIPPET = BuilderConstants.ICON_DIR + "editor/palette/pal_title_snippet_nor.png"; //$NON-NLS-1$
+
+    public static final String PALETTE_CATEGORY_ICON_UI_VIEW_SELECTED = BuilderConstants.ICON_DIR + "editor/palette/pal_title_view_nor.png"; //$NON-NLS-1$
+    public static final String PALETTE_CATEGORY_ICON_UI_CONTAINER_SELECTED = BuilderConstants.ICON_DIR + "editor/palette/pal_title_uicontainer_nor.png"; //$NON-NLS-1$
+    public static final String PALETTE_CATEGORY_ICON_UI_COMPONENT_SELECTED = BuilderConstants.ICON_DIR + "editor/palette/pal_title_uicomponent_nor.png"; //$NON-NLS-1$
+    public static final String PALETTE_CATEGORY_ICON_UI_SNIPPET_SELECTED = BuilderConstants.ICON_DIR + "editor/palette/pal_title_snippet_nor.png"; //$NON-NLS-1$
+    public static final String PALETTE_ICON_FILE_ARROW_DOWN = BuilderConstants.ICON_DIR + "editor/palette/pal_title_arrow_down_nor.png";
+    public static final String PALETTE_ICON_FILE_ARROW_UP = BuilderConstants.ICON_DIR + "editor/palette/pal_title_arrow_up_nor.png";
+
+    /*
+     * M-Screen
+     */
+    public static final String MSCREEN_ICON_FILE_DELETE = BuilderConstants.ICON_DIR + "editor/ms_config_delete.png"; //$NON-NLS-1$
+    public static final String MSCREEN_ICON_FILE_PORT_ON = BuilderConstants.ICON_DIR + "editor/ms_config_port_on.png"; //$NON-NLS-1$
+    public static final String MSCREEN_ICON_FILE_PORT_OFF = BuilderConstants.ICON_DIR + "editor/ms_config_port_off.png"; //$NON-NLS-1$
+    public static final String MSCREEN_ICON_FILE_LAND_ON = BuilderConstants.ICON_DIR + "editor/ms_config_land_on.png"; //$NON-NLS-1$
+    public static final String MSCREEN_ICON_FILE_LAND_OFF = BuilderConstants.ICON_DIR + "editor/ms_config_land_off.png"; //$NON-NLS-1$
+
+    /*
+     * Snippet
+     */
+    public static final String SNIPPET_DEFAULT_SNIPPET_IMAGE = BuilderConstants.ICON_DIR + "snippet/default_snippet.png"; //$NON-NLS-1$
+
+    /*
+     * Preview
+     */
+    public static final String PREVIEW_MOBILE_HD_PORTRAIT = BuilderConstants.ICON_DIR + "preview/mobile_HD/mobile_HD.png"; //$NON-NLS-1$
+    public static final String PREVIEW_MOBILE_HD_LANDSCAPE = BuilderConstants.ICON_DIR + "preview/mobile_HD/mobile_HD_landscape.png"; //$NON-NLS-1$
+    public static final String PREVIEW_MOBILE_WVGA_PORTRAT = BuilderConstants.ICON_DIR + "preview/mobile_WVGA/mobile_WVGA.png"; //$NON-NLS-1$
+    public static final String PREVIEW_MOBILE_WVGA_LANDSCAPE = BuilderConstants.ICON_DIR + "preview/mobile_WVGA/mobile_WVGA_landscape.png"; //$NON-NLS-1$
+    public static final String PREVIEW_CIRCLE = BuilderConstants.ICON_DIR + "preview/wearable_circle.png"; //$NON-NLS-1$
+    public static final String PREVIEW_WEARABLE_RECT_320 = BuilderConstants.ICON_DIR + "preview/wearable_320.png"; //$NON-NLS-1$
+    public static final String PREVIEW_WEARABLE_RECT_360 = BuilderConstants.ICON_DIR + "preview/wearable_360.png"; //$NON-NLS-1$
+    public static final String PREVIEW_TOOLBAR_DUMMY = BuilderConstants.ICON_DIR + "transparent_dummy.png"; //$NON-NLS-1$
+
+    /*
+     * Properties view
+     */
+    public static final String PROPERTIES_EVENT_ARROW = BuilderConstants.ICON_DIR + "event/event_arrow.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_EVENT_PLUS_NOR = BuilderConstants.ICON_DIR + "event/event_plus_nor.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_EVENT_PLUS_SEL = BuilderConstants.ICON_DIR + "event/event_plus_sel.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_EVENT_PLUS_MV = BuilderConstants.ICON_DIR + "event/event_plus_mv.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_EVENT_PLUS_DIM = BuilderConstants.ICON_DIR + "event/event_plus_dim.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_EVENT_ARROW_BTN_NOR = BuilderConstants.ICON_DIR + "event/event_arrow_btn_nor.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_EVENT_ARROW_BTN_SEL = BuilderConstants.ICON_DIR + "event/event_arrow_btn_sel.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_EVENT_ARROW_BTN_MV = BuilderConstants.ICON_DIR + "event/event_arrow_btn_mv.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_EVENT_DELETE_NOR = BuilderConstants.ICON_DIR + "event/event_delete_nor.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_EVENT_DELETE_SEL = BuilderConstants.ICON_DIR + "event/event_delete_sel.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_EVENT_DELETE_MV = BuilderConstants.ICON_DIR + "event/event_delete_mv.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_BTN_IC_LOCATION_NOR = BuilderConstants.ICON_DIR + "properties/btn_ic_location_nor.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_BTN_IC_LOCATION_SEL = BuilderConstants.ICON_DIR + "properties/btn_ic_location_sel.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_BTN_IC_LOCATION_OVER = BuilderConstants.ICON_DIR + "properties/btn_ic_location_over.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_CD_ICON = BuilderConstants.ICON_DIR + "properties/cd_icon.png"; //$NON-NLS-1$
+    // TODO Check that following is unnecessary.
+    public static final String PROPERTIES_HANDLER_GO_ICON = BuilderConstants.ICON_DIR + "go.png";
+    public static final String PROPERTIES_SECOND_FOLDING_CLOSED = BuilderConstants.ICON_DIR + "second_folding_closed.png";
+    public static final String PROPERTIES_ANIMATOR_ACTION_ADD_NOR = BuilderConstants.ICON_DIR + "animator_action_add_normal.png.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_ANIMATOR_ACTION_ADD_PUSH = BuilderConstants.ICON_DIR + "animator_action_add_push.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_ANIMATOR_ACTION_ADD_HOVER = BuilderConstants.ICON_DIR + "animator_action_add_hover.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_ANIMATOR_ACTION_DELETE_NOR = BuilderConstants.ICON_DIR + "animator_action_delete_normal.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_ANIMATOR_ACTION_DELETE_PUSH = BuilderConstants.ICON_DIR + "animator_action_delete_push.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_ANIMATOR_ACTION_DELETE_HOVER = BuilderConstants.ICON_DIR + "animator_action_delete_hover.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_DOWN_ARROW = BuilderConstants.ICON_DIR + "properties/down_arrow.png"; //$NON-NLS-1$
+    public static final String PROPERTIES_UP_ARROW = BuilderConstants.ICON_DIR + "properties/up_arrow.png"; //$NON-NLS-1$
+
+    /*
+     * Method in Properties view
+     */
+    public static final String METHOD_LEFT_ARROW_IMG_PATH = BuilderConstants.ICON_DIR + "style_clip_left_arrow.png";
+    public static final String METHOD_RIGHT_ARROW_IMG_PATH = BuilderConstants.ICON_DIR + "style_clip_right_arrow.png";
+    public static final String METHOD_UP_ARROW_IMG_PATH = BuilderConstants.ICON_DIR + "style_clip_up_arrow.png";
+    public static final String METHOD_DOWN_ARROW_PATH = BuilderConstants.ICON_DIR + "style_clip_down_arrow.png";
+    public static final String METHOD_IMAGE = BuilderConstants.ICON_DIR + "properties/image.png";
+    public static final String METHOD_RESET = BuilderConstants.ICON_DIR + "properties/reset.png";
+    public static final String METHOD_BOLD = BuilderConstants.ICON_DIR + "properties/bold.png";
+    public static final String METHOD_ITALIC = BuilderConstants.ICON_DIR + "properties/italic.png";
+    public static final String METHOD_UNDER_LINE = BuilderConstants.ICON_DIR + "properties/underline.png";
+    public static final String METHOD_CANCEL_LINE = BuilderConstants.ICON_DIR + "properties/cancelline.png";
+    public static final String METHOD_ALIGN_LEFT = BuilderConstants.ICON_DIR + "properties/align_left.png";
+    public static final String METHOD_ALIGN_CENTER = BuilderConstants.ICON_DIR + "properties/align_center.png";
+    public static final String METHOD_ALIGN_RIGHT = BuilderConstants.ICON_DIR + "properties/align_right.png";
+    public static final String METHOD_ICON_FILE_LABEL_ITEM = BuilderConstants.ICON_DIR + "properties/ms_key_autocomplete.png";
+    public static final String METHOD_COLOR_RESET_NOR = PROPERTIES_EVENT_DELETE_NOR;
+    public static final String METHOD_COLOR_RESET_SEL = PROPERTIES_EVENT_DELETE_SEL;
+    public static final String METHOD_COLOR_RESET_MV = PROPERTIES_EVENT_DELETE_MV;
+
+    /*
+     * WYSIWYG Dialog
+     */
+    public static final String DIALOG_DEVICE_MOBILE_PORTRAIT_DIM = BuilderConstants.ICON_DIR + "editor/dialog/device_mobile_s_dim.png";
+    public static final String DIALOG_DEVICE_MOBILE_PORTRAIT_NOR = BuilderConstants.ICON_DIR + "editor/dialog/device_mobile_s_nor.png";
+    public static final String DIALOG_DEVICE_MOBILE_LANDSCAPE_DIM = BuilderConstants.ICON_DIR + "editor/dialog/device_mobile_sv_dim.png";
+    public static final String DIALOG_DEVICE_MOBILE_LANDSCAPE_NOR = BuilderConstants.ICON_DIR + "editor/dialog/device_mobile_sv_nor.png";
+    public static final String DIALOG_PROFILE_DELETE_NOR = BuilderConstants.ICON_DIR + "editor/dialog/profile_delete_nor.png";
+    public static final String DIALOG_PROFILE_DELETE_OVER = BuilderConstants.ICON_DIR + "editor/dialog/profile_delete_over.png";
+    public static final String DIALOG_PROFILE_DELETE_SEL = BuilderConstants.ICON_DIR + "editor/dialog/profile_delete_sel.png";
+    public static final String DIALOG_SC_BG = BuilderConstants.ICON_DIR + "editor/dialog/sc_bg.png";
+    public static final String DIALOG_STORYBOARD_ARROW_LEFT = BuilderConstants.ICON_DIR + "editor/dialog/storyboard_arrow_left.png";
+    public static final String DIALOG_STORYBOARD_ARROW_RIGHT = BuilderConstants.ICON_DIR + "editor/dialog/storyboard_arrow_right.png";
+    public static final String DIALOG_VIEW_TAB_HELP_MV = BuilderConstants.ICON_DIR + "editor/dialog/view_tab_help_mv.png";
+    public static final String DIALOG_VIEW_TAB_HELP_NOR = BuilderConstants.ICON_DIR + "editor/dialog/view_tab_help_nor.png";
+
+    /*
+     * UIB Converter Wizard
+     */
+    public static final String UIB_CONVERTER_WIZARD_PAGE_IMAGE_MAIN = BuilderConstants.ICON_DIR + "uibconverter/wizard_page_main/uib_screenshot.png";
+    public static final String UIB_CONVERTER_WIZARD_PAGE_IMAGE_SHAPE_CIRCLE =
+            BuilderConstants.ICON_DIR + "uibconverter/wizard_page_shape_type/wearable_circle.png";
+    public static final String UIB_CONVERTER_WIZARD_PAGE_IMAGE_SHAPE_SQUARE =
+            BuilderConstants.ICON_DIR + "uibconverter/wizard_page_shape_type/wearable_square.png";
+    public static final String UIB_CONVERTER_WIZARD_PAGE_IMAGE_APPENTRY_LEGACY =
+            BuilderConstants.ICON_DIR + "uibconverter/wizard_page_app_entry/code_legacy.png";
+    public static final String UIB_CONVERTER_WIZARD_PAGE_IMAGE_APPENTRY_UIB =
+            BuilderConstants.ICON_DIR + "uibconverter/wizard_page_app_entry/code_uib.png";
+
+    public static final String UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_SETSTARTUP_SEL =
+            BuilderConstants.ICON_DIR + "uibconverter/wizard_page_user_view/userviews_setasstartup_sel.png";
+    public static final String UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_SETSTARTUP_NOR =
+            BuilderConstants.ICON_DIR + "uibconverter/wizard_page_user_view/userviews_setasstartup_nor.png";
+    public static final String UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_SETSTARTUP_OVER =
+            BuilderConstants.ICON_DIR + "uibconverter/wizard_page_user_view/userviews_setasstartup_over.png";
+
+    public static final String UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_DELETE_SEL =
+            BuilderConstants.ICON_DIR + "uibconverter/wizard_page_user_view/userviews_delete_sel.png";
+    public static final String UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_DELETE_NOR =
+            BuilderConstants.ICON_DIR + "uibconverter/wizard_page_user_view/userviews_delete_nor.png";
+    public static final String UIB_CONVERTER_WIZARD_PAGE_IMAGE_USERVIEWS_DELETE_OVER =
+            BuilderConstants.ICON_DIR + "uibconverter/wizard_page_user_view/userviews_delete_over.png";
+
+    /*
+     * Invalid xml
+     */
+    public static final String INVALID_XML_ERROR = BuilderConstants.ICON_DIR + "ic_error.png";
+
+    /**
+     * This method return cached image object. Do not dispose returned image.
+     *
+     * @param imagePath
+     * @return SWT image object
+     */
+    public static Image getImage(String imagePath) {
+        // get data from cache
+        Image image = imageRegistry.get(imagePath);
+        if (image == null || image.isDisposed()) {
+            // create data
+            ImageDescriptor descriptor = BuilderPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID, imagePath);
+            if (descriptor == null) {
+                throw new IllegalArgumentException("Cannot load image: " + imagePath);
+            }
+            imageRegistry.put(imagePath, descriptor);
+            image = imageRegistry.get(imagePath);
+        }
+        return image;
+    }
+
+    public static ImageDescriptor getImageDescriptor(String imagePath) {
+        ImageDescriptor descriptor = imageRegistry.getDescriptor(imagePath);
+        if (descriptor == null) {
+            descriptor = BuilderPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID, imagePath);
+            if (descriptor == null) {
+                throw new IllegalArgumentException("Cannot load image: " + imagePath);
+            }
+            imageRegistry.put(imagePath, descriptor);
+        }
+        return descriptor;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/Activator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/Activator.java
new file mode 100644 (file)
index 0000000..375bc63
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.tizen.efluibuilder.ui.view.databinding"; //$NON-NLS-1$
+
+    // The shared instance
+    private static Activator plugin;
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     * 
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingDnDManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingDnDManager.java
new file mode 100644 (file)
index 0000000..f1c4e50
--- /dev/null
@@ -0,0 +1,547 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding;
+
+import org.eclipse.gef.dnd.TemplateTransfer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSource;
+import org.eclipse.swt.dnd.DragSourceEffect;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.DragSourceListener;
+import org.eclipse.swt.dnd.DropTarget;
+import org.eclipse.swt.dnd.DropTargetAdapter;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.gef.dnd.model.DataBindingTemplate;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingObject;
+import org.tizen.efluibuilder.ui.view.databinding.model.TreeItemData;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class DataBindingDnDManager {
+       /**
+        * Adds a drag listener to the data source tree.
+        * 
+        * @param tree
+        */
+       public static void addDragListenerToDataSourceTree(final Tree tree) {
+
+               Transfer[] transferTypes = new Transfer[] { TreeItemTransfer.getInstance() };
+               int dndOperations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK;
+
+               final DragSource dragSource = new DragSource(tree, dndOperations);
+               dragSource.setTransfer(transferTypes);
+               final TreeItem[] dragSourceItem = new TreeItem[1];
+               dragSource.addDragListener(new DragSourceListener() {
+
+                       @Override
+                       public void dragStart(DragSourceEvent dragSourceEvent) {
+                               TreeItem[] selectedTreeItems = tree.getSelection();
+                               if (selectedTreeItems.length == 1) {// &&
+                                                                                       // selection[0].getItemCount()
+                                                                                       // ==
+                                                                                       // 0) {
+                                       TreeItem dataSource = getRootItemFromTree(selectedTreeItems[0]);
+
+                                       if (dataSource == null)
+                                               return;
+
+                                       if (dataSource.equals(selectedTreeItems[0])) {
+                                               dragSourceEvent.doit = true;
+                                               dragSourceItem[0] = selectedTreeItems[0]; // TODO
+                                                                                                                       // multiselect
+                                       } else {
+                                               dragSourceEvent.doit = false;
+                                       }
+                               } else {
+                                       dragSourceEvent.doit = false;
+                               }
+                       }
+
+                       @Override
+                       public void dragSetData(DragSourceEvent dragSourceEvent) {
+                               // event.data = dragSourceItem[0].getText();
+                               dragSourceEvent.data = dragSourceItem[0];
+                       }
+
+                       @Override
+                       public void dragFinished(DragSourceEvent dragSourceEvent) {
+                               if ((dragSourceEvent.detail == DND.DROP_MOVE) && (dragSourceEvent.doit)) {
+                                       dragSourceItem[0].dispose();
+                               }
+                               dragSourceItem[0] = null;
+                       }
+               });
+       }
+
+       /**
+        * Adds a drag and drop listener to the view model tree.
+        * 
+        * @param tree
+        * @param dataBindingView
+        * @param dataBindingPage
+        */
+       public static void addDragAndDropListenerToDataModelTree(final Tree tree, final DataBindingView dataBindingView,
+                       final DataBindingPage dataBindingPage) {
+
+               Transfer[] transferTypes = new Transfer[] { TemplateTransfer.getInstance() };
+               int dndOperations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK;
+
+               final DragSource dragSource = new DragSource(tree, dndOperations);
+               dragSource.setTransfer(transferTypes);
+               final TreeItem[] dragSourceItem = new TreeItem[1];
+
+               dragSource.setDragSourceEffect(new DragSourceEffect(tree) {
+                       @Override
+                       public void dragStart(DragSourceEvent dragSourceEvent) {
+                               dragSourceEvent.image = null;
+                       }
+               });
+
+               dragSource.addDragListener(new DragSourceListener() {
+
+                       @Override
+                       public void dragStart(DragSourceEvent dragSourceEvent) {
+                               TreeItem[] selectedTreeItems = tree.getSelection();
+                               if (selectedTreeItems.length == 1 && selectedTreeItems[0].getParentItem() != null) {
+                                       dragSourceEvent.doit = true;
+                                       dragSourceItem[0] = selectedTreeItems[0]; // TODO multiselect
+                                       TreeItemData treeItemData = (TreeItemData) selectedTreeItems[0].getData("TREEITEMDATA");
+                                       BindingObject bindingObject = (BindingObject) selectedTreeItems[0].getData("BINDING_OBJECT");
+
+                                       if (bindingObject != null && treeItemData != null && treeItemData.getObjectType() != null
+                                                       && (treeItemData.getObjectType().equals("Object") || 
+                                                                       (bindingObject.getChildren().size() > 0 && bindingObject.getChildren().get(0).getPropertyValue("type").equals("IndexObject")))) {
+                                               dragSourceEvent.doit = false;
+                                               return;
+                                       }
+                                       if(treeItemData == null){
+                                           return;
+                                       }
+                                       String sourceType = null;
+                                       BindingData source = dataBindingPage.getDataSource(treeItemData.getModel().getSourceName());
+                    if (source != null) {
+                        sourceType = source.getPropertyValue(BuilderConstants.ATTRIBUTE_SOURCE_TYPE);
+                    }
+                                       String dataType = treeItemData.getObjectType();
+                                       String allowedBindingType = treeItemData.getAllowedBindingType();
+                                       String viewModelInfo = (String) selectedTreeItems[0].getData("path");
+                                       int index = viewModelInfo.indexOf(BuilderConstants.SLASH);
+                                       DataBindingTemplate dataBindingTemplate = new DataBindingTemplate(viewModelInfo.substring(0, index), viewModelInfo.substring(index+1),
+                                                       dataType, allowedBindingType, sourceType);
+                                       TemplateTransfer.getInstance().setTemplate(dataBindingTemplate);
+                               } else {
+                                       dragSourceEvent.doit = false;
+                               }
+
+                       }
+
+                       @Override
+                       public void dragSetData(DragSourceEvent dragSourceEvent) {
+                               // event.data = dragSourceItem[0];
+                               dragSourceEvent.data = TemplateTransfer.getInstance().getTemplate();
+                       }
+
+                       @Override
+                       public void dragFinished(DragSourceEvent dragSourceEvent) {
+                               // TODO only copy?
+//                             if ((dragSourceEvent.detail == DND.DROP_MOVE) && (dragSourceEvent.doit)) {
+//                                     dragSourceItem[0].dispose();
+//                             }
+
+                if (dataBindingPage != null) {
+                    dataBindingPage.refreshBindingInfos();
+                }
+                               
+                               dragSourceItem[0] = null;
+                               TemplateTransfer.getInstance().setTemplate(null);
+                       }
+               });
+
+               DropTarget dropTarget = new DropTarget(tree, dndOperations);
+               transferTypes = new Transfer[] { DataModelTreeItemTransfer.getInstance(), TreeItemTransfer
+                               .getInstance(), /*
+                                                                * TemplateTransfer.getInstance()
+                                                                */ };
+               dropTarget.setTransfer(transferTypes);
+               dropTarget.addDropListener(new DropTargetAdapter() {
+                       public void dragOver(DropTargetEvent dropTargetEvent) {
+                               dropTargetEvent.feedback = DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL;
+                               if (dropTargetEvent.item != null) {
+                                       TreeItem dropTargetItem = (TreeItem) dropTargetEvent.item;
+                                       TreeItem viewModel = getRootItemFromTree(dropTargetItem);
+
+                                       if (viewModel == null)
+                                               return;
+
+                                       if (TreeItemTransfer.getInstance().isSupportedType(dropTargetEvent.currentDataType)) {
+                                               if (viewModel.equals(dropTargetItem)) {
+                                                       dropTargetEvent.feedback |= DND.FEEDBACK_SELECT;
+                                               }
+                                       } else if (DataModelTreeItemTransfer.getInstance().isSupportedType(dropTargetEvent.currentDataType)) {
+                                               TreeItemData treeItemData = (TreeItemData) viewModel.getData("TREEITEMDATA");
+
+                                               if ((treeItemData == null) || (treeItemData.getModel() == null)
+                                                               || (treeItemData.getModel().getModelType()) == null) {
+                                                       return;
+                                               } else if (treeItemData.getModel().getModelType()
+                                                               .equals(BuilderConstants.DATABINDING_TYPE_STATIC)) {
+                                                       Point dropTargetPoint = tree.getDisplay().map(null, tree, dropTargetEvent.x, dropTargetEvent.y);
+                                                       Rectangle itemRectBounds = dropTargetItem.getBounds();
+                                                       if (dropTargetPoint.y < itemRectBounds.y + itemRectBounds.height / 3) {
+                                                               dropTargetEvent.feedback |= DND.FEEDBACK_INSERT_BEFORE;
+                                                       } else if (dropTargetPoint.y > itemRectBounds.y + 2 * itemRectBounds.height / 3) {
+                                                               dropTargetEvent.feedback |= DND.FEEDBACK_INSERT_AFTER;
+                                                       } else {
+                                                               dropTargetEvent.feedback |= DND.FEEDBACK_SELECT;
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+
+                       public void drop(DropTargetEvent dropTargetEvent) {
+
+                               if (dropTargetEvent.data == null) {
+                                       dropTargetEvent.detail = DND.DROP_NONE;
+                                       return;
+                               }
+
+                               TreeItem sourceTreeItem = (TreeItem) dropTargetEvent.data;
+
+                               if (sourceTreeItem.equals(dropTargetEvent.item)) {
+                                       dropTargetEvent.detail = DND.DROP_NONE;
+                                       return;
+                               }
+
+                               if (TreeItemTransfer.getInstance().isSupportedType(dropTargetEvent.currentDataType)) {
+                                       if (dropTargetEvent.item == null) {
+                                               BindingData dataSource = dataBindingPage.getDataSource(sourceTreeItem.getText());
+                                               dataBindingPage.setDataSourceToDataModel(dataSource, null);
+
+                                               dropTargetEvent.detail = DND.DROP_COPY;
+                                       } else if (dropTargetEvent.item.equals(getRootItemFromTree((TreeItem) dropTargetEvent.item))) {
+                                               TreeItem item = (TreeItem) dropTargetEvent.item;
+                                               TreeItem parent = item.getParentItem();
+                                               if (parent != null) {
+                                                       dropTargetEvent.detail = DND.DROP_NONE;
+                                               } else {
+                                                       BindingData viewModel = dataBindingPage.getDataModelByItemName(item.getText());
+                                                       BindingData dataSource = dataBindingPage.getDataSource(sourceTreeItem.getText());
+                                                       dataBindingPage.setDataSourceToDataModel(dataSource, viewModel);
+
+                                                       dropTargetEvent.detail = DND.DROP_COPY;
+                                               }
+                                       } else {
+                                               dropTargetEvent.detail = DND.DROP_NONE;
+                                       }
+                               } else if (DataModelTreeItemTransfer.getInstance().isSupportedType(dropTargetEvent.currentDataType)) {
+                                       BindingData dataModel = null;
+                                       if (dropTargetEvent.item != null) {
+                                           TreeItem treeItem = getRootItemFromTree((TreeItem) dropTargetEvent.item);
+                                           if (treeItem != null) {
+                                               TreeItemData treeItemData = (TreeItemData) treeItem.getData("TREEITEMDATA");
+                               if (treeItemData != null)
+                                   dataModel = treeItemData.getModel();
+                                           }
+                                       }
+                                       if ((dataModel != null)
+                                                       && (dataModel.getModelType().equals(BuilderConstants.DATABINDING_TYPE_STATIC))) {
+                                               TreeItem eventTreeItem = (TreeItem) dropTargetEvent.item;
+                                               Point dropPoint = tree.getDisplay().map(null, tree, dropTargetEvent.x, dropTargetEvent.y);
+                                               Rectangle treeItemBounds = eventTreeItem.getBounds();
+                                               TreeItem parent = eventTreeItem.getParentItem();
+                                               if (parent != null) {
+                                                       TreeItem[] parentItems = parent.getItems();
+                                                       int itemIndex = 0;
+                                                       for (int i = 0; i < parentItems.length; i++) {
+                                                               if (parentItems[i] == eventTreeItem) {
+                                                                       itemIndex = i;
+                                                                       break;
+                                                               }
+                                                       }
+                                                       if (dropPoint.y < treeItemBounds.y + treeItemBounds.height / 3) {
+                                                               TreeItem newTreeItem = new TreeItem(parent, SWT.NONE, itemIndex);
+                                                               setValuesOfItem(newTreeItem, sourceTreeItem);
+                                                       } else if (dropPoint.y > treeItemBounds.y + 2 * treeItemBounds.height / 3) {
+                                                               TreeItem newTreeItem = new TreeItem(parent, SWT.NONE, itemIndex + 1);
+                                                               setValuesOfItem(newTreeItem, sourceTreeItem);
+                                                       } else {
+                                                               TreeItem newTreeItem = new TreeItem(eventTreeItem, SWT.NONE);
+                                                               setValuesOfItem(newTreeItem, sourceTreeItem);
+                                                       }
+
+                                               } else {
+                                                       TreeItem[] items = tree.getItems();
+                                                       int itemIndex = 0;
+                                                       for (int i = 0; i < items.length; i++) {
+                                                               if (items[i] == eventTreeItem) {
+                                                                       itemIndex = i;
+                                                                       break;
+                                                               }
+                                                       }
+                                                       if (dropPoint.y < treeItemBounds.y + treeItemBounds.height / 3) {
+                                                               TreeItem newTreeItem = new TreeItem(tree, SWT.NONE, itemIndex);
+                                                               setValuesOfItem(newTreeItem, sourceTreeItem);
+                                                       } else if (dropPoint.y > treeItemBounds.y + 2 * treeItemBounds.height / 3) {
+                                                               TreeItem newTreeItem = new TreeItem(tree, SWT.NONE, itemIndex + 1);
+                                                               setValuesOfItem(newTreeItem, sourceTreeItem);
+                                                       } else {
+                                                               TreeItem newTreeItem = new TreeItem(eventTreeItem, SWT.NONE);
+                                                               setValuesOfItem(newTreeItem, sourceTreeItem);
+                                                       }
+                                               }
+                                       } else {
+                                               dropTargetEvent.detail = DND.DROP_NONE;
+                                       }
+                               } else {
+                                       dropTargetEvent.detail = DND.DROP_NONE;
+                               }
+                       }
+               });
+       }
+
+       /**
+        * Adds a drag and drop listener to the SetSourceDialog tree.
+        * 
+        * @param tree
+        */
+       public static void addDragAndDropListenerToTree(final Tree tree) {
+               Transfer[] transferTypes = new Transfer[] { TreeItemTransfer.getInstance() };
+               int dndOperations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK;
+
+               final DragSource dragSource = new DragSource(tree, dndOperations);
+               dragSource.setTransfer(transferTypes);
+               final TreeItem[] dragSourceItem = new TreeItem[1];
+               dragSource.addDragListener(new DragSourceListener() {
+
+                       @Override
+                       public void dragStart(DragSourceEvent dragSourceEvent) {
+                               TreeItem[] treeSelection = tree.getSelection();
+                               if (treeSelection.length == 1) { // > 0 &&
+                                                                                               // selection[0].getItemCount()
+                                                                                               // == 0) {
+                                       dragSourceEvent.doit = true;
+                                       dragSourceItem[0] = treeSelection[0];
+                               } else {
+                                       dragSourceEvent.doit = false;
+                               }
+
+                       }
+
+                       @Override
+                       public void dragSetData(DragSourceEvent dragSourceEvent) {
+                               dragSourceEvent.data = dragSourceItem[0];
+                       }
+
+                       @Override
+                       public void dragFinished(DragSourceEvent dragSourceEvent) {
+                               if ((dragSourceEvent.detail == DND.DROP_MOVE) && (dragSourceEvent.doit)) {
+                                       dragSourceItem[0].dispose();
+                               }
+                               dragSourceItem[0] = null;
+                       }
+               });
+
+               DropTarget dropTarget = new DropTarget(tree, dndOperations);
+               dropTarget.setTransfer(transferTypes);
+               dropTarget.addDropListener(new DropTargetAdapter() {
+                       public void dragOver(DropTargetEvent dropTargetEvent) {
+                               dropTargetEvent.feedback = DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL;
+                               if (dropTargetEvent.item != null) {
+                                       TreeItem treeItem = (TreeItem) dropTargetEvent.item;
+                                       Point dropPoint = tree.getDisplay().map(null, tree, dropTargetEvent.x, dropTargetEvent.y);
+                                       Rectangle bounds = treeItem.getBounds();
+                                       if (dropPoint.y < bounds.y + bounds.height / 3) {
+                                               dropTargetEvent.feedback |= DND.FEEDBACK_INSERT_BEFORE;
+                                       } else if (dropPoint.y > bounds.y + 2 * bounds.height / 3) {
+                                               dropTargetEvent.feedback |= DND.FEEDBACK_INSERT_AFTER;
+                                       } else {
+                                               dropTargetEvent.feedback |= DND.FEEDBACK_SELECT;
+                                       }
+                               }
+                       }
+
+                       public void drop(DropTargetEvent dropEvent) {
+                               if (dropEvent.data == null) {
+                                       dropEvent.detail = DND.DROP_NONE;
+                                       return;
+                               }
+
+                               TreeItem sourceItem = (TreeItem) dropEvent.data;
+
+                               if (sourceItem.equals(dropEvent.item)) {// ||
+                                                                                                                               // (sourceItem.getData("VIEWMODELNODE")
+                                                                                                                               // != null)
+                                                                                                                               // ) {
+                                       dropEvent.detail = DND.DROP_NONE;
+                                       return;
+                               }
+
+                               if (dropEvent.item == null) {
+                                       TreeItem newTreeItem = new TreeItem(tree, SWT.NONE);
+                                       setValuesOfItem(newTreeItem, sourceItem);
+                               } else {
+                                       TreeItem treeItem = (TreeItem) dropEvent.item;
+                                       Point dropPoint = tree.getDisplay().map(null, tree, dropEvent.x, dropEvent.y);
+                                       Rectangle bounds = treeItem.getBounds();
+                                       TreeItem parentTreeItem = treeItem.getParentItem();
+                                       if (parentTreeItem != null) {
+                                               TreeItem[] items = parentTreeItem.getItems();
+                                               int index = 0;
+                                               for (int i = 0; i < items.length; i++) {
+                                                       if (items[i] == treeItem) {
+                                                               index = i;
+                                                               break;
+                                                       }
+                                               }
+                                               if (dropPoint.y < bounds.y + bounds.height / 3) {
+                                                       TreeItem newTreeItem = new TreeItem(parentTreeItem, SWT.NONE, index);
+                                                       setValuesOfItem(newTreeItem, sourceItem);
+                                               } else if (dropPoint.y > bounds.y + 2 * bounds.height / 3) {
+                                                       TreeItem newTreeItem = new TreeItem(parentTreeItem, SWT.NONE, index + 1);
+                                                       setValuesOfItem(newTreeItem, sourceItem);
+                                               } else {
+                                                       TreeItem newTreeItem = new TreeItem(treeItem, SWT.NONE);
+                                                       setValuesOfItem(newTreeItem, sourceItem);
+                                               }
+
+                                       } else {
+                                               TreeItem[] items = tree.getItems();
+                                               int treeItemIndex = 0;
+                                               for (int i = 0; i < items.length; i++) {
+                                                       if (items[i] == treeItem) {
+                                                               treeItemIndex = i;
+                                                               break;
+                                                       }
+                                               }
+                                               if (dropPoint.y < bounds.y + bounds.height / 3) {
+                                                       TreeItem newTreeItem = new TreeItem(tree, SWT.NONE, treeItemIndex);
+                                                       setValuesOfItem(newTreeItem, sourceItem);
+                                               } else if (dropPoint.y > bounds.y + 2 * bounds.height / 3) {
+                                                       TreeItem newTreeItem = new TreeItem(tree, SWT.NONE, treeItemIndex + 1);
+                                                       setValuesOfItem(newTreeItem, sourceItem);
+                                               } else {
+                                                       TreeItem newTreeItem = new TreeItem(treeItem, SWT.NONE);
+                                                       setValuesOfItem(newTreeItem, sourceItem);
+                                               }
+                                       }
+
+                               }
+                       }
+               });
+
+       }
+
+       private static TreeItem getRootItemFromTree(TreeItem treeItem) {
+
+               if (treeItem == null)
+                       return null;
+
+               while (true) {
+                       if (treeItem == null || treeItem.getParentItem() == null)
+                               break;
+
+                       treeItem = treeItem.getParentItem();
+               }
+
+               return treeItem;
+       }
+
+       private static void setValuesOfItem(TreeItem newTreeItem, TreeItem sourceTreeItem) {
+               TreeItemData treeItemData = new TreeItemData();
+               TreeItemData sourceTreeItemData = (TreeItemData) sourceTreeItem.getData("TREEITEMDATA");
+               if (sourceTreeItemData == null) {
+                       return;
+               }
+               String text = sourceTreeItem.getText();
+
+               treeItemData.setObjectValue(sourceTreeItemData.getObjectValue());
+               treeItemData.setObjectType(sourceTreeItemData.getObjectType());
+
+               newTreeItem.setText(text);
+
+               newTreeItem.setData("TREEITEMDATA", treeItemData);
+
+               if ((treeItemData.getObjectType() != null) && (treeItemData.getObjectType().equals("Array"))) {
+                       newTreeItem.setImage(
+                                       ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_ARRAY_ICON));
+               }
+
+               setChildItems(newTreeItem, sourceTreeItem.getItems());
+       }
+
+       /**
+        * Creates a new TreeItem and child items.
+        * 
+        * @param parentTreeItem
+        * @param treeItems
+        */
+       public static void setChildItems(TreeItem parentTreeItem, TreeItem[] treeItems) {
+
+               if (treeItems.length != 0) {
+                       for (TreeItem treeItem : treeItems) {
+                               TreeItem newTreeItem = new TreeItem(parentTreeItem, SWT.NONE);
+                               TreeItemData treeItemData = new TreeItemData();
+                               TreeItemData sourceTreeItemData = (TreeItemData) treeItem.getData("TREEITEMDATA");
+
+                               if ((sourceTreeItemData != null) && (sourceTreeItemData.getObjectValue() != null)) {
+                                       newTreeItem.setText(new String[] { treeItem.getText(), sourceTreeItemData.getObjectValue() });
+                               } else {
+                                       newTreeItem.setText(treeItem.getText());
+                               }
+
+                               if (sourceTreeItemData == null) {
+                                       return;
+                               }
+
+                               treeItemData.setObjectValue(sourceTreeItemData.getObjectValue());
+
+                               if ((sourceTreeItemData.getObjectType() != null)
+                                               && (sourceTreeItemData.getObjectType().equals("Array"))) {
+                                       treeItemData.setObjectType(sourceTreeItemData.getObjectType());
+                                       newTreeItem.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+                                                       BuilderConstants.DATABINDING_ARRAY_ICON));
+                               } else if ((sourceTreeItemData.getObjectType() != null)
+                                               && (sourceTreeItemData.getObjectType().equals("Object"))) {
+                                       treeItemData.setObjectType(sourceTreeItemData.getObjectType());
+                               }
+
+                               newTreeItem.setData("TREEITEMDATA", treeItemData);
+
+                               TreeItem[] treeSubItems = treeItem.getItems();
+                               if (treeSubItems.length != 0) {
+                                       setChildItems(newTreeItem, treeSubItems);
+                               }
+
+                       }
+               }
+       }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingManager.java
new file mode 100644 (file)
index 0000000..56cbaa5
--- /dev/null
@@ -0,0 +1,260 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.DataBindingPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.DBPartUnmarshaller;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditor;
+import org.tizen.efluibuilder.ui.editor.texteditor.DataBindingModelListener;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingDataSet;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingObject;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+public class DataBindingManager {
+    private CombineEditorPart combineEditorPart = null;
+    private Document dataBindingModel = null;
+    private String layoutMetaPath = "";
+    private BindingDataSet bindingDataSet = null;
+
+    // TODO: Change it to DesignEditor when we need to use DesignEditor specific
+    // functionalities. Use GraphicalEditor as DesignEditor is not exported by
+    // contributing package
+    private DesignEditor designEditor = null;
+    private DesignViewer designViewer = null;
+
+    public void initializeDataBindingModelListener(Part dataBindingPart) {
+        DataBindingModelListener modelListener = new DataBindingModelListener();
+        modelListener.initContents(dataBindingPart, dataBindingModel);
+    }
+
+    public void createDataBindingModel(Part dataBindingPart, IEditorInput input) {
+        try {
+            String inputPath = ((FileEditorInput) input).getPath().toOSString();
+            String inputName = ((FileEditorInput) input).getName();
+            layoutMetaPath = inputPath.replace(inputName, BuilderConstants.DATABINDING_LAYOUT_META_XML);
+
+            File fileToOpen = new File(layoutMetaPath);
+            DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
+            if (fileToOpen.createNewFile()) {
+                Document doc = dBuilder.newDocument();
+                Element rootElement = doc.createElement(BuilderConstants.DATABINDING_ROOT_ELEMENT);
+                doc.appendChild(rootElement);
+                TransformerFactory transformerFactory = TransformerFactory.newInstance();
+                Transformer transformer = transformerFactory.newTransformer();
+                DOMSource source = new DOMSource(doc);
+                StreamResult result = new StreamResult(fileToOpen);
+                transformer.transform(source, result);
+                dataBindingModel = doc;
+            } else {
+                dataBindingModel = dBuilder.parse(fileToOpen);
+            }
+            if (dataBindingModel != null) {
+                Element element = dataBindingModel.getDocumentElement();
+                if (element != null) {
+                    DBPartUnmarshaller unmarshaller = new DBPartUnmarshaller();
+                    unmarshaller.unmarshall(dataBindingPart, dataBindingModel, true);
+                    ((DataBindingPart) dataBindingPart).updateID();
+                }
+            }
+            bindingDataSet = new BindingDataSet(dataBindingPart);
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (SAXException e) {
+            e.printStackTrace();
+        } catch (ParserConfigurationException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (TransformerConfigurationException e) {
+            e.printStackTrace();
+        } catch (TransformerException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public CombineEditorPart getCombineEditorPart() {
+        if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null && PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() != null
+                && PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() != null) {
+            IEditorPart activeEditorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+            if (activeEditorPart instanceof CombineEditorPart) {
+                combineEditorPart = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+            }
+        }
+        return combineEditorPart;
+    }
+
+    public DesignEditor getDesignEditor() {
+        if (getCombineEditorPart() != null) {
+            designEditor = getCombineEditorPart().getDesignEditor();
+        }
+        return designEditor;
+    }
+
+    public BindingDataSet getBindingDataSet() {
+        return bindingDataSet;
+    }
+
+    public DesignViewer getDesignViewer() {
+        if (getDesignEditor() != null) {
+            designViewer = getDesignEditor().getViewer();
+        }
+        return designViewer;
+    }
+
+    public List<BindingData> getDataSources() {
+        return bindingDataSet.getDataSources();
+    }
+
+    public BindingData getDataSource(String name) {
+        return bindingDataSet.getDataSource(name);
+    }
+
+    public List<BindingData> getDataModels() {
+        return bindingDataSet.getDataModels();
+    }
+
+    public Part getNextSiblingToAddDataSource() {
+        return bindingDataSet.getNextSiblingToAddDataSource();
+    }
+
+    public void addDataSource(BindingData bindingData, Part nextSibling) {
+        bindingDataSet.addDataSource(bindingData, nextSibling);
+    }
+
+    public void renameDataSource(BindingData bindingData, String newName) {
+        bindingDataSet.renameDataSource(bindingData, newName);
+    }
+
+    public void removeDataSource(BindingData bindingData) {
+        bindingDataSet.removeDataSource(bindingData);
+    }
+
+    public BindingData getDataModelByItemName(String name) {
+        return bindingDataSet.getDataModelByItemName(name);
+    }
+
+    public BindingData getDataModelByModelName(String name) {
+        return bindingDataSet.getDataModelByModelName(name);
+    }
+
+    public BindingObject getDataModelObject(BindingData bindingData, List<String> itemPath) {
+        return bindingDataSet.getDataModelObject(bindingData, itemPath);
+    }
+
+    public List<BindingObject> getDataModelObjects(BindingData bindingData, List<String> itemPath) {
+        return bindingDataSet.getBindingObjectsList(bindingData, itemPath);
+    }
+
+    public void addDataModel(BindingData bindingData, Part nextSibling) {
+        bindingDataSet.addDataModel(bindingData, nextSibling);
+    }
+
+    public void addDataModelItem(BindingData bindingData, List<String> itemPath, String childName, String value) {
+        bindingDataSet.addDataModelItem(bindingData, itemPath, childName, value);
+    }
+
+    public void addDataModelItems(BindingData bindingData, List<Part> nextSiblings, List<String> itemPath, List<BindingObject> dataModelObject, String value) {
+        bindingDataSet.addDataModelItems(bindingData, nextSiblings, itemPath, dataModelObject, value);
+    }
+
+    public void removeDataModelItems(BindingData bindingData, List<String> itemPath, String childName, String value) {
+        bindingDataSet.removeDataModelItems(bindingData, itemPath, childName, value);
+    }
+
+    public void setDataModel(BindingData dataModel, BindingData newDataModel) {
+        bindingDataSet.setDataModel(dataModel, newDataModel);
+    }
+
+    public void unlinkDataModel(BindingData dataModel, BindingData newDataModel) {
+        bindingDataSet.unlinkDataModel(dataModel, newDataModel);
+    }
+
+    public void renameDataModel(BindingData bindingData, String newName) {
+        bindingDataSet.renameDataModel(bindingData, newName);
+    }
+
+    public void renameDataModelItems(BindingData bindingData, String newName, List<String> itemPath) {
+        bindingDataSet.renameDataModelItems(bindingData, newName, itemPath);
+    }
+
+    public void removeDataModel(BindingData bindingData) {
+        bindingDataSet.removeDataModel(bindingData);
+    }
+
+    public void doSave(SubMonitor newChild) {
+        try {
+            // Make a transformer factory to create the Transformer
+            TransformerFactory tFactory = TransformerFactory.newInstance();
+
+            // Make the Transformer
+            Transformer transformer;
+
+            transformer = tFactory.newTransformer();
+            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+            transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+            // Mark the document as a DOM (XML) source
+            DOMSource source = new DOMSource(dataBindingModel);
+
+            // Say where we want the XML to go
+            StreamResult result = new StreamResult(layoutMetaPath);
+
+            // Write the XML to file
+            transformer.transform(source, result);
+        } catch (TransformerConfigurationException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (TransformerException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingPage.java
new file mode 100644 (file)
index 0000000..08c2a05
--- /dev/null
@@ -0,0 +1,1446 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.view.databinding;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.custom.TreeEditor;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.part.Page;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.command.SetPropertyPartCommand;
+import org.tizen.efluibuilder.model.part.DataBindingPart;
+import org.tizen.efluibuilder.model.part.IPartChangedListener;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartMutation;
+import org.tizen.efluibuilder.model.part.PartObserver;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.view.databinding.actions.AddDataSourceAction;
+import org.tizen.efluibuilder.ui.view.databinding.actions.AddModelDropDownAction;
+import org.tizen.efluibuilder.ui.view.databinding.actions.CollapseAllAction;
+import org.tizen.efluibuilder.ui.view.databinding.actions.EditDataSourceAction;
+import org.tizen.efluibuilder.ui.view.databinding.actions.RemoveBindingInfoAction;
+import org.tizen.efluibuilder.ui.view.databinding.actions.RemoveDataModelAction;
+import org.tizen.efluibuilder.ui.view.databinding.actions.RemoveDataSourceAction;
+import org.tizen.efluibuilder.ui.view.databinding.actions.RenameDataModelAction;
+import org.tizen.efluibuilder.ui.view.databinding.actions.RenameDataSourceAction;
+import org.tizen.efluibuilder.ui.view.databinding.actions.SetModelTargetAction;
+import org.tizen.efluibuilder.ui.view.databinding.actions.ShowBindingInfoAction;
+import org.tizen.efluibuilder.ui.view.databinding.dialog.SetSourcePage;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingDataSetEvent;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingDataSetEvent.BindingDataSetEventType;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingObject;
+import org.tizen.efluibuilder.ui.view.databinding.model.IBindingDataSetListener;
+import org.tizen.efluibuilder.ui.view.databinding.model.TreeItemData;
+import org.tizen.efluibuilder.ui.view.databinding.model.command.ConfigureDataModelCommand;
+import org.tizen.efluibuilder.ui.view.databinding.model.command.DataBindingCommandFactory;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.DataBindingHelper;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+
+public class DataBindingPage extends Page implements IBindingDataSetListener, ISelectionChangedListener, IPartChangedListener {
+
+    private Composite composite;
+
+    private Tree dataSourceTree;
+    private Tree dataModelTree;
+    private TreeEditor dataSourceTreeEditor;
+    private TreeEditor dataModelTreeEditor;
+    private TableViewer bindingInfoTableViewer;
+
+    private MenuManager dataSourceMenuManager;
+    private MenuManager dataModelMenuManager;
+    private MenuManager bindingInfoMenuManager;
+
+    private final DataBindingView dataBindingView;
+    private ToolBarManager dataSourceToolBarManager;
+    private ToolBarManager bindingInfoToolBarManager;
+    private AddDataSourceAction addDataSourceAction;
+    private EditDataSourceAction editDataSourceAction;
+    private RemoveDataSourceAction removeDataSourceAction;
+    private RenameDataSourceAction renameDataSourceAction;
+    // private AddViewModelItemAction addDataModelAction;
+    private AddModelDropDownAction addDataModelDorpDownAction;
+    private RenameDataModelAction renameDataModelAction;
+    private RemoveDataModelAction removeDataModelAction;
+    private SetModelTargetAction setModelTargetAction;
+    private RemoveBindingInfoAction removeBindingInfoAction;
+    private ShowBindingInfoAction showBindingInfoAction;
+    private ActionRegistry registry;
+    private final CombineEditorPart combineEditorPart;
+    private CollapseAllAction collapseAllModelAction;
+    private CollapseAllAction collapseAllSourceAction;
+
+    private ToolBarManager viewModelToolBarManager;
+
+    private PartObserver docPartObserver = null;
+    private PartObserver dataBindingPartObserver = null;
+    private Part currentViewPart = null;
+
+    public DataBindingPage(DataBindingView dataBindingView, CombineEditorPart editorPart) {
+        this.dataBindingView = dataBindingView;
+        this.combineEditorPart = editorPart;
+        this.setInput();
+    }
+
+    public void renameDataModel(TreeItem treeItem) {
+        renameTreeItem(dataModelTree, dataModelTreeEditor, treeItem);
+    }
+
+    private boolean checkModelName(String newName) {
+        List<BindingData> viewModels = combineEditorPart.getDataBindManager().getDataModels();
+        for (BindingData viewModel : viewModels) {
+            if (viewModel.getModelName().equals(newName)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public BindingData getDataSource(String name) {
+        return combineEditorPart.getDataBindManager().getDataSource(name);
+    }
+
+    public BindingData getDataModelByItemName(String name) {
+        return combineEditorPart.getDataBindManager().getDataModelByItemName(name);
+    }
+
+    public Table getInfoTable() {
+        return bindingInfoTableViewer.getTable();
+    }
+
+    private boolean checkModelItemName(BindingData bindingData, List<String> itemPath, String newName) {
+        if ((itemPath == null) || (itemPath.size() < 2)) {
+            return false;
+        }
+
+        List<String> parentItemPath = new ArrayList<String>();
+        List<BindingObject> childObjects = null;
+
+        for (int i = 1; i < itemPath.size(); i++) {
+            parentItemPath.add(itemPath.get(i));
+        }
+
+        if (parentItemPath.size() == 1) {
+            childObjects = bindingData.getBindingObjects();
+        } else {
+            BindingObject bindingObject = combineEditorPart.getDataBindManager().getDataModelObject(bindingData, parentItemPath);
+            if (bindingObject == null) {
+                return false;
+            }
+            childObjects = bindingObject.getBindingObjects();
+        }
+
+        for (BindingObject childObject : childObjects) {
+            if (childObject.getName().equals(newName)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public void renameDataModel(TreeItem treeItem, String newName) {
+        if (treeItem.getParentItem() == null) {
+            if (!checkModelName(newName)) {
+                return;
+            }
+            BindingData dataModel = combineEditorPart.getDataBindManager().getDataModelByItemName(treeItem.getText());
+            Command renameDataModelCommand = DataBindingCommandFactory.createRenameDataModelCommand(combineEditorPart, dataModel, newName);
+            getCommandStackFromDesignEditor().execute(renameDataModelCommand);
+        } else {
+            List<String> itemPath = makeItemPath(treeItem);
+            BindingData bindingData = combineEditorPart.getDataBindManager().getDataModelByItemName(itemPath.get(itemPath.size() - 1));
+            if (!checkModelItemName(bindingData, itemPath, newName)) {
+                return;
+            }
+            Command command = new ConfigureDataModelCommand(BindingDataSetEventType.DATAMODEL_ITEM_RENAMED, combineEditorPart.getDataBindManager(), bindingData,
+                                                            itemPath, treeItem.getText(), newName,
+                                                            0);
+            getCommandStackFromDesignEditor().execute(command);
+        }
+    }
+
+    private void renameTreeItem(final Tree tree, TreeEditor treeEditor, TreeItem treeItem) {
+        // Determine the item to edit
+        final TreeItem item;
+        if (treeItem == null) {
+            item = tree.getSelection()[0];
+        } else {
+            item = treeItem;
+        }
+        if (treeEditor == null) {
+            return;
+        }
+
+        Control oldEditor = treeEditor.getEditor();
+        if (oldEditor != null) {
+            oldEditor.dispose();
+        }
+
+        // Create a text field to do the editing
+        final Text text = new Text(tree, SWT.NONE);
+
+        BindingData data = combineEditorPart.getDataBindManager().getDataModelByItemName(item.getText());
+        if (data != null) {
+            text.setText(data.getModelName());
+        } else {
+            data = combineEditorPart.getDataBindManager().getDataSource(item.getText());
+            if (data != null) {
+                text.setText(data.getSourceName());
+            } else {
+                text.setText(item.getText());
+            }
+        }
+
+        text.selectAll();
+        text.setFocus();
+
+        // If they hit Enter, set the text into the tree and end the
+        // editing
+        // session. If they hit Escape, ignore the text and end the
+        // editing
+        // session
+        text.addKeyListener(new KeyAdapter() {
+            public void keyPressed(KeyEvent event) {
+                switch (event.keyCode) {
+                    case SWT.CR:
+                        // Enter hit--set the text into the tree and
+                        // drop through
+                        if (tree.equals(getDataSourceTree())) {
+                            renameDataSource(item, text.getText());
+                        } else {
+                            renameDataModel(item, text.getText());
+                        }
+                        text.dispose();
+                        break;
+                    case SWT.KEYPAD_CR:
+                        if (tree.equals(getDataSourceTree())) {
+                            renameDataSource(item, text.getText());
+                        } else {
+                            renameDataModel(item, text.getText());
+                        }
+                        text.dispose();
+                        break;
+                    case SWT.ESC:
+                        // End editing session
+                        text.dispose();
+                        break;
+                }
+            }
+        });
+        text.addFocusListener(new FocusListener() {
+
+            @Override
+            public void focusLost(FocusEvent arg0) {
+                // TODO Auto-generated method stub
+                if (tree.equals(getDataSourceTree())) {
+                    renameDataSource(item, text.getText());
+                } else {
+                    renameDataModel(item, text.getText());
+                }
+                text.dispose();
+            }
+
+            @Override
+            public void focusGained(FocusEvent arg0) {
+                // TODO Auto-generated method stub
+
+            }
+        });
+        // Set the text field into the editor
+        treeEditor.setEditor(text, item);
+    }
+
+    private boolean isSourceNameValid(String newName) {
+        BindingData dataSource = combineEditorPart.getDataBindManager().getDataSource(newName);
+        if (dataSource != null) {
+            return false;
+        }
+        return true;
+    }
+
+    public void editDataSource(BindingData dataSource) {
+        Command editDataSourceCommand = null;
+        DataBindingPart dataBindingPart = (DataBindingPart) combineEditorPart.getDataBindingPart();
+        for (Part bindingData : dataBindingPart.getChildren()) {
+            if (bindingData.getType() == PartType.DATASOURCE && ((BindingData) bindingData).getSourceName().equals(dataSource.getSourceName())) {
+                editDataSourceCommand = DataBindingCommandFactory.createEditDataSourceCommand(combineEditorPart, dataSource);
+                break;
+            }
+        }
+        getCommandStackFromDesignEditor().execute(editDataSourceCommand);
+    }
+
+    public boolean canRemoveDataSource() {
+        TreeItem[] treeItems = dataSourceTree.getSelection();
+        if ((treeItems == null) || (treeItems.length < 1)) {
+            return false;
+        } else {
+            if (treeItems[0].getParentItem() == null)
+                return true;
+        }
+        return false;
+    }
+
+    private void createDataModelParentPanel(SashForm parentSashForm) {
+        SashForm sashForm = new SashForm(parentSashForm, SWT.VERTICAL);
+
+        createDataSourcePanel(sashForm);
+        createDataModelPanel(sashForm);
+    }
+
+    @Override
+    public void createControl(Composite parent) {
+        composite = new Composite(parent, SWT.NONE);
+        composite.setLayout(new FillLayout());
+
+        registry = combineEditorPart.getDesignEditor().getActions();
+
+        // used to initialize the toolbar buttons
+        createActions();
+
+        SashForm sashForm = new SashForm(composite, SWT.VERTICAL);
+        createDataModelParentPanel(sashForm);
+
+        createBindingInfoPanel(sashForm);
+        sashForm.setLayoutData(SWT.RESIZE);
+        refresh();
+    }
+
+    public void removeBindingInfo() {
+        TableItem[] tableItems = bindingInfoTableViewer.getTable().getSelection();
+        CompoundCommand cc = new CompoundCommand("removeBindingInfo");
+        for (TableItem tableItem : tableItems) {
+            Part part = (Part) tableItem.getData("PART");
+            if (part != null) {
+                Command command = new SetPropertyPartCommand(part, BuilderConstants.ATTRIBUTE_DATA_BIND, "");
+                cc.add(command);
+            }
+        }
+        getCommandStackFromDesignEditor().execute(cc);
+        refresh();
+    }
+
+    public boolean canRemoveBindingInfo() {
+        TableItem[] tableItems = bindingInfoTableViewer.getTable().getSelection();
+        if ((tableItems == null) || (tableItems.length < 1)) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    private void createActions() {
+        // Data Source
+        addDataSourceAction = new AddDataSourceAction("Add", "Add", dataBindingView);
+        removeDataSourceAction = new RemoveDataSourceAction("Remove@Del", "Remove", dataBindingView);
+        editDataSourceAction = new EditDataSourceAction("Edit@DClick", "Edit", dataBindingView, combineEditorPart.getProject());
+        renameDataSourceAction = new RenameDataSourceAction("Rename@F2", "Rename", dataBindingView);
+        collapseAllSourceAction = new CollapseAllAction("Collapse All", "Collapse All");
+        // Data Model
+        // addDataModelAction = new AddViewModelItemAction("ADD Item", "Add
+        // Item", dataBindingView);
+        addDataModelDorpDownAction = new AddModelDropDownAction("Add", "Add", dataBindingView, combineEditorPart.getDataBindManager());
+        renameDataModelAction = new RenameDataModelAction("Rename@F2", "Rename", dataBindingView);
+        removeDataModelAction = new RemoveDataModelAction("Remove@Del", "Remove", dataBindingView);
+        setModelTargetAction = new SetModelTargetAction("Set Target", dataBindingView);
+        collapseAllModelAction = new CollapseAllAction("Collapse All", "Collapse All");
+
+        // Binding Info
+        removeBindingInfoAction = new RemoveBindingInfoAction("Remove@Del", "Remove", dataBindingView);
+        showBindingInfoAction = new ShowBindingInfoAction("Show", combineEditorPart.getDataBindManager());
+
+        // Add undo/redo handlers and attach it to designEditors action
+        // registers so that their command stack gets shared
+        // http://www.programcreek.com/java-api-examples/index.php?api=org.eclipse.gef.ui.actions.ActionRegistry
+        IActionBars actionBars = getSite().getActionBars();
+
+        String id = ActionFactory.UNDO.getId();
+
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionFactory.REDO.getId();
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        actionBars.updateActionBars();
+    }
+
+    private void createDataSourcePanel(SashForm parentSashForm) {
+        Composite dataSourcePanel = new Composite(parentSashForm, SWT.BORDER);
+
+        FormLayout layout = new FormLayout();
+
+        dataSourcePanel.setLayout(layout);
+
+        ToolBar toolBar = makeDataSourcePanelToolbar(dataSourcePanel);
+        FormData toolBarData = new FormData();
+        toolBarData.top = new FormAttachment(0, 0);
+        toolBarData.right = new FormAttachment(100, 0);
+        toolBar.setLayoutData(toolBarData);
+
+        dataSourceTree = new Tree(dataSourcePanel, SWT.NONE);
+        FormData treeData = new FormData();
+        treeData.top = new FormAttachment(toolBar, 0);
+        treeData.bottom = new FormAttachment(100, 0);
+        treeData.left = new FormAttachment(0, 0);
+        treeData.right = new FormAttachment(100, 0);
+        dataSourceTree.setLayoutData(treeData);
+        collapseAllSourceAction.setTreeItem(dataSourceTree);
+        dataSourceTreeEditor = new TreeEditor(dataSourceTree);
+        dataSourceTreeEditor.horizontalAlignment = SWT.LEFT;
+        dataSourceTreeEditor.grabHorizontal = true;
+
+        dataSourceTree.addMouseListener(new MouseAdapter() {
+
+            @Override
+            public void mouseDoubleClick(MouseEvent e) {
+                Point point = new Point(e.x, e.y);
+                TreeItem treeItem = dataSourceTree.getItem(point);
+                if (treeItem == null) {
+                    dataSourceTree.deselectAll();
+                    return;
+                }
+
+                Rectangle rect = treeItem.getBounds();
+                if (rect.contains(point)) {
+                    // renameDataSource(treeItem);
+                    while (treeItem != null && treeItem.getParentItem() != null) {
+                        treeItem = treeItem.getParentItem();
+                    }
+                    SetSourcePage dlg = new SetSourcePage(Display.getCurrent().getActiveShell(), treeItem, combineEditorPart.getProject());
+                    BindingData dataSource = dlg.open();
+                    if (dataSource != null) {
+                        editDataSource(dataSource);
+                    }
+                }
+            }
+        });
+
+        dataSourceTree.addKeyListener(new KeyAdapter() {
+            public void keyPressed(KeyEvent event) {
+                // Make sure one and only one item is selected when F2 is
+                // pressed
+                if (event.keyCode == SWT.F2 && dataSourceTree.getSelectionCount() == 1) {
+                    TreeItem treeItem = dataSourceTree.getSelection()[0];
+                    if (treeItem.getParentItem() == null) {
+                        renameDataSource(null);
+                    }
+                } else if (event.keyCode == SWT.DEL) {
+                    removeDataSource();
+                }
+            }
+        });
+
+        dataSourceTree.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent e) {
+                updateDataSourceMenus();
+            }
+        });
+
+        DataBindingDnDManager.addDragListenerToDataSourceTree(dataSourceTree);
+        createDataSourceContextMenu();
+
+    }
+
+    private ToolBar makeDataSourcePanelToolbar(Composite dataSourcePanel) {
+        ToolBar toolBar = new ToolBar(dataSourcePanel, SWT.FLAT);
+        dataSourceToolBarManager = new ToolBarManager(toolBar);
+        dataSourceToolBarManager.add(editDataSourceAction);
+        dataSourceToolBarManager.add(addDataSourceAction);
+        dataSourceToolBarManager.add(removeDataSourceAction);
+        dataSourceToolBarManager.add(collapseAllSourceAction);
+        dataSourceToolBarManager.update(true);
+
+        createToolBarTitle(toolBar, "Data Source");
+
+        return toolBar;
+    }
+
+    private void createToolBarTitle(ToolBar toolBar, String title) {
+        Label viewModelTitle = new Label(toolBar.getParent(), SWT.None);
+        viewModelTitle.setText(title);
+        FormData labelData = new FormData();
+        labelData.top = new FormAttachment(0, 5);
+        viewModelTitle.setLayoutData(labelData);
+    }
+
+    public void updateDataSourceMenus() {
+        if (renameDataSourceAction != null)
+            renameDataSourceAction.refresh();
+
+        if (removeDataSourceAction != null)
+            removeDataSourceAction.refresh();
+
+        if (editDataSourceAction != null)
+            editDataSourceAction.refresh();
+
+        if (dataSourceMenuManager != null)
+            dataSourceMenuManager.update(true);
+
+        if (collapseAllSourceAction != null)
+            collapseAllSourceAction.refresh();
+    }
+
+    public void updateDataModelMenus() {
+        // if (addDataModelAction != null)
+        // addDataModelAction.refresh();
+        if (removeDataModelAction != null)
+            removeDataModelAction.refresh();
+        if (renameDataModelAction != null)
+            renameDataModelAction.refresh();
+        if (viewModelToolBarManager != null)
+            viewModelToolBarManager.update(true);
+        if (dataModelMenuManager != null)
+            dataModelMenuManager.update(true);
+        if (setModelTargetAction != null)
+            setModelTargetAction.refresh();
+        if (collapseAllModelAction != null)
+            collapseAllModelAction.refresh();
+    }
+
+    public void updateBindingInfoMenus() {
+        if (removeBindingInfoAction != null) {
+            removeBindingInfoAction.refresh();
+        }
+        if (bindingInfoToolBarManager != null) {
+            bindingInfoToolBarManager.update(true);
+        }
+        if (bindingInfoMenuManager != null) {
+            bindingInfoMenuManager.update(true);
+        }
+    }
+
+    private void createDataSourceContextMenu() {
+        dataSourceMenuManager = new MenuManager("#dataSourceMenu");
+        dataSourceMenuManager.add(addDataSourceAction);
+        dataSourceMenuManager.add(editDataSourceAction);
+        dataSourceMenuManager.add(renameDataSourceAction);
+        dataSourceMenuManager.add(removeDataSourceAction);
+        dataSourceMenuManager.update(true);
+
+        Menu menu = dataSourceMenuManager.createContextMenu(dataSourceTree);
+        dataSourceTree.setMenu(menu);
+    }
+
+    private ToolBar makeDataModelToolbar(Composite panel) {
+        ToolBar toolBar = new ToolBar(panel, SWT.FLAT);
+        viewModelToolBarManager = new ToolBarManager(toolBar);
+
+        // viewModelToolBarManager.add(addDataModelAction);
+        viewModelToolBarManager.add(addDataModelDorpDownAction);
+        viewModelToolBarManager.add(removeDataModelAction);
+        viewModelToolBarManager.add(setModelTargetAction);
+        viewModelToolBarManager.add(collapseAllModelAction);
+        viewModelToolBarManager.update(true);
+
+        createToolBarTitle(toolBar, "Data Model");
+
+        return toolBar;
+    }
+
+    public void createDataModelPanel(SashForm parentSashForm) {
+        Composite dataModelPanel = new Composite(parentSashForm, SWT.BORDER);
+
+        FormLayout layout = new FormLayout();
+        dataModelPanel.setLayout(layout);
+        ToolBar toolBar = makeDataModelToolbar(dataModelPanel);
+        FormData toolBarData = new FormData();
+        toolBarData.top = new FormAttachment(0, 0);
+        toolBarData.right = new FormAttachment(100, 0);
+        toolBar.setLayoutData(toolBarData);
+
+        dataModelTree = new Tree(dataModelPanel, SWT.NONE);
+        FormData treeData = new FormData();
+        treeData.top = new FormAttachment(toolBar, 0);
+        treeData.bottom = new FormAttachment(100, 0);
+        treeData.left = new FormAttachment(0, 0);
+        treeData.right = new FormAttachment(100, 0);
+        dataModelTree.setLayoutData(treeData);
+        collapseAllModelAction.setTreeItem(dataModelTree);
+        dataModelTreeEditor = new TreeEditor(dataModelTree);
+        dataModelTreeEditor.horizontalAlignment = SWT.LEFT;
+        dataModelTreeEditor.grabHorizontal = true;
+
+        dataModelTree.addKeyListener(new KeyAdapter() {
+            public void keyPressed(KeyEvent event) {
+                // Make sure one and only one item is selected when F2 is
+                // pressed
+                if (event.keyCode == SWT.F2 && dataModelTree.getSelectionCount() == 1) {
+                    TreeItem treeItem = dataModelTree.getSelection()[0];
+                    if (treeItem != null && treeItem.getParentItem() == null) {
+                        TreeItemData treeItemData = (TreeItemData) treeItem.getData("TREEITEMDATA");
+                        if (!treeItemData.getBindedValue()) {
+                            renameDataModel(null);
+                        }
+                    }
+                } else if (event.keyCode == SWT.DEL) {
+                    removeDataModel();
+                }
+            }
+        });
+
+        dataModelTree.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent e) {
+                updateDataModelMenus();
+                setSelectionPath(dataModelTree);
+            }
+        });
+
+        DataBindingDnDManager.addDragAndDropListenerToDataModelTree(dataModelTree, dataBindingView, this);
+        createDataModelContextMenu(null);
+    }
+
+    /**
+     * Returns TRUE if tree item name can be set.
+     * 
+     * @param TreeItem
+     * 
+     * @param itemName
+     *            a tree item name
+     * @return true if tree item name can be set
+     */
+    private boolean canSetTreeItemName(TreeItem treeItem, String itemName) {
+        TreeItem[] childItems = treeItem.getItems();
+        for (TreeItem childItem : childItems) {
+            if (childItem.getText().equals(itemName)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public void addDataModelItem() {
+
+        TreeItem[] selectedItems = dataModelTree.getSelection();
+
+        if (selectedItems.length > 0) {
+            int idIndex = 0;
+            while (!canSetTreeItemName(selectedItems[0], BuilderConstants.DATABINDING_DATAMODEL_ITEM_NAME + idIndex)) {
+                idIndex++;
+            }
+
+            List<String> itemPath = makeItemPath(selectedItems[0]);
+            BindingData bindingData = combineEditorPart.getDataBindManager().getDataModelByItemName(itemPath.get(itemPath.size() - 1));
+
+            Command command =
+                    new ConfigureDataModelCommand(BindingDataSetEventType.DATAMODEL_ITEM_ADDED, combineEditorPart.getDataBindManager(), bindingData, itemPath,
+                                                  BuilderConstants.DATABINDING_DATAMODEL_ITEM_NAME + idIndex, "", 0);
+            getCommandStackFromDesignEditor().execute(command);
+        }
+    }
+
+    /**
+     * Removes a tree item in the view model panel.
+     */
+    public void removeDataModel() {
+        TreeItem[] treeItems = dataModelTree.getSelection();
+        Command removeDataModelCommand = null;
+        for (TreeItem treeItem : treeItems) {
+            if (treeItem.getParentItem() == null) {
+                BindingData dataModel = combineEditorPart.getDataBindManager().getDataModelByItemName(treeItem.getText());
+                removeDataModelCommand = DataBindingCommandFactory.createRemoveDataModelCommand(combineEditorPart, dataModel);
+            } else {
+                List<String> itemPath = new ArrayList<>();
+                String path = (String) treeItem.getData("path");
+                path = path.replaceAll(BuilderConstants.FILTER_REGEX, BuilderConstants.EMPTY);
+                String[] split = path.split(BuilderConstants.SLASH_REGEX);
+                for (int i = split.length - 1; i >= 0; i--) {
+                    itemPath.add(split[i]);
+                }
+                BindingData dataModel = combineEditorPart.getDataBindManager().getDataModelByModelName(itemPath.get(itemPath.size() - 1));
+                removeDataModelCommand = DataBindingCommandFactory.createRemoveDataModelItemCommand(combineEditorPart, dataModel, itemPath, treeItem.getText());
+            }
+            getCommandStackFromDesignEditor().execute(removeDataModelCommand);
+        }
+    }
+
+    public void setModelTarget(Part part, BindingData dataModel, String itemPath, String widgetName) {
+        Command command = DataBindingCommandFactory.getAddBindingCommand(part, dataModel, itemPath, widgetName);
+        getCommandStackFromDesignEditor().execute(command);
+    }
+
+    private List<String> makeItemPath(TreeItem selectedItem) {
+
+        TreeItem item = selectedItem;
+
+        List<String> itemPath = new ArrayList<String>();
+
+        if (item == null)
+            return itemPath;
+
+        itemPath.add(item.getText());
+
+        while ((item = item.getParentItem()) != null) {
+            itemPath.add(item.getText());
+        }
+
+        return itemPath;
+    }
+
+    private void setSelectionPath(Tree tree) {
+        if ((tree.getSelection() == null) || (tree.getSelection().length == 0)) {
+            return;
+        }
+
+        TreeItem treeItem = tree.getSelection()[0];
+
+        if (treeItem != null) {
+            List<String> itemPath = makeItemPath(treeItem);
+
+            while (true) {
+                if (treeItem == null || treeItem.getParentItem() == null)
+                    break;
+
+                treeItem = treeItem.getParentItem();
+            }
+
+            if (treeItem != null && treeItem.getData("TREEITEMDATA") != null) {
+                TreeItemData treeItemData = (TreeItemData) treeItem.getData("TREEITEMDATA");
+                treeItemData.setSelectionPath(itemPath);
+                treeItem.setData("TREEITEMDATA", treeItemData);
+            }
+
+            TreeItemData treeData = (TreeItemData) tree.getData("TREEITEMDATA");
+            treeData.setSelectionPath(itemPath);
+            tree.setData("TREEITEMDATA", treeData);
+        }
+
+    }
+
+    public void createDataModelContextMenu(IMenuManager menuManager) {
+        if (menuManager == null) {
+            dataModelMenuManager = new MenuManager("#viewModelMenu");
+            dataModelMenuManager.addMenuListener(new IMenuListener() {
+                @Override
+                public void menuAboutToShow(IMenuManager manager) {
+                    createDataModelContextMenu(manager);
+                }
+            });
+        } else {
+            dataModelMenuManager = (MenuManager) menuManager;
+        }
+        dataModelMenuManager.removeAll();
+
+        dataModelMenuManager.add(removeDataModelAction);
+        addDataModelDorpDownAction.dispose();
+        addDataModelDorpDownAction = new AddModelDropDownAction("Add", "Add", dataBindingView, combineEditorPart.getDataBindManager());
+        // dataModelMenuManager.add(addDataModelAction);
+        dataModelMenuManager.add(renameDataModelAction);
+        dataModelMenuManager.add(setModelTargetAction);
+        dataModelMenuManager.add(addDataModelDorpDownAction);
+        dataModelMenuManager.update(true);
+
+        Menu menu = dataModelMenuManager.createContextMenu(dataModelTree);
+        dataModelTree.setMenu(menu);
+    }
+
+    public boolean canRemoveDataModel() {
+        TreeItem[] treeItems = dataModelTree.getSelection();
+        if ((treeItems == null) || (treeItems.length < 1)) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    /**
+     * Adds a tree item in the view model panel.
+     */
+    public void addDataModel() {
+        BindingData dataModel;
+        int idIndex = 0;
+        while (!canSetTreeItemName(dataModelTree, "model" + idIndex)) {
+            idIndex++;
+        }
+        dataModel = (BindingData) PartUtil.createPart(PartType.DATAMODEL, LayoutSchemaConstants.DATAMODEL);
+        dataModel.setModelType(BuilderConstants.DATABINDING_TYPE_EMPTY);
+        dataModel.setModelName("model" + idIndex);
+        dataModel.setItemName(dataModel.getModelName());
+        Command addDataModelCommand = DataBindingCommandFactory.createAddDataModelCommand(combineEditorPart, dataModel);
+        getCommandStackFromDesignEditor().execute(addDataModelCommand);
+
+    }
+
+    public void setDataSourceToDataModel(BindingData dataSource, BindingData dataModel) {
+        if (dataSource == null) {
+            return;
+        }
+        if (dataModel == null) {
+            BindingData dataModelToBeAdded = (BindingData) PartUtil.createPart(PartType.DATAMODEL, LayoutSchemaConstants.DATAMODEL);
+            int idIndex = 0;
+            while (!canSetTreeItemName(dataModelTree, "model" + idIndex)) {
+                idIndex++;
+            }
+            dataModelToBeAdded.setModelName("model" + idIndex);
+            dataModelToBeAdded.setSourceName(dataSource.getSourceName());
+            dataModelToBeAdded.setModelType(dataSource.getModelType());
+            for (BindingObject dataSourceBindingObject : dataSource.getBindingObjects()) {
+                BindingObject dataModelBindingObject = dataSourceBindingObject.clone();
+                dataModelToBeAdded.insertChildBefore(dataModelBindingObject, null);
+            }
+            Command addDataModelCommand = DataBindingCommandFactory.createAddDataModelCommand(combineEditorPart, dataModelToBeAdded);
+            getCommandStackFromDesignEditor().execute(addDataModelCommand);
+        } else {
+
+            if (dataModel.getSourceName() != null && dataModel.getSourceName().length() > 0) {
+                MessageBox msgBox = new MessageBox(composite.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
+                msgBox.setText("Data Binding");
+                msgBox.setMessage(dataModel.getModelName() + " is already linked with " + dataModel.getSourceName() + ".\nDo you want to change to "
+                        + dataSource.getSourceName() + " ?");
+                if (msgBox.open() == SWT.NO)
+                    return;
+            }
+
+            BindingData newDataModel = (BindingData) PartUtil.createPart(PartType.DATAMODEL, LayoutSchemaConstants.DATAMODEL);
+            newDataModel.setSourceName(dataSource.getSourceName());
+            newDataModel.setItemName(dataModel.getItemName());
+            newDataModel.setModelName(dataModel.getModelName());
+            newDataModel.setModelType(dataSource.getModelType());
+            for (BindingObject bo : dataSource.getBindingObjects()) {
+                BindingObject newBo = bo.clone();
+                newDataModel.insertChildBefore(newBo, null);
+            }
+
+            Command setDataModelCommand = DataBindingCommandFactory.createSetDataModelCommand(combineEditorPart, dataModel, newDataModel);
+            getCommandStackFromDesignEditor().execute(setDataModelCommand);
+        }
+
+    }
+
+    public void createBindingInfoPanel(SashForm parentSashForm) {
+        Composite dataInfoPanel = new Composite(parentSashForm, SWT.BORDER);
+
+        FormLayout layout = new FormLayout();
+        dataInfoPanel.setLayout(layout);
+
+        ToolBar toolBar = makeBindingInfoToolbar(dataInfoPanel);
+        FormData toolBarData = new FormData();
+        toolBarData.top = new FormAttachment(0, 0);
+        toolBarData.right = new FormAttachment(100, 0);
+
+        toolBar.setLayoutData(toolBarData);
+
+        bindingInfoTableViewer = new TableViewer(dataInfoPanel, SWT.MULTI);
+        FormData tableData = new FormData();
+        tableData.top = new FormAttachment(toolBar, 0);
+        tableData.bottom = new FormAttachment(100, 0);
+        tableData.left = new FormAttachment(0, 0);
+        tableData.right = new FormAttachment(100, 0);
+        bindingInfoTableViewer.getTable().setLayoutData(tableData);
+
+        TableColumn tc1 = new TableColumn(bindingInfoTableViewer.getTable(), SWT.LEFT);
+        TableColumn tc2 = new TableColumn(bindingInfoTableViewer.getTable(), SWT.LEFT);
+        TableColumn tc3 = new TableColumn(bindingInfoTableViewer.getTable(), SWT.LEFT);
+
+        tc1.setText("Data");
+        tc2.setText("UI Component");
+        tc3.setText("Binding");
+
+        tc1.setWidth(150);
+        tc2.setWidth(100);
+        tc3.setWidth(60);
+
+        bindingInfoTableViewer.getTable().setHeaderVisible(true);
+        bindingInfoTableViewer.getTable().setLinesVisible(true);
+
+        bindingInfoTableViewer.getTable().addKeyListener(new KeyAdapter() {
+            public void keyPressed(KeyEvent event) {
+                switch (event.keyCode) {
+                    case SWT.DEL:
+                        removeBindingInfo();
+                        break;
+                }
+            }
+        });
+
+        bindingInfoTableViewer.getTable().addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent e) {
+                updateBindingInfoMenus();
+            }
+        });
+        createBindingInfoContextMenu();
+    }
+
+    private void createBindingInfoContextMenu() {
+        bindingInfoMenuManager = new MenuManager("#BindingInfoMenu");
+
+        bindingInfoMenuManager.add(removeBindingInfoAction);
+        bindingInfoMenuManager.update(true);
+
+        Menu menu = bindingInfoMenuManager.createContextMenu(bindingInfoTableViewer.getTable());
+        bindingInfoTableViewer.getTable().setMenu(menu);
+    }
+
+    private ToolBar makeBindingInfoToolbar(Composite panel) {
+        ToolBar toolBar = new ToolBar(panel, SWT.FLAT);
+        bindingInfoToolBarManager = new ToolBarManager(toolBar);
+        bindingInfoToolBarManager.add(showBindingInfoAction);
+        bindingInfoToolBarManager.add(new Separator());
+
+        bindingInfoToolBarManager.add(removeBindingInfoAction);
+        bindingInfoToolBarManager.update(true);
+        createToolBarTitle(toolBar, "Binding Information");
+        return toolBar;
+    }
+
+    /*
+     * DataSouce editions start
+     */
+
+    public void addDataSource() {
+        int idIndex = 0;
+        while (!canSetTreeItemName(dataSourceTree, "source" + idIndex)) {
+            idIndex++;
+        }
+
+        BindingData dataSource = (BindingData) PartUtil.createPart(PartType.DATASOURCE, LayoutSchemaConstants.DATASOURCE);
+        dataSource.setModelType(BuilderConstants.DATABINDING_TYPE_EMPTY);
+        dataSource.setSourceName("source" + idIndex);
+        dataSource.setItemName(dataSource.getSourceName());
+        Command addDataSourceCommand = DataBindingCommandFactory.createAddDataSourceCommand(combineEditorPart, dataSource);
+        getCommandStackFromDesignEditor().execute(addDataSourceCommand);
+    }
+
+    public void renameDataSource(TreeItem treeItem) {
+        renameTreeItem(dataSourceTree, dataSourceTreeEditor, treeItem);
+    }
+
+    public void renameDataSource(TreeItem treeItem, String newName) {
+        if (treeItem.getParentItem() == null && combineEditorPart.getDataBindManager() != null && isSourceNameValid(newName)) {
+            BindingData dataSource = combineEditorPart.getDataBindManager().getDataSource(treeItem.getText());
+            Command renameDataSourceCommand = DataBindingCommandFactory.createRenameDataSourceCommand(combineEditorPart, dataSource, newName);
+            getCommandStackFromDesignEditor().execute(renameDataSourceCommand);
+        }
+    }
+
+    public void removeDataSource() {
+        TreeItem[] treeItems = dataSourceTree.getSelection();
+        if (combineEditorPart.getDataBindManager() != null) {
+            for (TreeItem treeItem : treeItems) {
+                if (treeItem.getParentItem() == null) {
+                    BindingData dataSource = combineEditorPart.getDataBindManager().getDataSource(treeItem.getText());
+                    Command dataSourceRemoveCommand = DataBindingCommandFactory.createRemoveDataSourceCommand(combineEditorPart, dataSource);
+                    getCommandStackFromDesignEditor().execute(dataSourceRemoveCommand);
+                }
+            }
+        }
+    }
+
+    /*
+     * DataSouce editions end
+     */
+
+    private CommandStack getCommandStackFromDesignEditor() {
+        if (combineEditorPart.getDesignEditor() != null) {
+            return (CommandStack) combineEditorPart.getDesignEditor().getAdapter(CommandStack.class);
+        } else {
+            return null;
+        }
+    }
+
+    private boolean canSetTreeItemName(Tree tree, String itemName) {
+        TreeItem[] childItems = tree.getItems();
+        for (TreeItem childItem : childItems) {
+            TreeItemData treeItemData = (TreeItemData) childItem.getData("TREEITEMDATA");
+            String originName = null;
+            String name;
+            if (treeItemData != null) {
+                originName = treeItemData.getOriginModelName();
+            }
+            if (originName == null) {
+                name = childItem.getText();
+            } else {
+                name = originName;
+            }
+
+            if (name != null) {
+                if (name.equals(itemName)) {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    /*
+     * Method to rename Data Model
+     */
+    public void renameDataModel() {
+
+    }
+
+    public void setInput() {
+
+        // Map uodo redo handlers for DesignEditor to DataBindingPage
+
+        if (combineEditorPart != null && combineEditorPart.getDataBindManager() != null && combineEditorPart.getDataBindManager().getBindingDataSet() != null) {
+            combineEditorPart.getDataBindManager().getBindingDataSet().addBindingDataListener(this);
+            combineEditorPart.getDataBindManager().getDesignViewer().addSelectionChangedListener(this);
+            docPartObserver = new PartObserver(this);
+            docPartObserver.observe(combineEditorPart.getDocumentPart());
+            dataBindingPartObserver = new PartObserver(this);
+            dataBindingPartObserver.observe(combineEditorPart.getDataBindingPart());
+        }
+
+    }
+
+    // TODO: Merge it with page.dispose
+    public void unHook() {
+        if (combineEditorPart != null) {
+            combineEditorPart.getDataBindManager().getBindingDataSet().removeBindingDataListener(this);
+            combineEditorPart.getDesignEditor().getViewer().removeSelectionChangedListener(this);
+            docPartObserver.disconnect();
+            dataBindingPartObserver.disconnect();
+        }
+    }
+
+    @Override
+    public Control getControl() {
+        return composite;
+    }
+
+    @Override
+    public void setFocus() {
+        // TODO Auto-generated method stub
+
+    }
+
+    public Tree getDataSourceTree() {
+        return dataSourceTree;
+    }
+
+    public Tree getDataModelTree() {
+        return dataModelTree;
+    }
+
+    @Override
+    public void allDataSourcesReseted(BindingDataSetEvent e) {
+
+    }
+
+    @Override
+    public void dataSourceAdded(BindingDataSetEvent e) {
+    }
+
+    public void refresh() {
+        refreshDataSourceTree();
+        refreshDataModelTree();
+        refreshBindingInfos();
+        refreshMenus();
+    }
+
+    public void refreshBindingInfos() {
+        DesignViewer designViewer = combineEditorPart.getDataBindManager().getDesignViewer();
+        showBindingInfoAction.updateActionImage();
+        bindingInfoTableViewer.getTable().removeAll();
+        DesignEditPart currentViewEditPart = designViewer.getCurrentViewEditPart();
+        if (currentViewEditPart != null) {
+            designViewer.showBindingInfo(currentViewEditPart.isBinded());
+            Part currentViewPart = combineEditorPart.getDesignEditor().getViewer().getCurrentViewPart();
+            if (currentViewPart != null) {
+                refreshBindingInfo(currentViewPart.getChildren());
+            }
+        }
+    }
+
+    private void refreshBindingInfo(List<Part> parts) {
+        if (parts == null) {
+            return;
+        }
+        for (Part part : parts) {
+            String propertyValue = part.getPropertyValue(BuilderConstants.ATTRIBUTE_DATA_BIND);
+            if ((propertyValue != null) && (!propertyValue.isEmpty())) {
+                addInfoTableItem(part, propertyValue.substring(propertyValue.indexOf(":") + 1), part.getPropertyValue(BuilderConstants.PROPERTY_ID),
+                                 propertyValue.substring(0, propertyValue.indexOf(":")));
+            }
+            refreshBindingInfo(part.getChildren());
+        }
+    }
+
+    private void refreshMenus() {
+        updateDataSourceMenus();
+        updateDataModelMenus();
+        updateBindingInfoMenus();
+    }
+
+    private void refreshDataSourceTree() {
+        // Retaining scrollbar values
+        int selection = dataSourceTree.getVerticalBar().getSelection();
+        int minimum = dataSourceTree.getVerticalBar().getMinimum();
+        int maximum = dataModelTree.getVerticalBar().getMaximum();
+        int thumb = dataSourceTree.getVerticalBar().getThumb();
+        int increment = dataSourceTree.getVerticalBar().getIncrement();
+        int pageIncrement = dataSourceTree.getVerticalBar().getIncrement();
+        dataSourceTree.removeAll();
+        if (combineEditorPart.getDataBindManager() != null) {
+            List<BindingData> dataSources = combineEditorPart.getDataBindManager().getDataSources();
+
+            BindingData dataSource;
+            for (int i = 0; i < dataSources.size(); i++) {
+                dataSource = dataSources.get(i);
+                TreeItem treeItem = new TreeItem(dataSourceTree, 0);
+                TreeItemData treeItemData = new TreeItemData();
+
+                if ((dataSource.getItemName() == null) || (!dataSource.getItemName().equals(dataSource.getSourceName()))) {
+                    dataSource.setItemName(dataSource.getSourceName());
+                }
+                treeItem.setText(dataSource.getItemName());
+                if (dataSource.getPropertyValue(BuilderConstants.ATTRIBUTE_SOURCE_TYPE) != null
+                        && dataSource.getPropertyValue(BuilderConstants.ATTRIBUTE_SOURCE_TYPE).equals(BuilderConstants.JSON)) {
+                    treeItem.setData("path", dataSource.getSourceName() + BuilderConstants.SLASH + "root");
+                } else {
+                    treeItem.setData("path", dataSource.getSourceName());
+                }
+                treeItemData.setModel(dataSource);
+                treeItem.setData("TREEITEMDATA", treeItemData);
+
+                makeSubTreeItem(treeItem, dataSource.getBindingObjects(), null, null);
+                TreeItemData data = (TreeItemData) dataSourceTree.getData("TREEITEMDATA");
+                if (data == null) {
+                    data = new TreeItemData();
+                }
+                // data.setViewModelCount(i + 1);
+                dataSourceTree.setData("TREEITEMDATA", data);
+
+                String imageName = DataBindingHelper.makeIconPath(dataSource.getModelType());
+                if (imageName != null) {
+                    treeItem.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, imageName));
+                }
+            }
+            dataSourceTree.getVerticalBar().setValues(selection, minimum, maximum, thumb, increment, pageIncrement);
+        }
+    }
+
+    private void refreshDataModelTree() {
+        // Retaining scrollbar values
+        int selection = dataModelTree.getVerticalBar().getSelection();
+        int minimum = dataModelTree.getVerticalBar().getMinimum();
+        int maximum = dataModelTree.getVerticalBar().getMaximum();
+        int thumb = dataModelTree.getVerticalBar().getThumb();
+        int increment = dataModelTree.getVerticalBar().getIncrement();
+        int pageIncrement = dataModelTree.getVerticalBar().getIncrement();
+        String selectedPath = null;
+
+        if (dataModelTree.getSelection().length > 0)
+            selectedPath = (String) dataModelTree.getSelection()[0].getData("path");
+
+        ArrayList<String> extendedItems = new ArrayList<String>();
+
+        DataBindingHelper.getExtendedItems(extendedItems, dataModelTree.getItems());
+
+        dataModelTree.removeAll();
+
+        List<BindingData> viewModels = combineEditorPart.getDataBindManager().getDataModels();
+
+        for (BindingData viewModel : viewModels) {
+            TreeItem treeItem = new TreeItem(dataModelTree, 0);
+            treeItem.setData("VIEW_MODEL", viewModel);
+            TreeItemData treeItemData = new TreeItemData();
+
+            if ((viewModel.getSourceName() == null) || (viewModel.getSourceName().isEmpty())) {
+                viewModel.setItemName(viewModel.getModelName());
+            } else {
+                viewModel.setItemName(viewModel.getModelName() + " (" + viewModel.getSourceName() + ")");
+            }
+
+            treeItem.setText(viewModel.getItemName());
+            BindingData dataSource = null;
+            if ((viewModel.getSourceName() != null) && (!viewModel.getSourceName().isEmpty())) {
+                dataSource = combineEditorPart.getDataBindManager().getDataSource(viewModel.getSourceName());
+            }
+            if (dataSource != null && BuilderConstants.JSON.equals(dataSource.getPropertyValue(BuilderConstants.ATTRIBUTE_SOURCE_TYPE))) {
+                treeItem.setData("path", viewModel.getModelName() + BuilderConstants.SLASH + "root");
+            } else {
+                treeItem.setData("path", viewModel.getModelName());
+            }
+
+            treeItemData.setModel(viewModel);
+            treeItemData.setOriginModelName(viewModel.getModelName());
+            treeItem.setData("TREEITEMDATA", treeItemData);
+
+            if (!viewModel.getBindingObjects().isEmpty()) {
+                if (dataSource != null) {
+                    makeSubTreeItem(treeItem, viewModel.getBindingObjects(), dataSource.getBindingObjects(), null);
+                } else {
+                    makeSubTreeItem(treeItem, viewModel.getBindingObjects(), null, null);
+                }
+            }
+
+            TreeItemData data = (TreeItemData) dataModelTree.getData("TREEITEMDATA");
+            if (data == null) {
+                data = new TreeItemData();
+            }
+            dataModelTree.setData("TREEITEMDATA", data);
+
+            String imageName = null;
+            if ((viewModel.getSourceName() == null) || (viewModel.getSourceName().isEmpty())) {
+                imageName = BuilderConstants.DATABINDING_MODEL_EMPTY_ICON;
+            } else {
+                imageName = BuilderConstants.DATABINDING_MODEL_NOT_EMPTY_ICON;
+            }
+
+            if (imageName != null) {
+                treeItem.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, imageName));
+            }
+        }
+
+        DataBindingHelper.extendItems(extendedItems, dataModelTree.getItems(), selectedPath);
+        dataModelTree.getVerticalBar().setValues(selection, minimum, maximum, thumb, increment, pageIncrement);
+    }
+
+    private void makeSubTreeItem(TreeItem parentTreeItem, List<BindingObject> list, List<BindingObject> sourcelist, String allowedBindingType) {
+        if ((list == null) || (list.isEmpty())) {
+            return;
+        }
+
+        // BindingObject sourceItem = null;
+        for (BindingObject observableObject : list) {
+            if (observableObject.getName() == null || observableObject.getName().isEmpty())
+                continue;
+
+            if (observableObject.getValueType().equals("Array")) {
+                String nextAllowedBindingType = null;
+                List<BindingObject> firstChildList = new ArrayList<BindingObject>();
+                firstChildList.add(observableObject.getBindingObjects().get(0));
+                if (firstChildList.get(0).getValueType().equals("Index")) {
+                    nextAllowedBindingType = "Array";
+                }
+                TreeItem treeItem = createTreeItem(parentTreeItem, observableObject, nextAllowedBindingType);
+                makeSubTreeItem(treeItem, firstChildList, sourcelist, nextAllowedBindingType);
+            } else if (observableObject.getValueType().equals("Index")) {
+                continue;
+            } else if (observableObject.getValueType().equals("IndexObject")) {
+                makeSubTreeItem(parentTreeItem, observableObject.getBindingObjects(), sourcelist, "Array");
+            } else if (observableObject.getValueType().equals("Object")) {
+                TreeItem treeItem = createTreeItem(parentTreeItem, observableObject, null);
+                makeSubTreeItem(treeItem, observableObject.getBindingObjects(), sourcelist, allowedBindingType);
+            } else {
+                createTreeItem(parentTreeItem, observableObject, "Array".equals(allowedBindingType) ? allowedBindingType : "Text");
+            }
+
+        }
+    }
+
+    private TreeItem createTreeItem(TreeItem parentTreeItem, BindingObject observableObject, String allowedBindingType) {
+        TreeItem treeItem = new TreeItem(parentTreeItem, 0);
+        treeItem.setData("BINDING_OBJECT", observableObject);
+        treeItem.setText(observableObject.getName());
+        treeItem.setData("path", parentTreeItem.getData("path") + BuilderConstants.SLASH + observableObject.getName());
+        if (observableObject.getValueType().equals("Array")) {
+            treeItem.setData("path", treeItem.getData("path") + "[*]");
+        }
+        TreeItemData treeItemData = new TreeItemData();
+        treeItemData.setObjectType(observableObject.getValueType());
+        treeItemData.setObjectValue(observableObject.getValue());
+        treeItemData.setBindedValue(false);
+        treeItemData.setAllowedBindingType(allowedBindingType);
+        treeItemData.setModel(observableObject.getOwnerBindingData());
+        treeItem.setData("TREEITEMDATA", treeItemData);
+        if (treeItemData.getObjectType() != null) {
+            String imageName = null;
+            String type = treeItemData.getObjectType();
+            if (type.equals("Array")) {
+                imageName = BuilderConstants.DATABINDING_ARRAY_ICON;
+            } else if (type.equals("Number")) {
+                imageName = BuilderConstants.DATABINDING_NUMBER_ICON;
+            } else if (type.equals("String")) {
+                imageName = BuilderConstants.DATABINDING_STRING_ICON;
+            } else if (type.equals("Index")) {
+                imageName = BuilderConstants.DATABINDING_INDEX_ICON;
+            } else if (type.equals("Object")) {
+                imageName = BuilderConstants.DATABINDING_OBJECT_ICON;
+            } else if (type.equals("Boolean")) {
+                imageName = BuilderConstants.DATABINDING_BOOLEAN_ICON;
+            } else {
+                imageName = BuilderConstants.DATABINDING_UNDEFINED_ICON;
+            }
+
+            if (imageName != null) {
+                treeItem.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, imageName));
+            }
+        }
+        return treeItem;
+    }
+
+    @Override
+    public void dataSourceRemoved(BindingDataSetEvent e) {
+    }
+
+    @Override
+    public void dataSourceRenamed(BindingDataSetEvent e) {
+        if (combineEditorPart.getDataBindManager() != null) {
+            List<BindingData> models = combineEditorPart.getDataBindManager().getDataModels();
+            for (BindingData model : models) {
+                if (model.getSourceName() != null && model.getSourceName().equals(e.getOldValue())) {
+                    model.setSourceName(e.getValue());
+                }
+            }
+        }
+    }
+
+    @Override
+    public void dataSourceMoved(BindingDataSetEvent e) {
+    }
+
+    @Override
+    public void dataSourceChanged(BindingDataSetEvent e) {
+    }
+
+    @Override
+    public void allDataModelReseted(BindingDataSetEvent e) {
+    }
+
+    @Override
+    public void dataModelAdded(BindingDataSetEvent e) {
+    }
+
+    @Override
+    public void dataModelRemoved(BindingDataSetEvent e) {
+    }
+
+    @Override
+    public void dataModelRenamed(BindingDataSetEvent e) {
+    }
+
+    @Override
+    public void dataModelMoved(BindingDataSetEvent e) {
+    }
+
+    @Override
+    public void dataModelChanged(BindingDataSetEvent e) {
+    }
+
+    @Override
+    public void dataModelItemRenamed(BindingDataSetEvent e) {
+    }
+
+    public boolean checkDuplicatedTableItem(String modelName, String widgetName, String bindingInfoStr) {
+        TableItem[] items = bindingInfoTableViewer.getTable().getItems();
+        for (TableItem item : items) {
+            if (item.getText(0).equals(modelName)) {
+                if (item.getText(2).equals(widgetName)) {
+                    if (item.getText(3).equals(bindingInfoStr)) {
+                        return false;
+                    }
+                }
+            }
+        }
+
+        return true;
+    }
+
+    public void addInfoTableItem(Part part, String modelName, String widgetName, String bindingInfoStr) {
+        final TableItem item = new TableItem(bindingInfoTableViewer.getTable(), SWT.NONE);
+        item.setText(new String[] { modelName, widgetName, bindingInfoStr });
+        item.setData("PART", part);
+    }
+
+    @Override
+    public void selectionChanged(SelectionChangedEvent event) {
+        Part viewPart = combineEditorPart.getDesignEditor().getViewer().getCurrentViewPart();
+        if (currentViewPart == null || currentViewPart != viewPart) {
+            currentViewPart = viewPart;
+            refreshBindingInfos();
+        }
+
+        TableItem[] tableItems = bindingInfoTableViewer.getTable().getItems();
+        List<TableItem> selectTableItems = new ArrayList<TableItem>();
+        for (Object child : ((StructuredSelection) event.getSelection()).toList()) {
+            if (child instanceof EditPart) {
+                EditPart editPart = (EditPart) child;
+                Part part = (Part) editPart.getModel();
+                String value = part.getPropertyValue(BuilderConstants.ATTRIBUTE_DATA_BIND);
+                if (value != null && !value.isEmpty()) {
+                    for (TableItem tableItem : tableItems) {
+                        Part tableItemPart = (Part) tableItem.getData("PART");
+                        if (part == tableItemPart) {
+                            selectTableItems.add(tableItem);
+                        }
+                    }
+                }
+            }
+        }
+        bindingInfoTableViewer.getTable().setSelection(selectTableItems.toArray(new TableItem[0]));
+        updateBindingInfoMenus();
+    }
+
+    @Override
+    public void partsChanged(List<PartMutation> mutations, PartObserver observer, String sender) {
+        if (mutations.size() > 0) {
+            refresh();
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingView.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataBindingView.java
new file mode 100644 (file)
index 0000000..6ff7643
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding;
+
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
+import java.text.ParseException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.part.IPage;
+import org.eclipse.ui.part.MessagePage;
+import org.eclipse.ui.part.PageBook;
+import org.eclipse.ui.part.PageBookView;
+//import org.tizen.webuibuilder.BuilderConstants;
+//import org.tizen.efluibuilder.ui.editor.PageDesigner;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.nativecore.ext.manifest.Manifest;
+import org.tizen.nativecore.ext.xmlstore.CoreXMLStore;
+
+/**
+ * DataBindingView is the data binding plugin's view entry point.
+ * 
+ * @author mukul.cy
+ * 
+ */
+public class DataBindingView extends PageBookView {
+       private static double MIN_SUPPORTED_VERSION = 2.4;
+
+       @Override
+       protected IPage createDefaultPage(PageBook book) {
+               MessagePage page = new MessagePage();
+               initPage(page);
+               page.createControl(book);
+               page.setMessage("Data binding view");
+               return page;
+       }
+
+       @Override
+       protected PageRec doCreatePage(IWorkbenchPart part) {
+               IPage page = null;
+               if (!(part instanceof CombineEditorPart)) {
+                       return null;
+               }
+               DataBindingPage dataBindingPage = new DataBindingPage(this, (CombineEditorPart) part);
+               initPage(dataBindingPage);
+               if (!isDataBindingSupported(part)) {
+                       page = createNotSupportedPage();
+                       PageRec pageRecord = new PageRec(part, page);
+                       return pageRecord;
+               } else {
+                       dataBindingPage.createControl(getPageBook());
+               }
+
+               PageRec pageRecord = new PageRec(part, dataBindingPage);
+               return pageRecord;
+       }
+
+       private boolean isDataBindingSupported(IWorkbenchPart part) {
+               boolean isDataBindingSupported = false;
+               if (part instanceof EditorPart) {
+                       String major_version_str = null;
+                       Number major_version = null;
+                       NumberFormat df = DecimalFormat.getInstance();
+                       String[] version_sub_str = getAppVersion(part).split("\\.");
+                       major_version_str = version_sub_str[0] + "." + version_sub_str[1];
+                       try {
+                               major_version = df.parse(major_version_str);
+                       } catch (ParseException e) {
+                               e.printStackTrace();
+                       }
+                       if ((major_version != null) && (major_version.doubleValue() >= MIN_SUPPORTED_VERSION)) {
+                               isDataBindingSupported = true;
+                       }
+               }
+               return isDataBindingSupported;
+       }
+
+       private String getAppVersion(IWorkbenchPart part) {
+               IProject project = null;
+               String version = null;
+               EditorPart editorPart = (EditorPart) part;
+               project = ((IFileEditorInput) editorPart.getEditorInput()).getFile().getProject();
+               CoreXMLStore coreXmlManager = new CoreXMLStore(project);
+               coreXmlManager.loadXml();
+               Manifest manifestModel = coreXmlManager.getCoreManifest();
+               version = manifestModel.getApiVersion();
+               return version;
+       }
+
+       protected IPage createNotSupportedPage() {
+               MessagePage page = new MessagePage();
+               initPage(page);
+               page.createControl(getPageBook());
+               page.setMessage("Databinding is not supported for Tizen platform earlier than 2.4");
+               return page;
+       }
+
+       @Override
+       protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
+               // TODO Auto-generated method stub
+               if (pageRecord.page instanceof DataBindingPage)
+                       ((DataBindingPage) pageRecord.page).unHook();
+               // this.dataBindingPage = null;
+               pageRecord.page.dispose();
+               // this.pageRecord = null;
+       }
+
+       @Override
+       protected IWorkbenchPart getBootstrapPart() {
+               IWorkbench workbench = PlatformUI.getWorkbench();
+               if (workbench == null) {
+                       return null;
+               }
+               IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+               if (window == null) {
+                       return null;
+               }
+               IWorkbenchPage page = window.getActivePage();
+               if (page == null) {
+                       return null;
+               }
+               IEditorPart editor = page.getActiveEditor();
+               if (editor == null) {
+                       return null;
+               }
+
+               return editor;
+       }
+
+       @Override
+       protected boolean isImportant(IWorkbenchPart part) {
+           return part instanceof CombineEditorPart;
+       }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataModelTreeItemTransfer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/DataModelTreeItemTransfer.java
new file mode 100644 (file)
index 0000000..b4479fc
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding;
+
+import java.nio.charset.Charset;
+
+import org.eclipse.swt.dnd.ByteArrayTransfer;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+
+public class DataModelTreeItemTransfer extends ByteArrayTransfer {
+
+       private static final DataModelTreeItemTransfer INSTANCE = new DataModelTreeItemTransfer();
+       private static final String TYPE_NAME = "TreeItem Transfer"//$NON-NLS-1$
+                       + System.currentTimeMillis() + ":" + INSTANCE.hashCode();//$NON-NLS-1$
+       private static final int TYPEID = registerType(TYPE_NAME);
+
+       private TreeItem treeItem;
+       private long startTime;
+
+       public static DataModelTreeItemTransfer getInstance() {
+               return INSTANCE;
+       }
+
+       private DataModelTreeItemTransfer() {
+       }
+
+       @Override
+       protected int[] getTypeIds() {
+               return new int[] { TYPEID };
+       }
+
+       @Override
+       protected String[] getTypeNames() {
+               return new String[] { TYPE_NAME };
+       }
+
+       @Override
+       public void javaToNative(Object object, TransferData transferData) {
+               setTreeItem((TreeItem) object);
+               startTime = System.currentTimeMillis();
+               if (transferData != null)
+                       super.javaToNative(String.valueOf(startTime).getBytes(Charset.forName(BuilderConstants.ENCODING)),
+                                       transferData);
+       }
+
+       @Override
+       public Object nativeToJava(TransferData transferData) {
+               byte bytes[] = (byte[]) super.nativeToJava(transferData);
+               if (bytes == null) {
+                       return null;
+               }
+               long startTime = Long.parseLong(new String(bytes, Charset.forName(BuilderConstants.ENCODING)));
+               return (this.startTime == startTime) ? getTreeItem() : null;
+       }
+
+       /**
+        * Gets a tree item.
+        * 
+        * @return tree item
+        */
+       public TreeItem getTreeItem() {
+               return treeItem;
+       }
+
+       /**
+        * Sets a tree item.
+        * 
+        * @param item
+        */
+       public void setTreeItem(TreeItem item) {
+               this.treeItem = item;
+       }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/TreeItemTransfer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/TreeItemTransfer.java
new file mode 100644 (file)
index 0000000..6df0440
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding;
+
+import java.nio.charset.Charset;
+
+import org.eclipse.swt.dnd.ByteArrayTransfer;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+
+public class TreeItemTransfer extends ByteArrayTransfer {
+
+       private static final TreeItemTransfer INSTANCE = new TreeItemTransfer();
+       private static final String TYPE_NAME = "TreeItem Transfer"//$NON-NLS-1$
+                       + System.currentTimeMillis() + ":" + INSTANCE.hashCode();//$NON-NLS-1$
+       private static final int TYPEID = registerType(TYPE_NAME);
+
+       private TreeItem treeItem;
+       private long startTime;
+
+       public static TreeItemTransfer getInstance() {
+               return INSTANCE;
+       }
+
+       private TreeItemTransfer() {
+       }
+
+       @Override
+       protected int[] getTypeIds() {
+               return new int[] { TYPEID };
+       }
+
+       @Override
+       protected String[] getTypeNames() {
+               return new String[] { TYPE_NAME };
+       }
+
+       @Override
+       public void javaToNative(Object object, TransferData transferData) {
+               setTreeItem((TreeItem) object);
+               startTime = System.currentTimeMillis();
+               if (transferData != null)
+                       super.javaToNative(String.valueOf(startTime).getBytes(Charset.forName(BuilderConstants.ENCODING)),
+                                       transferData);
+       }
+
+       @Override
+       public Object nativeToJava(TransferData transferData) {
+               byte bytes[] = (byte[]) super.nativeToJava(transferData);
+               if (bytes == null) {
+                       return null;
+               }
+               long startTime = Long.parseLong(new String(bytes, Charset.forName(BuilderConstants.ENCODING)));
+               return (this.startTime == startTime) ? getTreeItem() : null;
+       }
+
+       /**
+        * Gets a tree item.
+        * 
+        * @return tree item
+        */
+       public TreeItem getTreeItem() {
+               return treeItem;
+       }
+
+       /**
+        * Sets a tree item.
+        * 
+        * @param item
+        */
+       public void setTreeItem(TreeItem item) {
+               this.treeItem = item;
+       }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddDataModelAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddDataModelAction.java
new file mode 100644 (file)
index 0000000..49681d6
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.part.IPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingView;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class AddDataModelAction extends SelectionAction {
+
+       private DataBindingView view;
+       private BindingData model;
+
+       /**
+        * Constructor.
+        * 
+        * @param text
+        * @param view
+        */
+       public AddDataModelAction(DataBindingView view, BindingData model) {
+               super(null);
+
+               if (model != null)
+                       setText(model.getSourceName());
+               else
+                       setText("Empty Model");
+
+               this.view = view;
+               this.model = model;
+               Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR,
+                               BuilderConstants.DATABINDING_DATAMODEL_ADD_ICON);
+               ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+               setImageDescriptor(imgDesc);
+       }
+
+       @Override
+       protected boolean calculateEnabled() {
+               if (view == null) {
+                       return false;
+               }
+               return true;
+       }
+
+       @Override
+       public void run() {
+               IPage page = view.getCurrentPage();
+               if (!(page instanceof DataBindingPage)) {
+                       return;
+               }
+               DataBindingPage dataBindingPage = (DataBindingPage) page;
+               if (model != null)
+                       dataBindingPage.setDataSourceToDataModel(model, null);
+               else
+                       dataBindingPage.addDataModel();
+       }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddDataModelItemAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddDataModelItemAction.java
new file mode 100644 (file)
index 0000000..af738fc
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.part.IPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingView;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class AddDataModelItemAction extends SelectionAction {
+
+       protected DataBindingView view;
+
+       /**
+        * Constructor.
+        * 
+        * @param text
+        * @param view
+        */
+       public AddDataModelItemAction(String text, String tooltipText, DataBindingView view) {
+               super(null);
+               setText(text);
+               setToolTipText(tooltipText);
+               this.view = view;
+               Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR,
+                               BuilderConstants.DATABINDING_DATAMODELITEM_ADD_ICON);
+               ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+               setImageDescriptor(imgDesc);
+       }
+
+       @Override
+       protected boolean calculateEnabled() {
+               if (view == null) {
+                       return false;
+               }
+
+               IPage page = view.getCurrentPage();
+               if (!(page instanceof DataBindingPage)) {
+                       return false;
+               }
+               DataBindingPage dataBindingPage = (DataBindingPage) page;
+               if (!dataBindingPage.canRemoveDataModel()) {
+                       return false;
+               }
+               return true;
+       }
+
+       public void refresh() {
+               setEnabled(calculateEnabled());
+       }
+
+       @Override
+       public void run() {
+               IPage page = view.getCurrentPage();
+               if (!(page instanceof DataBindingPage)) {
+                       return;
+               }
+               DataBindingPage dataBindingPage = (DataBindingPage) page;
+               dataBindingPage.addDataModelItem();
+       }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddDataSourceAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddDataSourceAction.java
new file mode 100644 (file)
index 0000000..d46070c
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.part.IPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingPage;
+/*import org.tizen.webuibuilder.BuilderConstants;
+import org.tizen.webuibuilder.ui.views.databinding.DataBindingPage;
+import org.tizen.webuibuilder.ui.views.databinding.DataBindingView;
+import org.tizen.webuibuilder.ui.views.databinding.dialog.SetSourcePage;
+import org.tizen.webuibuilder.ui.views.databinding.model.BindingData;
+import org.tizen.webuibuilder.utility.ResourceManager;*/
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingView;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+
+public class AddDataSourceAction extends SelectionAction {
+       
+       protected DataBindingView view;
+        /**
+     * Constructor.
+     * 
+     * @param text
+     * @param view
+     */
+    public AddDataSourceAction(String text, String toolTipText, DataBindingView view) {
+        super(null);
+        setText(text);
+        setToolTipText(toolTipText);
+        this.view = view;
+        Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_DATASOURCE_ADD_ICON);
+        ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+        setImageDescriptor(imgDesc);
+    }
+    
+    private TreeItem getSelectedTreeItem() {
+        IPage page = view.getCurrentPage();
+        if (!(page instanceof DataBindingPage)) {
+            return null;
+        }
+        DataBindingPage dataBindingPage = (DataBindingPage) page;
+        Tree tree = dataBindingPage.getDataSourceTree();
+        TreeItem[] treeItem = tree.getSelection();
+
+        if ((treeItem == null) || (treeItem.length == 0)) {
+            return null;
+        }
+
+        // 0 .. multi select
+        return treeItem[0];
+    }
+
+       @Override
+       protected boolean calculateEnabled() {
+               return true;
+       }
+       
+    @Override
+    public void run() {
+        IPage page = view.getCurrentPage();
+        if (!(page instanceof DataBindingPage)) {
+            return;
+        }
+        DataBindingPage dataBindingPage = (DataBindingPage) page;
+        dataBindingPage.addDataSource();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddModelDropDownAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/AddModelDropDownAction.java
new file mode 100644 (file)
index 0000000..f39d823
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.part.IPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingManager;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingView;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class AddModelDropDownAction extends Action implements IMenuCreator {
+       private Menu contextMenu;
+       private Menu toolbartMenu;
+       private DataBindingView view;
+       private DataBindingManager dataBindingManager;
+
+       public AddModelDropDownAction(String text, String tooltipText, DataBindingView view, DataBindingManager dataBindingManager) {
+               super(text, IAction.AS_DROP_DOWN_MENU | SWT.NONE);
+
+               setToolTipText(tooltipText);
+               this.view = view;
+               this.dataBindingManager = dataBindingManager;
+
+               Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR,
+                               BuilderConstants.DATABINDING_DATAMODEL_ADD_ICON);
+               ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+               setImageDescriptor(imgDesc);
+
+               setMenuCreator(this);
+       }
+
+       @Override
+       public void dispose() {
+               if (contextMenu != null) {
+                       contextMenu.dispose();
+                       contextMenu = null;
+               }
+
+               if (toolbartMenu != null) {
+                       toolbartMenu.dispose();
+                       toolbartMenu = null;
+               }
+       }
+
+       @Override
+       public Menu getMenu(Control parent) {
+               if (contextMenu != null)
+                       contextMenu.dispose();
+
+               contextMenu = new Menu(parent.getShell(), SWT.POP_UP | SWT.NONE);
+
+               return createMenu(contextMenu);
+       }
+
+       @Override
+       public Menu getMenu(Menu parent) {
+               if (toolbartMenu != null)
+                       toolbartMenu.dispose();
+
+               toolbartMenu = new Menu(parent);
+
+               return createMenu(toolbartMenu);
+       }
+
+       public Menu createMenu(Menu menu) {
+               ActionContributionItem baseItem = new ActionContributionItem(new AddDataModelAction(view, null));
+               baseItem.fill(menu, -1);
+
+               for (BindingData data : dataBindingManager.getDataSources()) {
+
+                       ActionContributionItem item = new ActionContributionItem(new AddDataModelAction(view, data));
+                       item.fill(menu, -1);
+               }
+               return menu;
+       }
+
+       public void run() {
+               IPage page = view.getCurrentPage();
+               if (!(page instanceof DataBindingPage)) {
+                       return;
+               }
+               DataBindingPage dataBindingPage = (DataBindingPage) page;
+               dataBindingPage.addDataModel();
+       }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/CollapseAllAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/CollapseAllAction.java
new file mode 100644 (file)
index 0000000..6f87de3
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class CollapseAllAction extends SelectionAction {
+       private Tree dataTree = null;
+    public CollapseAllAction(String text, String toolTipText) {
+        super(null);
+        setText(text);
+        setToolTipText(toolTipText);
+        Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_COLLAPSEALL);
+        ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+        setImageDescriptor(imgDesc);
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        return true;
+    }
+
+    public void refresh() {
+        setEnabled(calculateEnabled());
+    }
+
+    @Override
+    public void run() {
+        if(dataTree == null) return;
+        for (TreeItem treeItem : dataTree.getItems()) {
+            collapseTreeItem(treeItem);
+        }
+    }
+
+    private void collapseTreeItem(TreeItem treeItems) {
+        treeItems.setExpanded(false);
+        for (TreeItem treeItem : treeItems.getItems()) {
+            collapseTreeItem(treeItem);
+        }
+    }
+
+    public void setTreeItem(Tree tree){
+        this.dataTree = tree;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/EditDataSourceAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/EditDataSourceAction.java
new file mode 100644 (file)
index 0000000..94a4008
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.part.IPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingView;
+import org.tizen.efluibuilder.ui.view.databinding.dialog.SetSourcePage;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class EditDataSourceAction extends SelectionAction {
+       protected DataBindingView view;
+       private IProject project;
+
+       /**
+        * Constructor.
+        * 
+        * @param text
+        * @param view
+        */
+       public EditDataSourceAction(String text, String toolTipText, DataBindingView view, IProject project) {
+               super(null);
+               setText(text);
+               setToolTipText(toolTipText);
+               this.view = view;
+               Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR,
+                               BuilderConstants.DATABINDING_DATASOURCE_DIALOG_ICON);
+               ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+               setImageDescriptor(imgDesc);
+               this.project = project;
+
+       }
+
+       private TreeItem getSelectedTreeItem() {
+               IPage page = view.getCurrentPage();
+               if (!(page instanceof DataBindingPage)) {
+                       return null;
+               }
+               DataBindingPage dataBindingPage = (DataBindingPage) page;
+               Tree tree = dataBindingPage.getDataSourceTree();
+               TreeItem[] treeItem = tree.getSelection();
+
+               if ((treeItem == null) || (treeItem.length == 0)) {
+                       return null;
+               }
+
+               // 0 .. multi select
+               return treeItem[0];
+       }
+
+       @Override
+       protected boolean calculateEnabled() {
+               if (view == null) {
+                       return false;
+               }
+
+               if (getSelectedTreeItem() == null) {
+                       return false;
+               }
+
+               return true;
+       }
+
+       public void refresh() {
+               setEnabled(calculateEnabled());
+       }
+
+       @Override
+       public void run() {
+               TreeItem treeItem = getSelectedTreeItem();
+               if (treeItem == null) {
+                       return;
+               }
+
+               while (treeItem.getParentItem() != null) {
+                       treeItem = treeItem.getParentItem();
+               }
+
+               SetSourcePage dlg = new SetSourcePage(Display.getCurrent().getActiveShell(), treeItem, project);
+               BindingData dataSource = dlg.open();
+
+               if (dataSource != null) {
+                       IPage page = view.getCurrentPage();
+                       if (!(page instanceof DataBindingPage)) {
+                               return;
+                       }
+                       DataBindingPage dataBindingPage = (DataBindingPage) page;
+                       dataBindingPage.editDataSource(dataSource);
+               }
+       }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RemoveBindingInfoAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RemoveBindingInfoAction.java
new file mode 100644 (file)
index 0000000..46dc129
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.part.IPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingView;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class RemoveBindingInfoAction extends SelectionAction {
+
+    protected DataBindingView view;
+    
+    public RemoveBindingInfoAction(String text, String toolTipText, DataBindingView view) {
+        super(null);
+        setText(text);
+        setToolTipText(toolTipText);
+        this.view = view;
+        Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_DELETE_ICON);
+        ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+        setImageDescriptor(imgDesc);
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        if (view == null) {
+            return false;
+        }
+        
+        IPage page = view.getCurrentPage();
+        if (!(page instanceof DataBindingPage)) {
+            return false;
+        }
+        DataBindingPage dataBindingPage = (DataBindingPage) page;
+        if (!dataBindingPage.canRemoveBindingInfo()) {
+            return false;
+        }
+
+        return true;
+    }
+    
+    public void refresh() {
+        setEnabled(calculateEnabled());
+    }
+
+    @Override
+    public void run() {
+        IPage page = view.getCurrentPage();
+        if (!(page instanceof DataBindingPage)) {
+            return;
+        }
+        DataBindingPage dataBindingPage = (DataBindingPage) page;
+        dataBindingPage.removeBindingInfo();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RemoveDataModelAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RemoveDataModelAction.java
new file mode 100644 (file)
index 0000000..bba6e6d
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.part.IPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingView;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class RemoveDataModelAction extends SelectionAction {
+
+    protected DataBindingView view;
+
+    /**
+     * Constructor.
+     * 
+     * @param text
+     * @param view
+     */
+    public RemoveDataModelAction(String text, String toolTipText, DataBindingView view) {
+        super(null);
+        setText(text);
+        setToolTipText(toolTipText);
+        this.view = view;
+        Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_DATAMODEL_DELETE_ICON);
+        ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+        setImageDescriptor(imgDesc);
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        if (view == null) {
+            return false;
+        }
+
+        IPage page = view.getCurrentPage();
+        if (!(page instanceof DataBindingPage)) {
+            return false;
+        }
+        DataBindingPage dataBindingPage = (DataBindingPage) page;
+        if (!dataBindingPage.canRemoveDataModel()) {
+            return false;
+        }
+
+        return true;
+    }
+
+    public void refresh() {
+        setEnabled(calculateEnabled());
+    }
+
+    @Override
+    public void run() {
+        IPage page = view.getCurrentPage();
+        if (!(page instanceof DataBindingPage)) {
+            return;
+        }
+        DataBindingPage dataBindingPage = (DataBindingPage) page;
+        dataBindingPage.removeDataModel();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RemoveDataSourceAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RemoveDataSourceAction.java
new file mode 100644 (file)
index 0000000..6b604f8
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.part.IPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingView;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class RemoveDataSourceAction extends SelectionAction {
+
+       protected DataBindingView view;
+
+       /**
+        * Constructor.
+        * 
+        * @param text
+        * @param view
+        */
+       public RemoveDataSourceAction(String text, String toolTipText, DataBindingView view) {
+               super(null);
+               setText(text);
+               setToolTipText(toolTipText);
+               this.view = view;
+               Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR,
+                               BuilderConstants.DATABINDING_DATASOURCE_DELETE_ICON);
+               ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+               setImageDescriptor(imgDesc);
+       }
+
+       @Override
+       protected boolean calculateEnabled() {
+               if (view == null) {
+                       return false;
+               }
+
+               IPage page = view.getCurrentPage();
+               if (!(page instanceof DataBindingPage)) {
+                       return false;
+               }
+               DataBindingPage dataBindingPage = (DataBindingPage) page;
+               if (!dataBindingPage.canRemoveDataSource()) {
+                       return false;
+               }
+
+               return true;
+       }
+
+       public void refresh() {
+               setEnabled(calculateEnabled());
+       }
+
+       @Override
+       public void run() {
+               IPage page = view.getCurrentPage();
+               if (!(page instanceof DataBindingPage)) {
+                       return;
+               }
+               DataBindingPage dataBindingPage = (DataBindingPage) page;
+               dataBindingPage.removeDataSource();
+       }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RenameDataModelAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RenameDataModelAction.java
new file mode 100644 (file)
index 0000000..c6ebd6b
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.part.IPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingView;
+import org.tizen.efluibuilder.ui.view.databinding.model.TreeItemData;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class RenameDataModelAction extends SelectionAction {
+
+    protected DataBindingView view;
+
+    /**
+     * Constructor.
+     * 
+     * @param text
+     * @param view
+     */
+    public RenameDataModelAction(String text, String toolTipText, DataBindingView view) {
+        super(null);
+        setText(text);
+        setToolTipText(toolTipText);
+        this.view = view;
+        Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_RENAME_ICON);
+        ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+        setImageDescriptor(imgDesc);
+    }
+
+    private TreeItem getSelectedTreeItem() {
+        IPage page = view.getCurrentPage();
+        if (!(page instanceof DataBindingPage)) {
+            return null;
+        }
+        DataBindingPage dataBindingPage = (DataBindingPage) page;
+        Tree tree = dataBindingPage.getDataModelTree();
+        TreeItem[] treeItem = tree.getSelection();
+
+        if ((treeItem == null) || (treeItem.length == 0)) {
+            return null;
+        }
+
+        // 0 .. multi select
+        return treeItem[0];
+    }
+
+    private boolean checkTreeItem(TreeItem selectedTreeItem) {
+
+        TreeItemData treeItemData = (TreeItemData) selectedTreeItem.getData("TREEITEMDATA");
+        if (treeItemData.getBindedValue()) {
+            return true;
+        }
+
+        return false;
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        if (view == null) {
+            return false;
+        }
+
+        if (getSelectedTreeItem() == null) {
+            return false;
+        }
+
+        if (checkTreeItem(getSelectedTreeItem())) {
+            return false;
+        }
+
+        if (getSelectedTreeItem().getParentItem() != null)
+            return false;
+
+        return true;
+    }
+
+    public void refresh() {
+        setEnabled(calculateEnabled());
+    }
+
+    @Override
+    public void run() {
+        IPage page = view.getCurrentPage();
+        if (!(page instanceof DataBindingPage)) {
+            return;
+        }
+        DataBindingPage dataBindingPage = (DataBindingPage) page;
+        dataBindingPage.renameDataModel(null);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RenameDataSourceAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/RenameDataSourceAction.java
new file mode 100644 (file)
index 0000000..a6234ca
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.part.IPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingView;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class RenameDataSourceAction extends SelectionAction {
+
+       protected DataBindingView view;
+
+       private TreeItem getSelectedTreeItem() {
+               IPage page = view.getCurrentPage();
+               if (!(page instanceof DataBindingPage)) {
+                       return null;
+               }
+               DataBindingPage dataBindingPage = (DataBindingPage) page;
+               Tree tree = dataBindingPage.getDataSourceTree();
+               TreeItem[] treeItem = tree.getSelection();
+
+               if ((treeItem == null) || (treeItem.length == 0)) {
+                       return null;
+               }
+               return treeItem[0];
+       }
+
+       /**
+        * Constructor.
+        * 
+        * @param text
+        * @param view
+        */
+       public RenameDataSourceAction(String text, String toolTipText,  DataBindingView view) {
+               super(null);
+               setText(text);
+               setToolTipText(toolTipText);
+               this.view = view;
+        Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_RENAME_ICON);
+        ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+        setImageDescriptor(imgDesc);
+       }
+
+       public void refresh() {
+               setEnabled(calculateEnabled());
+       }
+
+       @Override
+       protected boolean calculateEnabled() {
+               if (view == null)
+                       return false;
+               if (getSelectedTreeItem() == null)
+                       return false;
+               if (getSelectedTreeItem().getParentItem() != null)
+                       return false;
+               return true;
+       }
+
+       @Override
+       public void run() {
+               IPage page = view.getCurrentPage();
+               if (!(page instanceof DataBindingPage)) {
+                       return;
+               }
+               DataBindingPage dataBindingPage = (DataBindingPage) page;
+               dataBindingPage.renameDataSource(null);
+       }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/SetModelTargetAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/SetModelTargetAction.java
new file mode 100644 (file)
index 0000000..3faeb54
--- /dev/null
@@ -0,0 +1,262 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.IPage;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingManager;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingPage;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingView;
+import org.tizen.efluibuilder.ui.view.databinding.dialog.SetModelTargetDialog;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingObject;
+import org.tizen.efluibuilder.ui.view.databinding.model.DataBindingPartProperty;
+import org.tizen.efluibuilder.ui.view.databinding.model.TreeItemData;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.DataBindingHelper;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+/**
+ * 
+ * @author mukul.cy
+ * 
+ */
+public class SetModelTargetAction extends SelectionAction {
+
+       private final DataBindingView dataBindingView;
+       private final CombineEditorPart combineEditorPart;
+
+       private SetModelTargetDialog setTargetDialog;
+       private final String dialogWindowHeader;
+       /**
+        * List of ID's of part falling under selected part's hierarchy
+        */
+       private final List<String> idList = new ArrayList<String>();
+       /**
+        * List of corresponding part which maps to idList's elements
+        */
+       private final List<Part> partList = new ArrayList<Part>();
+       private DataBindingManager dataBindingManager;
+       private final TreeItem treeItem;
+
+       public SetModelTargetAction(String text, DataBindingView view) {
+               super(view.getSite().getPart());
+               setText(text);
+               Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_SET_TARGET_ICON);
+               ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+               setImageDescriptor(imgDesc);
+               this.dataBindingView = view;
+               dialogWindowHeader = text;
+               combineEditorPart = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+                               .getActiveEditor();
+               if (combineEditorPart != null) {
+                       dataBindingManager = combineEditorPart.getDataBindManager();
+               }
+               treeItem = getSelectedTreeItem();
+       }
+
+       public void refresh() {
+           setEnabled(calculateEnabled());
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.eclipse.jface.action.Action#run()
+        */
+       @Override
+       public void run() {
+               // Create dialog window for set target operation
+               setTargetDialog = new SetModelTargetDialog(Display.getCurrent().getActiveShell());
+               // make list of widgets on current page
+               makeWidgetsList();
+
+               // update binding view with user entry/update
+
+               if (setTargetDialog.open() != Window.OK) {
+                       return;
+               }
+
+               String selectedWidgetPropertyName = setTargetDialog.getSelectedWidgetPropertyName();
+               Part selectedPart = setTargetDialog.getSelectedPart();
+               TreeItem treeItem = getSelectedTreeItem();
+               addBindingToTarget(selectedPart, selectedWidgetPropertyName, treeItem);
+       }
+
+       /**
+        * Add binding info to binding info viewer model
+        * 
+        * @param part
+        * @param widgetName
+        *            Bound UI widget name
+        * @param treeItem
+        *            treeItem information value
+        */
+       private void addBindingToTarget(Part part, String widgetName, TreeItem treeItem) {
+               DataBindingManager dataBindManager = combineEditorPart.getDataBindManager();
+               DataBindingPage dataBindingPage = (DataBindingPage)dataBindingView.getCurrentPage();
+               String path = (String) treeItem.getData("path");
+               BindingObject bindingObject = (BindingObject) treeItem.getData("BINDING_OBJECT");
+               TreeItemData treeItemData = (TreeItemData) treeItem.getData("TREEITEMDATA");
+               String bindingInfoStr = widgetName + ": " + path;
+               if (dataBindingPage != null && bindingObject != null) {
+                       if (dataBindingPage.checkDuplicatedTableItem(path, widgetName, bindingInfoStr)) {
+                               String itemPath = path.substring(path.indexOf(BuilderConstants.SLASH) + 1);
+                               ComponentPart componentPart = (ComponentPart) part;
+                               String modelName = path.substring(0, path.indexOf(BuilderConstants.SLASH));
+                               BindingData dataModel = dataBindManager.getDataModelByModelName(modelName);
+                               String allowedBinding = treeItemData.getAllowedBindingType();
+                               BindingData dataSource = dataBindingPage.getDataSource(treeItemData.getModel().getSourceName());
+                               if (dataSource != null) {
+                                   String sourceType = dataSource.getPropertyValue(BuilderConstants.ATTRIBUTE_SOURCE_TYPE);
+                       DataBindingPartProperty property = new DataBindingPartProperty(modelName, itemPath, bindingObject.getValueType(), allowedBinding, sourceType);
+                       if (dataModel == null || !DataBindingHelper.checkDataBinding(componentPart, property)) {
+                           return;
+                       }
+                       dataBindingPage.setModelTarget(part, dataModel, itemPath, widgetName);
+                               }
+                       }
+               }
+       }
+
+       /**
+        * Make list of widgets on current view.
+        * 
+        */
+       private void makeWidgetsList() {
+               IPage page = dataBindingView.getCurrentPage();
+               if (!(page instanceof DataBindingPage)) {
+                       return;
+               }
+               /* DataBindingPage dataBindingPage = (DataBindingPage) page; */
+
+               idList.clear();
+               partList.clear();
+               dataBindingManager.getDesignEditor().getViewer().getCurrentViewPart();
+               if (dataBindingManager.getDesignViewer() == null) {
+                       // ViewManager not initialized
+                       return;
+               }
+               DesignViewer designViewer = dataBindingManager.getDesignViewer();
+               // get current page view's data
+               Part currentViewPart = designViewer.getCurrentViewPart();
+               // makeSubWidgetList(currentViewPart.getChildren(), idList, partList);
+               setTargetDialog.setWidgetContents(currentViewPart);
+               /*
+                * for (int i = 0; i < views.size(); i++) { part =
+                * views.get(i).getRootPart().getChildren(); makeSubWidgetList(part,
+                * idList, partList); }
+                */
+       }
+
+       private void makeSubWidgetList(List<Part> parts, List<String> idList, List<Part> partList) {
+               if (parts.size() == 0) {
+                       return;
+               } else {
+                       for (int j = 0; j < parts.size(); j++) {
+                               if (parts.get(j).getType() == PartType.COMPONENT) {
+                                       idList.add(parts.get(j).getUniqueId());
+                                       partList.add(parts.get(j));
+                                       List<Part> subParts = parts.get(j).getChildren();
+                                       makeSubWidgetList(subParts, idList, partList);
+                               }
+                       }
+               }
+       }
+
+       private String makePropertyValue(TreeItem treeItem) {
+               String str = "";
+               while (treeItem != null && treeItem.getParentItem() != null) {
+                       if (str.isEmpty()) {
+                               str = treeItem.getText();
+                       } else {
+                               str = treeItem.getText() + "." + str;
+                       }
+                       treeItem = treeItem.getParentItem();
+               }
+               if(treeItem != null)
+                   str = treeItem.getData("DEFAULTTEXT") + "." + str;
+               return str;
+       }
+
+       private TreeItem getSelectedTreeItem() {
+               DataBindingPage dataBindingPage = (DataBindingPage) getDataBindingPage();
+               if (dataBindingPage == null) {
+                       return null;
+               }
+
+               Tree tree = dataBindingPage.getDataModelTree();
+               TreeItem[] treeItem = tree.getSelection();
+
+               if (treeItem == null || treeItem.length == 0 || (treeItem[0].getParentItem() == null)) {
+                       return null;
+               }
+
+               // 0 .. multi select
+               return treeItem[0];
+       }
+
+       private IPage getDataBindingPage() {
+               IPage page = dataBindingView.getCurrentPage();
+               if (!(page instanceof DataBindingPage)) {
+                       return null;
+               }
+               return page;
+       }
+
+       @Override
+       protected boolean calculateEnabled() {
+               if (dataBindingView == null) {
+                       return false;
+               }
+
+               if (getSelectedTreeItem() == null) {
+                       return false;
+               }
+
+               TreeItemData treeItemData = (TreeItemData) getSelectedTreeItem().getData("TREEITEMDATA");
+
+               if (treeItemData != null && treeItemData.getObjectType() != null
+                               && treeItemData.getObjectType().equals("Object")) {
+                       return false;
+               }
+
+               return true;
+       }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/ShowBindingInfoAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/actions/ShowBindingInfoAction.java
new file mode 100644 (file)
index 0000000..c40d788
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.view.databinding.actions;
+
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.tizen.efluibuilder.gef.editparts.DesignEditPart;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingManager;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+
+public class ShowBindingInfoAction extends SelectionAction {
+
+    protected DataBindingManager dataBindManager;
+
+    public ShowBindingInfoAction(String text, DataBindingManager dataBindManager) {
+        super(null);
+        setText(text);
+        this.dataBindManager = dataBindManager;
+        Image img = ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_SHOW_ICON);
+        ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+        setImageDescriptor(imgDesc);
+        setText("show data binding info");
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        // TODO Auto-generated method stub
+        return true;
+    }
+
+    public void updateActionImage() {
+        DesignEditPart currentViewEditPart = dataBindManager.getDesignViewer().getCurrentViewEditPart();
+        if (currentViewEditPart == null) {
+            return;
+        }
+        boolean showBindInfo = currentViewEditPart.isBinded();
+        Image img = null;
+        if (showBindInfo) {
+            img = ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_HIDE_ICON);
+            setText("hide data binding info");
+        } else {
+            img = ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_SHOW_ICON);
+            setText("show data binding info");
+        }
+        ImageDescriptor imgDesc = ImageDescriptor.createFromImage(img);
+        setImageDescriptor(imgDesc);
+    }
+
+    @Override
+    public void run() {
+        DesignEditPart currentViewEditPart = dataBindManager.getDesignViewer().getCurrentViewEditPart();
+        if (currentViewEditPart == null) {
+            return;
+        }
+        boolean showBindInfo = currentViewEditPart.isBinded();
+        showBindInfo = !showBindInfo;
+        dataBindManager.getDesignViewer().showBindingInfo(showBindInfo);
+        updateActionImage();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/CallHistorySubPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/CallHistorySubPage.java
new file mode 100644 (file)
index 0000000..7e83bbb
--- /dev/null
@@ -0,0 +1,321 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.view.databinding.dialog;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.DataBindingHelper;
+import org.tizen.efluibuilder.ui.view.databinding.utils.Helper;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonObject;
+
+public class CallHistorySubPage implements SourceDialogSubPage {
+
+    private static final String CALL_HISTORY_PRIVILEGE = "http://tizen.org/privilege/callhistory.read";
+//    private SetSourcePage parent;
+    private Group parentGroup;
+    private Tree parentDataTree;
+    private Composite settingComposite;
+
+    private CCombo typeCombo;
+    private CCombo directionCombo;
+    private CCombo orderCombo;
+    private Button loadButton;
+
+    private Label descContents;
+    private IProject project;
+
+    private static Gson prettyGson;
+    private static Gson normalGson;
+    private static String[] typeItems;
+    private static String[] directionItems;
+    private static String[] orderItems;
+    private static List<String> requiredPrivileges;
+
+    static{
+        typeItems = new String[]{"ALL", "TELL", "XMPP","SIP"};
+        directionItems = new String[] {"ALL", "DIALED", "RECEIVED", "MISSEDNEW", "MISSED", "BLOCKED", "REJECTED"  };
+        orderItems = new String[] { "DESC", "ASC" };
+        prettyGson = new GsonBuilder().setPrettyPrinting().serializeNulls().create();
+        normalGson = new GsonBuilder().serializeNulls().create();
+    }
+
+    public CallHistorySubPage( SetSourcePage setSourcePage, Group dataGroup, Tree dialogTree, IProject project){
+//        parent = setSourcePage;
+        parentGroup = dataGroup;
+        parentDataTree = dialogTree;
+        this.project = project;
+    }
+
+    @Override
+    public BindingData getData() {
+        BindingData dataModel = (BindingData) PartUtil.createPart(PartType.DATASOURCE, LayoutSchemaConstants.DATASOURCE);
+
+        dataModel.setCallHistoryType( typeCombo.getText() );
+        dataModel.setCallHistoryDirection( directionCombo.getText() );
+        dataModel.setCallHistoryStartTimeOrder( orderCombo.getText() );
+
+        JsonObject root = new JsonObject();
+        TreeItem[] items = parentDataTree.getItems();
+
+        if( parentDataTree.getItemCount() == 0){
+            Event e = new Event(); 
+            e.item = loadButton; 
+            e.widget = loadButton; 
+            e.type = SWT.Selection; 
+            loadButton.notifyListeners(SWT.Selection, e);
+        }
+
+        for (TreeItem item : items) {
+            Helper.makeJsonFromTree( item, root);
+        }
+
+        dataModel.setJsonData( normalGson.toJson(root) );
+        //// TODO
+        ////dataSource.setStaticFilePath(jsonFile);
+        dataModel.setSourceType(typeCombo.getText().toLowerCase());
+        requiredPrivileges = new ArrayList<String>(Arrays.asList(CALL_HISTORY_PRIVILEGE));
+        Helper.addPrivileges(settingComposite.getShell(), requiredPrivileges, project);
+
+        return dataModel;
+    }
+
+    @Override
+    public Composite getSettingComposite() {
+        if( settingComposite == null ){
+            createSettingComposite();
+        }
+        return settingComposite;
+    }
+
+    private void createSettingComposite() {
+        settingComposite = new Composite(parentGroup, SWT.None);
+        FormLayout layout = new FormLayout();
+
+        settingComposite.setLayout(layout);
+        layout.marginWidth = 5;
+        layout.marginHeight = 5;
+        FormData data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(0, 0);
+        settingComposite.setLayoutData(data);
+
+        Composite typeComposite = Helper.makeInputCombo(settingComposite, "Type", typeItems );
+
+        data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        typeComposite.setLayoutData(data);
+
+        typeCombo = (CCombo) typeComposite.getData();
+        typeCombo.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent e) {
+                int index = typeCombo.getSelectionIndex();
+
+                String descText = "";
+
+                switch(index){
+                    case 0:
+                        descText = "";
+                        break;
+                    case 1:
+                        descText = "For all protocols with phone number addressing (PSTN, GSM, CDMA, LTE, etc.)";
+                        break;
+                    case 2:
+                        descText = "For generic XMPP calls.";
+                        break;
+                    case 3:
+                        descText = "For generic SIP calls.";
+                        break;
+                }
+                descContents.setText( descText );
+
+                settingComposite.layout();
+            }
+        });
+
+        Composite directionComposite = Helper.makeInputCombo(settingComposite, "Direction", directionItems);
+        directionCombo = (CCombo) directionComposite.getData();
+
+        data = new FormData();
+        data.top = new FormAttachment(typeComposite, 5);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        directionComposite.setLayoutData(data);
+
+        Composite orderComposite = Helper.makeInputCombo(settingComposite, "StartTime Order", orderItems);
+        orderCombo = (CCombo) orderComposite.getData();
+
+        data = new FormData();
+        data.top = new FormAttachment(directionComposite, 5);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        orderComposite.setLayoutData(data);
+
+        loadButton = new Button(settingComposite, SWT.PUSH | SWT.FLAT);
+        loadButton.setImage( ResourceManager.getImage( BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_RELOAD_ICON ) );
+        loadButton.setToolTipText( "Load" );
+
+        data = new FormData(29, 29);
+        data.bottom = new FormAttachment(100, -2);
+        data.right = new FormAttachment(100, -2);
+
+        loadButton.setLayoutData(data);
+        final SourceDialogSubPage subPage = this;
+        loadButton.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                for( Control control : parentDataTree.getChildren() ){
+                    control.dispose();
+                }
+                parentDataTree.removeAll();
+
+                String path = DataBindingHelper.getAbsolutePath( BuilderConstants.DATABINDING_DIR_JSON + "callHistory.json" );
+                JsonObject json;
+                try {
+                    json = Helper.readJsonFromStream( new FileInputStream( new File( path ) ) );
+                    Helper.makeTreeItem( json, parentDataTree, null, true, subPage);
+                } catch (Exception e1) {
+                    e1.printStackTrace();
+                }
+            }
+        });
+
+        Composite descComposite = new Composite(settingComposite, SWT.NONE );
+        descComposite.setLayout(new GridLayout(1, false));
+
+        data = new FormData();
+        data.left =  new FormAttachment(0, 0);
+        data.right = new FormAttachment(loadButton, -10);
+        data.bottom = new FormAttachment(100, -20);
+
+        descComposite.setLayoutData(data);
+
+        Label descTitle = new Label(descComposite, SWT.NONE );
+        descTitle.setText("Summary");
+        FontData[] fD = descTitle.getFont().getFontData();
+        fD[0].setHeight(16);
+        fD[0].setStyle( SWT.BOLD|SWT.UNDERLINE_LINK );
+        descTitle.setFont( new Font( Display.getCurrent(), fD[0] ) );
+
+        descContents = new Label(descComposite, SWT.WRAP );
+
+        fD = descContents.getFont().getFontData();
+        fD[0].setHeight(12);
+        descContents.setFont( new Font( Display.getCurrent(), fD[0] ) );
+
+        descContents.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
+    }
+
+    @Override
+    public void setButtonsState(Map<String, Button> dataButtonMap) {
+        dataButtonMap.get( "addTreeItem" ).setEnabled(false);
+        dataButtonMap.get( "upTreeItem" ).setEnabled(false);
+        dataButtonMap.get( "downTreeItem" ).setEnabled(false);
+        dataButtonMap.get( "removeTreeItem" ).setEnabled(false);
+        dataButtonMap.get( "removeAllTreeItem" ).setEnabled(false);
+        Button conversionTreeAndText = dataButtonMap.get("conversionTreeAndText");
+
+        if( conversionTreeAndText.getSelection() ){
+            conversionTreeAndText.setSelection(false);
+            Event e = new Event(); 
+            e.item = conversionTreeAndText; 
+            e.widget = conversionTreeAndText; 
+            e.type = SWT.Selection; 
+            conversionTreeAndText.notifyListeners(SWT.Selection, e);
+        }
+
+        conversionTreeAndText.setVisible(false);
+    }
+
+    @Override
+    public void loadData(BindingData dataModel) {
+        int typeIndex = Arrays.asList( typeItems ).indexOf(dataModel.getCallHistoryType() );
+        typeCombo.select( typeIndex );
+        directionCombo.select( Arrays.asList( directionItems ).indexOf(dataModel.getCallHistoryDirection() ) );
+        orderCombo.select( Arrays.asList( orderItems ).indexOf(dataModel.getCallHistoryStartTimeOrder() ) );
+
+        String descText = "";
+
+        switch(typeIndex){
+            case 0:
+                descText = "";
+                break;
+            case 1:
+                descText = "For all protocols with phone number addressing (PSTN, GSM, CDMA, LTE, etc.)";
+                break;
+            case 2:
+                descText = "For generic XMPP calls.";
+                break;
+            case 3:
+                descText = "For generic SIP calls.";
+                break;
+        }
+        descContents.setText( descText );
+
+        JsonObject json = prettyGson.fromJson(dataModel.getJsonData(), JsonObject.class );
+        Helper.makeTreeItem(json, parentDataTree, null, true, this);
+        Event e = new Event(); 
+        e.item = loadButton; 
+        e.widget = loadButton; 
+        e.type = SWT.Selection; 
+        loadButton.notifyListeners(SWT.Selection, e);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/ContactSubPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/ContactSubPage.java
new file mode 100644 (file)
index 0000000..46e0584
--- /dev/null
@@ -0,0 +1,320 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.view.databinding.dialog;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+////import org.tizen.webuibuilder.BuilderConstants;
+////import org.tizen.webuibuilder.ui.views.databinding.model.BindingData;
+////import org.tizen.webuibuilder.utility.ResourceManager;
+////import org.tizen.webuibuilder.utility.ResourceUtil;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.DataBindingHelper;
+import org.tizen.efluibuilder.ui.view.databinding.utils.Helper;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonObject;
+
+public class ContactSubPage implements SourceDialogSubPage {
+
+    private static final String CONTACT_PRIVILEGE = "http://tizen.org/privilege/contact.read";
+
+//    private SetSourcePage parent;
+    private Group parentGroup;
+    private Tree parentDataTree;
+    private Composite settingComposite;
+
+    private CCombo runtimeApiSettingCombo;
+    private Composite idComposite;
+    private Text addressbookID;
+    private Label descContents;
+    private Button loadButton;
+    private IProject project;
+
+    private static Gson prettyGson, normalGson;
+    private static String[] nameItems;
+    private List<String> requiredPrivileges;
+
+    static{
+        nameItems = new String[] { "ALL", "UNIFIED","DEFAULT", "SELECTED_ADDRESSBOOKID" };
+        prettyGson = new GsonBuilder().setPrettyPrinting().serializeNulls().create();
+        normalGson = new GsonBuilder().serializeNulls().create();
+    }
+
+    public ContactSubPage( SetSourcePage setSourcePage, Group dataGroup, Tree dialogTree, IProject project){
+//        parent = setSourcePage;
+        parentGroup = dataGroup;
+        parentDataTree = dialogTree;
+        this.project = project;
+    }
+
+    @Override
+    public BindingData getData() {
+        BindingData dataModel = (BindingData) PartUtil.createPart(PartType.DATASOURCE, LayoutSchemaConstants.DATASOURCE);
+
+        dataModel.setMethod(runtimeApiSettingCombo.getText());
+        ////dataModel.setRuntimeApiName( runtimeApiSettingCombo.getText() );
+
+        if( idComposite.getVisible() )
+            dataModel.setRuntimeApiAddressBookID( addressbookID.getText() );
+
+        if( parentDataTree.getItemCount() == 0){
+            Event e = new Event();
+            e.item = loadButton;
+            e.widget = loadButton;
+            e.type = SWT.Selection;
+            loadButton.notifyListeners(SWT.Selection, e);
+        }
+
+        JsonObject root = new JsonObject();
+        TreeItem[] items = parentDataTree.getItems();
+        for (TreeItem item : items) {
+            Helper.makeJsonFromTree( item, root);
+        }
+
+        dataModel.setJsonData( normalGson.toJson(root) );
+        requiredPrivileges = new ArrayList(Arrays.asList(CONTACT_PRIVILEGE));
+        Helper.addPrivileges(settingComposite.getShell(), requiredPrivileges, project );
+
+        return dataModel;
+    }
+
+    @Override
+    public Composite getSettingComposite() {
+        if( settingComposite == null ){
+            createSettingComposite();
+        }
+        return settingComposite;
+    }
+
+    private void createSettingComposite() {
+        settingComposite = new Composite(parentGroup, SWT.None);
+        FormLayout layout = new FormLayout();
+
+        settingComposite.setLayout(layout);
+        layout.marginWidth = 5;
+        layout.marginHeight = 5;
+        FormData data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(0, 0);
+        settingComposite.setLayoutData(data);
+
+        Composite apiComposite = Helper.makeInputCombo(settingComposite, "AddressBook Type", nameItems);
+
+        data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        apiComposite.setLayoutData(data);
+
+        runtimeApiSettingCombo = (CCombo) apiComposite.getData();
+        runtimeApiSettingCombo.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent e) {
+                boolean isVisible = false;
+                int index = runtimeApiSettingCombo.getSelectionIndex();
+                if( index == 3 )
+                    isVisible = true;
+
+                idComposite.setVisible(isVisible);
+                String descText = "";
+
+                switch(index){
+                    case 0:
+                        descText = "Gets the available address books.";
+                        break;
+                    case 1:
+                        descText = "Gets the aggregation of all address books.";
+                        break;
+                    case 2:
+                        descText = "Gets the default address book.";
+                        break;
+                    case 3:
+                        descText = "Gets the address book with the specified identifier.";
+                        break;
+                }
+                descContents.setText( descText );
+            }
+        });
+
+        idComposite = Helper.makeInputText(settingComposite, "Addressbook ID");
+        addressbookID = (Text) idComposite.getData();
+
+        idComposite.setVisible( false );
+
+        data = new FormData();
+        data.top = new FormAttachment(apiComposite, 5);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        idComposite.setLayoutData(data);
+
+        loadButton = new Button(settingComposite, SWT.PUSH | SWT.FLAT);
+        loadButton.setImage( ResourceManager.getImage( BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_RELOAD_ICON ) );
+        loadButton.setToolTipText( "Load" );
+
+        data = new FormData(29, 29);
+        data.bottom = new FormAttachment(100, -2);
+        data.right = new FormAttachment(100, -2);
+
+        loadButton.setLayoutData(data);
+        final SourceDialogSubPage subPage = this;
+        loadButton.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                for( Control control : parentDataTree.getChildren() ){
+                    control.dispose();
+                }
+                parentDataTree.removeAll();
+
+                String path = DataBindingHelper.getAbsolutePath( BuilderConstants.DATABINDING_DIR_JSON + "contact.json" );
+                JsonObject json;
+                try {
+                    json = Helper.readJsonFromStream( new FileInputStream( new File( path ) ) );
+                    Helper.makeTreeItem( json, parentDataTree, null, true, subPage);
+                } catch (FileNotFoundException e1) {
+                    e1.printStackTrace();
+                }
+            }
+        });
+
+        Composite descComposite = new Composite(settingComposite, SWT.NONE );
+        descComposite.setLayout(new GridLayout(1, false));
+
+        data = new FormData();
+        data.left =  new FormAttachment(0, 0);
+        data.right = new FormAttachment(loadButton, -10);
+        data.bottom = new FormAttachment(100, -20);
+
+        descComposite.setLayoutData(data);
+
+        Label descTitle = new Label(descComposite, SWT.NONE );
+        descTitle.setText("Summary");
+        FontData[] fD = descTitle.getFont().getFontData();
+        fD[0].setHeight(16);
+        fD[0].setStyle( SWT.BOLD|SWT.UNDERLINE_LINK );
+        descTitle.setFont( new Font( Display.getCurrent(), fD[0] ) );
+
+        descContents = new Label(descComposite, SWT.WRAP );
+        descContents.setText("Gets the available address books.");
+        fD = descContents.getFont().getFontData();
+        fD[0].setHeight(12);
+        descContents.setFont( new Font( Display.getCurrent(), fD[0] ) );
+
+        descContents.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
+    }
+
+    @Override
+    public void setButtonsState(Map<String, Button> dataButtonMap) {
+        dataButtonMap.get( "addTreeItem" ).setEnabled(false);
+        dataButtonMap.get( "upTreeItem" ).setEnabled(false);
+        dataButtonMap.get( "downTreeItem" ).setEnabled(false);
+        dataButtonMap.get( "removeTreeItem" ).setEnabled(false);
+        dataButtonMap.get( "removeAllTreeItem" ).setEnabled(false);
+        Button conversionTreeAndText = dataButtonMap.get("conversionTreeAndText");
+
+        if( conversionTreeAndText.getSelection() ){
+            conversionTreeAndText.setSelection(false);
+            Event e = new Event();
+            e.item = conversionTreeAndText;
+            e.widget = conversionTreeAndText;
+            e.type = SWT.Selection;
+            conversionTreeAndText.notifyListeners(SWT.Selection, e);
+        }
+
+        conversionTreeAndText.setVisible(false);
+    }
+
+    @Override
+    public void loadData(BindingData dataModel) {
+        int index = Arrays.asList(nameItems).indexOf(dataModel.getRuntimeApiName());
+        runtimeApiSettingCombo.select( index );
+
+        if( index == 3 ){
+            idComposite.setVisible(true);
+            addressbookID.setText(dataModel.getRuntimeApiAddressBookID());
+        }
+
+        String descText = "";
+
+        switch(index){
+            case 0:
+                descText = "Gets the available address books.";
+                break;
+            case 1:
+                descText = "Gets the aggregation of all address books.";
+                break;
+            case 2:
+                descText = "Gets the default address book.";
+                break;
+            case 3:
+                descText = "Gets the address book with the specified identifier.";
+                break;
+        }
+
+        descContents.setText( descText );
+
+//        JsonObject json = gson.fromJson(dataModel.getJsonData(), JsonObject.class );
+//        Helper.makeTreeItem(json, parentDataTree, null, false, this);
+
+        Event e = new Event();
+        e.item = loadButton;
+        e.widget = loadButton;
+        e.type = SWT.Selection;
+        loadButton.notifyListeners(SWT.Selection, e);
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/DataBindingFilterDialog.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/DataBindingFilterDialog.java
new file mode 100644 (file)
index 0000000..1bbfb5b
--- /dev/null
@@ -0,0 +1,509 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.dialog;
+
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map.Entry;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.layout.TableColumnLayout;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.TableEditor;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingObject;
+import org.tizen.efluibuilder.ui.view.databinding.model.DataBindingPartProperty;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class DataBindingFilterDialog extends Dialog {
+
+    private static final String FILTER_MSG = "This {0} supports \"{1}\" binding. Apply atleast {2} filters. \n (Each Level filtering should result in one Object.)";
+    private static final String HEADER = "(L{0}) {1}";
+    private static final String ERROR_MSG = "Enter valid data!";
+    private static final String DIALOG_HEADER = "Apply filter";
+
+    private final Color WHITE_COLOR = new Color(null, 255, 255, 255);
+
+    private DataBindingPartProperty property;
+
+    private Composite container;
+
+    private String filterPath;
+    private String widgetName;
+    private String bindingType;
+    private String modelName;
+    private int defaultLevel;
+    private HashMap<String, HashMap<String, String>> filterMap = new HashMap<String, HashMap<String, String>>();
+    private List<String> filterPathItems;
+    private int level = 1;
+
+    public DataBindingFilterDialog(Shell parent, DataBindingPartProperty property, int defaultLevel, String widgetName, String bindingType) {
+        super(parent);
+        this.property = property;
+        this.defaultLevel = defaultLevel;
+        this.widgetName = widgetName;
+        this.bindingType = bindingType;
+        this.modelName = property.getModelName();
+    }
+
+    @Override
+    protected Control createDialogArea(Composite parent) {
+
+        Composite composite = new Composite(parent, SWT.NONE);
+        composite.setBackground(WHITE_COLOR);
+        composite.setLayout(new GridLayout());
+        composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+        Label label = new Label(composite, SWT.NONE | SWT.BOLD);
+        label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+        label.setBackground(WHITE_COLOR);
+        label.setText(MessageFormat.format(FILTER_MSG, widgetName, bindingType, defaultLevel));
+
+        GridLayout gridLayout = new GridLayout();
+        gridLayout.numColumns = 2;
+        gridLayout.makeColumnsEqualWidth = true;
+        gridLayout.horizontalSpacing = 10;
+        gridLayout.verticalSpacing = 10;
+        gridLayout.marginLeft = 5;
+        gridLayout.marginRight = 5;
+        container = new Composite(parent, SWT.NONE);
+        container.setLayout(gridLayout);
+        container.setBackground(WHITE_COLOR);
+        GridData compositegridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+        compositegridData.heightHint = SWT.DEFAULT;
+        container.setLayoutData(compositegridData);
+
+        IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+        if (workbenchWindow == null) {
+            return null;
+        }
+        IWorkbenchPage activePage = workbenchWindow.getActivePage();
+        if (activePage == null) {
+            return null;
+        }
+        CombineEditorPart combineEditorPart = (CombineEditorPart) activePage.getActiveEditor();
+        BindingData bindingData = null;
+        if (combineEditorPart != null) {
+            bindingData = combineEditorPart.getDataBindManager().getDataModelByModelName(modelName);
+        }
+        filterPathItems = Arrays.asList(property.getViewItemName().replaceAll(BuilderConstants.ARRAY_REGEX, BuilderConstants.EMPTY).split(BuilderConstants.SLASH_REGEX));
+        if (bindingData != null) {
+            if (property.getSourceType().equals(BuilderConstants.JSON)) {
+                createFilters(bindingData.getBindingObjects(), null, 1, modelName + BuilderConstants.SLASH + "root");
+            } else {
+                createFilters(bindingData.getBindingObjects(), null, 0, modelName);
+            }
+        }
+        return composite;
+    }
+
+    @Override
+    protected void okPressed() {
+        List<String> items = Arrays.asList((property.getViewItemName()).split(BuilderConstants.SLASH_REGEX));
+        StringBuilder path = new StringBuilder(modelName);
+        for (Entry<String, HashMap<String, String>> entry : filterMap.entrySet()) {
+            int index = 1;
+            StringBuilder arrayValue = new StringBuilder(BuilderConstants.OPEN_SQUARE_BRACKET);
+            for (Entry<String, String> map : entry.getValue().entrySet()) {
+
+                arrayValue.append(map.getKey()).append(BuilderConstants.EQUAL).append(BuilderConstants.APOSTROPHE_MARK).append(map.getValue()).append(BuilderConstants.APOSTROPHE_MARK);
+
+                if (entry.getValue().size() > 1 && entry.getValue().size() != index) {
+                    arrayValue.append(" and ");
+                }
+                index++;
+            }
+            arrayValue.append(BuilderConstants.CLOSE_SQUARE_BRACKET);
+            String[] str = entry.getKey().split(BuilderConstants.SLASH_REGEX);
+            String item = items.get(str.length - 2).replaceAll(BuilderConstants.ARRAY_REGEX, arrayValue.toString());
+            items.set(str.length - 2, item);
+        }
+        for (String item : items) {
+            path = path.append(BuilderConstants.SLASH).append(item);
+        }
+        setFilterPath(path.toString());
+        super.okPressed();
+    }
+
+    @Override
+    protected void configureShell(Shell newShell) {
+        super.configureShell(newShell);
+        newShell.setText(DIALOG_HEADER);
+    }
+
+    @Override
+    protected void createButtonsForButtonBar(Composite parent) {
+        super.createButtonsForButtonBar(parent);
+        Button ok = getButton(IDialogConstants.OK_ID);
+        if (ok != null) {
+            ok.setEnabled(false);
+            ok.setFocus();
+        }
+    }
+
+    private void createFilters(List<BindingObject> list, String parent, int index, String path) {
+        if ((list == null) || (list.isEmpty())) {
+            return;
+        }
+        for (BindingObject observableObject : list) {
+            if (observableObject.getName() == null || observableObject.getName().isEmpty())
+                continue;
+            if (observableObject.getValueType().equals(BuilderConstants.ARRAY) && observableObject.getName().equals(filterPathItems.get(index))) {
+                List<BindingObject> firstChildList = new ArrayList<BindingObject>();
+                firstChildList.add(observableObject.getBindingObjects().get(0));
+                createFilters(firstChildList, observableObject.getName(), index, (path + BuilderConstants.SLASH + filterPathItems.get(index)));
+            } else if (observableObject.getValueType().equals(BuilderConstants.INDEX)) {
+                List<CustumTableItem> ComboItems = new ArrayList<CustumTableItem>();
+                ComboItems.add(new CustumTableItem(parent, BuilderConstants.EMPTY));
+                if (!ComboItems.isEmpty()) {
+                    createDropDownComposite(container, ComboItems.toArray(new CustumTableItem[ComboItems.size()]), path, true);
+                }
+            } else if (observableObject.getValueType().equals(BuilderConstants.INDEXOBJECT)) {
+                List<CustumTableItem> ComboItems = new ArrayList<CustumTableItem>();
+                for (BindingObject bindingObject : observableObject.getBindingObjects()) {
+                    if (bindingObject.getValueType().equals(BuilderConstants.STRING) || bindingObject.getValueType().equals(BuilderConstants.NUMBER)
+                            || bindingObject.getValueType().equals(BuilderConstants.BOOLEAN))
+                        ComboItems.add(new CustumTableItem(bindingObject.getName(), bindingObject.getValueType()));
+                }
+                if (!ComboItems.isEmpty()) {
+                    createDropDownComposite(container, ComboItems.toArray(new CustumTableItem[ComboItems.size()]), path, false);
+                }
+                createFilters(observableObject.getBindingObjects(), parent, index + 1, path);
+            } else if (observableObject.getValueType().equals(BuilderConstants.OBJECT) && observableObject.getName().equals(filterPathItems.get(index))) {
+                createFilters(observableObject.getBindingObjects(), parent, index + 1, (path + BuilderConstants.SLASH + filterPathItems.get(index)));
+            }
+        }
+    }
+
+    private static class CustumTableItem {
+        String value;
+        String type;
+
+        public String getValue() {
+            return value;
+        }
+
+        public String getType() {
+            return type;
+        }
+
+        public CustumTableItem(String value, String type) {
+            super();
+            this.value = value;
+            this.type = type;
+        }
+    }
+
+    private void createDropDownComposite(Composite parent, CustumTableItem[] items, final String labelStr, final Boolean isPrimitiveArray) {
+
+        Composite composite = new Composite(parent, SWT.BORDER);
+        composite.setLayout(new GridLayout(1, true));
+        GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+        gridData.widthHint = 250;
+        gridData.heightHint = SWT.DEFAULT;
+        composite.setBackground(WHITE_COLOR);
+        composite.setLayoutData(gridData);
+
+        // Filter Path
+        Label label = new Label(composite, SWT.WRAP | SWT.CENTER);
+        label.setBackground(WHITE_COLOR);
+        label.setText(MessageFormat.format(HEADER, level++, labelStr));
+        gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
+        gridData.widthHint = SWT.DEFAULT;
+        gridData.heightHint = SWT.DEFAULT;
+        label.setLayoutData(gridData);
+
+        Composite tableComposite = new Composite(composite, SWT.NONE);
+        TableColumnLayout tableColumnLayout = new TableColumnLayout();
+        tableComposite.setLayout(tableColumnLayout);
+        gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
+        gridData.widthHint = SWT.DEFAULT;
+        gridData.heightHint = 120;
+        tableComposite.setLayoutData(gridData);
+
+        // Filter Options
+        final TableViewer viewer = new TableViewer(tableComposite, SWT.BORDER | SWT.FULL_SELECTION);
+        TableViewerColumn imageCol = new TableViewerColumn(viewer, SWT.NONE);
+        imageCol.getColumn().setWidth(75);
+        imageCol.setLabelProvider(new ColumnLabelProvider() {
+            @Override
+            public String getText(Object element) {
+                if (element instanceof CustumTableItem) {
+                    CustumTableItem current = (CustumTableItem) element;
+                    return current.getValue();
+                }
+                return super.getText(element);
+            }
+
+            @Override
+            public Image getImage(Object element) {
+                if (element instanceof CustumTableItem) {
+                    CustumTableItem current = (CustumTableItem) element;
+                    if (current.getType().equals(BuilderConstants.STRING)) {
+                        return ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_STRING_ICON);
+                    } else if (current.getType().equals(BuilderConstants.NUMBER)) {
+                        return ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_NUMBER_ICON);
+                    } else if (current.getType().equals(BuilderConstants.BOOLEAN)) {
+                        return ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_BOOLEAN_ICON);
+                    }
+                }
+                return super.getImage(element);
+            }
+        });
+        TableViewerColumn inputBox = new TableViewerColumn(viewer, SWT.NONE);
+        inputBox.setLabelProvider(new ColumnLabelProvider() {
+            @Override
+            public void update(ViewerCell cell) {
+                cell.setText(BuilderConstants.EMPTY);
+            }
+
+        });
+        inputBox.getColumn().setWidth(75);
+        final Table table = viewer.getTable();
+        table.setLinesVisible(true);
+        final TableEditor editor = new TableEditor(table);
+        editor.horizontalAlignment = SWT.LEFT;
+        editor.grabHorizontal = true;
+        editor.minimumWidth = 50;
+        final int EDITABLECOLUMNINDEX = 1;
+        table.addListener(SWT.MeasureItem, new Listener() {
+
+            @Override
+            public void handleEvent(Event e) {
+               e.height = 30;
+            }
+        });
+        table.addSelectionListener(new SelectionListener() {
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+                Control oldEditor = editor.getEditor();
+                if (oldEditor != null)
+                    oldEditor.dispose();
+
+                final TableItem item = (TableItem) e.item;
+                if (item == null)
+                    return;
+
+                IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+                CustumTableItem tItem = (CustumTableItem) selection.getFirstElement();
+                final String type = tItem.getType();
+
+                if (!type.equals(BuilderConstants.BOOLEAN)) {
+                    final Text newEditor = new Text(table, SWT.BORDER);
+                    newEditor.setText(item.getText(EDITABLECOLUMNINDEX));
+
+                    final ControlDecoration txtDecorator = new ControlDecoration(newEditor, SWT.TOP | SWT.LEFT);
+                    FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+                    Image img = null;
+                    if(fieldDecoration != null)
+                        img = fieldDecoration.getImage();
+                    txtDecorator.setImage(img);
+                    txtDecorator.setDescriptionText(ERROR_MSG);
+                    txtDecorator.hide();
+
+                    newEditor.addFocusListener(new FocusListener() {
+
+                        @Override
+                        public void focusLost(FocusEvent e) {
+                            if (!validate(type, newEditor.getText())) {
+                                newEditor.setText(BuilderConstants.EMPTY);
+                            }
+                            newEditor.dispose();
+                        }
+
+                        @Override
+                        public void focusGained(FocusEvent e) {
+                        }
+                    });
+                    newEditor.addModifyListener(new ModifyListener() {
+
+                        @Override
+                        public void modifyText(ModifyEvent arg0) {
+                            String string = newEditor.getText();
+                            editor.getItem().setText(EDITABLECOLUMNINDEX, string);
+                            boolean isValid = false;
+                            if (!isPrimitiveArray) {
+                                isValid = validate(type, string);
+                                if (isValid) {
+                                    txtDecorator.hide();
+                                    updateMap(labelStr, string, item, isPrimitiveArray);
+                                } else {
+                                    txtDecorator.show();
+                                }
+                            } else {
+                                isValid = true;
+                                updateMap(labelStr, string, item, isPrimitiveArray);
+                            }
+
+                            Button ok = getButton(IDialogConstants.OK_ID);
+                            if (filterMap.size() >= defaultLevel && isValid) {
+                                ok.setEnabled(true);
+                            } else {
+                                ok.setEnabled(false);
+                            }
+
+                        }
+                    });
+                    newEditor.selectAll();
+                    newEditor.setFocus();
+                    editor.setEditor(newEditor, item, EDITABLECOLUMNINDEX);
+                } else {
+                    final Combo combo = new Combo(table, SWT.NONE | SWT.READ_ONLY);
+                    combo.setItems(new String[] { BuilderConstants.EMPTY, BuilderConstants.TRUE, BuilderConstants.FALSE });
+                    combo.addSelectionListener(new SelectionAdapter() {
+                        @Override
+                        public void widgetSelected(SelectionEvent e) {
+                            Combo newcombo = combo;
+                            editor.getItem().setText(EDITABLECOLUMNINDEX, newcombo.getText());
+                            updateMap(labelStr, combo.getItem(combo.getSelectionIndex()), item, isPrimitiveArray);
+                            Button ok = getButton(IDialogConstants.OK_ID);
+                            if (filterMap.size() >= defaultLevel) {
+                                ok.setEnabled(true);
+                            } else {
+                                ok.setEnabled(false);
+                            }
+                        }
+
+                    });
+                    combo.addFocusListener(new FocusListener() {
+
+                        @Override
+                        public void focusLost(FocusEvent e) {
+                            combo.dispose();
+                        }
+
+                        @Override
+                        public void focusGained(FocusEvent e) {
+
+                        }
+                    });
+                    combo.setFocus();
+                    editor.setEditor(combo, item, EDITABLECOLUMNINDEX);
+                }
+            }
+
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                widgetDefaultSelected(e);
+            }
+        });
+        viewer.setContentProvider(new ArrayContentProvider());
+        viewer.setInput(items);
+        viewer.setSelection(new StructuredSelection(viewer.getElementAt(0)), true);
+        tableColumnLayout.setColumnData(imageCol.getColumn(), new ColumnWeightData(1, true));
+        tableColumnLayout.setColumnData(inputBox.getColumn(), new ColumnWeightData(1, true));
+    }
+
+    private void updateMap(String labelStr, String text, TableItem item, boolean isPrimitiveArray) {
+        HashMap<String, String> map = new HashMap<String, String>();
+        for (Entry<String, HashMap<String, String>> entry : filterMap.entrySet()) {
+            if (entry.getKey().equals(labelStr)) {
+                map = entry.getValue();
+            }
+        }
+        if (text.isEmpty()) {
+            map.remove(item.getText(0));
+            if (map.size() == 0) {
+                filterMap.remove(labelStr);
+            } else {
+                filterMap.put(labelStr, map);
+            }
+        } else {
+            if (isPrimitiveArray) {
+                map.put(BuilderConstants.AT, text);
+            } else {
+                map.put(item.getText(0), text);
+            }
+            filterMap.put(labelStr, map);
+        }
+    }
+
+    private boolean validate(String type, String value) {
+        boolean flag = false;
+        if (value == null || value.isEmpty()) {
+            flag = true;
+        } else if (type.equals(BuilderConstants.NUMBER)) {
+            try {
+                Integer.parseInt(value);
+                flag = true;
+            } catch (NumberFormatException ex) {
+
+            }
+        } else if (type.equals(BuilderConstants.STRING)) {
+            flag = true;
+        }
+        return flag;
+    }
+
+    public String getFilterPath() {
+        return filterPath;
+    }
+
+    public void setFilterPath(String filterPath) {
+        this.filterPath = filterPath;
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/Helper.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/Helper.java
new file mode 100644 (file)
index 0000000..4f1cd6f
--- /dev/null
@@ -0,0 +1,530 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.dialog;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.StringReader;
+import java.math.BigDecimal;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.ui.view.databinding.model.TreeItemData;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonPrimitive;
+
+public class Helper {
+
+       private enum DataType {
+               OBJECT, ARRAY, PRIMITIVE
+       }
+
+       private static final String xmlConvertAttrPrifix = "";
+       private static final String xmlConvertTextPrifix = "";
+       private static final String xmlConvertTextName = "text";
+
+       private static Gson gson = new GsonBuilder().setPrettyPrinting().serializeNulls().create();
+
+       public static String callURL(String url, String method, TableItem[] items) {
+               BufferedReader br = null;
+               OutputStreamWriter writer = null;
+               try {
+
+                       HttpURLConnection con = null;
+                       if (method.equals("GET")) {
+                               String delimiter = "?";
+                               if (url.contains("?")) {
+                                       delimiter = "&";
+                               }
+                               con = (HttpURLConnection) new URL(url + delimiter + getParamString(items).toString()).openConnection();
+                       } else {
+                               con = (HttpURLConnection) new URL(url).openConnection();
+                               con.setDoOutput(true);
+                               writer = new OutputStreamWriter(con.getOutputStream());
+                               writer.write(getParamString(items).toString());
+                               writer.flush();
+                       }
+
+                       for (TableItem item : items) {
+                               if (item.getText(0).equals("header")) {
+                                       con.setRequestProperty(item.getText(1), item.getText(2));
+                               }
+                       }
+
+                       con.setRequestMethod(method);
+                       con.setDoInput(true);
+
+                       if (con.getResponseCode() != 200) {
+                               return null;
+                       }
+
+                       br = new BufferedReader(new InputStreamReader(con.getInputStream()));
+
+                       String line = null;
+                       StringBuilder sb = new StringBuilder();
+
+                       while ((line = br.readLine()) != null) {
+                               sb.append(line);
+                       }
+
+                       if (writer != null) {
+                               writer.close();
+                               writer = null;
+                       }
+                       br.close();
+                       br = null;
+
+                       return sb.toString();
+               } catch (Exception e) {
+                       e.printStackTrace();
+                       return null;
+               } finally {
+                       try {
+                               if (br != null)
+                                       br.close();
+                       } catch (IOException e) {
+                               e.printStackTrace();
+                       }
+                       try {
+                               if (writer != null)
+                                       writer.close();
+                       } catch (IOException e) {
+                               e.printStackTrace();
+                       }
+               }
+       }
+
+       public static JsonObject readJsonFromStream(InputStream is) {
+               BufferedReader br = null;
+               JsonObject result = null;
+               try {
+                       br = new BufferedReader(new InputStreamReader(is));
+                       result = gson.fromJson(br, JsonObject.class);
+                       br.close();
+                       br = null;
+               } catch (IOException e) {
+                       e.printStackTrace();
+                       return null;
+               } finally {
+                       try {
+                               if (br != null)
+                                       br.close();
+                       } catch (IOException e) {
+                               e.printStackTrace();
+                       }
+               }
+
+               return result;
+       }
+
+       public static void makeTreeItem(JsonElement jsonElement, Tree tree, TreeItem item, boolean includeIndex) {
+               if (jsonElement.isJsonArray()) {
+                       JsonArray array = jsonElement.getAsJsonArray();
+
+                       for (int i = 0; i < array.size(); i++) {
+                               if (includeIndex) {
+                                       TreeItem indexItem = new TreeItem(item, 0);
+                                       careteTreeItem(indexItem, String.valueOf(i), null, "Index");
+                                       makeTreeItem(array.get(i), tree, indexItem, includeIndex);
+                                       indexItem.setExpanded(true);
+                               } else {
+                                       makeTreeItem(array.get(i), tree, item, includeIndex);
+                                       break;
+                               }
+                       }
+               } else if (jsonElement.isJsonObject()) {
+
+                       JsonObject jb = jsonElement.getAsJsonObject();
+                       Set<Entry<String, JsonElement>> entrys = jb.entrySet();
+                       for (Entry<String, JsonElement> entry : entrys) {
+
+                               TreeItem treeItem = null;
+                               if (item == null) {
+                                       treeItem = new TreeItem(tree, 0);
+                               } else {
+                                       treeItem = new TreeItem(item, 0);
+                               }
+
+                               if (entry.getValue().isJsonPrimitive()) {
+                                       JsonPrimitive jp = entry.getValue().getAsJsonPrimitive();
+                                       String type = null;
+                                       if (jp.isBoolean())
+                                               type = "Boolean";
+                                       else if (jp.isNumber())
+                                               type = "Number";
+                                       else if (jp.isString())
+                                               type = "String";
+
+                                       careteTreeItem(treeItem, entry.getKey(), jp.getAsString(), type);
+                               } else if (entry.getValue().isJsonObject()) {
+                                       careteTreeItem(treeItem, entry.getKey(), null, "Object");
+                                       makeTreeItem(entry.getValue(), tree, treeItem, includeIndex);
+                               } else if (entry.getValue().isJsonArray()) {
+                                       careteTreeItem(treeItem, entry.getKey(), null, "Array");
+                                       makeTreeItem(entry.getValue(), tree, treeItem, includeIndex);
+                               } else if (entry.getValue().isJsonNull()) {
+                                       careteTreeItem(treeItem, entry.getKey(), null, "undefined");
+                                       makeTreeItem(entry.getValue(), tree, treeItem, includeIndex);
+                               }
+                               treeItem.setExpanded(true);
+                       }
+                       return;
+               } else if (jsonElement.isJsonPrimitive()) {
+                       JsonPrimitive jp = jsonElement.getAsJsonPrimitive();
+                       String type = null;
+                       if (jp.isBoolean()) {
+                               type = "Boolean";
+                       } else if (jp.isNumber()) {
+                               type = "Number";
+                       } else if (jp.isString()) {
+                               type = "String";
+                       }
+
+                       if (item.getParent().getColumnCount() > 0) {
+                               Helper.careteTreeItem(new TreeItem(item, 0), null, jp.getAsString(), type);
+                       }
+               }
+       }
+
+       private static TreeItem careteTreeItem(TreeItem treeItem, String key, String value, String type) {
+
+               TreeItemData treeItemData = new TreeItemData();
+
+               if (treeItem.getParent().getColumnCount() == 1) {
+                       treeItem.setText(key);
+               } else {
+                       treeItem.setText(new String[] { key, value, type });
+               }
+
+               treeItemData.setObjectType(type);
+               treeItemData.setObjectValue(value);
+               treeItemData.setSource("original");
+
+               treeItem.setData("TREEITEMDATA", treeItemData);
+
+               //String imageName = null;
+
+               //if (type.equals("Array")) {
+               //      imageName = "temp.png";
+               //}
+               // TODO:FIXME
+               // if ( imageName != null ) {
+               // treeItem.setImage( ResourceManager.getImage(
+               // BuilderConstants.ICON_DIR, imageName ) );
+               // }
+
+               return treeItem;
+       }
+
+       public static void makeJsonFromTree(TreeItem parentItem, JsonElement parentJsonElement) {
+               String key = parentItem.getText(0);
+               String value = parentItem.getText(1);
+               String type = parentItem.getText(2);
+
+               TreeItem[] items = parentItem.getItems();
+
+               JsonObject jsonOb = null;
+
+               if (type.equals("Array")) {
+                       JsonArray array = new JsonArray();
+                       ((JsonObject) parentJsonElement).add(key, array);
+                       jsonOb = null;
+                       for (TreeItem item : items) {
+                               if (item.getText(2).equals("Index")) {
+                                       makeJsonFromTree(item, array);
+                               } else {
+                                       if (jsonOb == null) {
+                                               jsonOb = new JsonObject();
+                                               array.add(jsonOb);
+                                       }
+                                       makeJsonFromTree(item, jsonOb);
+                               }
+                       }
+               } else if (type.equals("Object")) {
+                       jsonOb = new JsonObject();
+                       ((JsonObject) parentJsonElement).add(key, jsonOb);
+                       for (TreeItem item : items) {
+                               makeJsonFromTree(item, jsonOb);
+                       }
+               } else if (type.equals("Index")) {
+                       jsonOb = new JsonObject();
+                       for (TreeItem item : items) {
+                               if (item.getText().length() > 0) {
+                                       makeJsonFromTree(item, jsonOb);
+                               } else {
+                                       ((JsonArray) parentJsonElement).add(new JsonPrimitive(item.getText(1)));
+                               }
+                       }
+                       if (!jsonOb.entrySet().isEmpty())
+                               ((JsonArray) parentJsonElement).add(jsonOb);
+               } else if (type.equals("String")) {
+                       ((JsonObject) parentJsonElement).addProperty(key, value);
+               } else if (type.equals("Boolean")) {
+                       ((JsonObject) parentJsonElement).addProperty(key, Boolean.valueOf(value));
+               } else if (type.equals("Number")) {
+                       ((JsonObject) parentJsonElement).addProperty(key, new BigDecimal(value));
+               } else {
+                       ((JsonObject) parentJsonElement).add(key, null);
+               }
+       }
+
+       public static Composite makeInputText(Composite parentComposite, String title) {
+
+               Composite subComposite = new Composite(parentComposite, SWT.NONE);
+               FormLayout layout = new FormLayout();
+               subComposite.setLayout(layout);
+
+               Label label = new Label(subComposite, SWT.NONE);
+               label.setText(title);
+               FormData data = new FormData();
+               data.top = new FormAttachment(0, 0);
+               data.left = new FormAttachment(0, 0);
+               label.setLayoutData(data);
+
+               Text text = new Text(subComposite, SWT.SINGLE | SWT.BORDER);
+               data = new FormData();
+               data.top = new FormAttachment(label, 0);
+               data.left = new FormAttachment(10, 0);
+               data.right = new FormAttachment(100, 0);
+               text.setLayoutData(data);
+               subComposite.setData(text);
+               return subComposite;
+       }
+
+       public static Composite makeInputCombo(Composite parentComposite, String title, String[] items) {
+
+               Composite subComposite = new Composite(parentComposite, SWT.NONE);
+               FormLayout layout = new FormLayout();
+               subComposite.setLayout(layout);
+
+               Label label = new Label(subComposite, SWT.NONE);
+               label.setText(title);
+               FormData data = new FormData();
+               data.top = new FormAttachment(0, 0);
+               data.left = new FormAttachment(0, 0);
+               label.setLayoutData(data);
+
+               CCombo combo = new CCombo(subComposite, SWT.SINGLE | SWT.BORDER | SWT.FLAT | SWT.READ_ONLY);
+               data = new FormData();
+               data.top = new FormAttachment(label, 0);
+               data.left = new FormAttachment(10, 0);
+               data.right = new FormAttachment(100, 0);
+               combo.setLayoutData(data);
+               combo.setItems(items);
+               combo.select(0);
+
+               subComposite.setData(combo);
+
+               return subComposite;
+       }
+
+       public static String getParamString(TableItem[] items) {
+               StringBuilder query = new StringBuilder();
+               boolean isFirst = true;
+
+               for (TableItem item : items) {
+
+                       if (item.getText(0).equals("query")) {
+                               if (isFirst) {
+                                       isFirst = false;
+                               } else {
+                                       query.append("&");
+                               }
+
+                               query.append(item.getText(1)).append("=").append(item.getText(2));
+                       }
+               }
+
+               return query.toString();
+       }
+
+       public static JsonObject getJsonByScript(String xml) {
+               String jsonString = null;
+
+               return gson.fromJson(jsonString, JsonObject.class);
+       }
+
+       public static JsonObject getJsonFromXML(String xml) {
+               DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+               DocumentBuilder db;
+               Document doc = null;
+               try {
+                       InputSource inStream = new InputSource();
+                       inStream.setCharacterStream(new StringReader(xml));
+                       db = dbf.newDocumentBuilder();
+                       doc = db.parse(inStream);
+               } catch (ParserConfigurationException e) {
+                       e.printStackTrace();
+               } catch (SAXException e) {
+                       e.printStackTrace();
+               } catch (IOException e) {
+                       e.printStackTrace();
+               }
+
+               JsonObject root = new JsonObject();
+
+               if (doc != null) {
+                       NodeList nodeList = doc.getChildNodes();
+                       parseNodeList(root, nodeList);
+               }
+
+               return root;
+       }
+
+       /**
+        * @param json
+        * @param nodeList
+        */
+       private static void parseNodeList(JsonObject parentJson, NodeList nodeList) {
+               HashMap<String, DataType> meta = createMetaData(nodeList);
+               HashMap<String, JsonArray> arrayParents = new HashMap<String, JsonArray>();
+
+               for (int i = 0; i < nodeList.getLength(); i++) {
+
+                       Node node = nodeList.item(i);
+                       JsonObject jsonOb = null;
+
+                       DataType type = meta.get(node.getNodeName());
+
+                       if (type == DataType.ARRAY) {
+
+                               Node parentNode = node.getParentNode();
+                               String nodePath = parentNode.getNodeName() + "/" + node.getNodeName();
+
+                               while ((parentNode = parentNode.getParentNode()) != null) {
+                                       nodePath = parentNode.getNodeName() + "/" + nodePath;
+                               }
+
+                               JsonArray parentArray = null;
+
+                               if ((parentArray = arrayParents.get(nodePath)) == null) {
+                                       parentArray = new JsonArray();
+                                       parentJson.add(node.getNodeName(), parentArray);
+                                       arrayParents.put(nodePath, parentArray);
+                               }
+
+                               if (node.getChildNodes().getLength() == 1 && node.getFirstChild().getNodeType() == Node.TEXT_NODE) {
+                                       parentArray.add(new JsonPrimitive(node.getFirstChild().getTextContent()));
+                               } else {
+                                       jsonOb = new JsonObject();
+                                       parentArray.add(jsonOb);
+
+                                       parseNodeList(jsonOb, node.getChildNodes());
+                                       addAttributes(jsonOb, node);
+                               }
+
+                       } else if (type == DataType.OBJECT) {
+                               jsonOb = new JsonObject();
+                               parentJson.add(node.getNodeName(), jsonOb);
+
+                               parseNodeList(jsonOb, node.getChildNodes());
+                               addAttributes(jsonOb, node);
+                       } else if (type == DataType.PRIMITIVE) {
+                               if (node.getFirstChild() != null)
+                                       parentJson.addProperty(node.getNodeName(), node.getFirstChild().getTextContent());
+                               else
+                                       parentJson.add(node.getNodeName(), null);
+                       }
+               }
+       }
+
+       /**
+        * @param jsonOb
+        * @param node
+        */
+       private static void addAttributes(JsonObject jsonOb, Node node) {
+               boolean isExistAttr = false;
+
+               for (int j = 0; j < node.getAttributes().getLength(); j++) {
+                       Node attNode = node.getAttributes().item(j);
+                       jsonOb.addProperty(xmlConvertAttrPrifix + attNode.getNodeName(), attNode.getNodeValue());
+                       isExistAttr = true;
+               }
+
+               String textNodeName = xmlConvertTextName;
+               if (isExistAttr)
+                       textNodeName = xmlConvertTextPrifix + textNodeName;
+
+               if (node.getFirstChild() != null && node.getFirstChild().getNodeType() == Node.TEXT_NODE
+                               && node.getFirstChild().getTextContent().trim().length() != 0) {
+                       jsonOb.addProperty(textNodeName, node.getFirstChild().getTextContent());
+               }
+       }
+
+       /**
+        * @param nodeList
+        * @return
+        */
+       private static HashMap<String, DataType> createMetaData(NodeList nodeList) {
+               HashMap<String, DataType> result = new HashMap<String, DataType>();
+               for (int i = 0; i < nodeList.getLength(); i++) {
+                       Node node = nodeList.item(i);
+
+                       if (node.getNodeType() != Node.ELEMENT_NODE) {
+                               continue;
+                       }
+
+                       DataType type = result.get(node.getNodeName());
+
+                       if (type != null) {
+                               result.put(node.getNodeName(), DataType.ARRAY);
+                       } else if (node.getChildNodes().getLength() <= 1 && node.getAttributes().getLength() == 0) {
+                               result.put(node.getNodeName(), DataType.PRIMITIVE);
+                       } else {
+                               result.put(node.getNodeName(), DataType.OBJECT);
+                       }
+               }
+               return result;
+       }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/RemoteCallSubPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/RemoteCallSubPage.java
new file mode 100644 (file)
index 0000000..78ebb30
--- /dev/null
@@ -0,0 +1,829 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.dialog;
+
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.layout.TableColumnLayout;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.custom.TableEditor;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.Helper;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+import org.xml.sax.SAXException;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+
+public class RemoteCallSubPage implements SourceDialogSubPage {
+
+    private static final String INTERNET_PRIVILEGE = "http://tizen.org/privilege/internet";
+    private static final String DOWNLOAD_PRIVILEGE = "http://tizen.org/privilege/download";
+    private static final String NETWORK_PRIVILEGE = "http://tizen.org/privilege/network.get";
+
+    private IProject project;
+    private SetSourcePage parent;
+
+    private Composite settingComposite;
+    private Composite pollIntervalComposite;
+    private CCombo methodSettingCombo;
+    private CCombo proxySettingCombo;
+    private CCombo sourceTypeCombo;
+    private Group parentGroup;
+    private StyledText remoteSourceStyledText;
+    private Table requestParam;
+    private Text urlText;
+    private Text timeoutText;
+    private Text pollIntervalText;
+    private Tree parentDataTree;
+    private Button poll;
+    private Button push;
+    private Button staticButton;
+
+    private BindingData temp;
+
+    private static Gson gson;
+
+    private static String[] SoureTypes;
+    private static List<String> requiredPrivileges;
+
+    static {
+        SoureTypes = new String[] { "JSON", "XML" };
+        gson = new GsonBuilder().serializeNulls().create();
+    }
+
+    private SelectionAdapter loadEvent = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            // enqueue a given Runnable for execution on the UI thread
+            parentDataTree.getDisplay().asyncExec(new Runnable() {
+                @Override
+                public void run() {
+
+                    if (parent.isDataModelDirty()) {
+                        MessageBox messageBox = new MessageBox(remoteSourceStyledText.getShell(), SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
+                        messageBox.setText("Set Source Warning");
+                        messageBox.setMessage("Warning : Modified Data Model is lost. Do you want to continue?");
+                        int result = messageBox.open();
+
+                        if (result != SWT.OK) {
+                            loadData(temp);
+                            return;
+                        }
+                    }
+
+                    parentDataTree.getShell().setCursor(new Cursor(Display.getCurrent(), SWT.CURSOR_WAIT));
+
+                    for (Control control : parentDataTree.getChildren()) {
+                        control.dispose();
+                    }
+                    parentDataTree.removeAll();
+                    try {
+                        createDataSource();
+                    } catch (Exception e) {
+                        MessageBox messageBox = new MessageBox(remoteSourceStyledText.getShell(), SWT.ICON_ERROR);
+                        messageBox.setText("Set Source Error");
+                        messageBox.setMessage("Error occured while retrieving the data.");
+                        messageBox.open();
+                        return;
+                    }
+
+                    parentDataTree.getShell().setCursor(new Cursor(Display.getCurrent(), SWT.CURSOR_ARROW));
+                }
+            });
+        }
+    };
+
+    public RemoteCallSubPage(SetSourcePage setSourcePage, Group dataGroup, Tree dialogTree, IProject project) {
+        parent = setSourcePage;
+        parentGroup = dataGroup;
+        parentDataTree = dialogTree;
+        this.project = project;
+    }
+
+    @Override
+    public BindingData getData() {
+
+        BindingData dataSource = (BindingData) PartUtil.createPart(PartType.DATASOURCE, LayoutSchemaConstants.DATASOURCE);
+        dataSource.setURL(urlText.getText());
+        dataSource.setMethod(methodSettingCombo.getText());
+        dataSource.setProxy(proxySettingCombo.getText());
+        dataSource.setQuery(Helper.getParamString(requestParam.getItems()));
+        dataSource.setSourceType(sourceTypeCombo.getText().toLowerCase());
+        dataSource.setTimeout(timeoutText.getText());
+        dataSource.setPollingInterval(pollIntervalText.getText());
+        if (poll.getSelection() == true) {
+            dataSource.setRemoteCallRequestType("poll");
+        } else if (staticButton.getSelection() == true) {
+            dataSource.setRemoteCallRequestType("static");
+        }
+        HashMap<String, String> headers = new HashMap<String, String>();
+
+        for (TableItem item : requestParam.getItems()) {
+            if (item.getText(0).equals("header") && (item.getText(1) + item.getText(2)).trim().length() > 0) {
+                headers.put(item.getText(1), item.getText(2));
+            }
+        }
+        dataSource.setHeadersString(Helper.getHeadersString(headers));
+        dataSource.addAllHeaderInfos(headers);
+
+        JsonObject jsonObject = new JsonObject();
+        TreeItem[] items = parentDataTree.getItems();
+
+        if (items == null || items.length == 0) {
+            MessageBox messageBox = new MessageBox(remoteSourceStyledText.getShell(), SWT.ICON_ERROR);
+            messageBox.setText("Set Source Error");
+            messageBox.setMessage("Error : Data is invalid.");
+            messageBox.open();
+            return null;
+        }
+
+        for (TreeItem item : items) {
+            Helper.makeJsonFromTree(item, jsonObject);
+        }
+
+        dataSource.setJsonData(jsonObject.toString());
+        requiredPrivileges = new ArrayList<String>(Arrays.asList(INTERNET_PRIVILEGE, NETWORK_PRIVILEGE, DOWNLOAD_PRIVILEGE));
+        if (Helper.addPrivileges(settingComposite.getShell(), requiredPrivileges, project)) {
+            return dataSource;
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public Composite getSettingComposite() {
+        if (settingComposite == null) {
+            createSettingComposite();
+        }
+        return settingComposite;
+    }
+
+    private void createSettingComposite() {
+
+        settingComposite = new Composite(parentGroup, SWT.NONE);
+        FormLayout layout = new FormLayout();
+        layout.marginWidth = 5;
+        layout.marginHeight = 5;
+
+        settingComposite.setLayout(layout);
+
+        FormData data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(0, 0);
+        settingComposite.setLayoutData(data);
+
+        // Load buttton
+        Button loadButton = new Button(settingComposite, SWT.PUSH);
+        loadButton.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_RELOAD_ICON));
+        loadButton.setToolTipText("Load");
+        data = new FormData(29, 29);
+        data.bottom = new FormAttachment(100, -2);
+        data.right = new FormAttachment(100, -2);
+        loadButton.setLayoutData(data);
+        loadButton.addSelectionListener(loadEvent);
+
+        // URL Composite
+        Composite urlComposite = makeInputText(settingComposite, "URL");
+        data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        urlComposite.setLayoutData(data);
+
+        urlText = (Text) urlComposite.getData();
+
+        Listener listener = new Listener() {
+            @Override
+            public void handleEvent(Event event) {
+                if (!(event.type == SWT.FocusOut || event.type == SWT.KeyDown))
+                    return;
+                else if (event.type == SWT.KeyDown && event.keyCode != 13) {
+                    return;
+                }
+
+                String url = urlText.getText();
+                if (url.contains("?")) {
+
+                    urlText.setText(url.substring(0, url.indexOf("?")));
+                    String[] params = url.substring(url.indexOf("?") + 1).split("&");
+
+                    requestParam.removeAll();
+
+                    for (String param : params) {
+                        param = "query=" + param;
+                        String[] data = param.split("=");
+                        TableItem item = new TableItem(requestParam, SWT.BORDER);
+                        item.setText(data);
+                        makeParamCombo(item, data[0]);
+                    }
+                }
+
+                loadEvent.widgetSelected(null);
+            }
+        };
+        urlText.addListener(SWT.FocusOut, listener);
+        urlText.addListener(SWT.KeyDown, listener);
+
+        // HTTP Method Composite
+        Composite methodComposite = makeInputCombo(settingComposite, "Method", new String[] { "GET", "POST", "PUT", "DELETE" });
+        data = new FormData();
+        data.top = new FormAttachment(urlComposite, 5);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        methodComposite.setLayoutData(data);
+
+        methodSettingCombo = (CCombo) methodComposite.getData();
+        methodSettingCombo.setEnabled(false);
+
+        // HTTP Proxy Composite
+        Composite proxyComposite = makeInputCombo(settingComposite, "Proxy", new String[] { "jsonp", "ajax" });
+        data = new FormData();
+        data.top = new FormAttachment(methodComposite, 5);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        proxyComposite.setLayoutData(data);
+
+        proxySettingCombo = (CCombo) proxyComposite.getData();
+        proxySettingCombo.setEnabled(false);
+
+        // Source Type Composite
+        Composite sourceTypeComposite = makeInputCombo(settingComposite, "Source Type", SoureTypes);
+        data = new FormData();
+        data.top = new FormAttachment(proxyComposite, 5);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        sourceTypeComposite.setLayoutData(data);
+
+        sourceTypeCombo = (CCombo) sourceTypeComposite.getData();
+        sourceTypeCombo.setEnabled(false);
+
+        // Timeout Composite
+        Composite timeoutComposite = makeInputText(settingComposite, "Timeout");
+        data = new FormData();
+        data.top = new FormAttachment(sourceTypeComposite, 5);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        timeoutComposite.setLayoutData(data);
+
+        timeoutText = (Text) timeoutComposite.getData();
+        timeoutText.setText("5000");
+
+        // Radio Button Composite
+        Composite buttonComposite = new Composite(settingComposite, SWT.NONE);
+        buttonComposite.setLayout(new FormLayout());
+        poll = new Button(buttonComposite, SWT.RADIO);
+        poll.setText("Poll");
+        poll.setSelection(true);
+        poll.addSelectionListener(new SelectionListener() {
+
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                pollIntervalComposite.setVisible(true);
+                pollIntervalText.setText("5000");
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+
+            }
+        });
+        data = new FormData();
+        poll.setLayoutData(data);
+        push = new Button(buttonComposite, SWT.RADIO);
+        push.setText("Push");
+        push.setEnabled(false);
+        data = new FormData();
+        data.left = new FormAttachment(poll, 50);
+        push.setLayoutData(data);
+        staticButton = new Button(buttonComposite, SWT.RADIO);
+        staticButton.setText("Static");
+        staticButton.setEnabled(true);
+        staticButton.addSelectionListener(new SelectionListener() {
+
+            @Override
+            public void widgetSelected(SelectionEvent arg0) {
+                pollIntervalComposite.setVisible(false);
+                pollIntervalText.setText("-1");
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent arg0) {
+
+            }
+        });
+        data = new FormData();
+        data.left = new FormAttachment(push, 50);
+        staticButton.setLayoutData(data);
+        data = new FormData();
+        data.top = new FormAttachment(timeoutComposite, 5);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        buttonComposite.setLayoutData(data);
+
+        // Poll Interval Composite
+        pollIntervalComposite = makeInputText(settingComposite, "Poll Interval");
+        data = new FormData();
+        data.top = new FormAttachment(buttonComposite, 5);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        pollIntervalComposite.setLayoutData(data);
+
+        pollIntervalText = (Text) pollIntervalComposite.getData();
+        pollIntervalText.setText("5000");
+
+        // HTTP Request Parameter Composite
+        Composite queryComposite = makeQueryTable(settingComposite);
+        data = new FormData();
+        data.top = new FormAttachment(pollIntervalComposite, 5);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        data.bottom = new FormAttachment(loadButton, -3);
+        queryComposite.setLayoutData(data);
+
+        makeSourceStyledText(parentDataTree.getParent());
+    }
+
+    public Composite makeInputCombo(Composite parentComposite, String title, String[] items) {
+
+        Composite subComposite = new Composite(parentComposite, SWT.NONE);
+        FormLayout layout = new FormLayout();
+        subComposite.setLayout(layout);
+
+        Label label = new Label(subComposite, SWT.NONE);
+        label.setText(title);
+        FormData data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(0, 0);
+        label.setLayoutData(data);
+
+        CCombo combo = new CCombo(subComposite, SWT.SINGLE | SWT.BORDER | SWT.FLAT | SWT.READ_ONLY);
+        data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(30, 0);
+        data.right = new FormAttachment(100, 0);
+        combo.setLayoutData(data);
+        combo.setItems(items);
+        combo.select(0);
+
+        subComposite.setData(combo);
+
+        return subComposite;
+    }
+
+    public Composite makeInputText(Composite parentComposite, String title) {
+
+        Composite subComposite = new Composite(parentComposite, SWT.NONE);
+        FormLayout layout = new FormLayout();
+        subComposite.setLayout(layout);
+
+        Label label = new Label(subComposite, SWT.NONE);
+        label.setText(title);
+        FormData data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(0, 0);
+        label.setLayoutData(data);
+
+        Text text = new Text(subComposite, SWT.SINGLE | SWT.BORDER);
+
+        data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(30, 0);
+        data.right = new FormAttachment(100, 0);
+        text.setLayoutData(data);
+        subComposite.setData(text);
+        return subComposite;
+    }
+
+    private Composite makeQueryTable(Composite parentComposite) {
+
+        Composite subComposite = new Composite(parentComposite, SWT.NONE);
+        FormLayout layout = new FormLayout();
+        subComposite.setLayout(layout);
+
+        Label label = new Label(subComposite, SWT.NONE);
+        label.setText("Request Parameters");
+
+        FormData data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(0, 0);
+        label.setLayoutData(data);
+
+        Composite composite = new Composite(subComposite, SWT.NONE);
+
+        data = new FormData(50, 100);
+        data.top = new FormAttachment(label, 2);
+        data.right = new FormAttachment(100, 0);
+        data.left = new FormAttachment(10, 0);
+        data.bottom = new FormAttachment(100, 0);
+        composite.setLayoutData(data);
+
+        TableColumnLayout tableLayout = new TableColumnLayout();
+        composite.setLayout(tableLayout);
+
+        requestParam = new Table(composite, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+
+        requestParam.setLinesVisible(true);
+        requestParam.setHeaderVisible(true);
+
+        requestParam.addListener(SWT.MeasureItem, new Listener() {
+
+            @Override
+            public void handleEvent(Event e) {
+                e.height = 30;
+            }
+        });
+
+        TableColumn tblclmnType = new TableColumn(requestParam, SWT.LEFT);
+        tableLayout.setColumnData(tblclmnType, new ColumnWeightData(3, ColumnWeightData.MINIMUM_WIDTH, false));
+        tblclmnType.setText("Type");
+
+        TableColumn tblclmnKey = new TableColumn(requestParam, SWT.LEFT);
+        tableLayout.setColumnData(tblclmnKey, new ColumnWeightData(3, ColumnWeightData.MINIMUM_WIDTH, false));
+        tblclmnKey.setText("Key");
+
+        TableColumn tblclmnValue = new TableColumn(requestParam, SWT.LEFT);
+        tableLayout.setColumnData(tblclmnValue, new ColumnWeightData(3, ColumnWeightData.MINIMUM_WIDTH, false));
+        tblclmnValue.setText("Value");
+
+        TableColumn tblclmnButton = new TableColumn(requestParam, SWT.LEFT);
+        tableLayout.setColumnData(tblclmnButton, new ColumnWeightData(1, ColumnWeightData.MINIMUM_WIDTH, false));
+
+        final TableEditor editor = new TableEditor(requestParam);
+        editor.horizontalAlignment = SWT.LEFT;
+        editor.grabHorizontal = true;
+        editor.grabVertical = true;
+
+        makeParamCombo(new TableItem(requestParam, SWT.BORDER), "query");
+
+        requestParam.addListener(SWT.MouseDown, new Listener() {
+            public void handleEvent(Event event) {
+                Rectangle clientArea = requestParam.getClientArea();
+
+                Point pt = new Point(event.x, event.y);
+                int index = requestParam.getTopIndex();
+
+                TableItem lastItem = requestParam.getItem(requestParam.getItems().length - 1);
+                if ((lastItem.getText(1) + lastItem.getText(2)).trim().length() != 0) {
+                    makeParamCombo(new TableItem(requestParam, SWT.BORDER), "query");
+                }
+
+                while (index < requestParam.getItemCount()) {
+                    boolean visible = false;
+                    final TableItem item = requestParam.getItem(index);
+                    for (int i = 0; i < requestParam.getColumnCount(); i++) {
+                        Rectangle rect = item.getBounds(i);
+                        if (rect.contains(pt)) {
+
+                            if (requestParam.getSelection().length == 0 || !requestParam.getSelection()[0].equals(item))
+                                return;
+
+                            final int column = i;
+                            final Text text = new Text(requestParam, SWT.NONE);
+                            Listener textListener = new Listener() {
+                                public void handleEvent(final Event e) {
+                                    switch (e.type) {
+                                    case SWT.FocusOut:
+                                        item.setText(column, text.getText());
+                                        loadEvent.widgetSelected(null);
+                                        text.dispose();
+                                        break;
+                                    case SWT.Traverse:
+                                        switch (e.detail) {
+                                        case SWT.TRAVERSE_RETURN:
+                                            item.setText(column, text.getText());
+                                            // loadEvent.widgetSelected( null );
+                                            // FALL THROUGH
+                                        case SWT.TRAVERSE_ESCAPE:
+                                            text.dispose();
+                                            e.doit = false;
+                                        }
+                                        break;
+                                    }
+                                }
+                            };
+                            text.addListener(SWT.FocusOut, textListener);
+                            text.addListener(SWT.Traverse, textListener);
+                            editor.setEditor(text, item, i);
+                            text.setText(item.getText(i));
+                            text.selectAll();
+                            text.setFocus();
+                            return;
+                        }
+                        if (!visible && rect.intersects(clientArea)) {
+                            visible = true;
+                        }
+                    }
+                    if (!visible)
+                        return;
+                    index++;
+                }
+            }
+        });
+
+        return subComposite;
+    }
+
+    private void createDataSource() throws Exception {
+
+        if (urlText.getText().trim().length() == 0)
+            return;
+
+        MessageBox messageBox = new MessageBox(remoteSourceStyledText.getShell(), SWT.ICON_ERROR);
+        messageBox.setText("Set Source Error");
+        String result;
+
+        try {
+            result = Helper.callURL(urlText.getText(), methodSettingCombo.getText(), Integer.parseInt(timeoutText.getText()), requestParam.getItems());
+
+            if (result == null || result.trim().length() == 0) {
+                messageBox.setMessage("Error : Data is empty.");
+                messageBox.open();
+                return;
+            }
+
+        } catch (MalformedURLException e) {
+            for (Control control : parentDataTree.getChildren()) {
+                control.dispose();
+            }
+            parentDataTree.removeAll();
+
+            messageBox.setMessage("Error : Invalid URL.");
+            messageBox.open();
+            throw e;
+        }
+
+        remoteSourceStyledText.setText(result);
+
+        JsonElement json = null;
+
+        int type = -1;
+
+        try {
+            json = gson.fromJson(result, JsonElement.class);
+            type = 0;
+        } catch (Exception e) {
+            try {
+                json = Helper.getJsonFromXML(result);
+                type = 1;
+            } catch (SAXException e1) {
+            }
+        }
+
+        if (type >= 0)
+            sourceTypeCombo.select(type);
+
+        if (json != null) {
+            Helper.makeTreeItem(json, parentDataTree, null, true, this);
+            parent.setDataModelDirty(false);
+        } else {
+            messageBox.setMessage("Error : Can not parse the data");
+            messageBox.open();
+
+            for (Control control : parentDataTree.getChildren()) {
+                control.dispose();
+            }
+            parentDataTree.removeAll();
+        }
+    }
+
+    private void makeParamCombo(TableItem item, String value) {
+
+        TableEditor editor = new TableEditor(requestParam);
+        Combo combo = new Combo(requestParam, SWT.NONE);
+
+        editor.grabHorizontal = true;
+        editor.grabVertical = true;
+        editor.setEditor(combo, item, 0);
+        editor.layout();
+
+        combo.add("query");
+        combo.add("header");
+
+        combo.select(Arrays.asList(combo.getItems()).indexOf(value));
+
+        item.setText(combo.getText());
+        item.setData("ITEMCOMBO", editor);
+        combo.setData("EDITOR", editor);
+
+        combo.addSelectionListener(new SelectionAdapter() {
+
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Combo combo = (Combo) e.getSource();
+                TableEditor editor = (TableEditor) combo.getData("EDITOR");
+                TableItem item = editor.getItem();
+                item.setText(0, combo.getText());
+            }
+        });
+
+        editor = new TableEditor(requestParam);
+        editor.grabHorizontal = true;
+        editor.verticalAlignment = SWT.TOP;
+        Button button = new Button(requestParam, SWT.PUSH);
+        item.setData("ITEMBUTTON", editor);
+        button.setText("-");
+        button.pack();
+        button.setData("EDITOR", editor);
+        button.setToolTipText("Delete");
+        editor.minimumWidth = button.getSize().x;
+        editor.horizontalAlignment = SWT.RIGHT;
+        editor.setEditor(button, item, 3);
+        editor.layout();
+
+        button.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+
+                Button button = (Button) e.getSource();
+                Rectangle rect = button.getBounds();
+                TableItem targetItem = requestParam.getItem(new Point(rect.x + 1, rect.y + 1));
+
+                if (targetItem == null || requestParam.indexOf(targetItem) == requestParam.getItemCount() - 1)
+                    return;
+
+                TableEditor buttonEditor = (TableEditor) targetItem.getData("ITEMBUTTON");
+                TableEditor comboEditor = (TableEditor) targetItem.getData("ITEMCOMBO");
+
+                comboEditor.getEditor().setVisible(false);
+                comboEditor.getEditor().dispose();
+
+                comboEditor.dispose();
+
+                buttonEditor.getEditor().setVisible(false);
+                buttonEditor.getEditor().dispose();
+
+                buttonEditor.dispose();
+
+                targetItem.dispose();
+
+                for (TableItem item : requestParam.getItems()) {
+                    ((TableEditor) item.getData("ITEMBUTTON")).layout();
+                    ((TableEditor) item.getData("ITEMCOMBO")).layout();
+                }
+            }
+        });
+
+    }
+
+    private void makeSourceStyledText(Composite composite) {
+        remoteSourceStyledText = new StyledText(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+
+        FormData data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(0, 0);
+        remoteSourceStyledText.setLayoutData(data);
+    }
+
+    @Override
+    public void setButtonsState(Map<String, Button> dataButtonMap) {
+
+        if (dataButtonMap.get("conversionTreeAndText").getSelection()) {
+            dataButtonMap.get("upTreeItem").setEnabled(false);
+            dataButtonMap.get("downTreeItem").setEnabled(false);
+        } else {
+            dataButtonMap.get("upTreeItem").setEnabled(true);
+            dataButtonMap.get("downTreeItem").setEnabled(true);
+        }
+        dataButtonMap.get("addTreeItem").setEnabled(false);
+        dataButtonMap.get("removeTreeItem").setEnabled(false);
+        dataButtonMap.get("removeAllTreeItem").setEnabled(false);
+
+        dataButtonMap.get("conversionTreeAndText").setVisible(true);
+    }
+
+    @Override
+    public void loadData(BindingData dataSource) {
+        if (temp == null)
+            temp = dataSource;
+
+        JsonElement json = gson.fromJson(dataSource.getJsonData(), JsonElement.class);
+        urlText.setText(dataSource.getURL());
+        methodSettingCombo.select(Arrays.asList(methodSettingCombo.getItems()).indexOf(dataSource.getMethod()));
+        proxySettingCombo.select(Arrays.asList(proxySettingCombo.getItems()).indexOf(dataSource.getProxy()));
+        if (dataSource.getRemoteCallRequestType().equals("static")) {
+            pollIntervalComposite.setVisible(false);
+            pollIntervalText.setText("-1");
+            poll.setSelection(false);
+            push.setSelection(false);
+            staticButton.setSelection(true);
+        } else if (dataSource.getRemoteCallRequestType().equals("poll")) {
+            pollIntervalComposite.setVisible(true);
+            pollIntervalText.setText(dataSource.getPollingInterval());
+            poll.setSelection(true);
+            push.setSelection(false);
+            staticButton.setSelection(false);
+        }
+        sourceTypeCombo.select(Arrays.asList(SoureTypes).indexOf(dataSource.getSourceType().toUpperCase()));
+        timeoutText.setText(dataSource.getTimeout());
+        requestParam.removeAll();
+
+        for (Control control : requestParam.getChildren())
+            control.dispose();
+
+        if (dataSource.getHeaders() != null) {
+            for (Entry<String, String> entry : dataSource.getHeaders().entrySet()) {
+                TableItem item = new TableItem(requestParam, SWT.BORDER);
+                item.setText(1, "header");
+                item.setText(1, entry.getKey());
+                item.setText(2, entry.getValue());
+                makeParamCombo(item, "header");
+            }
+        }
+
+        String query = dataSource.getQuery();
+        if (!query.isEmpty()) {
+            setParamString(query);
+        }
+
+        makeParamCombo(new TableItem(requestParam, SWT.BORDER), "query");
+
+        if (dataSource.getJsonData() != null) {
+            remoteSourceStyledText.setText(dataSource.getJsonData());
+        }
+
+        if (!parent.isDataModelDirty()) {
+            parentDataTree.removeAll();
+            for (Control control : parentDataTree.getChildren()) {
+                control.dispose();
+            }
+
+            Helper.makeTreeItem(json, parentDataTree, null, true, this);
+        }
+    }
+
+    private void setParamString(String query) {
+        String[] params = query.split("&");
+        for (int i = 0; i < params.length; i++) {
+            String[] param = ("query=" + params[i]).split("=");
+            if (param.length == 0) {
+                continue;
+            } else {
+                TableItem item = new TableItem(requestParam, SWT.BORDER);
+                item.setText(param);
+                makeParamCombo(item, param[0]);
+            }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/SetModelTargetDialog.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/SetModelTargetDialog.java
new file mode 100644 (file)
index 0000000..59f37cd
--- /dev/null
@@ -0,0 +1,351 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.dialog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.efluibuilder.core.configurator.Configurator;
+import org.tizen.efluibuilder.model.descriptors.DescriptorManager;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.WidgetDescriptor;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+
+public class SetModelTargetDialog extends Dialog {
+       private Object widgetContents;
+       private Viewer propertyList;
+       private Part selectedPart;
+       private String selectedWidgetPropertyName;
+       private ListViewer listViewer;
+
+       DescriptorManager descriptorManager;
+
+       private static class WidgetTreeViewerLabelProvider implements ILabelProvider {
+
+               @Override
+               public void removeListener(ILabelProviderListener arg0) {
+                       // TODO Auto-generated method stub
+
+               }
+
+               @Override
+               public boolean isLabelProperty(Object arg0, String arg1) {
+                       // TODO Auto-generated method stub
+                       return false;
+               }
+
+               @Override
+               public void dispose() {
+                       // TODO Auto-generated method stub
+
+               }
+
+               @Override
+               public void addListener(ILabelProviderListener arg0) {
+                       // TODO Auto-generated method stub
+
+               }
+
+               @Override
+               public String getText(Object element) {
+                       return ((Part) element).getPropertyValue("id");
+               }
+
+               @Override
+               public Image getImage(Object arg0) {
+                       // TODO Auto-generated method stub
+                       return null;
+               }
+       }
+
+       private class WidgetTreeViewerSelectionChangedListener implements ISelectionChangedListener {
+
+               @Override
+               public void selectionChanged(SelectionChangedEvent event) {
+                       // if the selection is empty clear the label
+                       if (event.getSelection().isEmpty()) {
+                               return;
+                       }
+                       if (event.getSelection() instanceof IStructuredSelection) {
+                               IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+
+                               selectedPart = (Part) selection.getFirstElement();
+
+                               Configurator configurator = Configurator.of(selectedPart.getOwnerDocumentPart().getPlatform());
+                               descriptorManager = configurator.getDescriptorManager();
+                               WidgetDescriptor selectedWidgetDescriptor = descriptorManager
+                                               .getWidgetDescriptor(selectedPart.getDescriptorId());
+                               List<PropertyDescriptor> propertyDescriptors = selectedWidgetDescriptor.getPropertyDescriptors();
+
+                               if (propertyList != null) {
+                                       List inputList = new ArrayList<PropertyDescriptor>();
+                                       for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
+
+                                               if (propertyDescriptor.getPropertyName()
+                                                               .equalsIgnoreCase(BuilderConstants.ATTRIBUTE_DATA_BIND)) {
+                                                       inputList.add(propertyDescriptor);
+                                               }
+                                       }
+                                       propertyList.setInput(inputList);
+                               }
+                               Button ok = getButton(IDialogConstants.OK_ID);
+                               if (ok != null) {
+                                       ok.setEnabled(false);
+                               }
+                               selectedWidgetPropertyName = null;
+                               if(listViewer.getElementAt(0)!=null)
+                                       listViewer.setSelection(new StructuredSelection(listViewer.getElementAt(0)),true);
+                       }
+               }
+       }
+
+       private class WidgetTreeViewerContentProvider implements ITreeContentProvider {
+
+               @Override
+               public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
+               }
+
+               @Override
+               public void dispose() {
+                       // TODO Auto-generated method stub
+
+               }
+
+               @Override
+               public boolean hasChildren(Object element) {
+
+                       return (numComponentTypeChildren((Part) element) > 0);
+               }
+
+               @Override
+               public Object getParent(Object element) {
+                       Part partElement = (Part) element;
+                       return partElement.getParent();
+               }
+
+               @Override
+               public Object[] getElements(Object inputElement) {
+                       List rootElements = new ArrayList<Part>();
+                       for (Part part : ((Part) inputElement).getChildren()) {
+                               if (hasChildren(part) && part.getType() == PartType.COMPONENT) {
+
+                                       rootElements.add(part);
+                               }
+                       }
+                       return rootElements.toArray();
+               }
+
+               @Override
+               public Object[] getChildren(Object parentElement) {
+                       List rootElements = new ArrayList<Part>();
+                       for (final Part part : ((Part) parentElement).getChildren()) {
+                               if (part.getType() == PartType.COMPONENT) {
+                                       rootElements.add(part);
+                               }
+                       }
+                       return rootElements.toArray();
+               }
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see
+        * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets
+        * .Composite)
+        */
+       @Override
+       protected Control createDialogArea(Composite parent) {
+
+               Composite area = (Composite) super.createDialogArea(parent);
+
+               Composite container = new Composite(area, SWT.FILL);
+               container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+               GridLayout layout = new GridLayout(2, true);
+               container.setLayout(layout);
+
+               createWidgetTreeList(container);
+
+               createPropertyListViewer(container);
+
+               return area;
+       }
+
+       @Override
+       protected void configureShell(Shell newShell) {
+               super.configureShell(newShell);
+               newShell.setText("Set Target");
+       }
+
+       @Override
+       protected void createButtonsForButtonBar(Composite parent) {
+               // TODO Auto-generated method stub
+               super.createButtonsForButtonBar(parent);
+               Button ok = getButton(IDialogConstants.OK_ID);
+               if (ok != null) {
+                       ok.setEnabled(false);
+               }
+       }
+
+       private void createPropertyListViewer(Composite parent) {
+               listViewer = new ListViewer(parent);
+               GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+        data.minimumWidth = 100;
+        data.minimumHeight = 350;
+        listViewer.getList().setLayoutData(data);
+               // TODO: Create Separate class for IStructuredContentProvider
+               listViewer.setContentProvider(new IStructuredContentProvider() {
+
+                       @Override
+                       public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
+
+                       }
+
+                       @Override
+                       public void dispose() {
+                       }
+
+                       @Override
+                       public Object[] getElements(Object inputElements) {
+
+                               List<String> propNameList = new ArrayList<String>();
+
+                               for (PropertyDescriptor prop : ((List<PropertyDescriptor>) inputElements)) {
+
+                                       // data binding type is defined as 'text@data-binding'
+                                       propNameList.add(prop.getPropertyType().split("@")[0]);
+
+                               }
+                               return propNameList.toArray();
+                       }
+               });
+
+               listViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+                       @Override
+                       public void selectionChanged(SelectionChangedEvent event) {
+                               // if the selection is empty clear the label
+                               if (event.getSelection().isEmpty()) {
+                                       return;
+                               }
+                               if (event.getSelection() instanceof IStructuredSelection) {
+                                       IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+
+                                       selectedWidgetPropertyName = (String) selection.getFirstElement();
+                                       Button ok = getButton(IDialogConstants.OK_ID);
+                    if(ok != null){
+                        ok.setEnabled(true);
+                    }
+                               }
+                       }
+               });
+
+               propertyList = listViewer;
+       }
+
+       private int numComponentTypeChildren(Part element) {
+               // TODO: Confirm algorithm to decide it
+               // For time being, count all component type child
+               // parts and if it is greater than zero, then it's a
+               // container type of component
+               int count = 0;
+               List<Part> children = element.getChildren();
+               for (int i = 0; i < children.size(); ++i) {
+                       if (children.get(i).getType() == PartType.COMPONENT) {
+                               ++count;
+                       }
+               }
+               return count;
+       }
+
+       // TODO: Solve widget alignment and placement issue
+       private void createWidgetTreeList(Composite parent) {
+               // Consult: This article
+               // http://www.eclipse.org/articles/Article-TreeViewer/TreeViewerArticle.htm?PHPSESSID=4d48764999a9cb66a7fd58a954ef2131
+
+               TreeViewer widgetTreeViewer = new TreeViewer(parent, SWT.SINGLE);
+               GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+               data.minimumWidth = 200;
+               data.minimumHeight = 350;
+               widgetTreeViewer.getTree().setLayoutData(data);
+               widgetTreeViewer.setContentProvider(new WidgetTreeViewerContentProvider());
+
+               widgetTreeViewer.addSelectionChangedListener(new WidgetTreeViewerSelectionChangedListener());
+
+               widgetTreeViewer.setLabelProvider(new WidgetTreeViewerLabelProvider());
+
+               widgetTreeViewer.setInput(widgetContents);
+       }
+
+       public SetModelTargetDialog(Shell parent) {
+               super(parent);
+
+       }
+
+       /**
+        * @param widgetContents
+        *            the widgetContents to set
+        */
+       public void setWidgetContents(Object widgetContents) {
+               this.widgetContents = widgetContents;
+       }
+
+       /**
+        * @return the selectedWidgetProperty
+        */
+       public String getSelectedWidgetPropertyName() {
+               return selectedWidgetPropertyName;
+       }
+
+       /**
+        * @return the selectedPart
+        */
+       public Part getSelectedPart() {
+               return selectedPart;
+       }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/SetSourcePage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/SetSourcePage.java
new file mode 100644 (file)
index 0000000..8072571
--- /dev/null
@@ -0,0 +1,1273 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.dialog;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.custom.TreeEditor;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSource;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingObject;
+import org.tizen.efluibuilder.ui.view.databinding.model.TreeItemData;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.Helper;
+import org.tizen.efluibuilder.ui.view.databinding.utils.Helper.DataSourceType;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+
+public class SetSourcePage extends Dialog {
+
+       private Shell shell;
+       private TreeItem dataSourceTreeItem;
+       private BindingData dataSource;
+       private IProject project;
+
+       private StackLayout setttingStackLayout;
+       private StackLayout dataStackLayout;
+
+       private StaticSubPage staticSubPage;
+       private CallHistorySubPage callHistorySubPage;
+       private ContactSubPage contactSubPage;
+       private SourceDialogSubPage currentSubPage;
+
+       private CCombo dataTypeCombo;
+       private CLabel typeDesc;
+       private Tree dialogTree;
+       private Composite treeComposite;
+       private Composite dataComposite;
+
+       private Group dataModelGroup;
+
+       private SashForm sashForm;
+
+       private boolean isDataModelDirty = false;
+
+       private Map<String, Button> dataButtonMap = new HashMap<String, Button>();
+
+       private List<String> types = Arrays
+                       .asList(new String[] { "Boolean", "Number", "String", "Object", "Array", "Index", "Undefined" });
+
+       private DataSourceType[] dataSourceTypes = DataSourceType.values();
+    private RemoteCallSubPage remoteCallSubPage;
+
+       /**
+        * Constructor.
+        * 
+        * @param parent
+        * @param dataSourceTreeItem
+        * @param project
+        */
+       public SetSourcePage(Shell parent, TreeItem dataSourceTreeItem, IProject project) {
+               super(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+               setText("Set Source");
+               this.dataSourceTreeItem = dataSourceTreeItem;
+               this.project = project;
+       }
+
+       /**
+        * Opens the dialog and returns the input
+        * 
+        * @return message
+        */
+       public BindingData open() {
+               // Create the dialog window
+               shell = new Shell(getParent(), SWT.TITLE | SWT.CLOSE | SWT.BORDER | SWT.RESIZE | SWT.APPLICATION_MODAL);
+               shell.setText(getText());
+               createContents();
+               shell.pack();
+
+               TreeItemData treeItemData = (TreeItemData) dataSourceTreeItem.getData("TREEITEMDATA");
+               if (treeItemData != null)
+                       loadParentData(treeItemData);
+
+               shell.open();
+               Display display = getParent().getDisplay();
+               while (!shell.isDisposed()) {
+                       if (!display.readAndDispatch()) {
+                               display.sleep();
+                       }
+               }
+
+               return dataSource;
+       }
+
+       /**
+        * Creates the dialog's contents
+        */
+       private void createContents() {
+
+               FormLayout layout = new FormLayout();
+               shell.setLayout(layout);
+               layout.marginWidth = 5;
+               layout.marginHeight = 5;
+
+               Group typeGroup = makeTypeGroup(shell);
+               Composite baseGroup = makeBaseGroup(shell, typeGroup);
+
+               sashForm = new SashForm(baseGroup, SWT.HORIZONTAL);
+
+               FormData sashData = new FormData();
+               sashData.top = new FormAttachment(0, 0);
+               sashData.bottom = new FormAttachment(100, 0);
+               sashData.left = new FormAttachment(0, 0);
+               sashData.right = new FormAttachment(100, 0);
+               sashForm.setLayoutData(sashData);
+
+               Group settingGroup = new Group(sashForm, SWT.NONE);
+               dataModelGroup = new Group(sashForm, SWT.NONE);
+
+               sashForm.setWeights(new int[] { 2, 3 });
+
+               makeDataModelGroup(dataModelGroup);
+               makeSettingGroup(settingGroup);
+
+               // Create the cancel button and add a handler
+               // so that pressing it will set input to null
+               Button cancelButton = new Button(shell, SWT.PUSH);
+               cancelButton.setText("CANCEL");
+
+               FormData data = new FormData(100, 30);
+               data.top = new FormAttachment(baseGroup, 5);
+               data.right = new FormAttachment(100, -5);
+               data.bottom = new FormAttachment(100, -5);
+
+               cancelButton.setLayoutData(data);
+
+               cancelButton.addSelectionListener(new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent event) {
+                               dataSource = null;
+                               shell.close();
+                       }
+               });
+
+               // Create the OK button and add a handler
+               // so that pressing it will set input
+               // to the entered value
+               Button okButton = new Button(shell, SWT.PUSH);
+               okButton.setText("OK");
+
+               data = new FormData(100, 30);
+               data.top = new FormAttachment(baseGroup, 5);
+               data.right = new FormAttachment(cancelButton, -5);
+               data.bottom = new FormAttachment(100, -5);
+
+               okButton.setLayoutData(data);
+
+               okButton.addSelectionListener(new SelectionAdapter() {
+
+                       public void widgetSelected(SelectionEvent event) {
+                           TreeItemData treeItemData = (TreeItemData) dataSourceTreeItem.getData("TREEITEMDATA");
+                if (treeItemData == null) {
+                    return;
+                }
+                BindingData dataModel = currentSubPage.getData();
+
+                               if (dataModel == null)
+                                       return;
+
+                String type = null;
+                for (DataSourceType dataSourceType : dataSourceTypes) {
+                    if(dataSourceType.getLabel().equals(dataTypeCombo.getText())){
+                        type = dataSourceType.getValue();
+                    }
+                }
+                dataModel.setModelType(type);
+                               dataModel.setSourceName(dataSourceTreeItem.getText());
+                               TreeItem[] treeItems = dialogTree.getItems();
+
+                               for (TreeItem item : treeItems) {
+                                   BindingObject bindingObject = (BindingObject) PartUtil.createPart(PartType.BINDINGOBJECT, LayoutSchemaConstants.BINDINGOBJECT);
+                                   bindingObject.setName(item.getText(0));
+                                   bindingObject.setValue(item.getText(1));
+                                   bindingObject.setValueType(item.getText(2));
+                                       dataModel.insertChildBefore(bindingObject, null);
+                                       makeBindingDataFromTree(item, bindingObject);
+                               }
+
+                               dataSource = dataModel;
+                               shell.close();
+                       }
+               });
+       }
+
+       private void makeBindingDataFromTree(TreeItem parentItem, BindingObject parentBindingObject) {
+               String type = parentItem.getText(2);
+
+               TreeItem[] items = parentItem.getItems();
+
+               if (type.equals("Array")) {
+                       for (TreeItem item : items) {
+                               if (item.getText(2).equals("Index") && !item.getText(1).isEmpty()) {
+                                   BindingObject bo = (BindingObject) PartUtil.createPart(PartType.BINDINGOBJECT, LayoutSchemaConstants.BINDINGOBJECT);
+                    bo.setName(item.getText(0));
+                    bo.setValue(item.getText(1));
+                    bo.setValueType(item.getText(2));
+                                   parentBindingObject.insertChildBefore(bo, null);
+                                       for (TreeItem subItem : item.getItems()) {
+
+                                               if (subItem.getText(0).trim().length() == 0)
+                                                       continue;
+
+                                               BindingObject bindingData = (BindingObject) PartUtil.createPart(PartType.BINDINGOBJECT, LayoutSchemaConstants.BINDINGOBJECT);
+                                               bindingData.setName(item.getText(0));
+                                               bindingData.setValue(item.getText(1));
+                                               bindingData.setValueType(item.getText(2));
+                                               parentBindingObject.insertChildBefore(bindingData, null);
+                                               makeBindingDataFromTree(subItem, bindingData);
+                                       }
+                               } else {
+                                   BindingObject bindingData = (BindingObject) PartUtil.createPart(PartType.BINDINGOBJECT, LayoutSchemaConstants.BINDINGOBJECT);
+                    bindingData.setName(item.getText(0));
+                    bindingData.setValue(item.getText(1));
+                    bindingData.setValueType(item.getText(2));
+                                       parentBindingObject.insertChildBefore(bindingData, null);
+                                       makeBindingDataFromTree(item, bindingData);
+                               }
+                       }
+               } else {
+                       for (TreeItem item : items) {
+                           BindingObject bindingData = (BindingObject) PartUtil.createPart(PartType.BINDINGOBJECT, LayoutSchemaConstants.BINDINGOBJECT);
+                bindingData.setName(item.getText(0));
+                bindingData.setValue(item.getText(1));
+                bindingData.setValueType(item.getText(2));
+                               parentBindingObject.insertChildBefore(bindingData, null);
+                               makeBindingDataFromTree(item, bindingData);
+                       }
+               }
+       }
+
+       private void loadParentData(TreeItemData treeItemData) {
+               BindingData dataModel = treeItemData.getModel();
+
+               if (dataModel != null) {
+                       if (dataModel.getModelType().equals(BuilderConstants.DATABINDING_TYPE_EMPTY)) {
+                               dataTypeCombo.select(0);
+                       } else {
+                String modelType = dataModel.getModelType();
+                for (DataSourceType dataBindingType : dataSourceTypes) {
+                    if (dataBindingType.getValue().equals(modelType)) {
+                        dataTypeCombo.setText(dataBindingType.getLabel());
+                    }
+                }
+                       }
+                       initByType();
+                       try {
+                               currentSubPage.loadData(dataModel);
+                       } catch (Exception e) {
+                       }
+                       currentSubPage.setButtonsState(dataButtonMap);
+               }
+       }
+
+       private Group makeTypeGroup(Shell shell) {
+               Group typeGroup = new Group(shell, SWT.NONE);
+               typeGroup.setText("Data Type");
+
+               FormData data = new FormData();
+               data.top = new FormAttachment(0, 5);
+               data.left = new FormAttachment(0, 5);
+               data.right = new FormAttachment(100, -5);
+               typeGroup.setLayoutData(data);
+               typeGroup.setLayout(new FormLayout());
+
+               dataTypeCombo = new CCombo(typeGroup, SWT.READ_ONLY | SWT.BORDER | SWT.SINGLE);
+               data = new FormData();
+               data.top = new FormAttachment(0, 0);
+               data.left = new FormAttachment(0, 0);
+               dataTypeCombo.setLayoutData(data);
+
+               int count = 0;
+               String[] dataTypeItems = new String[dataSourceTypes.length];
+               for (DataSourceType dataSourceType : dataSourceTypes) {
+            dataTypeItems[count++] = dataSourceType.getLabel();
+        }
+               dataTypeCombo.setItems(dataTypeItems);
+               dataTypeCombo.setVisibleItemCount(dataSourceTypes.length);
+               dataTypeCombo.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
+               dataTypeCombo.addSelectionListener(new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent e) {
+
+                               for (Control control : dialogTree.getChildren()) {
+                                       control.dispose();
+                               }
+
+                               dialogTree.removeAll();
+
+                               initByType();
+
+                               currentSubPage.setButtonsState(dataButtonMap);
+                       }
+               });
+
+               typeDesc = new CLabel(typeGroup, SWT.NONE);
+               typeDesc.setText("Call history API Is supported only on real devices.");
+
+               data = new FormData();
+               data.top = new FormAttachment(0, 0);
+               data.left = new FormAttachment(dataTypeCombo, 10);
+               typeDesc.setLayoutData(data);
+
+               return typeGroup;
+       }
+
+       private void initByType() {
+               int settingWeight = 3;
+               int shshWidth = 1;
+               Composite dataCompositeParent = dataModelGroup;
+               typeDesc.setVisible(false);
+               if (dataTypeCombo.getText().equals(DataSourceType.STATIC.getLabel())) {
+                       currentSubPage = staticSubPage;
+                       settingWeight = 0;
+                       shshWidth = 0;
+                       dataCompositeParent = staticSubPage.getDataComposite();
+               } else if (dataTypeCombo.getText().equals(DataSourceType.REMOTE.getLabel())) {
+                       currentSubPage = remoteCallSubPage;
+               } /*else if (dataTypeCombo.getText().equals(DataSourceType.CALL_HISTORY.getLabel())) {
+                       currentSubPage = callHistorySubPage;
+               } else if (dataTypeCombo.getText().equals(DataSourceType.CONTACT.getLabel())) {
+                       currentSubPage = contactSubPage;
+               } else {
+                       // TODO: Handle other sources
+               }*/
+
+               sashForm.setWeights(new int[] { 2, settingWeight });
+               sashForm.setSashWidth(shshWidth);
+               dataComposite.setParent(dataCompositeParent);
+               dataComposite.getParent().layout();
+
+               Composite composite = currentSubPage.getSettingComposite();
+               setttingStackLayout.topControl = composite;
+               composite.getParent().layout();
+               isDataModelDirty = false;
+       }
+
+       private Composite makeBaseGroup(Shell shell, Group typeGroup) {
+               Composite mainGroup = new Composite(shell, SWT.NONE);
+
+               FormLayout mainLayout = new FormLayout();
+
+               FormData mainFormData = new FormData();
+               mainFormData.top = new FormAttachment(typeGroup, 5);
+               mainFormData.bottom = new FormAttachment(100, -35);
+               mainFormData.left = new FormAttachment(0, 5);
+               mainFormData.right = new FormAttachment(100, -5);
+
+               mainGroup.setLayout(mainLayout);
+               mainGroup.setLayoutData(mainFormData);
+
+               return mainGroup;
+       }
+
+       private Group makeDataModelGroup(Group dataGroup) {
+
+               dataGroup.setText("Data Source Schema");
+               FormLayout layout = new FormLayout();
+               dataGroup.setLayout(layout);
+
+               dataComposite = new Composite(dataGroup, SWT.NONE);
+
+               FormData data = new FormData();
+               data.top = new FormAttachment(0, 0);
+               data.left = new FormAttachment(0, 0);
+               data.right = new FormAttachment(100, 0);
+               data.bottom = new FormAttachment(100, 0);
+               dataComposite.setLayoutData(data);
+
+               dataComposite.setLayout(new FormLayout());
+
+               makeDataButtons(dataComposite);
+
+               treeComposite = new Composite(dataComposite, SWT.NONE);
+               data = new FormData();
+               data.top = new FormAttachment(dataButtonMap.get("expandAll"), 2);
+               data.left = new FormAttachment(0, 0);
+               data.right = new FormAttachment(100, 0);
+               data.bottom = new FormAttachment(100, 0);
+               treeComposite.setLayoutData(data);
+
+               dataStackLayout = new StackLayout();
+               treeComposite.setLayout(dataStackLayout);
+
+               makeDataTree(treeComposite);
+
+               dataStackLayout.topControl = dialogTree;
+
+               dataGroup.layout();
+               return dataGroup;
+       }
+
+       private void makeDataButtons(Composite dataGroup) {
+
+               Button expandAllButton = new Button(dataGroup, SWT.FLAT);
+               expandAllButton.setImage(
+                               ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_DATA_EXPAND_ALL_ICON));
+               expandAllButton.setToolTipText("Expand All Fields");
+
+               FormData data = new FormData(29, 29);
+               data.top = new FormAttachment(2, 0);
+               data.left = new FormAttachment(0, 0);
+
+               expandAllButton.setLayoutData(data);
+               dataButtonMap.put("expandAll", expandAllButton);
+
+               SelectionAdapter adapter = new SelectionAdapter() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               boolean isExpand;
+                               Button bt = (Button) e.getSource();
+                               if (bt.getData("expand") != null && (Boolean) bt.getData("expand")) {
+                                       isExpand = true;
+                               } else {
+                                       isExpand = false;
+                               }
+
+                               for (TreeItem treeItem : dialogTree.getItems()) {
+                                       doExpend(treeItem, isExpand);
+                               }
+                       }
+
+                       private void doExpend(TreeItem treeItems, boolean expand) {
+                               treeItems.setExpanded(expand);
+                               for (TreeItem treeItem : treeItems.getItems()) {
+                                       doExpend(treeItem, expand);
+                               }
+                       }
+               };
+               expandAllButton.setData("expand", true);
+               expandAllButton.addSelectionListener(adapter);
+
+               Button collapseAllButton = new Button(dataGroup, SWT.FLAT);
+               collapseAllButton.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+                               BuilderConstants.DATABINDING_DATA_COLLAPSE_ALL_ICON));
+               collapseAllButton.setToolTipText("Collapse All Fields");
+               collapseAllButton.setData("expand", false);
+               collapseAllButton.addSelectionListener(adapter);
+
+               data = new FormData(29, 29);
+               data.top = new FormAttachment(2, 0);
+               data.left = new FormAttachment(expandAllButton, 2);
+
+               collapseAllButton.setLayoutData(data);
+               dataButtonMap.put("collapseAll", collapseAllButton);
+
+               Button conversionButtonBetweenTreeAndText = new Button(dataGroup, SWT.TOGGLE | SWT.FLAT);
+               conversionButtonBetweenTreeAndText.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+                               BuilderConstants.DATABINDING_DATA_VIEW_SOURCE_ICON));
+               conversionButtonBetweenTreeAndText.setToolTipText("View Source");
+
+               data = new FormData(29, 29);
+               data.top = new FormAttachment(2, 0);
+               data.right = new FormAttachment(100, -2);
+               conversionButtonBetweenTreeAndText.setLayoutData(data);
+
+               conversionButtonBetweenTreeAndText.addSelectionListener(new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent event) {
+                               Button button = (Button) event.getSource();
+
+                               if (button.getSelection()) {
+                                       button.setToolTipText("View Tree");
+                                       // TODO: FIXME
+                                       // dataStackLayout.topControl =
+                                       // remoteCallSubPage.getDataSourceStyledText();
+                                       button.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+                                                       BuilderConstants.DATABINDING_DATA_VIEW_TREE_ICON));
+                               } else {
+                                       dataStackLayout.topControl = dialogTree;
+                                       button.setToolTipText("View Source");
+                                       button.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+                                                       BuilderConstants.DATABINDING_DATA_VIEW_SOURCE_ICON));
+                               }
+                               currentSubPage.setButtonsState(dataButtonMap);
+                               dialogTree.getParent().layout();
+                       }
+               });
+               dataButtonMap.put("conversionTreeAndText", conversionButtonBetweenTreeAndText);
+
+               Label verticalSeparator = new Label(dataGroup, SWT.SEPARATOR | SWT.VERTICAL);
+               data = new FormData(1, 29);
+               data.top = new FormAttachment(2, 0);
+               data.right = new FormAttachment(conversionButtonBetweenTreeAndText, -2);
+               verticalSeparator.setLayoutData(data);
+
+               Button downTreeItemButton = new Button(dataGroup, SWT.PUSH | SWT.FLAT);
+               downTreeItemButton.setImage(
+                               ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_DATA_DOWN_ICON));
+               downTreeItemButton.setToolTipText("Move Down");
+
+               data = new FormData(29, 29);
+               data.top = new FormAttachment(2, 0);
+               data.right = new FormAttachment(verticalSeparator, -2);
+
+               downTreeItemButton.setLayoutData(data);
+               downTreeItemButton.addSelectionListener(new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent event) {
+                               moveItem(false);
+                               isDataModelDirty = true;
+                       }
+               });
+               dataButtonMap.put("downTreeItem", downTreeItemButton);
+
+               Button upTreeItemButton = new Button(dataGroup, SWT.PUSH | SWT.FLAT);
+               upTreeItemButton.setImage(
+                               ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_DATA_UP_ICON));
+               upTreeItemButton.setToolTipText("Move Up");
+
+               data = new FormData(29, 29);
+               data.top = new FormAttachment(2, 0);
+               data.right = new FormAttachment(downTreeItemButton, -2);
+               upTreeItemButton.setLayoutData(data);
+
+               upTreeItemButton.addSelectionListener(new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent event) {
+                               moveItem(true);
+                               isDataModelDirty = true;
+                       }
+               });
+               dataButtonMap.put("upTreeItem", upTreeItemButton);
+
+               verticalSeparator = new Label(dataGroup, SWT.SEPARATOR | SWT.VERTICAL);
+               data = new FormData(1, 29);
+               data.top = new FormAttachment(2, 0);
+               data.right = new FormAttachment(upTreeItemButton, -2);
+               verticalSeparator.setLayoutData(data);
+
+               Button removeAllTreeItemButton = new Button(dataGroup, SWT.PUSH | SWT.FLAT);
+               removeAllTreeItemButton.setImage(
+                               ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_DATA_REMOVE_ALL_ICON));
+               removeAllTreeItemButton.setToolTipText("Remove All");
+
+               data = new FormData(29, 29);
+               data.top = new FormAttachment(2, 0);
+               data.right = new FormAttachment(verticalSeparator, -2);
+               removeAllTreeItemButton.setLayoutData(data);
+
+               removeAllTreeItemButton.addSelectionListener(new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent event) {
+                               removeAllItems();
+                               isDataModelDirty = true;
+                       }
+               });
+               dataButtonMap.put("removeAllTreeItem", removeAllTreeItemButton);
+
+               Button removeTreeItemButton = new Button(dataGroup, SWT.PUSH | SWT.FLAT);
+               removeTreeItemButton.setImage(
+                               ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_DATA_REMOVE_ICON));
+               removeTreeItemButton.setToolTipText("Remove");
+
+               data = new FormData(29, 29);
+               data.top = new FormAttachment(2, 0);
+               data.right = new FormAttachment(removeAllTreeItemButton, -2);
+
+               removeTreeItemButton.setLayoutData(data);
+               removeTreeItemButton.addSelectionListener(new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent event) {
+                               removeItem();
+                               isDataModelDirty = true;
+                       }
+               });
+               dataButtonMap.put("removeTreeItem", removeTreeItemButton);
+
+               Button addTreeItemButton = new Button(dataGroup, SWT.PUSH | SWT.FLAT);
+               addTreeItemButton.setImage(
+                               ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_DATA_ADD_ICON));
+               addTreeItemButton.setToolTipText("Add New Field");
+
+               data = new FormData(29, 29);
+               data.top = new FormAttachment(2, 0);
+               data.right = new FormAttachment(removeTreeItemButton, -2);
+               addTreeItemButton.setLayoutData(data);
+
+               addTreeItemButton.addSelectionListener(new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent event) {
+                               addItem();
+                               isDataModelDirty = true;
+                       }
+               });
+               dataButtonMap.put("addTreeItem", addTreeItemButton);
+       }
+
+       private void makeDataTree(Composite treeComposite) {
+
+               Button expandAll = new Button(treeComposite, SWT.FLAT);
+               expandAll.setToolTipText("Exapnd All fields");
+
+               FormData data = new FormData(33, 33);
+               data.top = new FormAttachment(2, 0);
+               data.left = new FormAttachment(2, 0);
+
+               expandAll.setLayoutData(data);
+
+               dialogTree = new Tree(treeComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
+
+               dialogTree.addListener(SWT.MeasureItem, new Listener() {
+                       @Override
+                       public void handleEvent(Event event) {
+                               event.height = 19;
+                       }
+               });
+
+               dialogTree.addMouseListener(new MouseAdapter() {
+                       @Override
+                       public void mouseDoubleClick(MouseEvent e) {
+                               if (dialogTree.getSelection().length > 0) {
+                                       if (dialogTree.getSelection()[0].getExpanded())
+                                               dialogTree.getSelection()[0].setExpanded(false);
+                                       else
+                                               dialogTree.getSelection()[0].setExpanded(true);
+                               }
+                       }
+               });
+
+               dialogTree.setLinesVisible(true);
+               dialogTree.setHeaderVisible(true);
+
+               data = new FormData();
+               data.top = new FormAttachment(expandAll, 2);
+               data.left = new FormAttachment(0, 0);
+               dialogTree.setLayoutData(data);
+
+               TreeColumn column1 = new TreeColumn(dialogTree, SWT.LEFT);
+               column1.setText("Field");
+               column1.setWidth(140);
+               TreeColumn column2 = new TreeColumn(dialogTree, SWT.LEFT);
+               column2.setText("Data");
+               column2.setWidth(100);
+               TreeColumn column3 = new TreeColumn(dialogTree, SWT.LEFT);
+               column3.setText("Type");
+               column3.setWidth(80);
+
+               dialogTree.addControlListener(new ControlAdapter() {
+                       public void controlResized(ControlEvent e) {
+                               Tree tree = (Tree) e.getSource();
+                               tree.getColumn(1).setWidth(tree.getClientArea().width - tree.getColumn(0).getWidth() - 95);
+                       }
+               });
+
+               final TreeEditor treeEditor = new TreeEditor(dialogTree);
+               treeEditor.horizontalAlignment = SWT.LEFT;
+               treeEditor.grabHorizontal = true;
+
+               dialogTree.addMouseListener(new MouseAdapter() {
+                       public void mouseDoubleClick(MouseEvent e) {
+                               Point point = new Point(e.x, e.y);
+                               final TreeItem treeItem = dialogTree.getItem(point);
+                               if (treeItem == null) {
+                                       dialogTree.deselectAll();
+                                       return;
+                               }
+
+                               for (int i = 0; i < dialogTree.getColumnCount(); i++) {// this
+                                                                                                                                               // is
+                                                                                                                                               // the
+                                                                                                                                               // column
+                                                                                                                                               // that
+                                                                                                                                               // was
+                                                                                                                                               // clicked
+                                       final int column = i;
+                                       Rectangle rect = treeItem.getBounds(column);
+                                       if (rect.contains(point)) {
+
+                                               TreeItemData data = (TreeItemData) treeItem.getData("TREEITEMDATA");
+                                               String type = treeItem.getText(2);
+
+                                               if (data.getSource().equals("original") && column != 1) {
+                                                       return;
+                                               } else if (!types.contains(data.getObjectType()) && treeItem.getData("") == null)
+                                                       return;
+                                               else if ((type.equals("Index") || type.equals("IndexObject")) && (column == 0 || column == 2))
+                                                       return;
+                                               else if ((type.equals("Object") || type.equals("Array")) && column != 0)
+                                                       return;
+
+                                               if (column == 1 && !(currentSubPage instanceof StaticSubPage))
+                                                       return;
+
+                                               Control oldEditor = treeEditor.getEditor();
+                                               if (oldEditor != null) {
+                                                       oldEditor.dispose();
+                                               }
+
+                                               // Create a text field to do the editing
+                                               final Text text = new Text(dialogTree, SWT.NONE);
+                                               text.setText(treeItem.getText(column));
+                                               text.selectAll();
+                                               text.setFocus();
+
+                                               // If the text field loses focus, set its text into the
+                                               // tree and end the editing session
+                                               text.addFocusListener(new FocusAdapter() {
+                                                       public void focusLost(FocusEvent event) {
+                                                               treeItem.setText(column, text.getText());
+                                                               isDataModelDirty = true;
+                                                               if (currentSubPage instanceof StaticSubPage) {
+                                                                       staticSubPage.updateJsonFromTree();
+                                                               }
+                                                               text.dispose();
+                                                       }
+                                               });
+
+                                               // If they hit Enter, set the text into the tree and end
+                                               // the editing session.
+                                               // If they hit Escape, ignore the text and end the
+                                               // editing session
+                                               text.addKeyListener(new KeyAdapter() {
+                                                       public void keyPressed(KeyEvent event) {
+                                                               switch (event.keyCode) {
+                                                               case SWT.CR:
+                                                                       treeItem.setText(column, text.getText());
+                                                                       if (currentSubPage instanceof StaticSubPage) {
+                                                                               staticSubPage.updateJsonFromTree();
+                                                                       }
+                                                                       isDataModelDirty = true;
+                                                                       text.dispose();
+                                                                       break;
+                                                               case SWT.KEYPAD_CR:
+                                                                       // Enter hit--set the text into the tree and
+                                                                       // drop through
+                                                                       treeItem.setText(column, text.getText());
+                                                                       if (currentSubPage instanceof StaticSubPage) {
+                                                                               staticSubPage.updateJsonFromTree();
+                                                                       }
+                                                                       isDataModelDirty = true;
+                                                                       text.dispose();
+                                                                       break;
+                                                               case SWT.ESC:
+                                                                       // End editing session
+                                                                       text.dispose();
+                                                                       break;
+                                                               }
+                                                       }
+                                               });
+
+                                               treeEditor.setEditor(text, treeItem, column);
+                                       }
+                               }
+                       }
+               });
+
+               // Add a key listener to the tree that listens for F2. If F2 is pressed,
+               // we do the editing
+               dialogTree.addKeyListener(new KeyAdapter() {
+                       public void keyPressed(KeyEvent event) {
+                               // Make sure one and only one item is selected when F2 is
+                               // pressed
+                               if (event.keyCode == SWT.F2 && dialogTree.getSelectionCount() == 1) {
+                                       // Determine the item to edit
+                                       final TreeItem item = dialogTree.getSelection()[0];
+                                       TreeItemData data = (TreeItemData) item.getData("TREEITEMDATA");
+
+                                       if (data.getSource().equals("original")) {
+                                               return;
+                                       } else if (!types.contains(data.getObjectType()))
+                                               return;
+
+                                       Control oldEditor = treeEditor.getEditor();
+                                       if (oldEditor != null) {
+                                               oldEditor.dispose();
+                                       }
+
+                                       // Create a text field to do the editing
+                                       final Text text = new Text(dialogTree, SWT.NONE);
+                                       text.setText(item.getText());
+                                       text.selectAll();
+                                       text.setFocus();
+
+                                       // If the text field loses focus, set its text into the tree
+                                       // and end the editing session
+                                       text.addFocusListener(new FocusAdapter() {
+                                               public void focusLost(FocusEvent event) {
+                                                       item.setText(text.getText());
+                                                       isDataModelDirty = true;
+                                                       text.dispose();
+                                                       if (currentSubPage instanceof StaticSubPage) {
+                                                               staticSubPage.updateJsonFromTree();
+                                                       }
+                                               }
+                                       });
+
+                                       // If they hit Enter, set the text into the tree and end the
+                                       // editing session.
+                                       // If they hit Escape, ignore the text and end the editing
+                                       // session
+                                       text.addKeyListener(new KeyAdapter() {
+                                               public void keyPressed(KeyEvent event) {
+                                                       switch (event.keyCode) {
+                                                       case SWT.CR:
+                                                       case SWT.KEYPAD_CR:
+                                                               // Enter hit--set the text into the tree and
+                                                               // drop through
+                                                               item.setText(text.getText());
+                                                               isDataModelDirty = true;
+                                                               if (currentSubPage instanceof StaticSubPage) {
+                                                                       staticSubPage.updateJsonFromTree();
+                                                               }
+                                                               text.dispose();
+                                                               break;
+                                                       case SWT.ESC:
+                                                               // End editing session
+                                                               text.dispose();
+                                                               break;
+                                                       }
+                                               }
+                                       });
+
+                                       // Set the text field into the editor
+                                       treeEditor.setEditor(text, item);
+                               }
+                       }
+               });
+
+               Transfer[] types = new Transfer[] { TextTransfer.getInstance() };
+               int operations = DND.DROP_MOVE | DND.DROP_LINK;
+
+               DragSource source = new DragSource(dialogTree, operations);
+               source.setTransfer(types);
+               //final TreeItem[] dragSourceItem = new TreeItem[1];
+               // TODO: FIXME
+               /*
+                * source.addDragListener( new DragSourceListener() { public void
+                * dragStart( DragSourceEvent event ) {
+                * 
+                * if( !( currentSubPage instanceof StaticSubPage || currentSubPage
+                * instanceof RemoteCallSubPage ) ){ event.detail = DND.DROP_NONE;
+                * event.doit = false; return; }
+                * 
+                * TreeItem[] selection = dialogTree.getSelection(); event.doit = true;
+                * dragSourceItem[0] = selection[0]; };
+                * 
+                * public void dragSetData( DragSourceEvent event ) { event.data =
+                * dragSourceItem[0].getText(); }
+                * 
+                * public void dragFinished( DragSourceEvent event ) { if ( event.detail
+                * == DND.DROP_MOVE ) dragSourceItem[0].dispose(); dragSourceItem[0] =
+                * null; } } );
+                * 
+                * DropTarget target = new DropTarget( dialogTree, operations );
+                * target.setTransfer( types ); target.addDropListener( new
+                * DropTargetAdapter() { public void dragOver( DropTargetEvent event ) {
+                * event.feedback = DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL;
+                * 
+                * if( dragSourceItem[0] == event.item ) { event.detail = DND.DROP_NONE;
+                * }
+                * 
+                * if ( event.item != null ) { TreeItem item = (TreeItem) event.item;
+                * Point pt = dialogTree.getDisplay().map( null, dialogTree, event.x,
+                * event.y ); Rectangle bounds = item.getBounds();
+                * 
+                * TreeItem parentItem;
+                * 
+                * if ( pt.y < bounds.y + bounds.height / 3 ) { event.feedback |=
+                * DND.FEEDBACK_INSERT_BEFORE; parentItem = item.getParentItem(); } else
+                * if ( pt.y > bounds.y + 2 * bounds.height / 3 ) { event.feedback |=
+                * DND.FEEDBACK_INSERT_AFTER; parentItem = item.getParentItem(); } else
+                * { event.feedback |= DND.FEEDBACK_SELECT; parentItem = item; }
+                * 
+                * if( !checkValidation( parentItem ) ) event.detail = DND.DROP_NONE;
+                * else event.detail = DND.DROP_MOVE; } }
+                * 
+                * public void drop( DropTargetEvent event ) { if ( event.data == null
+                * || dragSourceItem[0] == event.item ) { event.detail = DND.DROP_NONE;
+                * return; } TreeEditor editor = (TreeEditor)
+                * dragSourceItem[0].getData("TREEEDITORFORCOMBO");
+                * 
+                * if ( event.item == null ) { TreeItem item = new TreeItem( dialogTree,
+                * SWT.NONE ); copyAndDisposeItme( dragSourceItem[0], item, editor, true
+                * ); } else { TreeItem item = (TreeItem) event.item; Point pt =
+                * dialogTree.getDisplay().map( null, dialogTree, event.x, event.y );
+                * Rectangle bounds = item.getBounds(); TreeItem parent =
+                * item.getParentItem(); if ( parent != null ) { TreeItem[] items =
+                * parent.getItems(); int index = 0; for ( int i = 0; i < items.length;
+                * i++ ) { if ( items[i] == item ) { index = i; break; } } if ( pt.y <
+                * bounds.y + bounds.height / 3 ) { TreeItem newItem = new TreeItem(
+                * parent, SWT.NONE, index ); copyAndDisposeItme( dragSourceItem[0],
+                * newItem, editor, true ); } else if ( pt.y > bounds.y + 2 *
+                * bounds.height / 3 ) { TreeItem newItem = new TreeItem( parent,
+                * SWT.NONE, index + 1 ); copyAndDisposeItme( dragSourceItem[0],
+                * newItem, editor, true ); } else { TreeItem newItem = new TreeItem(
+                * item, SWT.NONE ); copyAndDisposeItme( dragSourceItem[0], newItem,
+                * editor, true ); }
+                * 
+                * } else { TreeItem[] items = dialogTree.getItems(); int index = 0; for
+                * ( int i = 0; i < items.length; i++ ) { if ( items[i] == item ) {
+                * index = i; break; } } if ( pt.y < bounds.y + bounds.height / 3 ) {
+                * TreeItem newItem = new TreeItem( dialogTree, SWT.NONE, index );
+                * copyAndDisposeItme( dragSourceItem[0], newItem, editor, true ); }
+                * else if ( pt.y > bounds.y + 2 * bounds.height / 3 ) { TreeItem
+                * newItem = new TreeItem( dialogTree, SWT.NONE, index + 1 );
+                * copyAndDisposeItme( dragSourceItem[0], newItem, editor, true ); }
+                * else { TreeItem newItem = new TreeItem( item, SWT.NONE );
+                * copyAndDisposeItme( dragSourceItem[0], newItem, editor, true ); } }
+                * 
+                * }
+                * 
+                * isDataModelDirty = true; if( currentSubPage instanceof StaticSubPage
+                * ){ staticSubPage.updateJsonFromTree(); } }
+                * 
+                * private boolean checkValidation( TreeItem parent ) {
+                * 
+                * boolean result = true; List<String> primitiveTypes = Arrays.asList(
+                * new String[]{ "String", "Number", "Boolean", "Undefined" } ); String
+                * sourceType = dragSourceItem[0].getText(2);
+                * 
+                * if( parent == null && sourceType.equals( "Index" ) ) result = false;
+                * 
+                * if( parent == null ) return result;
+                * 
+                * String parentType = parent.getText(2);
+                * 
+                * if( primitiveTypes.contains( parentType ) ) result = false;
+                * 
+                * if( parentType.equals( sourceType ) && !sourceType.equals( "Object" )
+                * ) result = false;
+                * 
+                * if( parentType.equals( "Object" ) && sourceType.equals( "Index" ) )
+                * result = false;
+                * 
+                * if( parentType.equals( "Index" ) && ( sourceType.equals( "Index" ) ||
+                * sourceType.equals( "Object" )) ) result = false;
+                * 
+                * if( parentType.equals( "Array" ) && !sourceType.equals( "Index" ) )
+                * result = false;
+                * 
+                * return result; } } );
+                */
+       }
+
+       private Group makeSettingGroup(Group settingGroup) {
+
+               settingGroup.setText("Setting");
+
+               setttingStackLayout = new StackLayout();
+               settingGroup.setLayout(setttingStackLayout);
+
+               staticSubPage = new StaticSubPage(this, settingGroup, dialogTree);
+               remoteCallSubPage = new RemoteCallSubPage(this, settingGroup, dialogTree, project);
+
+               callHistorySubPage = new CallHistorySubPage(this, settingGroup, dialogTree, project);
+
+               contactSubPage = new ContactSubPage(this, settingGroup, dialogTree, project);
+
+               currentSubPage = staticSubPage;
+               setttingStackLayout.topControl = staticSubPage.getSettingComposite();
+
+               sashForm.setWeights(new int[] { 2, 0 });
+               sashForm.setSashWidth(0);
+               dataComposite.setParent(staticSubPage.getDataComposite());
+
+               staticSubPage.setButtonsState(dataButtonMap);
+
+               return settingGroup;
+       }
+
+       private void addItem() {
+               TreeItem parentItem = null;
+
+               if (dialogTree.getSelection().length > 0)
+                       parentItem = dialogTree.getSelection()[0];
+
+               String[] ableTypes = new String[] { "Object", "Array", "IndexObject" };
+
+               if (parentItem != null && !Arrays.asList(ableTypes).contains(parentItem.getText(2))) {
+                       return;
+               }
+
+               if (currentSubPage instanceof StaticSubPage && staticSubPage.getCurrentType().equals("XML")
+                               && dialogTree.getItemCount() > 0 && parentItem == null) {
+                       return;
+               }
+
+               TreeItem item;
+               int index = 0;
+
+               String type = "String";
+               String value = "data";
+
+               if (parentItem == null) {
+                       item = new TreeItem(dialogTree, SWT.NONE);
+                       index = dialogTree.getItemCount();
+                       type = "Object";
+                       value = "";
+               } else {
+                       item = new TreeItem(parentItem, SWT.NONE);
+                       index = parentItem.getItemCount();
+                       value += index;
+               }
+
+               String key = "key" + index;
+
+        if (parentItem != null && currentSubPage instanceof StaticSubPage && parentItem.getText(2).equals("Array")) {
+            if (parentItem.getItem(0).getText(2).equals("IndexObject")) {
+                type = "IndexObject";
+            } else {
+                type = "Index";
+            }
+            value = "";
+            key = String.valueOf(parentItem.getItemCount() - 1);
+        }
+
+               if (!type.equals("Index") && !type.equals("IndexObject"))
+                       Helper.addComboInTreeItem(item, type, currentSubPage);
+
+               item.setText(new String[] { key, value, type });
+
+               String imageName;
+
+               if (type.equals("Array")) {
+                       imageName = BuilderConstants.DATABINDING_ARRAY_ICON;
+               } else if (type.equals("Number")) {
+                       imageName = BuilderConstants.DATABINDING_NUMBER_ICON;
+               } else if (type.equals("String")) {
+                       imageName = BuilderConstants.DATABINDING_STRING_ICON;
+               } else if (type.equals("Index") || type.equals("IndexObject")) {
+                       imageName = BuilderConstants.DATABINDING_INDEX_ICON;
+               } else if (type.equals("Object")) {
+                       imageName = BuilderConstants.DATABINDING_OBJECT_ICON;
+               } else if (type.equals("Boolean")) {
+                       imageName = BuilderConstants.DATABINDING_BOOLEAN_ICON;
+               } else {
+                       imageName = BuilderConstants.DATABINDING_UNDEFINED_ICON;
+               }
+
+               if (imageName != null) {
+                       item.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, imageName));
+               }
+
+               TreeItemData treeItemData = new TreeItemData();
+               treeItemData.setSource("custom");
+               treeItemData.setObjectType(type);
+               treeItemData.setObjectValue(value);
+
+               item.setData("TREEITEMDATA", treeItemData);
+
+               dialogTree.showItem(item);
+
+               if (currentSubPage instanceof StaticSubPage) {
+                       staticSubPage.updateJsonFromTree();
+               }
+       }
+
+       private void removeAllItems() {
+               TreeItem[] treeItems = dialogTree.getItems();
+               if (treeItems.length != 0) {
+                       for (TreeItem treeItem : treeItems) {
+                               removeAllChildrenRecursively(treeItem);
+                       }
+
+                       if (currentSubPage instanceof StaticSubPage) {
+                               staticSubPage.updateJsonFromTree();
+                       }
+               }
+       }
+
+       private void removeItem() {
+               TreeItem[] treeItems = dialogTree.getSelection();
+               for (TreeItem treeItem : treeItems) {
+                       removeAllChildrenRecursively(treeItem);
+               }
+
+               if (currentSubPage instanceof StaticSubPage) {
+                       staticSubPage.updateJsonFromTree();
+               }
+
+               // for redraw
+               dialogTree.setSize(dialogTree.getSize().x, dialogTree.getSize().y - 1);
+               dialogTree.setSize(dialogTree.getSize().x, dialogTree.getSize().y + 1);
+       }
+
+       private void removeAllChildrenRecursively(TreeItem treeItem) {
+               TreeItem[] treeItems = treeItem.getItems();
+
+               if (treeItems.length != 0) {
+                       for (TreeItem item : treeItems) {
+                               removeAllChildrenRecursively(item);
+                       }
+               }
+               //TreeItemData data = (TreeItemData) treeItem.getData("TREEITEMDATA");
+               // TODO: FIXME
+               // if( data != null && data.getSource().equals( "original" ) &&
+               // currentSubPage instanceof RemoteCallSubPage )
+               // return;
+
+               TreeEditor editor = (TreeEditor) treeItem.getData("TREEEDITORFORCOMBO");
+               if (editor != null) {
+                       editor.getEditor().dispose();
+                       editor.dispose();
+               }
+
+               if (treeItem.getText(2).equals("Index")) {
+                       int idx = 0;
+
+                       TreeItem parentTreeItem = treeItem.getParentItem();
+                       if (parentTreeItem != null) {
+                               for (TreeItem item : parentTreeItem.getItems()) {
+                                       if (item.equals(treeItem))
+                                               continue;
+
+                                       item.setText(0, String.valueOf(idx));
+                                       idx++;
+                               }
+                       }
+               }
+               treeItem.dispose();
+       }
+
+       private void moveItem(boolean option) {
+
+               if (dialogTree.getSelection().length > 0) {
+
+                       TreeItem selectedItem = dialogTree.getSelection()[0];
+                       TreeItem parentItem = selectedItem.getParentItem();
+                       int index = 0;
+                       int total = 0;
+
+                       if (parentItem == null) {
+                               index = dialogTree.indexOf(selectedItem);
+                               total = dialogTree.getItemCount();
+                       } else {
+                               index = parentItem.indexOf(selectedItem);
+                               total = parentItem.getItemCount();
+                       }
+
+                       if ((option && index == 0) || (!option && index == total - 1))
+                               return;
+
+                       int targetIndex = 0;
+
+                       if (option) {
+                               targetIndex = index - 1;
+                       } else {
+                               targetIndex = index + 2;
+                       }
+
+                       TreeEditor editor = (TreeEditor) selectedItem.getData("TREEEDITORFORCOMBO");
+                       TreeItem targetItem;
+
+                       if (parentItem == null) {
+                               targetItem = new TreeItem(dialogTree, SWT.NONE, targetIndex);
+                       } else {
+                               targetItem = new TreeItem(parentItem, SWT.NONE, targetIndex);
+                       }
+
+                       for (int i = 0; i < dialogTree.getColumnCount(); i++) {
+                               targetItem.setText(i, selectedItem.getText(i));
+                       }
+
+                       targetItem.setData("TREEITEMDATA", selectedItem.getData("TREEITEMDATA"));
+
+                       copyAndDisposeItme(selectedItem, targetItem, editor, true);
+
+                       if (currentSubPage instanceof StaticSubPage) {
+                               staticSubPage.updateJsonFromTree();
+                       }
+               }
+       }
+
+       private void copyAndDisposeItme(TreeItem sourceItem, TreeItem targetItem, TreeEditor editor, boolean isRedraw) {
+
+               if (sourceItem == targetItem)
+                       return;
+
+               targetItem.setData("TREEITEMDATA", sourceItem.getData("TREEITEMDATA"));
+               targetItem.setData(sourceItem.getData());
+
+               for (int i = 0; i < dialogTree.getColumnCount(); i++) {
+                       targetItem.setText(i, sourceItem.getText(i));
+                       targetItem.setImage(sourceItem.getImage());
+               }
+
+               if (editor != null) {
+                       editor.setItem(targetItem);
+                       targetItem.setData("TREEEDITORFORCOMBO", editor);
+               }
+
+               for (TreeItem item : sourceItem.getItems()) {
+                       TreeEditor subEditor = (TreeEditor) item.getData("TREEEDITORFORCOMBO");
+                       TreeItem subItem = new TreeItem(targetItem, SWT.NONE);
+                       copyAndDisposeItme(item, subItem, subEditor, false);
+               }
+
+               targetItem.setExpanded(sourceItem.getExpanded());
+
+               if (!sourceItem.isDisposed())
+                       sourceItem.dispose();
+
+               if (isRedraw) {
+                       dialogTree.select(targetItem);
+
+                       for (Control control : dialogTree.getChildren()) {
+                               control.redraw();
+                       }
+               }
+       }
+
+       public boolean isDataModelDirty() {
+               return isDataModelDirty;
+       }
+
+       public void setDataModelDirty(boolean isDataModelDirty) {
+               this.isDataModelDirty = isDataModelDirty;
+       }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/SourceDialogSubPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/SourceDialogSubPage.java
new file mode 100644 (file)
index 0000000..7ab6173
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.dialog;
+
+import java.util.Map;
+
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+
+public interface SourceDialogSubPage {
+
+       public BindingData getData();
+
+       public Composite getSettingComposite();
+
+       public void setButtonsState(Map<String, Button> dataButtonMap);
+
+       public void loadData(BindingData dataModel);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/StaticSubPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/dialog/StaticSubPage.java
new file mode 100644 (file)
index 0000000..5cd1d69
--- /dev/null
@@ -0,0 +1,667 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.dialog;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.Arrays;
+import java.util.Map;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.Helper;
+import org.tizen.efluibuilder.ui.view.databinding.utils.ResourceManager;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+
+public class StaticSubPage implements SourceDialogSubPage {
+
+    private Group parentGroup;
+    private Tree parentDataTree;
+    private Composite settingComposite;
+    private Composite dataComposite;
+
+    private Text staticSourceText;
+    private Combo typeCombo;
+
+    private String jsonFile;
+    private String temp;
+    private static Gson prettyGson;
+    private static Gson normalGson;
+
+    private static String[] comboItems;
+
+    static {
+        comboItems = new String[] { "JSON", "XML" };
+        prettyGson = new GsonBuilder().setPrettyPrinting().serializeNulls().create();
+        normalGson = new GsonBuilder().serializeNulls().create();
+    }
+
+    public StaticSubPage(SetSourcePage setSourcePage, Group dataGroup, Tree dialogTree) {
+        parentGroup = dataGroup;
+        parentDataTree = dialogTree;
+    }
+
+    @Override
+    public BindingData getData() {
+        BindingData dataSource = (BindingData) PartUtil.createPart(PartType.DATASOURCE, LayoutSchemaConstants.DATASOURCE);
+        Object obj = null;
+        String compactData = "";
+        String text = staticSourceText.getText();
+        try {
+            if (typeCombo.getSelectionIndex() == 0) {
+                obj = normalGson.fromJson(text, JsonElement.class);
+                compactData = normalGson.toJson(obj);
+            } else {
+                obj = Helper.parseXML(text);
+                compactData = text.replaceAll(">\\s*<", "><").replace("\r\n", "").replace("\n", "");
+            }
+        } catch (SAXException e) {
+        }
+
+        if (obj == null) {
+            MessageBox messageBox = new MessageBox(staticSourceText.getShell(), SWT.ICON_ERROR);
+            messageBox.setText("Set Source Error");
+            messageBox.setMessage("Error : Data is invalid.");
+            messageBox.open();
+            return null;
+        }
+
+        /*
+         * JsonObject root = new JsonObject(); TreeItem[] items =
+         * parentDataTree.getItems(); for (TreeItem item : items) {
+         * Helper.makeJsonFromTree(item, root); }
+         */
+
+        dataSource.setJsonData(compactData);
+        dataSource.setStaticFilePath(jsonFile);
+        dataSource.setSourceType(typeCombo.getText().toLowerCase());
+
+        return dataSource;
+    }
+
+    @Override
+    public Composite getSettingComposite() {
+        if (settingComposite == null) {
+            createSettingComposite();
+        }
+
+        String inputText = staticSourceText.getText();
+
+        if (inputText.trim().length() > 0) {
+
+            JsonElement json = null;
+            try {
+
+                if (typeCombo.getSelectionIndex() == 0)
+                    json = normalGson.fromJson(inputText, JsonElement.class);
+                else
+                    json = Helper.getJsonFromXML(inputText);
+
+            } catch (SAXException ex) {
+            }
+
+            if (json != null) {
+                parentDataTree.removeAll();
+                Helper.makeTreeItem(json, parentDataTree, null, true, this);
+            }
+        }
+
+        return settingComposite;
+    }
+
+    private void createSettingComposite() {
+
+        settingComposite = new Composite(parentGroup, SWT.NONE);
+        settingComposite.setLayout(new FormLayout());
+
+        FormData data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(5, 0);
+        data.right = new FormAttachment(100, -5);
+        data.bottom = new FormAttachment(100, 0);
+        settingComposite.setLayoutData(data);
+
+        SashForm sashForm = new SashForm(settingComposite, SWT.HORIZONTAL);
+        data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        data.bottom = new FormAttachment(100, 0);
+        sashForm.setLayoutData(data);
+
+        Composite subSettingComposite = new Composite(sashForm, SWT.NONE);
+        subSettingComposite.setLayout(new FormLayout());
+
+        dataComposite = new Composite(sashForm, SWT.NONE);
+        dataComposite.setLayout(new FormLayout());
+
+        data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.left = new FormAttachment(5, 0);
+        data.right = new FormAttachment(100, 0);
+        data.bottom = new FormAttachment(100, 0);
+        dataComposite.setLayoutData(data);
+
+        sashForm.setWeights(new int[] { 2, 3 });
+
+        Button formatButton = new Button(subSettingComposite, SWT.FLAT);
+        formatButton.setToolTipText("Formatted Data");
+        formatButton.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_FORMAT_STRING_ICON));
+
+        data = new FormData(29, 29);
+        data.top = new FormAttachment(2, 0);
+        data.left = new FormAttachment(2, 0);
+
+        formatButton.setLayoutData(data);
+
+        formatButton.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                if (typeCombo.getSelectionIndex() == 0) {
+                    JsonElement jo = prettyGson.fromJson(staticSourceText.getText(), JsonElement.class);
+                    staticSourceText.setData("editing", true);
+                    staticSourceText.setText(prettyGson.toJson(jo));
+                    staticSourceText.setData("editing", false);
+                } else {
+                    Document doc = null;
+                    try {
+                        doc = Helper.parseXML(staticSourceText.getText());
+                    } catch (SAXException e1) {
+                        e1.printStackTrace();
+                    }
+
+                    if (doc == null)
+                        return;
+
+                    staticSourceText.setData("editing", true);
+                    staticSourceText.setText(Helper.getStringFromDocument(doc, true));
+                    staticSourceText.setData("editing", false);
+                }
+            }
+        });
+
+        Button compactButton = new Button(subSettingComposite, SWT.FLAT);
+        compactButton.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_COMPACT_STRING_ICON));
+        compactButton.setToolTipText("Compacted Data");
+
+        data = new FormData(29, 29);
+        data.top = new FormAttachment(2, 0);
+        data.left = new FormAttachment(formatButton, 2);
+
+        compactButton.setLayoutData(data);
+
+        compactButton.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                if (typeCombo.getSelectionIndex() == 0) {
+                    JsonElement jo = normalGson.fromJson(staticSourceText.getText(), JsonElement.class);
+                    staticSourceText.setData("editing", true);
+                    staticSourceText.setText(normalGson.toJson(jo));
+                    staticSourceText.setData("editing", false);
+                } else {
+                    staticSourceText.setData("editing", true);
+                    staticSourceText.setText(staticSourceText.getText().replaceAll(">\\s*<", "><"));
+                    staticSourceText.setData("editing", false);
+                }
+            }
+        });
+
+        Label typelabel = new Label(subSettingComposite, SWT.NONE);
+        typelabel.setText("Type");
+
+        data = new FormData();
+        data.top = new FormAttachment(2, 0);
+        data.left = new FormAttachment(compactButton, 10);
+
+        typelabel.setLayoutData(data);
+
+        typeCombo = new Combo(subSettingComposite, SWT.SINGLE | SWT.BORDER | SWT.FLAT | SWT.READ_ONLY);
+        typeCombo.setItems(comboItems);
+        typeCombo.select(0);
+
+        data = new FormData(90, 29);
+        data.top = new FormAttachment(2, 0);
+        data.left = new FormAttachment(typelabel, 5);
+
+        typeCombo.setLayoutData(data);
+
+        typeCombo.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent event) {
+                String source = staticSourceText.getText();
+
+                if (source.trim().length() == 0)
+                    return;
+
+                String result = "";
+                JsonElement jo;
+
+                try {
+                    if (typeCombo.getSelectionIndex() == 0) {
+                        jo = Helper.getJsonFromXML(source);
+                    } else {
+                        temp = staticSourceText.getText();
+                        jo = prettyGson.fromJson(source, JsonElement.class);
+                    }
+
+                    if (jo == null)
+                        return;
+
+                    if (typeCombo.getSelectionIndex() == 0) {
+                        if (temp == null)
+                            result = prettyGson.toJson(jo);
+                        else
+                            result = temp;
+                    } else {
+                        result = Helper.getStringFromDocument(Helper.getXMLFromJson(null, null, jo), true);
+                    }
+                } catch (Exception e) {
+                    MessageBox box = new MessageBox(typeCombo.getShell(), SWT.ERROR);
+                    box.setText("Error");
+                    box.setMessage("Invalid data format. Unable to change data type.\n\nReason: " + e.getMessage());
+                    box.open();
+                    if (typeCombo.getSelectionIndex() == 0)
+                        typeCombo.select(1);
+                    else
+                        typeCombo.select(0);
+
+                    return;
+                }
+
+                if (result.length() == 0 || parentDataTree.getChildren().length == 0) {
+                    staticSourceText.setText(result);
+                } else {
+                    staticSourceText.setData("editing", true);
+                    staticSourceText.setText(result);
+                    staticSourceText.setData("editing", false);
+                }
+            }
+        });
+
+        Button clearButton = new Button(subSettingComposite, SWT.PUSH | SWT.FLAT);
+        clearButton.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_CLEAR_ICON));
+        clearButton.setToolTipText("Clear");
+
+        data = new FormData(29, 29);
+        data.top = new FormAttachment(2, 0);
+        data.right = new FormAttachment(100, -5);
+
+        clearButton.setLayoutData(data);
+        clearButton.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent event) {
+                staticSourceText.setText("");
+            }
+        });
+
+        final Button reloadFileButton = new Button(subSettingComposite, SWT.PUSH | SWT.FLAT);
+        reloadFileButton.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_RELOAD_ICON));
+        reloadFileButton.setToolTipText("Reload");
+
+        data = new FormData(29, 29);
+        data.top = new FormAttachment(2, 0);
+        data.right = new FormAttachment(clearButton, -2);
+
+        reloadFileButton.setLayoutData(data);
+
+        SelectionAdapter fileOpenSelectionAdapter = new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent event) {
+
+                Button sourceButton = (Button) event.getSource();
+
+                if (sourceButton.getToolTipText().equals("Open")) {
+                    FileDialog fileDialog = new FileDialog(parentGroup.getShell(), SWT.OPEN);
+                    String file = fileDialog.open();
+
+                    if (file == null)
+                        return;
+
+                    jsonFile = file;
+                }
+                try {
+
+                    for (Control control : parentDataTree.getChildren()) {
+                        control.dispose();
+                    }
+                    parentDataTree.removeAll();
+                    staticSourceText.setText(Helper.streamToString(new FileInputStream(new File(jsonFile))));
+                } catch (FileNotFoundException e) {
+                    e.printStackTrace();
+                }
+            }
+        };
+
+        reloadFileButton.addSelectionListener(fileOpenSelectionAdapter);
+
+        Button saveAdButton = new Button(subSettingComposite, SWT.PUSH | SWT.FLAT);
+        saveAdButton.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_SAVE_AS_ICON));
+        saveAdButton.setToolTipText("Save AS");
+
+        data = new FormData(29, 29);
+        data.top = new FormAttachment(2, 0);
+        data.right = new FormAttachment(reloadFileButton, -2);
+        saveAdButton.setLayoutData(data);
+
+        saveAdButton.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Shell shell = ((Control) e.getSource()).getShell();
+                FileDialog fdl = new FileDialog(shell, SWT.SAVE);
+                String path = fdl.open();
+
+                if (path == null)
+                    return;
+
+                File file = new File(path);
+
+                if (file.exists()) {
+                    String msg = file.getAbsolutePath() + " File is exist.\nDo you want to overwrite ?";
+                    MessageBox messageBox = new MessageBox(shell, SWT.ICON_QUESTION | SWT.OK | SWT.CANCEL);
+                    messageBox.setText("Save As");
+                    messageBox.setMessage(msg);
+
+                    if (messageBox.open() != SWT.OK)
+                        return;
+                }
+
+                if (file.exists())
+                    file.delete();
+
+                BufferedWriter bw = null;
+
+                try {
+                    file.createNewFile();
+                    bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file)));
+                    bw.write(staticSourceText.getText());
+
+                    bw.close();
+                    bw = null;
+                } catch (IOException e1) {
+                    e1.printStackTrace();
+                } finally {
+                    if (bw != null) {
+                        try {
+                            bw.close();
+                        } catch (IOException e1) {
+                        }
+                    }
+                }
+            }
+        });
+
+        Button openFileButton = new Button(subSettingComposite, SWT.PUSH | SWT.FLAT);
+        openFileButton.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_OPEN_ICON));
+        openFileButton.setToolTipText("Open");
+
+        data = new FormData(29, 29);
+        data.top = new FormAttachment(2, 0);
+        data.right = new FormAttachment(saveAdButton, -2);
+
+        openFileButton.setLayoutData(data);
+        openFileButton.addSelectionListener(fileOpenSelectionAdapter);
+
+        Composite composite = new Composite(subSettingComposite, SWT.NONE);
+
+        data = new FormData(390, 450);
+        data.top = new FormAttachment(formatButton, 2);
+        data.bottom = new FormAttachment(100, -2);
+        data.left = new FormAttachment(2, 0);
+        data.right = new FormAttachment(100, 8);
+
+        composite.setLayoutData(data);
+        composite.setLayout(new FormLayout());
+        // composite.setLayout( new FillLayout() );
+        // MemoryEditorInput editorInput =
+        // new MemoryEditorInput( "MemFile", new ByteArrayInputStream( new
+        // byte[0] ) );
+        //
+        // CompilationUnitEditor editor = new CompilationUnitEditor();
+        //
+        // IEditorSite parentSite =
+        // PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+        // .getActiveEditor().getEditorSite();
+        ////
+        //// WorkbenchPage workbrenchpage =
+        //// (WorkbenchPage)
+        // PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+        //// .getActivePage();
+        ////
+        //// EditorDescriptor desc =
+        //// (EditorDescriptor) PlatformUI.getWorkbench().getEditorRegistry()
+        //// .findEditor( PageDesigner.ID );
+        ////
+        //// EditorReference reference =
+        //// new EditorReference( workbrenchpage.getEditorManager(),
+        // editorInput, desc );
+        ////
+        //// EditorSite editorSite = new EditorSite( reference, editor,
+        // workbrenchpage, desc );
+        //// editorSite.setActionBars( new SubActionBars(
+        // parentSite.getActionBars() ) );
+        //
+        // try {
+        // editor.init( parentSite, editorInput );
+        // } catch ( PartInitException e1 ) {
+        // e1.printStackTrace();
+        // }
+        //
+        // editor.createPartControl( composite );
+        //
+        // editor.setActionActivationCode(
+        // ITextEditorActionConstants.GROUP_UNDO, 'Z', SWT.CONTROL, SWT.DEFAULT
+        // );
+        // staticSourceStyledText = editor.getViewer().getTextWidget();
+        staticSourceText = new Text(composite, SWT.V_SCROLL | SWT.H_SCROLL);
+
+        // staticSourceStyledText.addModifyListener(new ModifyListener() {
+        // public void modifyText(ModifyEvent event) {
+        // int maxLine = staticSourceStyledText.getLineCount();
+        // int lineCountWidth = Math.max(String.valueOf(maxLine).length(), 3);
+        //
+        // StyleRange style = new StyleRange();
+        // style.metrics = new GlyphMetrics(0, 0, lineCountWidth * 8 + 5);
+        // Bullet bullet = new Bullet(ST.BULLET_NUMBER, style);
+        // staticSourceStyledText.setLineBullet(0,
+        // staticSourceStyledText.getLineCount(), null);
+        // staticSourceStyledText.setLineBullet(0,
+        // staticSourceStyledText.getLineCount(), bullet);
+        // }
+        // });
+
+        data = new FormData();
+        data.top = new FormAttachment(2, 0);
+        data.right = new FormAttachment(100, -10);
+        data.left = new FormAttachment(2, 0);
+        data.bottom = new FormAttachment(100, -2);
+        staticSourceText.setLayoutData(data);
+
+        staticSourceText.setData("editing", false);
+
+        final SourceDialogSubPage subPage = this;
+        staticSourceText.addModifyListener(new ModifyListener() {
+            @Override
+            public void modifyText(ModifyEvent e) {
+
+                String inputText = staticSourceText.getText();
+
+                if (staticSourceText.getData("editing") != null && (Boolean) staticSourceText.getData("editing"))
+                    return;
+
+                if (inputText.trim().length() == 0) {
+                    for (Control control : parentDataTree.getChildren()) {
+                        control.dispose();
+                    }
+                    parentDataTree.removeAll();
+                    return;
+                }
+
+                temp = null;
+
+                JsonElement json = null;
+                try {
+
+                    if (typeCombo.getSelectionIndex() == 0)
+                        json = normalGson.fromJson(inputText, JsonElement.class);
+                    else
+                        json = Helper.getJsonFromXML(inputText);
+
+                } catch (SAXException ex) {
+                }
+
+                if (json != null) {
+                    TreeRefreshTask task = new TreeRefreshTask(subPage, json);
+                    parentDataTree.setData("LAST_TASK", task);
+                    parentDataTree.getDisplay().timerExec(800, task);
+
+                }
+            }
+        });
+    }
+
+    class TreeRefreshTask implements Runnable {
+
+        private JsonElement taskJson;
+        private SourceDialogSubPage subPage;
+
+        TreeRefreshTask(SourceDialogSubPage currentSubPage, JsonElement taskJson) {
+            this.subPage = currentSubPage;
+            this.taskJson = taskJson;
+        }
+
+        public void run() {
+            if (!parentDataTree.getData("LAST_TASK").equals(this))
+                return;
+
+            for (Control control : parentDataTree.getChildren()) {
+                control.dispose();
+            }
+
+            parentDataTree.removeAll();
+            Helper.makeTreeItem(taskJson, parentDataTree, null, true, subPage);
+        }
+    }
+
+    @Override
+    public void setButtonsState(Map<String, Button> dataButtonMap) {
+        dataButtonMap.get("addTreeItem").setEnabled(true);
+        dataButtonMap.get("upTreeItem").setEnabled(true);
+        dataButtonMap.get("downTreeItem").setEnabled(true);
+        dataButtonMap.get("removeTreeItem").setEnabled(true);
+        dataButtonMap.get("removeAllTreeItem").setEnabled(true);
+
+        Button conversionTreeAndText = dataButtonMap.get("conversionTreeAndText");
+
+        if (conversionTreeAndText.getSelection()) {
+            conversionTreeAndText.setSelection(false);
+            Event e = new Event();
+            e.item = conversionTreeAndText;
+            e.widget = conversionTreeAndText;
+            e.type = SWT.Selection;
+            conversionTreeAndText.notifyListeners(SWT.Selection, e);
+        }
+
+        conversionTreeAndText.setVisible(false);
+    }
+
+    @Override
+    public void loadData(BindingData dataModel) {
+
+        jsonFile = dataModel.getStaticFilePath();
+
+        if (dataModel.getSourceType() != null)
+            typeCombo.select(Arrays.asList(comboItems).indexOf(dataModel.getSourceType().toUpperCase()));
+
+        if (dataModel.getJsonData() != null)
+            staticSourceText.setText(dataModel.getJsonData());
+    }
+
+    public Composite getDataComposite() {
+        return dataComposite;
+    }
+
+    public void updateJsonFromTree() {
+        if (parentDataTree.getItemCount() > 0) {
+            JsonObject root = new JsonObject();
+            TreeItem[] items = parentDataTree.getItems();
+            for (TreeItem item : items) {
+                Helper.makeJsonFromTree(item, root);
+            }
+
+            staticSourceText.setData("editing", true);
+            temp = null;
+            try {
+                if (typeCombo.getSelectionIndex() == 0)
+                    staticSourceText.setText(prettyGson.toJson(root));
+                else
+                    staticSourceText.setText(Helper.getStringFromDocument(Helper.getXMLFromJson(null, null, root), true));
+            } catch (Exception e) {
+                staticSourceText.setText("");
+            }
+
+            staticSourceText.setData("editing", false);
+
+        } else {
+            staticSourceText.setData("editing", true);
+            staticSourceText.setText("");
+            staticSourceText.setData("editing", false);
+        }
+    }
+
+    public String getCurrentType() {
+        return typeCombo.getText();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingData.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingData.java
new file mode 100644 (file)
index 0000000..8b5f0f9
--- /dev/null
@@ -0,0 +1,480 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.tizen.efluibuilder.model.part.DataBindingPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+
+public class BindingData extends Part {
+
+    private String itemName;
+    private Map<String, String> headers = new HashMap<String, String>();
+    private String runtimeApiName;
+    private String runtimeApiAddressBookID;
+    private String calendarName;
+    private String calendarType;
+    private String calendarID;
+
+    public BindingData(String uniqueId, DataBindingPart parentPart, int type) {
+        super(uniqueId, parentPart, type);
+    }
+
+    /**
+     * Sets a name.
+     * 
+     * @param name
+     */
+    public void setModelName(String name) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_MODEL_NAME, name);
+    }
+
+    /**
+     * Gets a name.
+     * 
+     * @return name
+     */
+    public String getModelName() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_MODEL_NAME);
+    }
+
+    public String getItemName() {
+        return itemName;
+    }
+
+    public void setItemName(String itemName) {
+        this.itemName = itemName;
+    }
+
+    /**
+     * Sets a source name.
+     * 
+     * @param sourceName
+     */
+    public void setSourceName(String sourceName) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_DATASOURCE, sourceName);
+    }
+
+    /**
+     * Gets a source name.
+     * 
+     * @return source name
+     */
+    public String getSourceName() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_DATASOURCE);
+    }
+
+    /**
+     * Sets a JSON data.
+     * 
+     * @param jsonData
+     */
+    public void setJsonData(String jsonData) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_JSONDATA, jsonData);
+    }
+
+    /**
+     * Gets a JSON data.
+     * 
+     * @return JSON data
+     */
+    public String getJsonData() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_JSONDATA);
+    }
+
+    /**
+     * Sets a static file path.
+     * 
+     * @param staticFilePath
+     */
+    public void setStaticFilePath(String staticFilePath) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_FILEPATH, staticFilePath);
+    }
+
+    /**
+     * @return static file path
+     */
+    public String getStaticFilePath() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_FILEPATH);
+    }
+
+    /**
+     * Sets a model type.
+     * 
+     * @param modelType
+     */
+    public void setModelType(String modelType) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_MODELTYPE, modelType);
+    }
+
+    /**
+     * Gets a model type.
+     * 
+     * @return model type
+     */
+    public String getModelType() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_MODELTYPE);
+    }
+
+    /**
+     * Sets a URL.
+     * 
+     * @param url
+     */
+    public void setURL(String url) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_URL, url);
+    }
+
+    /**
+     * Gets a URL.
+     * 
+     * @return URL
+     */
+    public String getURL() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_URL);
+    }
+
+    /**
+     * Sets a method.
+     * 
+     * @param method
+     */
+    public void setMethod(String method) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_METHOD, method);
+    }
+
+    /**
+     * Gets a method.
+     * 
+     * @return method
+     */
+    public String getMethod() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_METHOD);
+    }
+
+    /**
+     * Sets a proxy.
+     * 
+     * @param proxy
+     */
+    public void setProxy(String proxy) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_PROXY, proxy);
+    }
+
+    /**
+     * Gets a proxy.
+     * 
+     * @return proxy
+     */
+    public String getProxy() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_PROXY);
+    }
+
+    /**
+     * Sets a query.
+     * 
+     * @param query
+     */
+    public void setQuery(String query) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_QUERY, query);
+    }
+
+    /**
+     * Gets a query.
+     * 
+     * @return query
+     */
+    public String getQuery() {
+        return this.getPropertyValue(BuilderConstants.ATTRIBUTE_QUERY);
+    }
+
+    /**
+     * Sets a source type.
+     * 
+     * @param sourceType
+     */
+    public void setSourceType(String sourceType) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_SOURCE_TYPE, sourceType);
+    }
+
+    /**
+     * Gets a source type.
+     * 
+     * @return source type
+     */
+    public String getSourceType() {
+        return this.getPropertyValue(BuilderConstants.ATTRIBUTE_SOURCE_TYPE);
+    }
+
+    /**
+     * Sets a timeout.
+     * 
+     * @param timeout
+     */
+    public void setTimeout(String timeout) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_TIMEOUT, timeout);
+    }
+
+    /**
+     * Gets a timeout.
+     * 
+     * @return timeout
+     */
+    public String getTimeout() {
+        return this.getPropertyValue(BuilderConstants.ATTRIBUTE_TIMEOUT);
+    }
+
+    /**
+     * Sets polling Interval
+     * 
+     * @param pollingInterval
+     */
+    public void setPollingInterval(String pollingInterval) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_POLLING_INTERVAL, pollingInterval);
+    }
+
+    /**
+     * Gets polling interval
+     * 
+     * @return pollingInterval
+     */
+    public String getPollingInterval() {
+        return this.getPropertyValue(BuilderConstants.ATTRIBUTE_POLLING_INTERVAL);
+    }
+
+    /**
+     * Sets a runtime API name.
+     * 
+     * @param runtimeApiName
+     */
+    public void setRuntimeApiName(String runtimeApiName) {
+        this.runtimeApiName = runtimeApiName;
+    }
+
+    /**
+     * Gets a runtime API name.
+     * 
+     * @return runtime API name
+     */
+    public String getRuntimeApiName() {
+        return runtimeApiName;
+    }
+
+    /**
+     * Remove a view model object.
+     * 
+     * @param observableObject
+     */
+    public void removeDataModelObject(BindingObject observableObject) {
+        removeChild(observableObject);
+    }
+
+    /**
+     * Clear view model objects.
+     */
+    public void clearDataModelObjects() {
+        clearChildrenBindingObjects();
+    }
+
+    public void clearChildrenBindingObjects() {
+        for (Part child : getChildren()) {
+            removeChild(child);
+        }
+    }
+
+    public List<BindingObject> getBindingObjects() {
+        List<BindingObject> bindingObjects = new ArrayList<BindingObject>();
+        for (Part child : getChildren()) {
+            bindingObjects.add((BindingObject) child);
+        }
+        return bindingObjects;
+    }
+
+    /**
+     * Gets a Runtime API Address Book ID.
+     * 
+     * @return runtimeApiAddressBookID
+     */
+    public String getRuntimeApiAddressBookID() {
+        return runtimeApiAddressBookID;
+    }
+
+    /**
+     * Sets a Runtime API Address Book ID.
+     * 
+     * @param runtimeApiAddressBookID
+     */
+    public void setRuntimeApiAddressBookID(String runtimeApiAddressBookID) {
+        this.runtimeApiAddressBookID = runtimeApiAddressBookID;
+    }
+
+    /**
+     * Gets a CallHistory Type.
+     * 
+     * @return callHistoryType
+     */
+    public String getCallHistoryType() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_CALL_HISTORY_TYPE);
+    }
+
+    /**
+     * Sets a CallHistory Type.
+     * 
+     * @param callHistoryType
+     */
+    public void setCallHistoryType(String callHistoryType) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_CALL_HISTORY_TYPE, callHistoryType);
+    }
+
+    /**
+     * Gets a CallHistory Direction.
+     * 
+     * @return callHistoryDirection
+     */
+    public String getCallHistoryDirection() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_CALL_HISTORY_DIRECTION);
+    }
+
+    /**
+     * Sets a CallHistory Direction.
+     * 
+     * @param callHistoryDirection
+     */
+    public void setCallHistoryDirection(String callHistoryDirection) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_CALL_HISTORY_DIRECTION, callHistoryDirection);
+    }
+
+    /**
+     * Gets a CallHistory Start Time Order.
+     * 
+     * @return callHistoryStartTimeOrder
+     */
+    public String getCallHistoryStartTimeOrder() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_CALL_HISTORY_START_TIME_ORDER);
+    }
+
+    /**
+     * Sets a CallHistory Start Time Order.
+     * 
+     * @param callHistoryStartTimeOrder
+     */
+    public void setCallHistoryStartTimeOrder(String callHistoryStartTimeOrder) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_CALL_HISTORY_START_TIME_ORDER, callHistoryStartTimeOrder);
+    }
+
+    /**
+     * Gets a CallHistory Start Time Order.
+     * 
+     * @return callHistoryStartTimeOrder
+     */
+    public String getCalendarName() {
+        return calendarName;
+    }
+
+    /**
+     * Sets a Calendar Name.
+     * 
+     * @param calendarName
+     */
+    public void setCalendarName(String calendarName) {
+        this.calendarName = calendarName;
+    }
+
+    /**
+     * Gets a CallHistory Start Time Order.
+     * 
+     * @return callHistoryStartTimeOrder
+     */
+    public String getCalendarType() {
+        return calendarType;
+    }
+
+    /**
+     * Sets a Calendar Type.
+     * 
+     * @param calendarType
+     */
+    public void setCalendarType(String calendarType) {
+        this.calendarType = calendarType;
+    }
+
+    /**
+     * Gets a Calendar ID.
+     * 
+     * @return calendarID
+     */
+    public String getCalendarID() {
+        return calendarID;
+    }
+
+    /**
+     * Sets a Calendar ID.
+     * 
+     * @param calendarID
+     */
+    public void setCalendarID(String calendarID) {
+        this.calendarID = calendarID;
+    }
+
+    public Map<String, String> getHeaders() {
+        return headers;
+    }
+
+    /**
+     * Clear header informations.
+     */
+    public void clearHeaderInfos() {
+        if (this.headers != null) {
+            this.headers.clear();
+        }
+    }
+
+    public void addAllHeaderInfos(Map<String, String> headers) {
+        clearHeaderInfos();
+        if (this.headers != null) {
+            this.headers.putAll(headers);
+        }
+    }
+
+    public String getHeadersString() {
+        return this.getPropertyValue(BuilderConstants.ATTRIBUTE_HEADERS);
+    }
+
+    public void setHeadersString(String headersString) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_HEADERS, headersString);
+    }
+
+       public String getRemoteCallRequestType() {
+               return this.getPropertyValue(BuilderConstants.ATTRIBUTE_REMOTE_CALL_REQUEST_TYPE);
+       }
+
+       public void setRemoteCallRequestType(String remoteCallRequestType) {
+               this.setPropertyValue(BuilderConstants.ATTRIBUTE_REMOTE_CALL_REQUEST_TYPE, remoteCallRequestType);
+       }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingDataSet.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingDataSet.java
new file mode 100644 (file)
index 0000000..5978e5d
--- /dev/null
@@ -0,0 +1,503 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.swt.widgets.Display;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingDataSetEvent.BindingDataSetEventType;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+
+public class BindingDataSet {
+
+    private Part dataBindingPart = null;
+
+    private List<IBindingDataSetListener> listeners = new ArrayList<IBindingDataSetListener>();
+    private List<IBindingDataSetListener> removeListeners = new ArrayList<IBindingDataSetListener>();
+    private boolean processEventFlag = false;
+
+    public BindingDataSet(Part root) {
+        dataBindingPart = root;
+    }
+
+    public void initDataSource(BindingData dataSource) {
+        dataBindingPart.insertChildBefore(dataSource, null);
+    }
+
+    public void initDataModel(BindingData dataModel) {
+        dataBindingPart.insertChildBefore(dataModel, null);
+    }
+
+    public void addDataSource(BindingData dataSource, Part nextSibling) {
+        dataBindingPart.insertChildBefore(dataSource, nextSibling);
+        fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATASOURCE_ADDED, dataSource, 0, null));
+    }
+
+    public void renameDataSource(BindingData dataSource, String newName) {
+        String oldName = dataSource.getSourceName();
+        dataSource.setSourceName(newName);
+        fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATASOURCE_RENAMED, dataSource, newName, oldName));
+    }
+
+    public void removeDataSource(BindingData dataSource) {
+        dataBindingPart.removeChild(dataSource);
+        fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATASOURCE_REMOVED, dataSource, getNumberOfDataSources() - 1, null));
+    }
+
+    // Data Model Handling
+    public void addDataModel(BindingData dataModel, Part nextSibling) {
+        dataBindingPart.insertChildBefore(dataModel, nextSibling);
+        fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATAMODEL_ADDED, dataModel, getNumberOfDataModels() - 1, null));
+    }
+
+    public BindingData getDataModelByItemName(String name) {
+        List<BindingData> viewModels = getDataModels();
+        for (BindingData viewModel : viewModels) {
+            if (viewModel.getItemName().equals(name)) {
+                return viewModel;
+            }
+        }
+        return null;
+    }
+
+    public BindingData getDataModelByModelName(String name) {
+        List<BindingData> viewModels = getDataModels();
+        for (BindingData viewModel : viewModels) {
+            if (viewModel.getModelName().equals(name)) {
+                return viewModel;
+            }
+        }
+        return null;
+    }
+
+    public void addDataModelItem(BindingData dataModelToBeChanged, List<String> bindingObjectItemPath, String bindingObjectItemName, String value) {
+        List<BindingData> dataModels = getDataModels();
+        for (BindingData dataModel : dataModels) {
+            if (dataModel.equals(dataModelToBeChanged)) {
+                BindingObject viewModelObject = getDataModelObject(dataModelToBeChanged, bindingObjectItemPath);
+                if (viewModelObject != null) {
+                    // addChildViewModelObject(viewModelObject,
+                    // bindingObjectItemName, value);
+                } else if (bindingObjectItemName != null) {
+                    // addChildViewModelObject(dataModelToBeChanged,
+                    // bindingObjectItemName, value);
+                }
+                fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATAMODEL_ITEM_ADDED, dataModel, value, getNumberOfDataModels() - 1, null));
+            }
+        }
+    }
+    
+    public void removeDataModelItems(BindingData dataModelToBeChanged, List<String> bindingObjectItemPath, String bindingObjectItemName, String value) {
+        List<BindingData> dataModels = getDataModels();
+        for (BindingData dataModel : dataModels) {
+            if (dataModel.equals(dataModelToBeChanged)) {
+                List<String> itemPath = new ArrayList<String>();
+                for (int i = 1; i < bindingObjectItemPath.size(); i++) {
+                    itemPath.add(bindingObjectItemPath.get(i));
+                }
+                List<BindingObject> parentDataModelBindingObjects = getBindingObjectsList(dataModelToBeChanged, itemPath);
+                if (parentDataModelBindingObjects != null && parentDataModelBindingObjects.size() > 0) {
+                    for (BindingObject parentDataModelBindingObject : parentDataModelBindingObjects) {
+                        removeChildDataModelObject(parentDataModelBindingObject, bindingObjectItemName, value);
+                    }
+                } else if (bindingObjectItemName != null) {
+                    removeChildDataModelObject(dataModelToBeChanged, bindingObjectItemName, value);
+                } else {
+                    // TODO remove?
+                    removeAllChildDataModelObject(dataModelToBeChanged);
+                }
+                fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATAMODEL_ITEM_REMOVED, dataModel, value, -1, null));
+            }
+        }
+    }
+
+    public List<BindingObject> getBindingObjectsList(BindingData bindingData, List<String> itemPath) {
+        if (itemPath == null) {
+            return null;
+        }
+        List<String> copyItemPath = new ArrayList<>();
+        copyItemPath.addAll(itemPath);
+        String sourceName = bindingData.getPropertyValue(BuilderConstants.ATTRIBUTE_DATASOURCE);
+        if (sourceName != null && !sourceName.isEmpty()) {
+            BindingData dataSource = getDataSource(sourceName);
+            if (dataSource != null && dataSource.getSourceType().equals(BuilderConstants.JSON)) {
+                copyItemPath.remove(copyItemPath.size() - 2);
+            }
+        }
+        if (copyItemPath.size() < 2) {
+            return null;
+        }
+
+        List<BindingObject> objects = new ArrayList<>();
+        List<BindingObject> viewModelObjects = bindingData.getBindingObjects();
+        int i = copyItemPath.size() - 1;
+        String name = copyItemPath.get(i - 1);
+        for (BindingObject modelObject : viewModelObjects) {
+            if (modelObject.getValueType().equals("IndexObject")) {
+                for (BindingObject obj : modelObject.getBindingObjects()) {
+                    if (obj.getName().equals(name)) {
+                        addObjectToList(obj, copyItemPath, objects, i - 2);
+                    }
+                }
+            } else {
+                if (modelObject.getName().equals(name)) {
+                    addObjectToList(modelObject, copyItemPath, objects, i - 2);
+                }
+            }
+        }
+        return objects;
+    }
+
+    private void addObjectToList(BindingObject bindingObj, List<String> itemPath, List<BindingObject> listObj, int i){
+        String name = null;
+        if(i < 0) {
+            name = itemPath.get(i+1);
+            if(bindingObj.getName().equals(name))
+                listObj.add(bindingObj);
+            return;
+        }
+        name = itemPath.get(i);
+        List<BindingObject> viewModelObjects = bindingObj.getBindingObjects();
+        for (BindingObject modelObject : viewModelObjects) {
+            if(modelObject.getValueType().equals("IndexObject")){
+                for (BindingObject obj : modelObject.getBindingObjects()) {
+                    if (obj.getName().equals(name)) {
+                        addObjectToList(obj, itemPath, listObj, i-1);
+                    }
+                }
+            } else {
+                if (modelObject.getName().equals(name)) {
+                    addObjectToList(modelObject, itemPath, listObj, i-1);
+                }
+            }
+        }
+    }
+
+    public void addDataModelItems(BindingData bindingData, List<Part> nextSiblings, List<String> itemPath, List<BindingObject> dataModelObject, String value) {
+        List<BindingData> viewModels = getDataModels();
+        int index = 0;
+        for (BindingData viewModel : viewModels) {
+            if (viewModel.equals(bindingData)) {
+                List<String> bindingObjectItemPath = new ArrayList<String>();
+                for (int i = 1; i < itemPath.size(); i++) {
+                    bindingObjectItemPath.add(itemPath.get(i));
+                }
+                List<BindingObject> viewModelParentObjects = getBindingObjectsList(bindingData, bindingObjectItemPath);
+                if (viewModelParentObjects != null && viewModelParentObjects.size() > 0) {
+                    for (BindingObject viewModelParentObject : viewModelParentObjects) {
+                        if(viewModelParentObject.getValueType().equals("Array")){
+                            for (BindingObject obj : viewModelParentObject.getBindingObjects()) {
+                                obj.insertChildBefore(dataModelObject.get(index), nextSiblings.get(index));
+                                index++;
+                            }
+                        } else {
+                            viewModelParentObject.insertChildBefore(dataModelObject.get(index), nextSiblings.get(index));
+                            index++;
+                        }
+                    }
+                } else {
+                    bindingData.insertChildBefore(dataModelObject.get(index), nextSiblings.get(index));
+                    index++;
+                }
+            }
+            fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATAMODEL_ITEM_ADDED, viewModel, value, getNumberOfDataModels() - 1, null));
+        }
+    }
+
+    public void setDataModel(BindingData dataModel, BindingData newDataModel) {
+        Part nextSibling = dataModel.getNextSibling();
+        dataBindingPart.removeChild(dataModel);
+        dataBindingPart.insertChildBefore(newDataModel, nextSibling);
+        fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATAMODEL_SET_DATASOURCE, newDataModel, null, getNumberOfDataModels() - 1, null));
+    }
+
+    public void unlinkDataModel(BindingData dataModel, BindingData newDataModel) {
+        fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATAMODEL_CHANGED, newDataModel, null, getNumberOfDataModels() - 1, null));
+    }
+
+    public void renameDataModel(BindingData bindingData, String newName) {
+        String oldName = bindingData.getModelName();
+        bindingData.setModelName(newName);
+        fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATAMODEL_RENAMED, bindingData, newName, oldName));
+    }
+    
+    public void renameDataModelItems(BindingData bindingData, String newName, List<String> itemPath) {
+        BindingObject viewModelObject = getDataModelObject(bindingData, itemPath);
+
+        if (viewModelObject != null)
+            viewModelObject.setName(newName);
+
+        StringBuffer oldPath = new StringBuffer();
+        for (int i = itemPath.size() - 1; i >= 0; i--) {
+            if (oldPath.length() > 0) {
+                oldPath.append(".");
+            }
+            oldPath.append(itemPath.get(i));
+        }
+
+        StringBuffer newPath = new StringBuffer();
+        for (int i = itemPath.size() - 1; i >= 1; i--) {
+            if (newPath.length() > 0) {
+                newPath.append(".");
+            }
+            newPath.append(itemPath.get(i));
+        }
+        newPath.append("." + newName);
+        fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATAMODEL_ITEM_RENAMED, bindingData, newPath.toString(), oldPath.toString()));
+    }
+
+    public BindingObject getDataModelObject(BindingData bindingData, List<String> itemPath) {
+        List<BindingObject> viewModelObjects = bindingData.getBindingObjects();
+        BindingObject object = null;
+        List<String> modelPath = new ArrayList<String>();
+
+        if ((itemPath == null) || (itemPath.isEmpty())) {
+            return null;
+        }
+
+        for (String path : itemPath) {
+            modelPath.add(path);
+        }
+
+        if (modelPath.isEmpty()) {
+            return null;
+        }
+
+        modelPath.remove(modelPath.size() - 1);
+        for (int i = 0; i < modelPath.size(); i++) {
+            String name = modelPath.get(modelPath.size() - 1);
+            modelPath.remove(modelPath.size() - 1);
+            for (BindingObject modelObject : viewModelObjects) {
+                if (modelObject.getName().equals(name)) {
+                    object = getDataModelObject(modelObject, modelPath);
+                    if (object == null) {
+                        object = modelObject;
+                    }
+                }
+            }
+        }
+        return object;
+    }
+
+    private BindingObject getDataModelObject(BindingObject viewModelObject, List<String> itemPath) {
+        List<BindingObject> subViewModelObjects = viewModelObject.getBindingObjects();
+        BindingObject object = null;
+
+        for (int i = 0; i < itemPath.size(); i++) {
+            String name = itemPath.get(itemPath.size() - 1);
+            itemPath.remove(itemPath.size() - 1);
+            for (BindingObject subViewModelObject : subViewModelObjects) {
+                if (subViewModelObject.getName().equals(name)) {
+                    object = getDataModelObject(subViewModelObject, itemPath);
+                    if (object == null) {
+                        object = subViewModelObject;
+                    }
+                }
+            }
+        }
+        return object;
+    }
+
+    public void removeDataModel(BindingData bindingData) {
+        dataBindingPart.removeChild(bindingData);
+        fireEvent(new BindingDataSetEvent(BindingDataSetEventType.DATAMODEL_REMOVED, bindingData, 0, null));
+    }
+
+    private void removeChildDataModelObject(BindingObject dataModelObject, String childName, String value) {
+        for (BindingObject object : dataModelObject.getBindingObjects()) {
+            if(object.getValueType().equals("IndexObject")){
+                for (BindingObject obj : object.getBindingObjects()) {
+                    if (obj.getName().equals(childName)) {
+                        object.removeChild(obj);
+                        break;
+                    }
+                }
+            } else {
+                if (object.getName().equals(childName)) {
+                    dataModelObject.removeChild(object);
+                    break;
+                }
+            }
+        }
+    }
+
+    private void removeChildDataModelObject(BindingData bindingData, String childName, String value) {
+        for (BindingObject object : bindingData.getBindingObjects()) {
+            if (object.getName().equals(childName)) {
+                bindingData.removeDataModelObject(object);
+                break;
+            }
+        }
+    }
+
+    private void removeAllChildDataModelObject(BindingData bindingData) {
+        bindingData.clearDataModelObjects();
+        bindingData.setSourceName(null);
+    }
+
+    private void fireEvent(final BindingDataSetEvent bindingDataEvent) {
+        Display.getDefault().syncExec(new Runnable() {
+            @Override
+            public void run() {
+                fireEvent(bindingDataEvent, listeners);
+            }
+        });
+    }
+
+    private void fireEvent(BindingDataSetEvent bindingEvent, List<IBindingDataSetListener> listeners) {
+        Iterator<IBindingDataSetListener> itr = listeners.iterator();
+        IBindingDataSetListener listener = null;
+
+        processEventFlag = true;
+        while (itr.hasNext()) {
+            listener = itr.next();
+            switch (bindingEvent.getType()) {
+            case DATASOURCE_ADDED:
+                listener.dataSourceAdded(bindingEvent);
+                break;
+            case DATASOURCE_RENAMED:
+                listener.dataSourceRenamed(bindingEvent);
+                break;
+            case DATASOURCE_REMOVED:
+                listener.dataSourceRemoved(bindingEvent);
+                break;
+            case DATASOURCE_CHANGED:
+                listener.dataSourceChanged(bindingEvent);
+                break;
+            case ALL_DATAMODEL_RESETED:
+                listener.allDataModelReseted(bindingEvent);
+                break;
+            case DATAMODEL_ADDED:
+                listener.dataModelAdded(bindingEvent);
+                break;
+            case DATAMODEL_REMOVED:
+                listener.dataModelRemoved(bindingEvent);
+                break;
+            case DATAMODEL_RENAMED:
+                listener.dataModelRenamed(bindingEvent);
+                break;
+            case DATAMODEL_MOVED:
+                listener.dataModelMoved(bindingEvent);
+                break;
+            case DATAMODEL_CHANGED:
+            case DATAMODEL_SET_DATASOURCE:
+            case DATAMODEL_ITEM_ADDED:
+            case DATAMODEL_ITEM_REMOVED:
+                listener.dataModelChanged(bindingEvent);
+                break;
+            case DATAMODEL_ITEM_RENAMED:
+                listener.dataModelItemRenamed(bindingEvent);
+                break;
+
+            default:
+                break;
+            }
+        }
+        processEventFlag = false;
+
+        if (!removeListeners.isEmpty()) {
+            for (IBindingDataSetListener removeListener : removeListeners) {
+                listeners.remove(removeListener);
+            }
+            removeListeners.clear();
+        }
+    }
+
+    public void addBindingDataListener(IBindingDataSetListener listener) {
+        listeners.add(listener);
+    }
+
+    public void removeBindingDataListener(IBindingDataSetListener listener) {
+        if (!processEventFlag) {
+            listeners.remove(listener);
+        } else {
+            removeListeners.add(listener);
+        }
+    }
+
+    public List<BindingData> getDataModels() {
+        List<BindingData> dataModels = new ArrayList<>();
+        for (Part child : dataBindingPart.getChildren()) {
+            if (child.getType() == PartType.DATAMODEL) {
+                dataModels.add((BindingData) child);
+            }
+        }
+        return dataModels;
+    }
+
+    public int getNumberOfDataModels() {
+        int size = 0;
+        for (Part child : dataBindingPart.getChildren()) {
+            if (child.getType() == PartType.DATAMODEL) {
+                size++;
+            }
+        }
+        return size;
+    }
+    
+    public List<BindingData> getDataSources() {
+        List<BindingData> dataSources = new ArrayList<>();
+        for (Part child : dataBindingPart.getChildren()) {
+            if (child.getType() == PartType.DATASOURCE) {
+                dataSources.add((BindingData) child);
+            }
+        }
+        return dataSources;
+    }
+
+    public int getNumberOfDataSources() {
+        int size = 0;
+        for (Part child : dataBindingPart.getChildren()) {
+            if (child.getType() == PartType.DATASOURCE) {
+                size++;
+            }
+        }
+        return size;
+    }
+
+    public BindingData getDataSource(String name) {
+        for (Part child : dataBindingPart.getChildren()) {
+            if (child instanceof BindingData && child.getType() == PartType.DATASOURCE && ((BindingData) child).getItemName().equals(name)) {
+                return (BindingData) child;
+            }
+        }
+        return null;
+    }
+
+    public Part getNextSiblingToAddDataSource() {
+        Part dataModel = null;
+        for (Part bindingData : dataBindingPart.getChildren()) {
+            if (bindingData.getDescriptorId().equals(LayoutSchemaConstants.DATAMODEL)) {
+                dataModel = bindingData;
+                break;
+            }
+        }
+        return dataModel;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingDataSetEvent.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingDataSetEvent.java
new file mode 100644 (file)
index 0000000..a13b23a
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model;
+
+public class BindingDataSetEvent {
+
+    public enum BindingDataSetEventType {
+        ALL_DATASOURCE_RESETED, DATASOURCE_ADDED, DATASOURCE_REMOVED, DATASOURCE_RENAMED, DATASOURCE_MOVED, ALL_DATAMODEL_RESETED, DATAMODEL_ADDED, DATAMODEL_REMOVED, DATAMODEL_RENAMED, DATAMODEL_MOVED, DATAMODEL_ITEM_ADDED, DATAMODEL_ITEM_REMOVED, DATAMODEL_ITEM_RENAMED, DATAMODEL_CHANGED, DATASOURCE_CHANGED, DATAMODEL_SET_DATASOURCE, DATAMODEL_UNLINK
+    }
+
+    private BindingDataSetEventType type;
+    private BindingData bindingData;
+    private int index;
+    private String value;
+    private BindingData oldBindingData;
+    private String oldValue;
+
+    public BindingDataSetEvent(BindingDataSetEventType type, BindingData bindingData, int index, BindingData oldBindingData) {
+        this.type = type;
+        this.bindingData = bindingData;
+        this.index = index;
+        this.oldBindingData = oldBindingData;
+    }
+
+    public BindingDataSetEvent(BindingDataSetEventType type, BindingData bindingData, String value, int index, BindingData oldBindingData) {
+        this.type = type;
+        this.bindingData = bindingData;
+        this.value = value;
+        this.index = index;
+        this.oldBindingData = oldBindingData;
+    }
+
+    public BindingDataSetEvent(BindingDataSetEventType type, BindingData bindingData, String value, String oldValue) {
+        this.type = type;
+        this.bindingData = bindingData;
+        this.value = value;
+        this.oldValue = oldValue;
+    }
+
+    public BindingDataSetEventType getType() {
+        return type;
+    }
+
+    public BindingData getBindingData() {
+        return bindingData;
+    }
+
+    public int getIndex() {
+        return index;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public BindingData getOldBindingData() {
+        return oldBindingData;
+    }
+
+    public String getOldValue() {
+        return oldValue;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingObject.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/BindingObject.java
new file mode 100644 (file)
index 0000000..93c6e72
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.efluibuilder.model.part.DataBindingPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+
+public class BindingObject extends Part {
+
+    public BindingObject(String uniqueId, DataBindingPart _parentPart) {
+        super(uniqueId, _parentPart, PartType.BINDINGOBJECT);
+    }
+
+    /**
+     * Sets a name.
+     * 
+     * @param name
+     */
+    public void setName(String name) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_NAME, name);
+    }
+
+    /**
+     * Gets a name.
+     * 
+     * @return name
+     */
+    public String getName() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_NAME);
+    }
+
+    /**
+     * Sets a value.
+     * 
+     * @param value
+     */
+    public void setValue(String value) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_VALUE, value);
+    }
+
+    /**
+     * Gets a value.
+     * 
+     * @return value
+     */
+    public String getValue() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_VALUE);
+    }
+
+    /**
+     * Sets a type.
+     * 
+     * @param type
+     */
+    public void setValueType(String type) {
+        this.setPropertyValue(BuilderConstants.ATTRIBUTE_TYPE, type);
+    }
+
+    /**
+     * Gets a type.
+     * 
+     * @return type
+     */
+    public String getValueType() {
+        return getPropertyValue(BuilderConstants.ATTRIBUTE_TYPE);
+    }
+
+    /**
+     * Get observableObjects.
+     * 
+     * @return observableObjects
+     */
+    public List<BindingObject> getBindingObjects() {
+        List<BindingObject> bindingObjects = new ArrayList<BindingObject>();
+        for (Part child : getChildren()) {
+            bindingObjects.add((BindingObject) child);
+        }
+        return bindingObjects;
+    }
+
+    public BindingObject clone() {
+        BindingObject newObj = null;
+        try {
+            newObj = (BindingObject) super.clone();
+            for (Part bindingObject : getChildren()) {
+                newObj.insertChildBefore(((BindingObject) bindingObject).clone(), null);
+            }
+
+        } catch (CloneNotSupportedException e) {
+            e.printStackTrace();
+        }
+        return newObj;
+    }
+
+    public String getPath() {
+        String path = getName();
+        return path;
+    }
+
+    public BindingData getOwnerBindingData() {
+        Part parent = this.getParent();
+        while (!(parent instanceof BindingData)) {
+            parent = parent.getParent();
+        }
+        return (BindingData) parent;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/DataBindingPartProperty.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/DataBindingPartProperty.java
new file mode 100644 (file)
index 0000000..46d975f
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model;
+
+/**
+ * A property class.
+ */
+public class DataBindingPartProperty {
+
+       /**
+        * Model name.
+        */
+       private String modelName;
+
+       /**
+        * Item Name
+        */
+       private String viewName;
+
+       /**
+        * Data Type binded
+        */
+       private String dataType;
+
+       /**
+        * Whether property value is changed.
+        */
+       private boolean isChanged;
+       
+       /**
+     * Allowed binding type
+     */
+    private String allowedBindingType;
+
+    /**
+     * json OR xml
+     */
+    private String sourceType;
+
+    /**
+        * Constructor.
+        * 
+        * @param name
+        *            a property name
+        * @param value
+        *            a property value
+        * @param defaultValue
+        *            a default property value
+        */
+       public DataBindingPartProperty(String modelName, String viewName, String dataType, String allowedBindingType, String sourceType) {
+               this.modelName = modelName;
+               this.viewName = viewName;
+               this.dataType = dataType;
+               this.allowedBindingType = allowedBindingType;
+        this.sourceType = sourceType;
+               isChanged = false;
+       }
+
+       /**
+        * Gets a property name.
+        * 
+        * @return property name
+        */
+       public String getModelName() {
+               return modelName;
+       }
+
+       /**
+        * Gets a property value.
+        * 
+        * @return property value
+        */
+       public String getViewItemName() {
+               return viewName;
+       }
+
+       /**
+        * Gets a property defaultValue.
+        * 
+        * @return property defaultValue
+        */
+       public String getDataType() {
+               return dataType;
+       }
+
+       /**
+        * Returns <code>true</code> if property value can be reset.
+        * 
+        * @return <code>true</code> if property value can be reset, and
+        *         <code>false</code> otherwise
+        */
+       public boolean isChanged() {
+               return isChanged;
+       }
+
+    public String getAllowedBindingType() {
+        return allowedBindingType;
+    }
+
+    public void setAllowedBindingType(String allowedBindingType) {
+        this.allowedBindingType = allowedBindingType;
+    }
+
+    public String getSourceType() {
+        return sourceType;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/IBindingDataSetListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/IBindingDataSetListener.java
new file mode 100644 (file)
index 0000000..bf8c58c
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model;
+
+public interface IBindingDataSetListener {
+
+    void allDataSourcesReseted(BindingDataSetEvent e);
+
+    void dataSourceAdded(BindingDataSetEvent e);
+
+    void dataSourceRemoved(BindingDataSetEvent e);
+
+    void dataSourceRenamed(BindingDataSetEvent e);
+
+    void dataSourceMoved(BindingDataSetEvent e);
+
+    void dataSourceChanged(BindingDataSetEvent e);
+
+    void allDataModelReseted(BindingDataSetEvent e);
+
+    void dataModelAdded(BindingDataSetEvent e);
+
+    void dataModelRemoved(BindingDataSetEvent e);
+
+    void dataModelRenamed(BindingDataSetEvent e);
+
+    void dataModelMoved(BindingDataSetEvent e);
+
+    void dataModelChanged(BindingDataSetEvent e);
+
+    void dataModelItemRenamed(BindingDataSetEvent e);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/TreeItemData.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/TreeItemData.java
new file mode 100644 (file)
index 0000000..9d655fe
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TreeItemData {
+
+    // For BindingData
+       private BindingData model;
+
+       //For BindingObject
+       private String originModelName;
+       private String objectType;
+       private String objectValue;
+       private String source; //original or custom
+       private boolean isBinded = false;
+       private List<String> selectionPath = new ArrayList<String>();
+       private String allowedBindingType;
+
+       /**
+        * Gets a model.
+        * 
+        * @return model
+        */
+       public BindingData getModel() {
+               return model;
+       }
+
+       /**
+        * Sets a model.
+        * 
+        * @param dataModel
+        */
+       public void setModel(BindingData dataModel) {
+               this.model = dataModel;
+       }
+
+       public boolean getBindedValue() {
+               return isBinded;
+       }
+
+       public void setBindedValue(boolean isBinded) {
+               this.isBinded = isBinded;
+       }
+
+       /**
+        * Gets a origin model name.
+        * 
+        * @return origin model name
+        */
+       public String getOriginModelName() {
+               return originModelName;
+       }
+
+       /**
+        * Sets a origin model name.
+        * 
+        * @param originModelName
+        */
+       public void setOriginModelName(String originModelName) {
+               this.originModelName = originModelName;
+       }
+
+       /**
+        * Gets a object type.
+        * 
+        * @return object type
+        */
+       public String getObjectType() {
+               return objectType;
+       }
+
+       /**
+        * Sets a object type.
+        * 
+        * @param objectType
+        */
+       public void setObjectType(String objectType) {
+               this.objectType = objectType;
+       }
+
+       /**
+        * Gets a object value.
+        * 
+        * @return object value
+        */
+       public String getObjectValue() {
+               return objectValue;
+       }
+
+       /**
+        * Sets a object value.
+        * 
+        * @param objectValue
+        */
+       public void setObjectValue(String objectValue) {
+               this.objectValue = objectValue;
+       }
+
+       /**
+        * Gets a object source.
+        * 
+        * @return String source
+        */
+       public String getSource() {
+               return source;
+       }
+
+       /**
+        * Sets a object source.
+        * 
+        * @param source
+        */
+       public void setSource(String source) {
+               this.source = source;
+       }
+
+       public void setSelectionPath(List<String> itemPath) {
+               selectionPath.clear();
+               selectionPath.addAll(itemPath);
+       }
+
+    public String getAllowedBindingType() {
+        return allowedBindingType;
+    }
+
+    public void setAllowedBindingType(String allowedBindingType) {
+        this.allowedBindingType = allowedBindingType;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/WidgetDataSourceBindingView.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/WidgetDataSourceBindingView.java
new file mode 100644 (file)
index 0000000..f62e58b
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model;
+
+public class WidgetDataSourceBindingView {
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/ConfigureDataModelCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/ConfigureDataModelCommand.java
new file mode 100644 (file)
index 0000000..de6d55d
--- /dev/null
@@ -0,0 +1,177 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model.command;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingManager;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingDataSetEvent.BindingDataSetEventType;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingObject;
+
+public class ConfigureDataModelCommand extends Command {
+    private DataBindingManager dataBindingManager;
+    private BindingData dataModel;
+    private Part nextSibling;
+    private List<String> itemPath;
+    private String childName;
+    private String value;
+    private BindingDataSetEventType type;
+    private List<BindingObject> oldBindingObjects;
+    private List<Part> nextSiblings;
+    private BindingData newDataModel;
+    private String oldName;
+
+    // For Data Model addition
+    // For Data Model deletion
+    public ConfigureDataModelCommand(BindingDataSetEventType type, DataBindingManager dataBindingManager, BindingData dataModel) {
+        super("Configure DataModel");
+        this.type = type;
+        this.dataBindingManager = dataBindingManager;
+        this.dataModel = dataModel;
+    }
+
+    // For DataModelItem deletion
+    public ConfigureDataModelCommand(BindingDataSetEventType type, DataBindingManager dataBindingManager, BindingData bindingData, List<String> itemPath, String childName) {
+        super("Configure DataModelItem");
+        this.type = type;
+        this.dataBindingManager = dataBindingManager;
+        this.dataModel = bindingData;
+        this.itemPath = itemPath;
+        this.childName = childName;
+    }
+
+    // For DataModel Renaming
+    public ConfigureDataModelCommand(BindingDataSetEventType type, DataBindingManager dataBindingManager, BindingData dataModel, String newValue) {
+        super("Configure DataModel");
+        this.type = type;
+        this.dataBindingManager = dataBindingManager;
+        this.dataModel = dataModel;
+        this.value = newValue;
+    }
+
+    public ConfigureDataModelCommand(BindingDataSetEventType type, DataBindingManager dataBindingManager, BindingData bindingData, List<String> itemPath, String childName, String value, int index) {
+        super("Configure DataModel");
+        this.type = type;
+        this.dataBindingManager = dataBindingManager;
+        this.dataModel = bindingData;
+        this.itemPath = itemPath;
+        this.childName = childName;
+        this.value = value;
+    }
+
+    // For Setting DataModel
+    public ConfigureDataModelCommand(BindingDataSetEventType type, DataBindingManager dataBindingManager, BindingData dataModelTobeReplaced, BindingData newDataModel) {
+        super("Configure DataModel");
+        this.type = type;
+        this.dataBindingManager = dataBindingManager;
+        this.dataModel = dataModelTobeReplaced;
+        this.newDataModel = newDataModel;
+    }
+
+    @Override
+    public boolean canExecute() {
+        if ((dataBindingManager == null)) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    @Override
+    public void execute() {
+        if (canExecute()) {
+            switch(type){
+            case DATAMODEL_ADDED:
+                dataBindingManager.addDataModel(dataModel, null);
+                break;
+            case DATAMODEL_REMOVED:
+                nextSibling = dataModel.getNextSibling();
+                dataBindingManager.removeDataModel(dataModel);
+                break;
+            case DATAMODEL_RENAMED:
+                oldName = dataModel.getModelName();
+                dataBindingManager.renameDataModel(dataModel, value);
+                break;
+            case DATAMODEL_SET_DATASOURCE:
+                dataBindingManager.setDataModel(dataModel, newDataModel);
+                break;
+            case DATAMODEL_ITEM_REMOVED:
+                nextSiblings = new ArrayList<Part>();
+                oldBindingObjects = dataBindingManager.getDataModelObjects(dataModel, itemPath);
+                if(oldBindingObjects != null) {
+                    for (BindingObject obj : oldBindingObjects) {
+                        nextSiblings.add(obj.getNextSibling());
+                    }
+                }
+                dataBindingManager.removeDataModelItems(dataModel, itemPath, childName, value);
+                break;
+            case DATAMODEL_ITEM_ADDED:
+                dataBindingManager.addDataModelItem(dataModel, itemPath, childName, value);
+                itemPath.add(0, childName);
+                break;
+            case DATAMODEL_ITEM_RENAMED:
+                BindingObject bo = dataBindingManager.getDataModelObject(dataModel, itemPath);
+                if (bo != null) {
+                    oldName = bo.getName();
+                    dataBindingManager.renameDataModelItems(dataModel, value, itemPath);
+                    itemPath.remove(0);
+                    itemPath.add(0, value);
+                }
+                break;
+            case DATAMODEL_UNLINK:
+                dataBindingManager.unlinkDataModel(dataModel, newDataModel);
+                break;
+            default:
+                break;
+            }
+        }
+    }
+
+    @Override
+    public void undo() {
+        switch (type) {
+        case DATAMODEL_ADDED:
+            dataBindingManager.removeDataModel(dataModel);
+            break;
+        case DATAMODEL_REMOVED:
+            dataBindingManager.addDataModel(dataModel, nextSibling);
+            break;
+        case DATAMODEL_SET_DATASOURCE:
+            dataBindingManager.setDataModel(newDataModel, dataModel);
+            break;
+        case DATAMODEL_RENAMED:
+            dataBindingManager.renameDataModel(dataModel, oldName);
+            break;
+        case DATAMODEL_ITEM_REMOVED:
+            dataBindingManager.addDataModelItems(dataModel, nextSiblings, itemPath, oldBindingObjects, value);
+            break;
+        default:
+            break;
+        }
+        super.undo();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/ConfigureDataSourceCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/ConfigureDataSourceCommand.java
new file mode 100644 (file)
index 0000000..7ba25f1
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model.command;
+
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingManager;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingDataSetEvent.BindingDataSetEventType;
+
+public class ConfigureDataSourceCommand extends Command {
+    private BindingData originalDataSource;
+    private BindingData dataSource;
+    private DataBindingManager dataBindingManager;
+    private BindingDataSetEventType type;
+    private Part nextSibling;
+    private String value;
+    private String oldName;
+
+    // For Adding DataSource
+    // For Removing DataSource
+    // For Editing DataSource
+    public ConfigureDataSourceCommand(BindingDataSetEventType type, DataBindingManager dataBindingManager, BindingData dataSource) {
+        super("Configure DataSource");
+        this.dataSource = dataSource;
+        this.dataBindingManager = dataBindingManager;
+        this.type = type;
+    }
+
+    // For Renaming DataSource
+    public ConfigureDataSourceCommand(BindingDataSetEventType type, DataBindingManager dataBindingManager, BindingData bindingData, String value) {
+        super("Configure DataSource");
+        this.type = type;
+        this.dataBindingManager = dataBindingManager;
+        this.dataSource = bindingData;
+        this.value = value;
+    }
+
+    @Override
+    public void execute() {
+        switch (type) {
+        case DATASOURCE_ADDED:
+            nextSibling = dataBindingManager.getNextSiblingToAddDataSource();
+            dataBindingManager.addDataSource(dataSource, nextSibling);
+            break;
+        case DATASOURCE_RENAMED:
+            oldName = dataSource.getSourceName();
+            dataBindingManager.renameDataSource(dataSource, value);
+            break;
+        case DATASOURCE_REMOVED:
+            nextSibling = dataSource.getNextSibling();
+            dataBindingManager.removeDataSource(dataSource);
+            break;
+        case DATASOURCE_CHANGED:
+            List<BindingData> dataSources = dataBindingManager.getDataSources();
+            for (BindingData dataSource : dataSources) {
+                if (dataSource.getSourceName().equals(this.dataSource.getSourceName())) {
+                    nextSibling = dataSource.getNextSibling();
+                    originalDataSource = dataSource;
+                    dataBindingManager.removeDataSource(dataSource);
+                    dataBindingManager.addDataSource(this.dataSource, nextSibling);
+                    break;
+                }
+            }
+            break;
+        default:
+            break;
+        }
+    }
+
+    @Override
+    public boolean canExecute() {
+        return super.canExecute();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.commands.Command#canUndo()
+     */
+    @Override
+    public boolean canUndo() {
+        return super.canUndo();
+    }
+
+    @Override
+    public void undo() {
+        switch (type) {
+        case DATASOURCE_ADDED:
+            dataBindingManager.removeDataSource(dataSource);
+            break;
+        case DATASOURCE_RENAMED:
+            dataBindingManager.renameDataSource(dataSource, oldName);
+            break;
+        case DATASOURCE_REMOVED:
+            dataBindingManager.addDataSource(dataSource, nextSibling);
+            break;
+        case DATASOURCE_CHANGED:
+            List<BindingData> dataSources = dataBindingManager.getDataSources();
+            BindingData docPartDataSource = null;
+            for (BindingData dataSource : dataSources) {
+                if (dataSource.getSourceName().equals(this.dataSource.getSourceName())) {
+                    docPartDataSource = dataSource;
+                    break;
+                }
+            }
+            dataBindingManager.removeDataSource(docPartDataSource);
+            dataBindingManager.addDataSource(originalDataSource, nextSibling);
+            break;
+        default:
+            break;
+        }
+
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/DataBindingCommandAdapter.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/DataBindingCommandAdapter.java
new file mode 100644 (file)
index 0000000..0ed9a0e
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.view.databinding.model.command;
+
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartObserver;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditCommandStack;
+
+
+/*
+ * We now use the EMFCommandStack instead of the GEFCommandStack.
+ */
+public class DataBindingCommandAdapter extends CompoundCommand {
+    private Part databindingPart;
+    DesignEditCommandStack commandStack;
+
+    public DataBindingCommandAdapter(Part databindingPart, DesignEditCommandStack commandStack) {
+        this.databindingPart = databindingPart;
+        this.commandStack = commandStack;
+    }
+
+    @Override
+    public void execute() {
+        super.execute();
+        processPostExecute(PartObserver.MESSAGE_GEF_EXECUTE);
+    }
+
+    @Override
+    public void redo() {
+        super.redo();
+        processPostExecute(PartObserver.MESSAGE_GEF_REDO);
+    }
+
+    @Override
+    public void undo() {
+        super.undo();
+        processPostExecute(PartObserver.MESSAGE_GEF_UNDO);
+    }
+
+    private void processPostExecute(String sender) {
+        // make dirty for the layout.xml
+        commandStack.makeDirtyByForce();
+        // If user undo/redo in Source tab (not Design), DesignEditCommandStack cannot handle it.
+        // So databindingPart change must be handled here not DesignEditCommandStack.
+        databindingPart.notifyObservers(sender);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/DataBindingCommandFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/DataBindingCommandFactory.java
new file mode 100644 (file)
index 0000000..adb36b1
--- /dev/null
@@ -0,0 +1,408 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model.command;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.efluibuilder.model.command.SetPropertyPartCommand;
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.view.databinding.dialog.DataBindingFilterDialog;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingDataSetEvent.BindingDataSetEventType;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingObject;
+import org.tizen.efluibuilder.ui.view.databinding.model.DataBindingPartProperty;
+import org.tizen.efluibuilder.ui.view.databinding.utils.BuilderConstants;
+import org.tizen.efluibuilder.ui.view.databinding.utils.DataBindingHelper;
+import org.tizen.efluibuilder.ui.view.databinding.utils.DataBindingHelper.PopUpListener;
+
+public class DataBindingCommandFactory {
+
+    public static Command createAddDataSourceCommand(CombineEditorPart combineEditorPart, BindingData dataSource) {
+        Command addDataSourceCommand = new ConfigureDataSourceCommand(BindingDataSetEventType.DATASOURCE_ADDED, combineEditorPart.getDataBindManager(), dataSource);
+        return addDataSourceCommand;
+    }
+
+    public static Command createRenameDataSourceCommand(CombineEditorPart combineEditorPart, BindingData dataSource, String newName) {
+        CompoundCommand cc = new CompoundCommand("Rename DataSource");
+        Command renameDataSourceCommand = new ConfigureDataSourceCommand(BindingDataSetEventType.DATASOURCE_RENAMED, combineEditorPart.getDataBindManager(), dataSource, newName);
+        cc.add(renameDataSourceCommand);
+        return cc;
+    }
+
+    public static Command createRemoveDataSourceCommand(CombineEditorPart combineEditorPart, BindingData dataSource) {
+        CompoundCommand cc = new CompoundCommand("Remove DataSource");
+        Command removeDataSourceCommand = new ConfigureDataSourceCommand(BindingDataSetEventType.DATASOURCE_REMOVED, combineEditorPart.getDataBindManager(), dataSource);
+        cc.add(removeDataSourceCommand);
+        Command removeDataModelCommand = null;
+        List<BindingData> dataModels = combineEditorPart.getDataBindManager().getDataModels();
+        for (BindingData dataModel : dataModels) {
+            if (dataModel.getSourceName() != null && dataModel.getSourceName().equals(dataSource.getSourceName())) {
+                removeDataModelCommand = createRemoveDataModelCommand(combineEditorPart, dataModel);
+                cc.add(removeDataModelCommand);
+            }
+        }
+        return cc;
+    }
+
+    public static Command createEditDataSourceCommand(CombineEditorPart combineEditorPart, BindingData dataSource) {
+        CompoundCommand cc = new CompoundCommand("Edit DataSource");
+        Command editDataSourceCommand = new ConfigureDataSourceCommand(BindingDataSetEventType.DATASOURCE_CHANGED, combineEditorPart.getDataBindManager(), dataSource);
+        cc.add(editDataSourceCommand);
+        List<BindingData> dataModels = combineEditorPart.getDataBindManager().getDataModels();
+        for (BindingData dataModel : dataModels) {
+            if (dataModel.getSourceName() != null && dataModel.getSourceName().equals(dataSource.getSourceName())) {
+//                Part nextSibling = dataModel.getNextSibling();
+                Command removeDataModelCommand = createRemoveDataModelCommand(combineEditorPart, dataModel);
+                cc.add(removeDataModelCommand);
+
+                BindingData newDataModel = (BindingData) PartUtil.createPart(PartType.DATAMODEL, LayoutSchemaConstants.DATAMODEL);
+                newDataModel.setSourceName(dataSource.getSourceName());
+                newDataModel.setItemName(dataModel.getItemName());
+                newDataModel.setModelName(dataModel.getModelName());
+                newDataModel.setModelType(dataSource.getModelType());
+                for (BindingObject bo : dataSource.getBindingObjects()) {
+                    BindingObject newBo = bo.clone();
+                    newDataModel.insertChildBefore(newBo, null);
+                }
+
+                Command addDataModelCommand = createAddDataModelCommand(combineEditorPart, newDataModel);
+                cc.add(addDataModelCommand);
+            }
+        }
+        return cc;
+    }
+
+    public static Command createAddDataModelCommand(CombineEditorPart combineEditorPart, BindingData dataModel) {
+        Command addDataModelCommand = new ConfigureDataModelCommand(BindingDataSetEventType.DATAMODEL_ADDED, combineEditorPart.getDataBindManager(), dataModel);
+        return addDataModelCommand;
+    }
+
+    public static Command createSetDataModelCommand(CombineEditorPart combineEditorPart, BindingData dataModelToBeReplaced, BindingData newDataModel) {
+        CompoundCommand cc = new CompoundCommand("Set DataSource To Model");
+        Command setDataModelCommand = new ConfigureDataModelCommand(BindingDataSetEventType.DATAMODEL_SET_DATASOURCE, combineEditorPart.getDataBindManager(), dataModelToBeReplaced,
+                newDataModel);
+        cc.add(setDataModelCommand);
+        Command removeBindingInfoCommand = createRemoveBindingInfoCommand(combineEditorPart, dataModelToBeReplaced.getModelName(), null);
+        if (removeBindingInfoCommand != null) {
+            cc.add(removeBindingInfoCommand);
+        }
+        return cc;
+    }
+
+    public static Command createRemoveDataModelCommand(CombineEditorPart combineEditorPart, BindingData dataModel) {
+        CompoundCommand cc = new CompoundCommand("Remove DataModel");
+        Command removeDataModelCommand = new ConfigureDataModelCommand(BindingDataSetEventType.DATAMODEL_REMOVED, combineEditorPart.getDataBindManager(), dataModel);
+        cc.add(removeDataModelCommand);
+        Command removeBindingInfoCommand = createRemoveBindingInfoCommand(combineEditorPart, dataModel.getModelName(), null);
+        // if (removeBindingInfoCommand != null) {
+        // MessageBox msgBox = new
+        // MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_QUESTION |
+        // SWT.YES | SWT.NO);
+        // msgBox.setText("Data Binding");
+        // StringBuilder sb = new StringBuilder().append("Related binding
+        // Information will be deleted when deleting the data
+        // model.\n").append("Do you want to delete it ?");
+        // msgBox.setMessage(sb.toString());
+        // if (msgBox.open() == SWT.NO) {
+        // return null;
+        // } else {
+        // cc.add(removeBindingInfoCommand);
+        // }
+        // }
+        if (removeBindingInfoCommand != null) {
+            cc.add(removeBindingInfoCommand);
+        }
+        return cc;
+    }
+
+    public static Command createRenameDataModelCommand(CombineEditorPart combineEditorPart, BindingData dataModel, String newName) {
+        CompoundCommand cc = new CompoundCommand("Rename DataModel");
+        Command renameDataModelCommand = new ConfigureDataModelCommand(BindingDataSetEventType.DATAMODEL_RENAMED, combineEditorPart.getDataBindManager(), dataModel, newName);
+        cc.add(renameDataModelCommand);
+        Part viewsPart = PartUtil.findViewsPart(combineEditorPart.getDocumentPart());
+        CompoundCommand updateBindingInfoscommand = new CompoundCommand("Update BindingInfos");
+        addUpdateBindingInfoCommands(viewsPart, updateBindingInfoscommand, dataModel.getModelName(), newName);
+        if (!updateBindingInfoscommand.isEmpty()) {
+            cc.add(updateBindingInfoscommand);
+        }
+        return cc;
+    }
+
+    public static Command createRemoveDataModelItemCommand(CombineEditorPart combineEditorPart, BindingData dataModel, List<String> itemPath, String childName) {
+        CompoundCommand cc = new CompoundCommand("Remove DataModelItem");
+        Command removeDataModelItemCommand = new ConfigureDataModelCommand(BindingDataSetEventType.DATAMODEL_ITEM_REMOVED, combineEditorPart.getDataBindManager(), dataModel, itemPath, childName);
+        cc.add(removeDataModelItemCommand);
+        Command removeBindingInfoCommand = createRemoveBindingInfoCommand(combineEditorPart, dataModel.getModelName(), itemPath);
+        // if (removeBindingInfoCommand != null) {
+        // MessageBox msgBox = new
+        // MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_QUESTION |
+        // SWT.YES | SWT.NO);
+        // msgBox.setText("Data Binding");
+        // StringBuilder sb = new StringBuilder().append("Related binding
+        // Information will be deleted when deleting the data
+        // model.\n").append("Do you want to delete it ?");
+        // msgBox.setMessage(sb.toString());
+        // if (msgBox.open() == SWT.NO) {
+        // return null;
+        // } else {
+        // cc.add(removeBindingInfoCommand);
+        // }
+        // }
+        if (removeBindingInfoCommand != null) {
+            cc.add(removeBindingInfoCommand);
+        }
+
+        return cc;
+    }
+
+    public static Command createRemoveBindingInfoCommand(CombineEditorPart combineEditorPart, String name, List<String> itemPath) {
+        CompoundCommand removeBindingInfoscommand = new CompoundCommand("Remove BindingInfos");
+
+        String modelFullPath = null;
+        if (itemPath != null) {
+            for (int i = itemPath.size() - 1; i >= 0; i--) {
+
+                String path = itemPath.get(i);
+
+                if (i == itemPath.size() - 1 && path.lastIndexOf(" ") > 0)
+                    path = path.substring(0, path.lastIndexOf(" "));
+
+                if (modelFullPath == null)
+                    modelFullPath = path;
+                else
+                    modelFullPath = modelFullPath + BuilderConstants.SLASH + path;
+            }
+        } else
+            modelFullPath = name;
+        Part viewsPart = PartUtil.findViewsPart(combineEditorPart.getDocumentPart());
+        addRemoveBindingInfoCommands(viewsPart, removeBindingInfoscommand, modelFullPath);
+        if (removeBindingInfoscommand.isEmpty()) {
+            return null;
+        }
+        return removeBindingInfoscommand;
+    }
+
+    private static void addUpdateBindingInfoCommands(Part part, CompoundCommand command, String modelName, String updatedModelName) {
+        if (part instanceof ComponentPart) {
+            String dataBindValue = part.getPropertyValue(BuilderConstants.ATTRIBUTE_DATA_BIND);
+            if ((dataBindValue != null) && (!dataBindValue.isEmpty())) {
+                Map<String, String> bindingInfos = DataBindingHelper.parseToMap(dataBindValue);
+                Object[] bindingTypes = bindingInfos.keySet().toArray();
+                for (Object bindingType : bindingTypes) {
+                    String value = bindingInfos.get(bindingType);
+                    if ((value != null) && (value.startsWith(modelName))) {
+                        value = value.replace(modelName, updatedModelName);
+                        bindingInfos.remove(bindingType.toString());
+                        bindingInfos.put(bindingType.toString(), value);
+                        String bindingInfo = DataBindingHelper.makeStringFromMap(bindingInfos);
+                        Command updateBindingCommand = new SetPropertyPartCommand(part, BuilderConstants.ATTRIBUTE_DATA_BIND, bindingInfo);
+                        command.add(updateBindingCommand);
+                    }
+                }
+            }
+        }
+        for (Part child : part.getChildren()) {
+            addUpdateBindingInfoCommands(child, command, modelName, updatedModelName);
+        }
+    }
+
+    private static void addRemoveBindingInfoCommands(Part part, CompoundCommand command, String modelFullPath) {
+        if (part instanceof ComponentPart) {
+            String dataBindValue = part.getPropertyValue(BuilderConstants.ATTRIBUTE_DATA_BIND);
+            if (dataBindValue != null) {
+                String[] array = dataBindValue.split(BuilderConstants.FILTER_REGEX);
+                String modelPath = null;
+                for (int i = 0; i < array.length; i++) {
+                    if (modelPath == null)
+                        modelPath = array[i];
+                    else
+                        modelPath = modelPath + array[i];
+                }
+                if (modelPath != null && modelPath.contains(modelFullPath)) {
+                    Command removeBindingCommand = new SetPropertyPartCommand(part, BuilderConstants.ATTRIBUTE_DATA_BIND, "");
+                    command.add(removeBindingCommand);
+                }
+            }
+        }
+        for (Part child : part.getChildren()) {
+            addRemoveBindingInfoCommands(child, command, modelFullPath);
+        }
+    }
+
+    public static Command getAddBindingCommand(Part targetPart, BindingData dataModel, String itemPath, String bindingType) {
+        Command command = null;
+        String value = bindingType + ": " + xPathConversion(dataModel.getModelName() + BuilderConstants.SLASH + itemPath);
+        command = new SetPropertyPartCommand(targetPart, BuilderConstants.ATTRIBUTE_DATA_BIND, value);
+        return command;
+    }
+
+    public static Command createDropCommand(Part currentPart, DataBindingPartProperty property, Shell shell, Point popupPoint) {
+        Command cmd = null;
+        if (!(currentPart instanceof ComponentPart))
+            return null;
+        ComponentPart part = (ComponentPart) currentPart;
+
+        if (!checkDataBinding(part, property)) {
+            return null;
+        }
+        if (canApplyFilter(part, property)) {
+            String type = bindingTypeAllowedonPart(part);
+            DataBindingFilterDialog dialog = new DataBindingFilterDialog(Display.getCurrent().getActiveShell(), property, getLevelDiff(part, property), part.getDescriptorId(), type);
+            if (dialog.open() == Window.OK) {
+                String value = type + ": " + xPathConversion(dialog.getFilterPath());
+                cmd = new SetPropertyPartCommand(part, BuilderConstants.ATTRIBUTE_DATA_BIND, value);
+            }
+        } else {
+            PopUpListener popUpListener = new PopUpListener(currentPart, property.getModelName(), property.getViewItemName());
+            popUpListener.init();
+
+            Menu contextMenu = new Menu(shell, SWT.POP_UP);
+            ComponentPart parentPart = null;
+            if (part.getParent() instanceof ComponentPart) {
+                parentPart = (ComponentPart) part.getParent();
+            }
+            ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+            PropertyDescriptor propDesc = componentDescriptor.getPropertyDescriptor(parentPart, part, BuilderConstants.ATTRIBUTE_DATA_BIND);
+            if (propDesc == null)
+                return null;
+            List<ConstantDescriptor> list = propDesc.getTypeDescriptor().getAvailableConstant();
+            if ((list != null) && (list.size() > 0)) {
+                if (popupPoint != null)
+                    contextMenu.setLocation(popupPoint);
+
+                for (ConstantDescriptor cd : list) {
+                    MenuItem item = new MenuItem(contextMenu, SWT.PUSH);
+                    String bindingType = cd.getValue();
+                    item.setData("bindingType", bindingType);
+                    item.setText(bindingType);
+                    item.addListener(SWT.Selection, popUpListener);
+                }
+                contextMenu.setVisible(true);
+
+                while (!contextMenu.isDisposed() && contextMenu.isVisible()) {
+                    if (!shell.getDisplay().readAndDispatch())
+                        shell.getDisplay().sleep();
+                }
+                contextMenu.dispose();
+            }
+
+            cmd = popUpListener.getCommand();
+        }
+        return cmd;
+    }
+    
+    public static boolean isIncludeDataBindProp(ComponentPart part, String propType) {
+
+        String propDescValue = part.getPropertyValue(BuilderConstants.ATTRIBUTE_DATA_BIND);
+        if (propDescValue == null)
+            return false;
+        ComponentPart parentPart = null;
+        if (part.getParent() instanceof ComponentPart) {
+            parentPart = (ComponentPart) part.getParent();
+        }
+        ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+        PropertyDescriptor propDesc = componentDescriptor.getPropertyDescriptor(parentPart, part, BuilderConstants.ATTRIBUTE_DATA_BIND);
+        if (propDesc == null)
+            return false;
+
+        TypeDescriptor TypeDesc = propDesc.getTypeDescriptor();
+        if (TypeDesc == null)
+            return false;
+
+        List<ConstantDescriptor> list = TypeDesc.getAvailableConstant();
+
+        for (ConstantDescriptor cd : list) {
+            if (cd.getValue().equals(propType)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static String bindingTypeAllowedonPart(ComponentPart targetModel) {
+        String type = null;
+        if (isIncludeDataBindProp(targetModel, "foreach")) {
+            type = "foreach";
+        } else {
+            type = "text";
+        }
+        return type;
+    }
+    
+    public static int getLevelDiff(ComponentPart targetModel, DataBindingPartProperty property) {
+        String[] array = property.getViewItemName().split(BuilderConstants.ARRAY_REGEX);
+        int propertyLevel;
+        if (property.getDataType().equals("Array")) {
+            propertyLevel = array.length;
+        } else {
+            propertyLevel = array.length - 1;
+        }
+        int widgetLevel = 0;
+        if (isIncludeDataBindProp(targetModel, "foreach")) {
+            widgetLevel = 1;
+        }
+        return propertyLevel - widgetLevel;
+    }
+    
+    public static boolean canApplyFilter(ComponentPart targetModel, DataBindingPartProperty property) {
+        return getLevelDiff(targetModel, property) > 0;
+    }
+
+    public static boolean checkDataBinding(ComponentPart targetModel, DataBindingPartProperty property) {
+        boolean flag = true;
+        if (targetModel.getChildren() != null && targetModel.getChildren().size() != 0) {
+            for (Part child : targetModel.getChildren()) {
+                if (child instanceof ComponentPart) {
+                    flag = false;
+                    break;
+                }
+            }
+        }
+        return flag;
+    }
+
+    public static String xPathConversion(String path) {
+        path = path.replaceAll(BuilderConstants.ARRAY_REGEX, BuilderConstants.EMPTY).replaceAll(BuilderConstants.AT,
+                BuilderConstants.DOT);
+        return path;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/DataBindingPropertyPartCommand.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/model/command/DataBindingPropertyPartCommand.java
new file mode 100644 (file)
index 0000000..a579d80
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.model.command;
+
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+
+public class DataBindingPropertyPartCommand extends Command {
+
+    private Part part = null;
+    private String name = null;
+    private String value = null;
+    private String oldValue = null;
+    private List<PropertyDescriptor> properties = null;
+
+    public DataBindingPropertyPartCommand(Part part, String name, String value) {
+        this.part = part;
+        this.name = name;
+        this.setValue(value);
+        if (part instanceof ComponentPart) {
+            ComponentPart parentPart = null;
+            if (part.getParent() instanceof ComponentPart) {
+                parentPart = (ComponentPart) part.getParent();
+            }
+            ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+            properties = componentDescriptor.getPropertyDescriptors(parentPart, (ComponentPart) part);
+        }
+
+    }
+
+    @Override
+    public boolean canExecute() {
+        if (!(part instanceof ComponentPart)) {
+            return true;
+        }
+
+        if (part.hasProperty(name)) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public void execute() {
+        super.execute();
+        oldValue = this.part.getPropertyValue(name);
+        this.part.setPropertyValue(name, value);
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public void undo() {
+        super.undo();
+        this.part.setPropertyValue(name, oldValue);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/BuilderConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/BuilderConstants.java
new file mode 100644 (file)
index 0000000..0d1200f
--- /dev/null
@@ -0,0 +1,399 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.utils;
+
+public class BuilderConstants {
+
+       // Special character
+       public static final String EMPTY = ""; //$NON-NLS-1$
+       public static final String SPACE = " "; //$NON-NLS-1$
+       public static final String TAB = "  "; //$NON-NLS-1$
+       public static final String SLASH = "/"; //$NON-NLS-1$
+       public static final String BSLASH = "\\"; //$NON-NLS-1$
+       public static final String NEW_LINE = "\n"; //$NON-NLS-1$
+       public static final String DOT = "."; //$NON-NLS-1$
+       public static final String COMMA = ","; //$NON-NLS-1$
+       public static final String COLON = ":"; //$NON-NLS-1$
+       public static final String SEMICOLON = ";"; //$NON-NLS-1$
+       public static final String DASH = "-"; //$NON-NLS-1$
+       public static final String UNDERBAR = "_"; //$NON-NLS-1$
+       public static final String OPEN_BRACKET = "("; //$NON-NLS-1$
+       public static final String CLOSE_BRACKET = ")"; //$NON-NLS-1$
+       public static final String OPEN_CURLY_BRACKET = "{"; //$NON-NLS-1$
+       public static final String CLOSE_CURLY_BRACKET = "}"; //$NON-NLS-1$
+       public static final String OPEN_SQUARE_BRACKET = "["; //$NON-NLS-1$
+       public static final String CLOSE_SQUARE_BRACKET = "]"; //$NON-NLS-1$
+       public static final String OPEN_TRI_BRACKET = "<"; //$NON-NLS-1$
+       public static final String CLOSE_TRI_BRACKET = ">"; //$NON-NLS-1$
+       public static final String TILDE = "~"; //$NON-NLS-1$
+       public static final String ELLIPSIS = "..."; //$NON-NLS-1$
+       public static final String EQUAL = "="; //$NON-NLS-1$
+       public static final String ASTERISK = "*"; //$NON-NLS-1$
+       public static final String GRAVE_ACCENT = "`"; //$NON-NLS-1$
+       public static final String QUOTATION_MARK = "\""; //$NON-NLS-1$
+       public static final String APOSTROPHE_MARK = "'"; //$NON-NLS-1$
+       public static final String SHARP = "#"; //$NON-NLS-1$
+       public static final String AT = "@"; //$NON-NLS-1$
+    public final static String ARRAY_REGEX = "\\[\\*\\]"; //$NON-NLS-1$
+    public final static String DOT_REGEX = "\\."; //$NON-NLS-1$
+    public final static String SLASH_REGEX = "\\/"; //$NON-NLS-1$
+    public final static String FILTER_REGEX = "\\[(.*?)\\]";
+
+    // Path
+       public static final String RES_DIR = "res" + SLASH; //$NON-NLS-1$
+       public static final String ICON_DIR = RES_DIR + "icons" + SLASH; //$NON-NLS-1$
+       public static final String PREVIEW_DIR = RES_DIR + "preview" + SLASH; //$NON-NLS-1$
+       public static final String TEMPLATE_DIR = RES_DIR + "template" + SLASH; //$NON-NLS-1$
+       public static final String IMAGE_DIR = RES_DIR + "images" + SLASH; //$NON-NLS-1$
+       public static final String XSLT_DIR = RES_DIR + "xslt" + SLASH; //$NON-NLS-1$
+       public static final String DATABINDING_DIR = RES_DIR + "databinding" + SLASH; //$NON-NLS-1$
+       public static final String DATABINDING_DIR_JSON = RES_DIR + "json" + SLASH + "databinding" + SLASH; //$NON-NLS-1$
+       public static final String ASSIST_DIR = RES_DIR + "assist" + SLASH; //$NON-NLS-1$
+
+       // Designer and Preview
+       public static final String PROPERTY_PROJECTMANAGER = "ProjectManager"; //$NON-NLS-1$
+       public static final String PROPERTY_APPMANAGER = "AppManager"; //$NON-NLS-1$
+       public static final String PROPERTY_DESCRIPTORMANAGER = "DescriptorManager"; //$NON-NLS-1$
+       public static final String DESIGNER_BACKGROUND_IMAGE = "workspace_pattern.png"; //$NON-NLS-1$
+       public static final String PREVIEW_BACKGROUND_IMAGE = "preview_panel_back.png"; //$NON-NLS-1$
+       public static final String SCROLLBAR_IMAGE = "scrollbar_image.png"; //$NON-NLS-1$
+
+       // UIFW
+       public static final String TAU = "tau"; //$NON-NLS-1$
+
+       // preview
+       public static final String PREVIEW_LEFT_TOP = "preview_left_top.png"; //$NON-NLS-1$
+       public static final String PREVIEW_TOP = "preview_top.png"; //$NON-NLS-1$
+       public static final String PREVIEW_RIGHT_TOP = "preview_right_top.png"; //$NON-NLS-1$
+       public static final String PREVIEW_LEFT = "preview_left.png"; //$NON-NLS-1$
+       public static final String PREVIEW_RIGHT = "preview_right.png"; //$NON-NLS-1$
+       public static final String PREVIEW_LEFT_BOTTOM = "preview_left_bottom.png"; //$NON-NLS-1$
+       public static final String PREVIEW_BOTTOM = "preview_bottom.png"; //$NON-NLS-1$
+       public static final String PREVIEW_RIGHT_BOTTOM = "preview_right_bottom.png"; //$NON-NLS-1$
+
+       // Model
+       public static final String PART_DOC = "tizen.doc"; //$NON-NLS-1$
+       public static final String PART_PAGE = "tizen.page"; //$NON-NLS-1$
+       public static final String PART_CONTENT = "tizen.content"; //$NON-NLS-1$
+       public static final String PART_HEADER = "tizen.header"; //$NON-NLS-1$
+       public static final String PART_FOOTER = "tizen.footer"; //$NON-NLS-1$
+       public static final String PART_TEXT = "html.text"; //$NON-NLS-1$
+       public static final String PX = "px"; //$NON-NLS-1$
+       public static final String SELECTOR_ID = "%id%";//$NON-NLS-1$
+
+       // Model descriptor
+       public static final String STYLE_DESCRIPTOR_FILE = "CSSProperties.xml"; //$NON-NLS-1$
+       public static final String SCREENFEATURE_DESCRIPTOR_FILE = "ScreenFeatures.xml"; //$NON-NLS-1$
+       public static final String DEVICE_DESCRIPTOR_FILE = "SupportedDevices.xml"; //$NON-NLS-1$
+       public static final String FEATURE_DESCRIPTOR_FILE = "FeatureDescriptor.xml"; //$NON-NLS-1$
+       public static final String FEATURE_DESCRIPTOR_XSLT_FILE = "FeatureDescriptorXslt.xml"; //$NON-NLS-1$
+
+       // Model IO
+       public static final String ATTRIBUTE_PID = "part-id"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_POSITION_SELECTOR = "position-selector"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_STYLE = "style"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_VALUE_POSITION = "position"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_VALUE_ABSOLUTE = "absolute"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_VALUE_RELATIVE = "relative"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_VALUE_LEFT = "left"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_VALUE_TOP = "top"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_VALUE_WIDTH = "width"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_VALUE_HEIGHT = "height"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_VALUE_PX = PX;
+       public static final String ATTRIBUTE_TEXT = "text"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_EVENT_PREFIX = "on"; //$NON-NLS-1$
+       public static final String PROPERTY_GROUP_PREFIX = "group"; //$NON-NLS-1$
+       public static final String LOG_READ_PAGE_ERROR = "This file is not valid XML."; //$NON-NLS-1$
+       public static final String CANNOT_BE_FOUND_ERROR = " cannot be found."; //$NON-NLS-1$
+       public static final String LOG_DESC_CANNOT_BE_FOUND_ERROR = "Descriptor cannot be found."; //$NON-NLS-1$
+
+       // Project
+       public static final String PAGE = "page"; //$NON-NLS-1$
+       public static final String JAVASCRIPT = "js"; //$NON-NLS-1$
+       public static final String CSS = "css"; //$NON-NLS-1$
+       public static final String XML = "xml"; //$NON-NLS-1$
+       public static final String HTML = "html"; //$NON-NLS-1$
+       public static final String JSON = "json"; //$NON-NLS-1$
+       public static final String PAGE_DIR = PAGE;
+       public static final String TIZEN_UI_BUILDER_TOOL_DIR = "tizen-ui-builder-tool"; //$NON-NLS-1$
+       public static final String XML_EXTENSION = DOT + XML;
+       public static final String PAGE_EXTENSION = DOT + PAGE;
+       public static final String JAVASCRIPT_EXTENSION = DOT + JAVASCRIPT;
+       private static final String MANAGED = "managed"; //$NON-NLS-1$
+       private static final String ASSIST = "assist"; //$NON-NLS-1$
+       public static final String MANAGEDJS_EXTENSION = DOT + MANAGED + DOT + JAVASCRIPT;
+       public static final String ASSISTJS_EXTENSION = DOT + ASSIST + DOT + JAVASCRIPT;
+       public static final String HTML_EXTENSION = DOT + HTML;
+       public static final String CSS_EXTENSION = DOT + CSS;
+       public static final String MANAGED_CSS_EXTENSION = DOT + MANAGED + CSS_EXTENSION;
+       public static final String DEFAULT_PAGE_NAME = "page1" + PAGE_EXTENSION; //$NON-NLS-1$
+
+       public static final String TIZEN_UI_BUILDER_TOOL_FILE = DOT + "tizen-ui-builder-tool.xml"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String TIZEN_UI_BUILDER_TOOL_FILE_OLD = "tizen-ui-builder-tool.xml"; //$NON-NLS-1$ //$NON-NLS-2$
+
+       public static final String INDEX_HTML_FILE_PREFIX = "index"; //$NON-NLS-1$
+       public static final String INDEX_HTML_FILE = INDEX_HTML_FILE_PREFIX + HTML_EXTENSION;
+       public static final String INDEX_MANAGED_JS_FILE = INDEX_HTML_FILE_PREFIX + MANAGEDJS_EXTENSION;
+       public static final String PROJECT_FILE_PREFIX = "app"; //$NON-NLS-1$
+       public static final String PROJECT_FILE = PROJECT_FILE_PREFIX + XML_EXTENSION;
+       public static final String PROJECT_HTML_FILE = PROJECT_FILE_PREFIX + HTML_EXTENSION;
+       public static final String PROJECT_JS_FILE = PROJECT_FILE_PREFIX + JAVASCRIPT_EXTENSION;
+       public static final String PROJECT_MANAGED_JS_FILE = PROJECT_FILE_PREFIX + MANAGEDJS_EXTENSION;
+       public static final String PROJECT_CSS_FILE = PROJECT_FILE_PREFIX + CSS_EXTENSION;
+       public static final String PROJECT_TYPE_SYSTEM = "system"; //$NON-NLS-1$
+       public static final String UIBINDING_FILE_PREFIX = "uibinding";
+       public static final String UIBINDING_ASSIST_JS_FILE = UIBINDING_FILE_PREFIX + ASSISTJS_EXTENSION;
+
+       // Code generator
+       public static final String YES = "yes"; //$NON-NLS-1$
+       public static final String NO = "no"; //$NON-NLS-1$
+       public static final String ENCODING = "UTF-8"; //$NON-NLS-1$
+       public static final String CLOSE_ANNOTATION = "-->"; //$NON-NLS-1$
+       public static final String ELEMENT_OPEN_HEAD = "<head>"; //$NON-NLS-1$
+       public static final String ELEMENT_CLOSE_HEAD = "</head>"; //$NON-NLS-1$
+       public static final String ELEMENT_OPEN_STYLE = "<style>"; //$NON-NLS-1$
+       public static final String ELEMENT_CLOSE_STYLE = "</style>"; //$NON-NLS-1$
+       public static final String ELEMENT_OPEN_LINK = "<link rel=\"stylesheet\" href=\""; //$NON-NLS-1$
+       public static final String ELEMENT_CLOSE_LINK = "\" />"; //$NON-NLS-1$
+
+       // Project descriptor
+       public static final String DEFAULT_THEME = "tizen-white"; //$NON-NLS-1$
+       public static final String LOG_EXIST_ERROR = " is already exist"; //$NON-NLS-1$
+
+       // Project file element name
+       public static final String ELEMENT_TIZENPROJECT = "tizenProject"; //$NON-NLS-1$
+       public static final String ELEMENT_PROJECTINFO = "projectInfo"; //$NON-NLS-1$
+       public static final String ELEMENT_TITLE = "title"; //$NON-NLS-1$
+       public static final String ELEMENT_AUTHOR = "author"; //$NON-NLS-1$
+       public static final String ELEMENT_VERSION = "version"; //$NON-NLS-1$
+       public static final String ELEMENT_PAGESYSTEM = "pageSystem"; //$NON-NLS-1$
+       public static final String ELEMENT_METAS = "metas"; //$NON-NLS-1$
+       public static final String ELEMENT_FRAMEWORKS = "frameworks"; //$NON-NLS-1$
+       public static final String ELEMENT_LIBRARIES = "libraries"; //$NON-NLS-1$
+       public static final String ELEMENT_SCREEN = "screen"; //$NON-NLS-1$
+       public static final String ELEMENT_PAGES = "pages"; //$NON-NLS-1$
+       public static final String ELEMENT_ENTRIES = "entries"; //$NON-NLS-1$
+       public static final String ELEMENT_STYLESHEETS = "stylesheets"; //$NON-NLS-1$
+       public static final String ELEMENT_NSCREEN = "nscreen"; //$NON-NLS-1$
+       public static final String ELEMENT_META = "meta"; //$NON-NLS-1$
+       public static final String ELEMENT_HEAD = "head"; //$NON-NLS-1$
+       public static final String ELEMENT_BODY = "body"; //$NON-NLS-1$
+       public static final String ELEMENT_LIBRARY = "library"; //$NON-NLS-1$
+       public static final String ELEMENT_SCRIPT = "script"; //$NON-NLS-1$
+       public static final String ELEMENT_VARIABLES = "variables"; //$NON-NLS-1$
+       public static final String ELEMENT_VARIABLE = "variable"; //$NON-NLS-1$
+       public static final String ELEMENT_FRAMEWORK = "framework"; //$NON-NLS-1$
+       public static final String ELEMENT_PAGE = PAGE;
+       public static final String ELEMENT_STYLESHEET = "stylesheet"; //$NON-NLS-1$
+       public static final String ELEMENT_FRAMEWORK_THEME = "framework-theme"; //$NON-NLS-1$
+       public static final String ELEMENT_SCREENDESC = "screenDesc"; //$NON-NLS-1$
+       public static final String ELEMENT_SCREENDESCLAYER = "screenDescLayer"; //$NON-NLS-1$
+       public static final String ELEMENT_DEVICE = "device"; //$NON-NLS-1$
+       public static final String ELEMENT_DATABINDING = "dataBinding"; //$NON-NLS-1$
+       public static final String ELEMENT_DATASOURCE = "dataSource"; //$NON-NLS-1$
+       public static final String ELEMENT_DATAMODEL = "dataModel"; //$NON-NLS-1$
+       public static final String ELEMENT_HANDLERINFO = "handlerInfo"; //$NON-NLS-1$
+       public static final String ELEMENT_MODELINFO = "modelInfo"; //$NON-NLS-1$
+       public static final String ELEMENT_UPDATEONSTARTUP = "updateOnStartUp"; //$NON-NLS-1$
+       public static final String ELEMENT_OBSERVABLEOBJECT = "observableObject"; //$NON-NLS-1$
+
+       // Project file attribute name
+       public static final String ATTRIBUTE_TYPE = "type"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_PATH = "path"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_PARAM = "param"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_PARAM2 = "param2"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_THEME = "data-framework-theme"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_SCALE = "data-framework-viewport-scale"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_PAGEPATH = "pagePath"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_JSPATH = "jsPath"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_MANAGEDJSPATH = "managedJsPath"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_HTMLPATH = "htmlPath"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_CSSPATH = "cssPath"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_MANAGED_CSSPATH = "managedCssPath"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_STARTUP = "startup"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_PAGEID = "pageId"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_WIDGETID = "widgetId"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_PARTID = "partId"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_DATASOURCE = "dataSource"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_ISCHECKED = "isChecked"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_MODELTYPE = "modelType"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_URL = "url"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_PROXY = "proxy"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_QUERY = "query"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_DATATYPE = "dataType"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_TIMEOUT = "timeout"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_JSONDATA = "jsonData"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_FILEPATH = "filePath"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_API = "api"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_METHOD = "method"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_ADDRESS_BOOK_ID = "addressBookId"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_CALENDAR_TYPE = "calendarType"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_CALENDAR_ID = "calendarId"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_DIRECTION = "direction"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_START_TIME_ORDER = "starttimeorder"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_HEADERS = "headers"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_DEVICE_NAME = "deviceName"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_SCREEN_DESC_NAME = "screenDescName"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_MODEL_NAME = "modelName"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_SOURCE_TYPE = "sourceType"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_POLLING_INTERVAL = "pollingInterval"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_CALL_HISTORY_TYPE = "callHistoryType"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_CALL_HISTORY_DIRECTION = "callHistoryDirection"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_CALL_HISTORY_START_TIME_ORDER = "callHistoryStartTimeOrder"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_REMOTE_CALL_REQUEST_TYPE = "remoteCallRequestType"; //$NON-NLS-1$
+       public static final String ATTRIBUTE_DATA_BIND = "data_bind"; //$NON-NLS-1$
+
+       // Project file attribute value
+       public static final String TRUE = "true"; //$NON-NLS-1$
+       public static final String FALSE = "false"; //$NON-NLS-1$
+
+       // Property
+       public static final String ELEMENT_PROPERTY = "property"; //$NON-NLS-1$
+       public static final String PROPERTY_ID = "id"; //$NON-NLS-1$
+       public static final String REGULAREXPRESSION = "^[a-zA-Z]+[a-zA-Z0-9_]*$"; //$NON-NLS-1$
+       public static final String ID_PATTERN = "^[a-zA-Z]+[a-zA-Z0-9]*$"; //$NON-NLS-1$
+       public static final String INTEGERVALUE = "^[0-9-]?+[0-9]*$"; //$NON-NLS-1$
+       public static final String FLOATVALUE = "^[0-9-]?+[.?0-9]*$"; //$NON-NLS-1$
+       public static final String SIZEVALUE = "^[0-9-]+[.?0-9]*(?:px|%|cm|em|deg)$"; //$NON-NLS-1$
+       public static final String SIZEPATTERN = "(^[0-9]?+[0-9]*)?(px|%|cm|em|deg)?$"; //$NON-NLS-1$
+       public static final String UNITPATTERN = "(px|%|cm|em)?$"; //$NON-NLS-1$
+       public static final String PROPERTY_VALUE_AUTO = "auto"; //$NON-NLS-1$
+       public static final String PROPERTY_VALUE_INHERIT = "inherit"; //$NON-NLS-1$
+       public static final String PROPERTY_VALUE_INITIAL = "initial"; //$NON-NLS-1$
+       public static final String PROPERTY_VALUE_NORMAL = "normal"; //$NON-NLS-1$
+
+       // DataBinding
+       public static final String DATABINDINGVIEW_DEFAULT_MESSAGE = "Data-Binding view is not available."; //$NON-NLS-1$
+       public static final String DATABINDING_ARRAYITEM_VALUE_PREFIX = "$data."; //$NON-NLS-1$
+       public static final String DATABINDING_ARRAYITEM_VALUE_SUFFIX = ", attr: { 'data-index': $index }"; //$NON-NLS-1$
+       public static final String DATABINDING_TYPE_EMPTY = "Empty"; //$NON-NLS-1$
+       public static final String DATABINDING_TYPE_STATIC = "static"; //$NON-NLS-1$
+       public static final String DATABINDING_DATAMODEL_ITEM_NAME = "item"; //$NON-NLS-1$
+       public static final String DATABINDING_TYPE_REMOTECALL = "Remote Call"; //$NON-NLS-1$
+       public static final String DATABINDING_ARRAY_ICON = "databinding/array.png"; //$NON-NLS-1$
+       public static final String DATABINDING_NUMBER_ICON = "databinding/number.png"; //$NON-NLS-1$
+       public static final String DATABINDING_INDEX_ICON = "databinding/index.png"; //$NON-NLS-1$
+       public static final String DATABINDING_STRING_ICON = "databinding/string.png"; //$NON-NLS-1$
+       public static final String DATABINDING_BOOLEAN_ICON = "databinding/boolean.png"; //$NON-NLS-1$
+       public static final String DATABINDING_ARRAY_BIND_ICON = "databinding/array_link.png"; //$NON-NLS-1$
+       public static final String DATABINDING_NUMBER_BIND_ICON = "databinding/number_link.png"; //$NON-NLS-1$
+       public static final String DATABINDING_INDEX_BIND_ICON = "databinding/index_link.png"; //$NON-NLS-1$
+       public static final String DATABINDING_STRING_BIND_ICON = "databinding/string_link.png"; //$NON-NLS-1$
+       public static final String DATABINDING_BOOLEAN_BIND_ICON = "databinding/boolean_link.png"; //$NON-NLS-1$
+       public static final String DATABINDING_OBJECT_ICON = "databinding/object.png"; //$NON-NLS-1$
+       public static final String DATABINDING_OBJECT_BIND_ICON = "databinding/object_link.png"; //$NON-NLS-1$
+       public static final String DATABINDING_UNDEFINED_ICON = "databinding/undefined.png"; //$NON-NLS-1$
+       public static final String DATABINDING_FORMAT_STRING_ICON = "databinding/format_string.png"; //$NON-NLS-1$
+       public static final String DATABINDING_COMPACT_STRING_ICON = "databinding/compact_string.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATA_COLLAPSE_ALL_ICON = "databinding/collapseallfields.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATA_EXPAND_ALL_ICON = "databinding/expandallfields.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATA_ADD_ICON = "databinding/add.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATA_UP_ICON = "databinding/up.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATA_DOWN_ICON = "databinding/down.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATA_REMOVE_ICON = "databinding/remove.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATA_REMOVE_ALL_ICON = "databinding/removeall.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATA_VIEW_SOURCE_ICON = "databinding/view_source.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATA_VIEW_TREE_ICON = "databinding/view_tree.png"; //$NON-NLS-1$
+       public static final String DATABINDING_OPEN_ICON = "databinding/open.png"; //$NON-NLS-1$
+       public static final String DATABINDING_RELOAD_ICON = "databinding/reload.png"; //$NON-NLS-1$
+       public static final String DATABINDING_CLEAR_ICON = "databinding/clear.png"; //$NON-NLS-1$
+       public static final String DATABINDING_SAVE_AS_ICON = "databinding/saveas.png"; //$NON-NLS-1$
+       public static final String DATABINDING_IMPORT_ICON = "databinding/import.png"; //$NON-NLS-1$
+       public static final String DATABINDING_LOAD_ICON = "databinding/load.png"; //$NON-NLS-1$
+
+       public static final String DATABINDING_EMPTY_ICON = "databinding/empty.png"; //$NON-NLS-1$
+       public static final String DATABINDING_FILE_ICON = "databinding/file.png"; //$NON-NLS-1$
+       public static final String DATABINDING_REMOTE_ICON = "databinding/remote.png"; //$NON-NLS-1$
+       public static final String DATABINDING_STATIC_ICON = "databinding/static.png"; //$NON-NLS-1$
+       public static final String DATABINDING_SYSTEM_API_CALL_ICON = "databinding/system_api_calls.png"; //$NON-NLS-1$
+       public static final String DATABINDING_MODEL_EMPTY_ICON = "databinding/datamodel_1.png"; //$NON-NLS-1$
+       public static final String DATABINDING_MODEL_NOT_EMPTY_ICON = "databinding/datamodel_2.png"; //$NON-NLS-1$
+
+       public static final String DATABINDING_BINDING_ICON = "databinding/link.png"; //$NON-NLS-1$
+       public static final String DATABINDING_BINDING_IMAGE = "databinding/link_image.png"; //$NON-NLS-1$
+       public static final String DATABINDING_BINDING_DELETE = "databinding/binding_delete.png"; //$NON-NLS-1$
+       public static final String DATABINDING_HIDE_ICON = "databinding/binding_hide.png"; //$NON-NLS-1$
+       public static final String DATABINDING_SHOW_ICON = "databinding/binding_show.png"; //$NON-NLS-1$
+       public static final String DATABINDING_RENAME_ICON = "databinding/rename.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATASOURCE_DIALOG_ICON = "databinding/datasource_open.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATASOURCE_ADD_ICON = "databinding/datasource_add.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATASOURCE_DELETE_ICON = "databinding/datasource_delete.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATAMODEL_ADD_ICON = "databinding/datamodel_add.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATAMODEL_DELETE_ICON = "databinding/datamodel_delete.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DATAMODELITEM_ADD_ICON = "databinding/modelitem_add.png"; //$NON-NLS-1$
+       public static final String DATABINDING_DELETE_ICON = "databinding/delete.png"; //$NON-NLS-1$
+       public static final String DATABINDING_SET_TARGET_ICON = "databinding/set_target.png"; //$NON-NLS-1$
+       public static final String DATABINDING_COLLAPSEALL = "databinding/collapseallfields.png";
+
+    public static final String DATABINDING_LAYOUT_META_XML = ".databinding"; //$NON-NLS-1$
+    public static final String DATABINDING_ROOT_ELEMENT = "dataBinding"; //$NON-NLS-1$
+
+       // HandlerCodeWriter
+       public static final String FILENAME = "%FileName%"; //$NON-NLS-1$
+       public static final String PAGENAME = UNDERBAR + FILENAME + "_page"; //$NON-NLS-1$
+       public static final String FULLFUNCNAME_PREFIX = UNDERBAR + "page.prototype."; //$NON-NLS-1$
+       public static final String FUNCNAME = "%FuncName%"; //$NON-NLS-1$
+       public static final String FUNCPARAMS = "%FuncParams%"; //$NON-NLS-1$
+       public static final String JSEXTENSION = "js"; //$NON-NLS-1$
+       public static final String CEXTENSION = "c"; //$NON-NLS-1$
+       public static final String PAGEEXTENSION = "page"; //$NON-NLS-1$
+       public static final String UNBINDEDFUNCNAME = "unbinded_function"; //$NON-NLS-1$
+       public static final String FUNCTION_ANNOTATION = "/**\n * @param {Object} " + FUNCPARAMS + "\n * @base " + PAGENAME //$NON-NLS-1$ //$NON-NLS-2$
+                       + "\n * @returns {Boolean}\n*/\n"; //$NON-NLS-1$
+       public static final String EVENT_HANDLER_FUNCTION = PAGENAME + ".prototype." + FUNCNAME + " = function(" //$NON-NLS-1$ //$NON-NLS-2$
+                       + FUNCPARAMS + ") {\n\t\n};\n\n"; //$NON-NLS-1$
+
+       // Command
+
+       // Bit constant
+       public static final int INVALID = -1;
+       public static final int SUCCESS = 0;
+       public static final int NONE = 0;
+       public static final int HTML_FILE = 1;
+       public static final int MANAGED_JS_FILE = 1 << 1;
+       public static final int JS_FILE = 1 << 2;
+       public static final int CSS_FILE = 1 << 3;
+       public static final int MANAGED_CSS_FILE = 1 << 4;
+
+       // Nscreen
+       public static final String SCREEN_FEATURE_COMMON = "Common"; //$NON-NLS-1$
+       public static final String SCREEN_FEATURE_PORTRAIT = "Portrait"; //$NON-NLS-1$
+       public static final String SCREEN_FEATURE_LANDSCAPE = "Landscape"; //$NON-NLS-1$
+
+       // Profile
+       public static final String PROFILE_MOBILE = "mobile"; //$NON-NLS-1$
+       public static final String PROFILE_WEARABLE = "wearable"; //$NON-NLS-1$
+       public static final String PROFILE_TV = "tv"; //$NON-NLS-1$
+       
+       // Databinding notations
+    public static final String ARRAY = "Array"; //$NON-NLS-1$
+    public static final String INDEX = "Index"; //$NON-NLS-1$
+    public static final String INDEXOBJECT = "IndexObject";//$NON-NLS-1$
+    public static final String OBJECT = "Object"; //$NON-NLS-1$
+    public static final String NUMBER = "Number";//$NON-NLS-1$
+    public static final String STRING = "String";//$NON-NLS-1$
+    public static final String BOOLEAN = "Boolean"; //$NON-NLS-1$
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/DataBindingHelper.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/DataBindingHelper.java
new file mode 100644 (file)
index 0000000..58b04cb
--- /dev/null
@@ -0,0 +1,328 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.utils;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.BuilderPlugin;
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.view.databinding.DataBindingManager;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingData;
+import org.tizen.efluibuilder.ui.view.databinding.model.BindingObject;
+import org.tizen.efluibuilder.ui.view.databinding.model.DataBindingPartProperty;
+import org.tizen.efluibuilder.ui.view.databinding.model.TreeItemData;
+import org.tizen.efluibuilder.ui.view.databinding.model.command.DataBindingCommandFactory;
+import org.tizen.efluibuilder.ui.view.databinding.utils.Helper.DataSourceType;
+
+public class DataBindingHelper {
+
+    public static Map<String, String> parseToMap(String str) {
+        Map<String, String> bindingInfos = new HashMap<String, String>();
+        if (str.contains(", ")) {
+            String[] infos = str.split(", ");
+            for (String info : infos) {
+                put(bindingInfos, info);
+            }
+        } else {
+            put(bindingInfos, str);
+        }
+
+        return bindingInfos;
+    }
+
+    private static void put(Map<String, String> bindingInfos, String string) {
+        String[] infos = string.split(": ");
+        if (infos.length == 2) {
+            if ((infos[0] != null) && (!infos[0].isEmpty())) {
+                if ((infos[1] != null) && (!infos[1].isEmpty())) {
+                    bindingInfos.put(infos[0], infos[1]);
+                }
+            }
+        }
+    }
+
+    public static void extendItems(ArrayList<String> extendedItems, TreeItem[] items, String selectedPath) {
+        for (int i = 0; i < items.length; i++) {
+            if (items[i].getItemCount() > 0) {
+                if (extendedItems.contains(items[i].getData("path")))
+                    items[i].setExpanded(true);
+            }
+
+            if (selectedPath != null && selectedPath.equals(items[i].getData("path"))) {
+                items[i].getParent().select(items[i]);
+                if (!items[i].getExpanded())
+                    items[i].setExpanded(true);
+            }
+            extendItems(extendedItems, items[i].getItems(), selectedPath);
+        }
+    }
+
+    public static void getExtendedItems(ArrayList<String> extendedItems, TreeItem[] items) {
+        for (int i = 0; i < items.length; i++) {
+            if (items[i].getItemCount() > 0) {
+                if (items[i].getExpanded()) {
+                    String path = (String) items[i].getData("path");
+                    extendedItems.add(path);
+                }
+                getExtendedItems(extendedItems, items[i].getItems());
+            }
+        }
+    }
+
+    public static String makeStringFromMap(Map<String, String> bindingInfos) {
+        Object[] bindingTypes = bindingInfos.keySet().toArray();
+        StringBuffer buffer = new StringBuffer();
+        for (Object bindingType : bindingTypes) {
+            String key = bindingType.toString();
+            String modelValue = bindingInfos.get(key);
+
+            if (buffer.length() > 0) {
+                buffer.append(", ");
+            }
+            buffer.append(key + ": " + modelValue);
+        }
+
+        return buffer.toString();
+    }
+
+    public static String makeIconPath(String type) {
+        if (type == null) {
+            return BuilderConstants.DATABINDING_EMPTY_ICON;
+        }
+
+        String imageName = null;
+        if (type.equals(DataSourceType.STATIC.getValue())) {
+            imageName = BuilderConstants.DATABINDING_STATIC_ICON;
+        } else if (type.equals(DataSourceType.REMOTE.getValue())) {
+            imageName = BuilderConstants.DATABINDING_REMOTE_ICON;
+        } /*else if (type.equals(DataSourceType.CALL_HISTORY.getValue())) {
+            imageName = BuilderConstants.DATABINDING_SYSTEM_API_CALL_ICON;
+        } else if (type.equals(DataSourceType.CONTACT.getValue())) {
+            imageName = BuilderConstants.DATABINDING_SYSTEM_API_CALL_ICON;
+        } else if (type.equals(DataSourceType.CALENDAR)) {
+            imageName = BuilderConstants.DATABINDING_SYSTEM_API_CALL_ICON;
+        } else if (type.equals(DataSourceType.FILE)) {
+            imageName = BuilderConstants.DATABINDING_FILE_ICON;
+        } */else {
+            imageName = BuilderConstants.DATABINDING_EMPTY_ICON;
+        }
+        return imageName;
+    }
+
+    /**
+     * Creates a view model information.
+     * 
+     * @param treeItem
+     * @return view model information
+     */
+    public static String makeDataModelInfoString(TreeItem treeItem) {
+        if (treeItem == null) {
+            return null;
+        }
+
+        String str = "";
+        while (treeItem != null && treeItem.getParentItem() != null) {
+
+            if (str.isEmpty()) {
+                str = treeItem.getText();
+            } else {
+                str = treeItem.getText() + "." + str;
+            }
+            treeItem = treeItem.getParentItem();
+        }
+
+        if (treeItem != null && treeItem.getData("TREEITEMDATA") != null) {
+            TreeItemData treeItemData = (TreeItemData) treeItem.getData("TREEITEMDATA");
+            str = treeItemData.getOriginModelName() + "-" + str;
+        }
+
+        return str;
+    }
+
+    private static String makeInfoString(String modelName, String bindingPath, String bindingType, String oldDbProp) {
+        String value = "";
+        value = bindingType + ": " + modelName + "." + bindingPath;
+        return value;
+    }
+
+    public static String toString(String[] items, int indx) {
+        StringBuilder builder = new StringBuilder();
+        for (int i = indx; i < items.length; ++i) {
+            builder.append(items[i]);
+        }
+        return builder.toString();
+    }
+
+    public static BindingObject getModelItem(List<BindingObject> dataModelObjects, String[] modelIds, int i) {
+
+        for (BindingObject bo : dataModelObjects) {
+            if (bo.getName().equals(modelIds[i])) {
+                if (modelIds.length - 1 == i)
+                    return bo;
+                else
+                    return getModelItem(bo.getBindingObjects(), modelIds, i + 1);
+            }
+        }
+
+        return null;
+
+    }
+
+    public static class PopUpListener implements Listener {
+        private Command command = null;
+        private Part targetPart;
+        private String modelName;
+        private String modelItem;
+
+        public PopUpListener(Part part, String modelName, String modelItem) {
+            // TODO: Hanlde multiple models to the same Component part?
+            this.targetPart = part;
+            this.modelName = modelName;
+            this.modelItem = modelItem;
+        }
+
+        public void init() {
+            command = null;
+        }
+
+        @Override
+        public void handleEvent(Event event) {
+            CombineEditorPart combineEditorPart = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+            DataBindingManager dataBindManager = combineEditorPart.getDataBindManager();
+            MenuItem item = (MenuItem) event.widget;
+            String bindingType = (String) item.getData("bindingType");
+            BindingData dataModel = dataBindManager.getDataModelByModelName(modelName);
+
+            if (dataModel == null)
+                return;
+            command = DataBindingCommandFactory.getAddBindingCommand(targetPart, dataModel, modelItem, bindingType);
+        }
+
+        public Command getCommand() {
+            return command;
+        }
+    }
+
+    public static boolean isIncludeDataBindProp(ComponentPart part, String propType) {
+
+        String propDescValue = part.getPropertyValue(BuilderConstants.ATTRIBUTE_DATA_BIND);
+        if (propDescValue == null)
+            return false;
+        ComponentPart parentPart = null;
+        if (part.getParent() instanceof ComponentPart) {
+            parentPart = (ComponentPart) part.getParent();
+        }
+        ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+        PropertyDescriptor propDesc = componentDescriptor.getPropertyDescriptor(parentPart, part, BuilderConstants.ATTRIBUTE_DATA_BIND);
+        if (propDesc == null)
+            return false;
+
+        TypeDescriptor TypeDesc = propDesc.getTypeDescriptor();
+        if (TypeDesc == null)
+            return false;
+
+        List<ConstantDescriptor> list = TypeDesc.getAvailableConstant();
+
+        for (ConstantDescriptor cd : list) {
+            if (cd.getValue().equals(propType)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static boolean checkDataBinding(ComponentPart targetModel, DataBindingPartProperty property) {
+        String allowedBinding = property.getAllowedBindingType();
+        if (allowedBinding == null || allowedBinding.isEmpty()) {
+            return false;
+        }
+        if (allowedBinding.equals("Array") && isIncludeDataBindProp(targetModel, "foreach")) {
+            if (targetModel.getDescriptorId().equals(LayoutSchemaConstants.LIST) && targetModel.getChildren() != null && targetModel.getChildren().size() != 0) {
+                return false;
+            }
+            String[] array = property.getViewItemName().split("\\[\\*\\]");
+            int propertyLevel;
+            if (property.getDataType().equals("Array")) {
+                propertyLevel = array.length;
+            } else {
+                propertyLevel = array.length - 1;
+            }
+            int widgetLevel = 1;
+            Part parent = targetModel.getParent();
+            while (parent instanceof ComponentPart) {
+                if (isIncludeDataBindProp((ComponentPart) parent, "foreach")) {
+                    widgetLevel++;
+                }
+                parent = parent.getParent();
+            }
+            return widgetLevel == propertyLevel;
+        } else if (allowedBinding.equals("Text") && isIncludeDataBindProp(targetModel, "text")) {
+            return true;
+        }
+        return false;
+    }
+
+    public static String makeDataModelInfo(TreeItem treeItem) {
+        String viewModelInfo;
+        viewModelInfo = DataBindingHelper.makeDataModelInfoString(treeItem);
+        return viewModelInfo;
+    }
+
+
+    public static String getAbsolutePath(String bundleRelativePath) {
+        Assert.notNull(bundleRelativePath);
+        URL url = BuilderPlugin.getDefault().getBundle().getEntry("");
+        String bundleAbsPath = getAbsolutePath(url);
+
+        return bundleAbsPath + bundleRelativePath;
+    }
+
+    private static String getAbsolutePath(URL url) {
+        URL fileUrl = null;
+        try {
+            fileUrl = FileLocator.toFileURL(url);
+        } catch (Exception e) {
+            return null;
+        }
+        return fileUrl.getPath().toString();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/Helper.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/Helper.java
new file mode 100644 (file)
index 0000000..6a4814d
--- /dev/null
@@ -0,0 +1,1018 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.utils;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.math.BigDecimal;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.custom.TreeEditor;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.ui.view.databinding.dialog.SourceDialogSubPage;
+import org.tizen.efluibuilder.ui.view.databinding.dialog.StaticSubPage;
+import org.tizen.efluibuilder.ui.view.databinding.model.TreeItemData;
+import org.tizen.nativecore.ext.manifest.Manifest;
+import org.tizen.nativecore.ext.xmlstore.CoreXMLStore;
+import org.tizen.nativecore.misc.IConstants;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonNull;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonPrimitive;
+
+public class Helper {
+
+       private enum DataType {
+               OBJECT, ARRAY, PRIMITIVE
+       }
+
+    public enum DataSourceType {
+
+        STATIC("static", "Static"), REMOTE("remote", "Remote Call"), /*CALL_HISTORY("call_history", "Call History"), CONTACT("contacts", "Contact"), CALENDAR("calendar", "Calendar"), FILE("file", "File")*/;
+
+        String value;
+        String label;
+
+        DataSourceType(String value, String label) {
+            this.value = value;
+            this.label = label;
+        }
+
+        public String getValue() {
+            return value;
+        }
+
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+        public String getLabel() {
+            return label;
+        }
+
+        public void setLabel(String label) {
+            this.label = label;
+        }
+    }
+
+       private static final String xmlAttrPrefix = "";
+       private static final String xmlTextPrefix = "";
+       private static final String xmlTextName = "text";
+       private static String nullFixAttrPrefix = null;
+
+       private static Gson gson;
+       private static DocumentBuilderFactory dbf;
+       private static DocumentBuilder db;
+       private static Transformer transformer;
+
+       static {
+
+               if (xmlAttrPrefix.trim().length() == 0)
+                       nullFixAttrPrefix = "__@@__";
+               else
+                       nullFixAttrPrefix = xmlAttrPrefix;
+
+               gson = new GsonBuilder().setPrettyPrinting().serializeNulls().create();
+
+               dbf = DocumentBuilderFactory.newInstance();
+
+               try {
+                       db = dbf.newDocumentBuilder();
+                       transformer = TransformerFactory.newInstance().newTransformer();
+                       transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+               } catch (TransformerConfigurationException e) {
+                       e.printStackTrace();
+               } catch (TransformerFactoryConfigurationError e) {
+                       e.printStackTrace();
+               } catch (ParserConfigurationException e) {
+                       e.printStackTrace();
+               }
+       }
+
+       public static String callURL(String url, String method, int timeout, TableItem[] items) throws Exception {
+               BufferedReader br = null;
+               OutputStreamWriter writer = null;
+               try {
+
+                       HttpURLConnection con = null;
+                       if (method.equals("GET")) {
+                               String delimiter = "?";
+                               if (url.contains("?")) {
+                                       delimiter = "&";
+                               }
+                               con = (HttpURLConnection) new URL(url + delimiter + getParamString(items).toString()).openConnection();
+                               con.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11");
+                               con.setConnectTimeout(timeout);
+                       } else {
+                               con = (HttpURLConnection) new URL(url).openConnection();
+                               con.setConnectTimeout(timeout);
+                               con.setDoOutput(true);
+                               writer = new OutputStreamWriter(con.getOutputStream());
+                               writer.write(getParamString(items).toString());
+                               writer.flush();
+                       }
+                       for (TableItem item : items) {
+                               if (item.getText(0).equals("header")) {
+                                       con.setRequestProperty(item.getText(1), item.getText(2));
+                               }
+                       }
+
+                       con.setRequestMethod(method);
+                       con.setDoInput(true);
+
+                       if (con.getResponseCode() != 200) {
+                               return null;
+                       }
+
+                       br = new BufferedReader(new InputStreamReader(con.getInputStream()));
+
+                       String line = null;
+                       StringBuilder sb = new StringBuilder();
+
+                       while ((line = br.readLine()) != null) {
+                               sb.append(line);
+                       }
+
+                       if (writer != null) {
+                               writer.close();
+                               writer = null;
+                       }
+                       br.close();
+                       br = null;
+
+                       return sb.toString();
+               } catch (Exception e) {
+                       throw e;
+               } finally {
+                       try {
+                               if (br != null)
+                                       br.close();
+                       } catch (IOException e) {
+                               e.printStackTrace();
+                       }
+                       try {
+                               if (writer != null)
+                                       writer.close();
+                       } catch (IOException e) {
+                               e.printStackTrace();
+                       }
+               }
+       }
+
+       public static JsonObject readJsonFromStream(InputStream is) {
+               BufferedReader br = null;
+               JsonObject result = null;
+               try {
+                       br = new BufferedReader(new InputStreamReader(is));
+                       result = gson.fromJson(br, JsonObject.class);
+                       br.close();
+                       br = null;
+               } catch (IOException e) {
+                       e.printStackTrace();
+                       return null;
+               } finally {
+                       try {
+                               if (br != null)
+                                       br.close();
+                       } catch (IOException e) {
+                               e.printStackTrace();
+                       }
+               }
+
+               return result;
+       }
+
+       public static void makeTreeItem(JsonElement jsonElement, Tree tree, TreeItem item, boolean includeIndex,
+                       SourceDialogSubPage currentSubPage) {
+               if (jsonElement.isJsonArray()) {
+                       if (item == null) {
+                               item = new TreeItem(tree, 0);
+                               careteTreeItem(item, "TreeRoot", null, "Array");
+                       }
+                       JsonArray array = jsonElement.getAsJsonArray();
+
+                       for (int i = 0; i < array.size(); i++) {
+                               if (includeIndex) {
+                                       TreeItem indexItem = new TreeItem(item, 0);
+                    if (array.get(i).isJsonObject()) {
+                        careteTreeItem(indexItem, String.valueOf(i), null, "IndexObject");
+                    } else {
+                        careteTreeItem(indexItem, String.valueOf(i), array.get(i) instanceof JsonNull ? null : array.get(i).getAsString(), "Index");
+                    }
+                    
+                                       makeTreeItem(array.get(i), tree, indexItem, includeIndex, currentSubPage);
+                                       item.setExpanded(true);
+                                       indexItem.setExpanded(true);
+                               } else {
+                                       makeTreeItem(array.get(i), tree, item, includeIndex, currentSubPage);
+                                       item.setExpanded(true);
+                                       break;
+                               }
+                       }
+               } else if (jsonElement.isJsonObject()) {
+
+                       JsonObject jb = jsonElement.getAsJsonObject();
+                       Set<Entry<String, JsonElement>> entrys = jb.entrySet();
+                       for (Entry<String, JsonElement> entry : entrys) {
+
+                               TreeItem treeItem = null;
+                               if (item == null) {
+                                       treeItem = new TreeItem(tree, 0);
+                               } else {
+                                       treeItem = new TreeItem(item, 0);
+                               }
+
+                               if (entry.getValue().isJsonPrimitive()) {
+                                       JsonPrimitive jp = entry.getValue().getAsJsonPrimitive();
+                                       String type = null;
+                                       if (jp.isBoolean())
+                                               type = "Boolean";
+                                       else if (jp.isNumber())
+                                               type = "Number";
+                                       else // else if ( jp.isString() )
+                                               type = "String";
+
+                                       careteTreeItem(treeItem, entry.getKey(), jp.getAsString(), type);
+                                       if (includeIndex)
+                                               Helper.addComboInTreeItem(treeItem, type, currentSubPage);
+                               } else if (entry.getValue().isJsonObject()) {
+                                       careteTreeItem(treeItem, entry.getKey(), null, "Object");
+
+                                       if (includeIndex)
+                                               Helper.addComboInTreeItem(treeItem, "Object", currentSubPage);
+
+                                       makeTreeItem(entry.getValue(), tree, treeItem, includeIndex, currentSubPage);
+                               } else if (entry.getValue().isJsonArray()) {
+                                       careteTreeItem(treeItem, entry.getKey(), null, "Array");
+
+                                       if (includeIndex)
+                                               Helper.addComboInTreeItem(treeItem, "Array", currentSubPage);
+
+                                       makeTreeItem(entry.getValue(), tree, treeItem, includeIndex, currentSubPage);
+                               } else if (entry.getValue().isJsonNull()) {
+                                       careteTreeItem(treeItem, entry.getKey(), null, "String");
+
+                                       if (includeIndex)
+                                               Helper.addComboInTreeItem(treeItem, "String", currentSubPage);
+
+                                       makeTreeItem(entry.getValue(), tree, treeItem, includeIndex, currentSubPage);
+
+                               }
+                               treeItem.setExpanded(true);
+                       }
+                       return;
+               } else if (jsonElement.isJsonPrimitive()) {
+                       // JsonPrimitive jp = jsonElement.getAsJsonPrimitive();
+                       // String type = null;
+                       // if ( jp.isBoolean() ) {
+                       // type = "Boolean";
+                       // } else if ( jp.isNumber() ) {
+                       // type = "Number";
+                       // } else if ( jp.isString() ) {
+                       // type = "String";
+                       // }
+                       //
+                       // if ( item.getParent().getColumnCount() > 0 ) {
+                       // TreeItem primitiveItem = new TreeItem( item, 0 );
+                       // Helper.careteTreeItem( primitiveItem, null, jp.getAsString(),
+                       // type );
+                       //
+                       // if ( includeIndex )
+                       // Helper.addComboInTreeItem( primitiveItem, type, currentSubPage );
+                       //
+                       // item.setExpanded( true );
+                       // }
+               }
+       }
+
+       private static TreeItem careteTreeItem(TreeItem treeItem, String key, String value, String type) {
+
+               TreeItemData treeItemData = new TreeItemData();
+
+               if (treeItem.getParent().getColumnCount() == 1) {
+                       treeItem.setText(key);
+               } else {
+                       treeItem.setText(new String[] { key, value, type });
+               }
+
+               treeItemData.setObjectType(type);
+               treeItemData.setObjectValue(value);
+               treeItemData.setSource("original");
+
+               treeItem.setData("TREEITEMDATA", treeItemData);
+
+               String imageName = null;
+
+               if (type.equals("Array")) {
+                       imageName = BuilderConstants.DATABINDING_ARRAY_ICON;
+               } else if (type.equals("Number")) {
+                       imageName = BuilderConstants.DATABINDING_NUMBER_ICON;
+               } else if (type.equals("String")) {
+                       imageName = BuilderConstants.DATABINDING_STRING_ICON;
+               } else if (type.equals("Index") || type.equals("IndexObject")) {
+                       imageName = BuilderConstants.DATABINDING_INDEX_ICON;
+               } else if (type.equals("Object")) {
+                       imageName = BuilderConstants.DATABINDING_OBJECT_ICON;
+               } else if (type.equals("Boolean")) {
+                       imageName = BuilderConstants.DATABINDING_BOOLEAN_ICON;
+               } else {
+                       imageName = BuilderConstants.DATABINDING_UNDEFINED_ICON;
+               }
+
+               if (imageName != null) {
+                       treeItem.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, imageName));
+               }
+
+               return treeItem;
+       }
+
+       public static void makeJsonFromTree(TreeItem parentItem, JsonElement parentJsonElement) {
+               String key = parentItem.getText(0);
+               String value = parentItem.getText(1);
+               String type = parentItem.getText(2);
+
+               TreeItem[] items = parentItem.getItems();
+
+               JsonObject jsonOb = null;
+
+               if (type.equals("Array")) {
+                       JsonArray array = new JsonArray();
+                       ((JsonObject) parentJsonElement).add(key, array);
+                       jsonOb = null;
+                       for (TreeItem item : items) {
+                               if (item.getText(2).equals("Index")) {
+                                       makeJsonFromTree(item, array);
+                               } else if(item.getText(2).equals("IndexObject")){
+                                               jsonOb = new JsonObject();
+                                               array.add(jsonOb);
+                                       makeJsonFromTree(item, jsonOb);
+                               }
+                       }
+               } else if (type.equals("Object")) {
+                       jsonOb = new JsonObject();
+                       ((JsonObject) parentJsonElement).add(key, jsonOb);
+                       for (TreeItem item : items) {
+                               makeJsonFromTree(item, jsonOb);
+                       }
+               } else if (type.equals("Index")) {
+                       ((JsonArray) parentJsonElement).add(new JsonPrimitive(parentItem.getText(1)));
+               } else if (type.equals("IndexObject")) {
+            for (TreeItem item : items) {
+                makeJsonFromTree(item, parentJsonElement);
+            }
+        } else if (type.equals("String")) {
+                       ((JsonObject) parentJsonElement).addProperty(key, value);
+               } else if (type.equals("Boolean")) {
+                       ((JsonObject) parentJsonElement).addProperty(key, Boolean.valueOf(value));
+                       parentItem.setText(1, Boolean.valueOf(value).toString());
+               } else if (type.equals("Number")) {
+                       try {
+                               ((JsonObject) parentJsonElement).addProperty(key, new BigDecimal(value));
+                       } catch (NumberFormatException e) {
+                               ((JsonObject) parentJsonElement).addProperty(key, new BigDecimal(0));
+                               parentItem.setText(1, "0");
+                       }
+               } else if (type.equals("Undefined") && value != null) {
+                       ((JsonObject) parentJsonElement).addProperty(key, value);
+               } else {
+                       ((JsonObject) parentJsonElement).add(key, null);
+               }
+       }
+
+       public static Composite makeInputText(Composite parentComposite, String title) {
+
+               Composite subComposite = new Composite(parentComposite, SWT.NONE);
+               FormLayout layout = new FormLayout();
+               subComposite.setLayout(layout);
+
+               Label label = new Label(subComposite, SWT.NONE);
+               label.setText(title);
+               FormData data = new FormData();
+               data.top = new FormAttachment(0, 0);
+               data.left = new FormAttachment(0, 0);
+               label.setLayoutData(data);
+
+               Text text = new Text(subComposite, SWT.SINGLE | SWT.BORDER);
+
+               data = new FormData(200, 16);
+               data.top = new FormAttachment(label, 2);
+               data.left = new FormAttachment(10, 0);
+               data.right = new FormAttachment(100, 0);
+               text.setLayoutData(data);
+               subComposite.setData(text);
+               return subComposite;
+       }
+
+       public static Composite makeInputCombo(Composite parentComposite, String title, String[] items) {
+
+               Composite subComposite = new Composite(parentComposite, SWT.NONE);
+               FormLayout layout = new FormLayout();
+               subComposite.setLayout(layout);
+
+               Label label = new Label(subComposite, SWT.NONE);
+               label.setText(title);
+               FormData data = new FormData();
+               data.top = new FormAttachment(0, 0);
+               data.left = new FormAttachment(0, 0);
+               label.setLayoutData(data);
+
+               CCombo combo = new CCombo(subComposite, SWT.SINGLE | SWT.BORDER | SWT.FLAT | SWT.READ_ONLY);
+               data = new FormData(200, 26);
+               data.top = new FormAttachment(label, 2);
+               data.left = new FormAttachment(10, 0);
+               data.right = new FormAttachment(100, 0);
+               combo.setLayoutData(data);
+               combo.setItems(items);
+               combo.select(0);
+
+               subComposite.setData(combo);
+
+               return subComposite;
+       }
+
+       public static String getParamString(TableItem[] items) {
+               StringBuilder query = new StringBuilder();
+               boolean isFirst = true;
+
+               for (TableItem item : items) {
+
+                       if (item.getText(0).equals("query") && (item.getText(1) + item.getText(2)).trim().length() > 0) {
+                               if (isFirst) {
+                                       isFirst = false;
+                               } else {
+                                       query.append("&");
+                               }
+
+                               query.append(item.getText(1)).append("=").append(item.getText(2));
+                       }
+               }
+
+               return query.toString();
+       }
+
+    public static String getHeadersString(HashMap<String, String> headers) {
+        StringBuilder headerString = new StringBuilder();
+        for (HashMap.Entry<String, String> header : headers.entrySet()) {
+            headerString.append(header.getKey()).append("=").append(header.getValue()).append(";");
+        }
+        return headerString.toString();
+    }
+
+       public static JsonObject getJsonFromXML(String xml) throws SAXException {
+
+               Document doc = parseXML(xml);
+
+               JsonObject root = new JsonObject();
+               if (doc != null) {
+                       NodeList nodeList = doc.getChildNodes();
+                       parseNodeList(root, nodeList);
+               }
+
+               return root;
+       }
+
+       public static Document parseXML(String xml) throws SAXException {
+               DocumentBuilder db;
+               Document doc = null;
+               try {
+                       InputSource inStream = new InputSource();
+                       inStream.setCharacterStream(new StringReader(xml));
+                       db = dbf.newDocumentBuilder();
+                       doc = db.parse(inStream);
+               } catch (ParserConfigurationException e) {
+                       e.printStackTrace();
+               } catch (SAXException e) {
+                       throw e;
+               } catch (IOException e) {
+                       e.printStackTrace();
+               }
+
+               return doc;
+       }
+
+       /**
+        * @param parentJson
+        * @param nodeList
+        */
+       private static void parseNodeList(JsonObject parentJson, NodeList nodeList) {
+               HashMap<String, DataType> meta = createMetaData(nodeList);
+               HashMap<String, JsonArray> arrayParents = new HashMap<String, JsonArray>();
+
+               for (int i = 0; i < nodeList.getLength(); i++) {
+
+                       Node node = nodeList.item(i);
+                       JsonObject jsonOb = null;
+
+                       DataType type = meta.get(node.getNodeName());
+
+                       if (type == DataType.ARRAY) {
+
+                               Node parentNode = node.getParentNode();
+                               String nodePath = parentNode.getNodeName() + "/" + node.getNodeName();
+
+                               while ((parentNode = parentNode.getParentNode()) != null) {
+                                       nodePath = parentNode.getNodeName() + "/" + nodePath;
+                               }
+
+                               JsonArray parentArray = null;
+
+                               if ((parentArray = arrayParents.get(nodePath)) == null) {
+                                       parentArray = new JsonArray();
+                                       parentJson.add(node.getNodeName(), parentArray);
+                                       arrayParents.put(nodePath, parentArray);
+                               }
+
+                               if (node.getChildNodes().getLength() == 1 && node.getFirstChild().getNodeType() == Node.TEXT_NODE) {
+                                       parentArray.add(new JsonPrimitive(node.getFirstChild().getTextContent()));
+                               } else {
+                                       jsonOb = new JsonObject();
+                                       parentArray.add(jsonOb);
+
+                                       parseNodeList(jsonOb, node.getChildNodes());
+                                       addAttributes(jsonOb, node);
+                               }
+
+                       } else if (type == DataType.OBJECT) {
+                               jsonOb = new JsonObject();
+                               parentJson.add(node.getNodeName(), jsonOb);
+
+                               parseNodeList(jsonOb, node.getChildNodes());
+                               addAttributes(jsonOb, node);
+                       } else if (type == DataType.PRIMITIVE) {
+                               if (node.getFirstChild() != null) {
+                                       parentJson.addProperty(node.getNodeName(), node.getFirstChild().getTextContent());
+                               } else {
+                                       parentJson.add(node.getNodeName(), null);
+                               }
+                       }
+               }
+       }
+
+       /**
+        * @param jsonOb
+        * @param node
+        */
+       private static void addAttributes(JsonObject jsonOb, Node node) {
+               boolean isExistChild = false;
+
+               for (int j = 0; j < node.getAttributes().getLength(); j++) {
+                       Node attNode = node.getAttributes().item(j);
+                       jsonOb.addProperty(xmlAttrPrefix + attNode.getNodeName(), attNode.getNodeValue());
+                       isExistChild = true;
+               }
+
+               if (node.getChildNodes().getLength() > 0)
+                       isExistChild = true;
+
+               String textNodeName = "";
+
+               if (isExistChild)
+                       textNodeName = xmlTextPrefix + xmlTextName;
+
+               if (node.getFirstChild() != null && node.getFirstChild().getNodeType() == Node.TEXT_NODE
+                               && node.getFirstChild().getTextContent().trim().length() != 0) {
+                       jsonOb.addProperty(textNodeName, node.getFirstChild().getTextContent());
+               }
+       }
+
+       /**
+        * @param nodeList
+        * @return
+        */
+       private static HashMap<String, DataType> createMetaData(NodeList nodeList) {
+               HashMap<String, DataType> result = new HashMap<String, DataType>();
+               for (int i = 0; i < nodeList.getLength(); i++) {
+                       Node node = nodeList.item(i);
+
+                       if (node.getNodeType() != Node.ELEMENT_NODE) {
+                               continue;
+                       }
+
+                       DataType type = result.get(node.getNodeName());
+
+                       if (type != null) {
+                               result.put(node.getNodeName(), DataType.ARRAY);
+                       } else if (node.getAttributes().getLength() == 0 && node.getChildNodes().getLength() == 1
+                                       && node.getFirstChild().getNodeType() == Node.TEXT_NODE) {
+                               result.put(node.getNodeName(), DataType.PRIMITIVE);
+                       } else {
+                               result.put(node.getNodeName(), DataType.OBJECT);
+                       }
+               }
+               return result;
+       }
+
+       public static void removeAllChildren(TreeItem[] treeItems) {
+        for (TreeItem item : treeItems) {
+            TreeEditor editor = (TreeEditor) item.getData("TREEEDITORFORCOMBO");
+            if (editor != null) {
+                editor.getEditor().dispose();
+                editor.dispose();
+            }
+            item.dispose();
+        }
+    }
+
+       public static Combo addComboInTreeItem(TreeItem item, String data, final SourceDialogSubPage currentSubPage) {
+
+               TreeEditor treeEditor = new TreeEditor(item.getParent());
+               treeEditor.grabHorizontal = true;
+               treeEditor.grabVertical = true;
+
+               Combo combo = new Combo(item.getParent(), SWT.SINGLE | SWT.READ_ONLY);
+               treeEditor.setEditor(combo, item, 2);
+               final String[] comboItems = { "String", "Number", "Boolean", "Object", "Array" };
+
+               combo.setVisibleItemCount(comboItems.length);
+               combo.setItems(comboItems);
+               combo.select(Arrays.asList(comboItems).indexOf(data));
+               combo.setData("parentItem", item);
+
+               item.setData("TREEEDITORFORCOMBO", treeEditor);
+
+               combo.addSelectionListener(new SelectionAdapter() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               Combo combo = (Combo) e.getSource();
+                               TreeItem parentItem = (TreeItem) combo.getData("parentItem");
+                               String selectedText = "";
+                               int selectionIndex = combo.getSelectionIndex();
+                               if (selectionIndex >= 0)
+                                   selectedText = comboItems[selectionIndex];
+                               String parentText = parentItem.getText(2);
+
+                if(selectedText.equals(parentText))
+                    return;
+
+                               if(parentText.equals("Object") && selectedText.equals("Array")){    // Allow changing from Object to Array
+                                   TreeItem[] items = parentItem.getItems();
+                                   TreeItem newItem = new TreeItem(parentItem, SWT.NONE);
+                                   newItem.setText(new String[] { "0", "", "IndexObject" });
+                                   String imageName = BuilderConstants.DATABINDING_INDEX_ICON;
+                           newItem.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, imageName));
+                           addAllChildrenRecursively(items, newItem, currentSubPage);
+                           removeAllChildren(items);
+                               } else if(selectedText.equals("Array")){
+                                   TreeItem newItem = new TreeItem(parentItem, SWT.NONE);
+                                   newItem.setText(new String[]{"0", parentItem.getText(1), "Index"});
+                                   newItem.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, BuilderConstants.DATABINDING_INDEX_ICON));
+                                   TreeItemData treeItemData = new TreeItemData();
+                           treeItemData.setSource("custom");
+                           treeItemData.setObjectType(newItem.getText(2));
+                           treeItemData.setObjectValue(newItem.getText(1));
+
+                           newItem.setData("TREEITEMDATA", treeItemData);
+                                   parentItem.setText(new String[]{parentItem.getText(0), "", "Array"});
+                               } else if ((parentText.equals("Object") || parentText.equals("Array")) && parentItem.getItemCount() > 0
+                                               && !selectedText.equals(parentText)) {
+
+                                       String msg = "Error : Can not change the type of items that have a child.";
+                                       MessageBox messageBox = new MessageBox(combo.getShell(), SWT.ICON_WARNING);
+                                       messageBox.setText("Set Source Warning");
+                                       messageBox.setMessage(msg);
+                                       combo.select(Arrays.asList(comboItems).indexOf(parentText));
+                                       messageBox.open();
+                                       return;
+                               }
+
+                               if (selectedText.equals("Object")) {
+                                       parentItem.setText(1, "");
+                               }
+
+                               parentItem.setText(2, selectedText);
+
+                               String imageName;
+
+                               if (selectedText.equals("Array")) {
+                                       imageName = BuilderConstants.DATABINDING_ARRAY_ICON;
+                               } else if (selectedText.equals("Number")) {
+                                       imageName = BuilderConstants.DATABINDING_NUMBER_ICON;
+                               } else if (selectedText.equals("String")) {
+                                       imageName = BuilderConstants.DATABINDING_STRING_ICON;
+                               } else if (selectedText.equals("Index")) {
+                                       imageName = BuilderConstants.DATABINDING_INDEX_ICON;
+                               } else if (selectedText.equals("Object")) {
+                                       imageName = BuilderConstants.DATABINDING_OBJECT_ICON;
+                               } else if (selectedText.equals("Boolean")) {
+                                       imageName = BuilderConstants.DATABINDING_BOOLEAN_ICON;
+                               } else {
+                                       imageName = BuilderConstants.DATABINDING_UNDEFINED_ICON;
+                               }
+
+                               if (imageName != null) {
+                                       parentItem.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, imageName));
+                               }
+
+                               if (currentSubPage instanceof StaticSubPage) {
+                                       ((StaticSubPage) currentSubPage).updateJsonFromTree();
+                               }
+                       }
+               });
+
+               return combo;
+       }
+
+       public static void addAllChildrenRecursively(TreeItem[] items, TreeItem parentItem, SourceDialogSubPage currentSubPage) {
+        // TODO Auto-generated method stub
+        if(items.length <= 0){
+            return;
+        }
+        for (TreeItem treeItem : items) {
+            TreeItem newItem = new TreeItem(parentItem, SWT.NONE);
+            newItem.setText(new String[] { treeItem.getText(0), treeItem.getText(1), treeItem.getText(2)});
+            String type = treeItem.getText(2);
+            String imageName;
+            if (!type.equals("Index") && !type.equals("IndexObject"))
+                Helper.addComboInTreeItem(newItem, type, currentSubPage);
+
+
+            if (type.equals("Array")) {
+                imageName = BuilderConstants.DATABINDING_ARRAY_ICON;
+            } else if (type.equals("Number")) {
+                imageName = BuilderConstants.DATABINDING_NUMBER_ICON;
+            } else if (type.equals("String")) {
+                imageName = BuilderConstants.DATABINDING_STRING_ICON;
+            } else if (type.equals("Index") || type.equals("IndexObject")) {
+                imageName = BuilderConstants.DATABINDING_INDEX_ICON;
+            } else if (type.equals("Object")) {
+                imageName = BuilderConstants.DATABINDING_OBJECT_ICON;
+            } else if (type.equals("Boolean")) {
+                imageName = BuilderConstants.DATABINDING_BOOLEAN_ICON;
+            } else {
+                imageName = BuilderConstants.DATABINDING_UNDEFINED_ICON;
+            }
+
+            if (imageName != null) {
+                newItem.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR, imageName));
+            }
+            TreeItemData treeItemData = new TreeItemData();
+            treeItemData.setSource("original");
+            treeItemData.setObjectType(treeItem.getText(2));
+            treeItemData.setObjectValue(treeItem.getText(1));
+
+            newItem.setData("TREEITEMDATA", treeItemData);
+            addAllChildrenRecursively(treeItem.getItems(), newItem, currentSubPage);
+        }
+    }
+       public static String streamToString(InputStream is) {
+               StringBuilder sb = new StringBuilder();
+
+               BufferedReader br = null;
+               String line = null;
+
+               try {
+                       br = new BufferedReader(new InputStreamReader(is));
+
+                       while ((line = br.readLine()) != null) {
+                               sb.append(line);
+                       }
+
+                       br.close();
+                       is.close();
+               } catch (IOException e) {
+                       e.printStackTrace();
+               } finally {
+                       if (br != null) {
+                               try {
+                                       br.close();
+                               } catch (IOException e) {
+                                       e.printStackTrace();
+                               }
+                       }
+                       if (is != null) {
+                               try {
+                                       is.close();
+                               } catch (IOException e) {
+                                       e.printStackTrace();
+                               }
+                       }
+               }
+
+               return sb.toString();
+       }
+
+       public static String getStringFromDocument(Document dom, boolean indented) {
+               String signedContent = null;
+
+               if (!indented) {
+                       dom.normalize();
+                       dom.normalizeDocument();
+               }
+
+               try {
+                       StringWriter sw = new StringWriter();
+                       DOMSource domSource = new DOMSource(dom);
+                       transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+                       transformer.setOutputProperty(OutputKeys.INDENT, indented ? "yes" : "no");
+                       transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", indented ? "2" : "0");
+                       transformer.transform(domSource, new StreamResult(sw));
+                       sw.flush();
+                       signedContent = sw.toString();
+               } catch (TransformerException e) {
+                       e.printStackTrace();
+               }
+
+               return signedContent;
+       }
+
+       public static Document getXMLFromJson(Document doc, Element element, JsonElement jsonElement) {
+
+               if (doc == null)
+                       doc = db.newDocument();
+
+               if (jsonElement.isJsonArray()) {
+                       JsonArray array = jsonElement.getAsJsonArray();
+                       for (int i = 0; i < array.size(); i++) {
+                                       getXMLFromJson(doc, element, array.get(i));
+                       }
+               } else if (jsonElement.isJsonObject()) {
+                       JsonObject jb = jsonElement.getAsJsonObject();
+
+                       JsonElement textElement = jb.get(xmlTextPrefix + xmlTextName);
+                       if (textElement != null)
+                               element.setTextContent(textElement.getAsString());
+
+                       Set<Entry<String, JsonElement>> entrys = jb.entrySet();
+                       for (Entry<String, JsonElement> entry : entrys) {
+
+                               String key = entry.getKey();
+                               Element newChild = null;
+
+                if (entry.getValue().isJsonArray()) {
+                    JsonArray value = entry.getValue().getAsJsonArray();
+                    Iterator<JsonElement> valueIterator = value.iterator();
+                    while(valueIterator.hasNext()){
+                        if (!key.startsWith(nullFixAttrPrefix) && !key.equals(xmlTextPrefix + xmlTextName)) {
+                            newChild = doc.createElement(key);
+                            if (element == null)
+                                doc.appendChild(newChild);
+                            else
+                                element.appendChild(newChild);
+                        }
+                        getXMLFromJson(doc, newChild, valueIterator.next());
+                    }
+                } else {
+                    if (!key.startsWith(nullFixAttrPrefix) && !key.equals(xmlTextPrefix + xmlTextName)) {
+                        newChild = doc.createElement(key);
+                        if (element == null)
+                            doc.appendChild(newChild);
+                        else
+                            element.appendChild(newChild);
+                    }
+                }
+
+                               if (entry.getValue().isJsonPrimitive()) {
+                                       String value = entry.getValue().getAsJsonPrimitive().getAsString();
+                                       if (element != null && key.startsWith(nullFixAttrPrefix)) {
+                                               element.setAttribute(key.substring(1, key.length()), value);
+                                       } else if (key.equals(xmlTextPrefix + xmlTextName)) {
+                                               continue;
+                                       } else if(newChild != null){
+                                               newChild.setTextContent(value);
+                                       }
+                               } else if (entry.getValue().isJsonObject()) {
+                                       getXMLFromJson(doc, newChild, entry.getValue());
+                               } else if(element != null) {
+                                       element.appendChild(newChild);
+                               }
+                       }
+                       return doc;
+               } else if (jsonElement.isJsonPrimitive()) {
+                       element.setTextContent(jsonElement.getAsJsonPrimitive().getAsString());
+               }
+               return doc;
+
+       }
+
+    /**
+     *
+     * @param shell
+     * @param privilegeKeys
+     *            required for specific datasource
+     * @param project
+     * @return false if privileges are already present
+     */
+    public static boolean addPrivileges(Shell shell, List<String> privilegeKeys, IProject project) {
+
+        CoreXMLStore coreXmlManager = new CoreXMLStore(project);
+        coreXmlManager.loadXml();
+        Manifest manifestModel = coreXmlManager.getCoreManifest();
+        Collection<String> privileges = coreXmlManager.getPrivileges();
+        if (privileges != null) {
+            for (String privilege : privileges) {
+                for (Iterator<String> itr = privilegeKeys.iterator(); itr.hasNext();) {
+                    String privilegeKey = itr.next();
+                    if (privilege.equals(privilegeKey)) {
+                        itr.remove();
+                    }
+                }
+            }
+        }
+
+        if (!privilegeKeys.isEmpty()) {
+            StringBuilder privileges_list = new StringBuilder("\n");
+            for (String privilege : privilegeKeys) {
+                privileges_list = privileges_list.append("\"").append(privilege).append("\"\n");
+            }
+            String msg = "Additional privileges required " + privileges_list + " Do you want to add? \n (Privileges addition can not be undone)";
+            MessageBox mb = new MessageBox(shell, SWT.ICON_QUESTION | SWT.OK | SWT.CANCEL);
+            mb.setText("Set Source");
+            mb.setMessage(msg);
+
+            if (mb.open() == SWT.OK) {
+                for (String privilege : privilegeKeys) {
+                    manifestModel.addPrivilege(privilege);
+                }
+                // Updating privileges to tizen-manifest.xml file
+                coreXmlManager.storeXml();
+                IFile manifestFile = project.getFile(IConstants.MANIFEST_FILE);
+
+                // Refresh the tizen-manifest.xml file
+                try {
+                    manifestFile.refreshLocal(IResource.DEPTH_ZERO, null);
+                } catch (CoreException e) {
+                    e.printStackTrace();
+                }
+
+            } else {
+                return false;
+            }
+        }
+        return true;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/ResourceManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/view/databinding/utils/ResourceManager.java
new file mode 100644 (file)
index 0000000..80e48f3
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * UI Builder - Databinding
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - Samsung R&D Institute India, Bangalore
+ *
+ */
+
+package org.tizen.efluibuilder.ui.view.databinding.utils;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.util.IOUtil;
+import org.tizen.efluibuilder.BuilderPlugin;
+
+public class ResourceManager {
+       private static final String ID = "org.tizen.efluibuilder";
+       private static ImageRegistry imageRegistry = BuilderPlugin.getDefault().getImageRegistry();
+       protected static final Logger logger = LoggerFactory.getLogger(ResourceManager.class);
+
+       private ResourceManager() {
+       }
+
+       /**
+        * 
+        * @param dir
+        *            image directory
+        * @param imageName
+        *            resource name
+        * @return Image object from resource
+        */
+       public static Image getImage(String dir, String imageName) {
+               String imageFilePath = dir + imageName;
+               String key = imageFilePath;
+               if (imageRegistry.get(key) == null || imageRegistry.get(key).isDisposed()) {
+                       ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(ID, imageFilePath);
+                       imageRegistry.put(key, desc);
+               }
+
+               return imageRegistry.get(key);
+       }
+
+       public static Image getImage(String name) {
+               return getImage(BuilderConstants.IMAGE_DIR, name);
+       }
+
+       public static Image getIcon(String name) {
+               return getImage(BuilderConstants.ICON_DIR, name);
+       }
+
+       /**
+        * @param dir
+        *            image directory
+        * @param imageName
+        *            resource name
+        * @return ImageDescriptor object from resource
+        */
+       public static ImageDescriptor getImageDescriptor(String dir, String imageName) {
+               if (imageName == null || imageName.equals(BuilderConstants.EMPTY)) {
+                       return null;
+               }
+
+               ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(ID, dir + imageName);
+               return desc;
+       }
+
+       public static ImageDescriptor getImageDescriptor(String name) {
+               return getImageDescriptor(BuilderConstants.IMAGE_DIR, name);
+       }
+
+       public static ImageDescriptor getIconDescriptor(String name) {
+               return getImageDescriptor(BuilderConstants.ICON_DIR, name);
+       }
+
+       /**
+        * @param resource
+        *            name
+        * @return URL of resource file
+        */
+       public static URL getResource(String name) {
+               return BuilderPlugin.getDefault().getBundle().getResource(name);
+       }
+
+       /**
+        * @param resource
+        *            name
+        * @return InputStream of resource file
+        * @throws IOException
+        */
+       public static InputStream openStream(String name) throws IOException {
+               InputStream stream = getResource(name).openStream();
+               return stream;
+       }
+
+       /**
+        * 
+        * @param name
+        *            resource name (bundle relative path)
+        * @return String of resource file (or null)
+        */
+       public static String getString(String name) {
+               InputStream stream = null;
+               try {
+                       stream = openStream(name);
+                       int length = stream.available();
+                       if (length > 4096) {
+                               logger.warn("Resource file is too large");
+                       }
+                       byte[] buffer = new byte[length];
+                       int readLength = stream.read(buffer);
+                       if (readLength == -1) {
+                               logger.warn("End of file");
+                       }
+                       stream.close();
+                       return new String(buffer, BuilderConstants.ENCODING);
+               } catch (IOException e) {
+                       IOUtil.tryClose(stream);
+                       return null;
+               }
+
+       }
+
+       /**
+        * Copy Plugin resource -> Project file
+        * 
+        * @param src
+        *            resource name
+        * @param dst
+        *            dst file
+        * @throws IOException
+        * @throws CoreException
+        */
+       /*
+        * public static final void copy(String src, IFile dst) throws IOException,
+        * CoreException { InputStream stream = ResourceManager.openStream(src);
+        * dst.create(stream, false, null); }
+        */
+
+       public static URL getFileURL(String bundle, String fullPath) {
+               URL url = null;
+               if (fullPath != null && !fullPath.isEmpty()) {
+                       url = FileLocator.find(org.eclipse.core.runtime.Platform.getBundle(bundle), new Path(fullPath), null);
+               } else {
+                       url = FileLocator.find(org.eclipse.core.runtime.Platform.getBundle(bundle), new Path(""), null);
+               }
+               if (url != null) {
+                       try {
+                               return FileLocator.resolve(url);
+                       } catch (IOException e) {
+                               return null;
+                       }
+               }
+               return null;
+       }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/Messages.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/Messages.java
new file mode 100644 (file)
index 0000000..fa180f2
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public final class Messages {
+    private static final String BUNDLE_NAME = Messages.class.getName();
+
+    // == filters
+    public static String FILTER_TEXT;
+
+    // == actions
+
+    // rename
+    public static String RENAME;
+
+    // new view
+    public static String ACTION_ADD_VIEW_TITLE;
+    public static String ACTION_ADD_VIEW_TEMPLATE_TITLE;
+    public static String ACTION_ADD_VIEW_EMPTY_TITLE;
+    public static String ACTION_ADD_VIEW_EMPTY_ICON_NOR;
+    public static String ACTION_ADD_VIEW_EMPTY_ICON_MV;
+    public static String ACTION_ADD_VIEW_EMPTY_ICON_SEL;
+    public static String ACTION_ADD_VIEW_POPUP_TITLE;
+    public static String ACTION_ADD_VIEW_CTXPOPUP_TITLE;
+    public static String ACTION_SET_MAIN_VIEW_TITLE;
+
+    public static String ACTION_CREATE_TEMPLATE_VIEW_TITLE;
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/Messages.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/Messages.properties
new file mode 100644 (file)
index 0000000..a4dcfc1
--- /dev/null
@@ -0,0 +1,22 @@
+# Messages
+
+# Filters
+FILTER_TEXT=type filter text
+
+#== actions
+# rename
+RENAME=Modify ID
+
+# new view
+ACTION_ADD_VIEW_TITLE=&Add View
+ACTION_ADD_VIEW_EMPTY_TITLE=&Empty View
+ACTION_ADD_VIEW_TEMPLATE_TITLE=&View From Template List...
+ACTION_ADD_VIEW_POPUP_TITLE=&Popup View
+ACTION_ADD_VIEW_CTXPOPUP_TITLE=&Ctxpopup View
+
+ACTION_ADD_VIEW_EMPTY_ICON_NOR=res/icons/outline/t_outline_icon2_nor.png
+ACTION_ADD_VIEW_EMPTY_ICON_MV=res/icons/outline/t_outline_icon2_mv.png
+ACTION_ADD_VIEW_EMPTY_ICON_SEL=res/icons/outline/t_outline_icon2_sel.png
+ACTION_SET_MAIN_VIEW_TITLE=&Set As Startup View
+
+ACTION_CREATE_TEMPLATE_VIEW_TITLE=&Save As View Template
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineConstants.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineConstants.java
new file mode 100644 (file)
index 0000000..40d2558
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline;
+
+/**
+ * A OutlinePage constants
+ */
+public final class OutlineConstants {
+
+    // Action key (popup, ctxpopup)
+    public static final String KEY_POPUP_VIEW = "Popup"; //$NON-NLS-1$
+    public static final String KEY_CTXPOPUP_VIEW = "Ctxpopup"; //$NON-NLS-1$
+
+    // ActionConstants
+    public static final String RENAME_GROUP = "outline rename group"; //$NON-NLS-1$
+    public static final String RENAME_ACTION = "outline rename"; //$NON-NLS-1$
+
+    // ====
+    // New View Group
+    public static final String ADD_VIEW_GROUP = "org.tizen.efluibuilder.ui.view.outline.action.addviewgroup";
+
+    /**
+     * New popup view action id.
+     */
+    public static final String ADD_VIEW_POPUP = "org.tizen.efluibuilder.ui.view.outline.action.AddViewPopup";//$NON-NLS-1$
+
+    /**
+     * New ctxpopup view action id.
+     */
+    public static final String ADD_VIEW_CTXPOPUP = "org.tizen.efluibuilder.ui.view.outline.action.AddViewCtxpopup";//$NON-NLS-1$
+
+    /**
+     * New view template action id.
+     */
+    public static final String ADD_VIEW_TEMPLATE = "org.tizen.efluibuilder.ui.view.outline.action.AddViewtemplate";//$NON-NLS-1$
+
+    /**
+     * Set main view action id.
+     */
+    public static final String CREATE_TEMPLATE_VIEW = "org.tizen.efluibuilder.ui.view.outline.action.CreateTemplateView";//$NON-NLS-1$
+
+    /**
+     * Show view action id.
+     * <p>
+     * Value : <code>"org.tizen.efluibuilder.ui.view.outline.action.ShowView"</code>
+     */
+    public static final String SHOW_VIEW = "org.tizen.efluibuilder.ui.view.outline.action.ShowView";//$NON-NLS-1$
+
+    /**
+     * Show popup view action id.
+     * <p>
+     * Value : <code>"org.tizen.efluibuilder.ui.view.outline.action.ShowPopup"</code>
+     */
+    public static final String SHOW_POPUP = "org.tizen.efluibuilder.ui.view.outline.action.ShowPopup";//$NON-NLS-1$
+
+    /**
+     * Show text filter action id.
+     * <p>
+     * <code>"org.tizen.efluibuilder.ui.view.outline.action.ShowTextFilter"</code>
+     */
+    public static final String SHOW_TEXT_FILTER = "org.tizen.efluibuilder.ui.view.outline.action.ShowTextFilter";//$NON-NLS-1$
+
+    // RequestConstnats
+    public static final String REQ_RENAME = "outlineview treeitem rename"; //$NON-NLS-1$
+    public static final String NEW_NAME = "treeitem new name"; //$NON-NLS-1$
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineContextMenu.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineContextMenu.java
new file mode 100644 (file)
index 0000000..152938d
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline;
+
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.tizen.efluibuilder.ui.contextmenu.CommonContextMenu;
+
+
+public final class OutlineContextMenu extends CommonContextMenu {
+    // Storyboard Start
+    // private IEventsMenu eventMenu;
+
+    public OutlineContextMenu(EditPartViewer viewer,
+            ActionRegistry registry/* , IEventsMenu eventMenu */) {
+        super(viewer, registry);
+        // this.eventMenu = eventMenu;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public void buildContextMenu(IMenuManager menu) {
+        addUndoContextMenu(menu);
+        addEditContextMenu(menu);        
+        addViewSpecificContextMenu(menu);
+
+        IAction action = null;
+
+        // ADD RENAME
+        menu.add(new Separator(OutlineConstants.RENAME_GROUP));
+
+        action = getAction(OutlineConstants.RENAME_ACTION);
+        if (action != null) {
+            menu.appendToGroup(OutlineConstants.RENAME_GROUP, action);
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineEditPartFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineEditPartFactory.java
new file mode 100644 (file)
index 0000000..7507b0b
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.ui.IActionBars;
+
+
+public final class OutlineEditPartFactory implements EditPartFactory {
+    private IActionBars actionBars = null;
+    private ActionRegistry registry = null;
+
+    public OutlineEditPartFactory(IActionBars actionBars, ActionRegistry registry) {
+        this.actionBars = actionBars;
+        this.registry = registry;
+    }
+
+    @Override
+    public EditPart createEditPart(EditPart context, Object model) {
+        EditPart editPart = new OutlineViewEditPart(actionBars, registry);
+        editPart.setModel(model);
+
+        return editPart;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineEditPolicy.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineEditPolicy.java
new file mode 100644 (file)
index 0000000..df76c95
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.TreeEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.TreeContainerEditPolicy;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.PartUtil;
+
+
+/**
+ * An edit policy class for outline page.
+ */
+public final class OutlineEditPolicy extends TreeContainerEditPolicy {
+
+    @Override
+    protected Command getAddCommand(ChangeBoundsRequest request) {
+        return getMoveCommand(request);
+    }
+
+    @Override
+    protected Command getCreateCommand(CreateRequest request) {
+        Part parent = null;
+        Part child = null;
+        Part refChild = null;
+        Part part = (Part) getHost().getModel();
+        Part nextSibling = null;
+
+        if ((Part) request.getNewObject() == null) {
+            return null;
+        }
+
+        Point point = request.getLocation();
+        TreeEditPart treeEditPart = (TreeEditPart) getHost().getViewer().findObjectAt(point);
+        if (treeEditPart == null) {
+            return null;
+        }
+        if (!(treeEditPart.getWidget() instanceof TreeItem)) {
+            return null;
+        }
+        TreeItem item = (TreeItem) treeEditPart.getWidget();
+        refChild = (Part) treeEditPart.getModel();
+        Rectangle rect = item.getBounds();
+
+        ComponentDescriptor componentDescriptor = part.getOwnerDocumentPart().getComponentDescriptor();
+        if ((refChild.equals(part)) && componentDescriptor.canHaveChild((ComponentPart) part, (ComponentPart) request.getNewObject())) {
+            parent = (Part) getHost().getParent().getModel();
+            child = (Part) request.getNewObject();
+            nextSibling = null;
+        } else if (refChild.equals(part)) {
+            return null;
+        } else if (!part.getChildren().isEmpty()) {
+            parent = part;
+            child = (Part) request.getNewObject();
+
+            if (isNextPosion(rect, point)) {
+                nextSibling = refChild;
+            } else {
+                nextSibling = refChild.getNextSibling();
+            }
+        }
+
+        return PartUtil.createAddPartCommand(parent, child, nextSibling);
+    }
+
+    private boolean isNextPosion(Rectangle rect, Point point) {
+        Rectangle temp = rect;
+        temp.y = rect.y + (rect.height / 2);
+        temp.height = rect.height / 2;
+
+        if (temp.contains(point.x, point.y)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    protected Command getMoveChildrenCommand(ChangeBoundsRequest request) {
+        // TODO implement
+        return null;
+    }
+
+    /**
+     * Gets a rename {@link Command}.
+     * 
+     * @param request
+     *            a {@link Request}
+     * @return a rename {@link Command}
+     */
+    protected Command getRenameCommand(Request request) {
+        Object object = getHost().getModel();
+        /*
+         * if (object instanceof ViewPart) { ViewPart viewPart = (ViewPart) getHost().getModel();
+         * return PartUtil.createSetViewPropertyIdCommand(viewPart, (String)
+         * request.getExtendedData().get(OutlineConstants.NEW_NAME)); } else
+         */if (object instanceof Part) {
+            Part part = (Part) object;
+            return PartUtil.createSetPropertyCommand(part, BuilderConstants.PROPERTY_ID, (String) request.getExtendedData().get(OutlineConstants.NEW_NAME));
+        }
+        return null;
+
+    }
+
+    @Override
+    public Command getCommand(Request req) {
+        if (OutlineConstants.REQ_RENAME.equals(req.getType())) {
+            return getRenameCommand(req);
+        } else if (REQ_MOVE.equals(req.getType())) {
+            if (req instanceof ChangeBoundsRequest) {
+                return getMoveCommand((ChangeBoundsRequest) req);
+            }
+        }
+        return super.getCommand(req);
+    }
+
+    @Override
+    public boolean understandsRequest(Request req) {
+        return true;
+    }
+
+    private Command getMoveCommand(ChangeBoundsRequest request) {
+        EditPart srcEditPart = (EditPart) request.getEditParts().get(0);
+        if (srcEditPart == null) {
+            return null;
+        }
+
+        EditPart targetEditPart = (EditPart) request.getExtendedData().get("target");
+        if (targetEditPart == null) {
+            return null;
+        }
+
+        Part sourcePart = null, parentPart = null, siblingPart = null;
+
+        sourcePart = (Part) srcEditPart.getModel();
+        if (!(sourcePart instanceof ComponentPart)) {
+            return null;
+        }
+
+        parentPart = (Part) targetEditPart.getModel();
+        if (!(parentPart instanceof ComponentPart)) {
+            return null;
+        }
+        ComponentDescriptor componentDescriptor = sourcePart.getOwnerDocumentPart().getComponentDescriptor();
+        if (!componentDescriptor.canHaveChild((ComponentPart) parentPart, (ComponentPart) sourcePart)) {
+            parentPart = (Part) targetEditPart.getParent().getModel();
+            siblingPart = (Part) targetEditPart.getModel();
+        }
+
+        return PartUtil.createMovePartCommand(sourcePart, sourcePart.getParent(), parentPart, siblingPart);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlinePage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlinePage.java
new file mode 100644 (file)
index 0000000..9462962
--- /dev/null
@@ -0,0 +1,180 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline;
+
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.KeyHandler;
+import org.eclipse.gef.KeyStroke;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.gef.ui.parts.ContentOutlinePage;
+import org.eclipse.gef.ui.parts.SelectionSynchronizer;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.actions.ActionFactory;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.actions.ActionConstants;
+
+
+public final class OutlinePage extends ContentOutlinePage {
+    private ActionRegistry registry = null;
+    private EditDomain editDomain = null;
+
+    private Composite composite = null;
+    private Composite viewerComposite = null;
+    private Part documentPart;
+    private SelectionSynchronizer selectionSynchronizer = null;
+
+    // public OutlinePage(Part documentPart, EditDomain editDomain, ActionRegistry registry,
+    // SelectionSynchronizer selectionSynchronizer,
+    // ISBTabManager sbTabManager) {
+    public OutlinePage(Part documentPart, EditDomain editDomain, ActionRegistry registry, SelectionSynchronizer selectionSynchronizer) {
+        super(new OutlineTreeViewer());
+        // this.sbTabManager = sbTabManager;
+
+        this.documentPart = documentPart;
+        this.editDomain = editDomain;
+        this.registry = registry;
+        this.selectionSynchronizer = selectionSynchronizer;
+    }
+
+    @Override
+    public Control getControl() {
+        return composite;
+    }
+
+    @Override
+    public void createControl(Composite parent) {
+        // super.createControl(parent);
+        createActions();
+        configureToolBar();
+        composite = new SashForm(parent, SWT.VERTICAL);
+        viewerComposite = new Composite(composite, SWT.NONE);
+        viewerComposite.setLayout(new FormLayout());
+        getViewer().setEditDomain(editDomain);
+        getViewer().createControl(viewerComposite);
+        getViewer().setEditPartFactory(new OutlineEditPartFactory(getSite().getActionBars(), registry));
+        KeyHandler keyHandler = new KeyHandler();
+        keyHandler.put(KeyStroke.getPressed(SWT.F2, 0), registry.getAction(OutlineConstants.RENAME_ACTION));
+        getViewer().setKeyHandler(keyHandler);
+        getViewer().setContextMenu(new OutlineContextMenu(getViewer(), registry /* , eventMenu */));
+
+        FormData layoutData = new FormData();
+        layoutData.top = new FormAttachment(0);
+        layoutData.bottom = new FormAttachment(100);
+        layoutData.left = new FormAttachment(0);
+        layoutData.right = new FormAttachment(100);
+        getViewer().getControl().setLayoutData(layoutData);
+        composite.layout();
+        parent.layout();
+        addListeners();
+
+        Part viewsPart = PartUtil.findViewsPart(documentPart);
+        getViewer().setContents(viewsPart);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.part.Page#dispose()
+     */
+    @Override
+    public void dispose() {
+        removeListeners();
+        super.dispose();
+    }
+
+    private void createActions() {
+        // set actions to actionbars.
+        IActionBars actionBars = getSite().getActionBars();
+
+        String id = ActionFactory.UNDO.getId();
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionFactory.REDO.getId();
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionConstants.DELETE_PART;
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionConstants.COPY_PART;
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionConstants.CUT_PART;
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionConstants.PASTE_PART;
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        // == advux ==//
+        // New View
+
+        id = ActionConstants.ADD_VIEW_EMPTY;
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = OutlineConstants.ADD_VIEW_TEMPLATE;
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = OutlineConstants.ADD_VIEW_POPUP;
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = OutlineConstants.ADD_VIEW_CTXPOPUP;
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = OutlineConstants.CREATE_TEMPLATE_VIEW;
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionConstants.SET_STARTUP_VIEW;
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        actionBars.updateActionBars();
+    }
+
+    private void configureToolBar() {
+        // set actions to toollbar.
+        IActionBars actionBars = getSite().getActionBars();
+        IToolBarManager toolBarManager = actionBars.getToolBarManager();
+        toolBarManager.add(new Separator(OutlineConstants.ADD_VIEW_GROUP));
+
+        IAction action = actionBars.getGlobalActionHandler(ActionConstants.ADD_VIEW_EMPTY);
+        toolBarManager.appendToGroup(OutlineConstants.ADD_VIEW_GROUP, action);
+    }
+
+    private void addListeners() {
+        selectionSynchronizer.addViewer(getViewer());
+    }
+
+    private void removeListeners() {
+        selectionSynchronizer.removeViewer(getViewer());
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeTransfer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeTransfer.java
new file mode 100644 (file)
index 0000000..4cf043c
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline;
+
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.dnd.SimpleObjectTransfer;
+
+
+/**
+ * A tree transfer class for drag and drop.
+ */
+final class OutlineTreeTransfer extends SimpleObjectTransfer {
+
+    private static final OutlineTreeTransfer INSTANCE = new OutlineTreeTransfer();
+    private static final String TYPE_NAME = "Local Transfer"//$NON-NLS-1$
+            + System.currentTimeMillis() + ":" + INSTANCE.hashCode();//$NON-NLS-1$
+    private static final int TYPEID = registerType(TYPE_NAME);
+
+    private EditPartViewer viewer;
+
+    /**
+     * Gets a {@link OutlineTreeTransfer}.
+     * 
+     * @return a {@link OutlineTreeTransfer}
+     */
+    public static OutlineTreeTransfer getInstance() {
+        return INSTANCE;
+    }
+
+    private OutlineTreeTransfer() {
+    }
+
+    @Override
+    protected int[] getTypeIds() {
+        return new int[] { TYPEID };
+    }
+
+    @Override
+    protected String[] getTypeNames() {
+        return new String[] { TYPE_NAME };
+    }
+
+    /**
+     * Gets a {@link EditPartViewer}.
+     * 
+     * @return a {@link EditPartViewer}
+     */
+    public EditPartViewer getViewer() {
+        return viewer;
+    }
+
+    /**
+     * Sets a {@link EditPartViewer}.
+     * 
+     * @param epv
+     *            a {@link EditPartViewer}
+     */
+    public void setViewer(EditPartViewer viewer) {
+        this.viewer = viewer;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeTransferDragListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeTransferDragListener.java
new file mode 100644 (file)
index 0000000..1760cd5
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.dnd.AbstractTransferDragSourceListener;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+/**
+ * A tree transfer class for drag and drop.
+ * 
+ * @see AbstractTransferDragSourceListener
+ */
+class OutlineTreeTransferDragListener extends AbstractTransferDragSourceListener {
+
+    private List<Part> modelSelection;
+
+    /**
+     * Constructor.
+     * 
+     * @param viewer
+     *            a {@link EditPartViewer}
+     * @see AbstractTransferDragSourceListener
+     */
+    public OutlineTreeTransferDragListener(EditPartViewer viewer) {
+        super(viewer, OutlineTreeTransfer.getInstance());
+    }
+
+    @Override
+    public void dragSetData(DragSourceEvent event) {
+        event.data = getViewer().getSelectedEditParts();
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    public void dragStart(DragSourceEvent event) {
+        OutlineTreeTransfer.getInstance().setViewer(getViewer());
+        List<Part> selection = getViewer().getSelectedEditParts();
+        OutlineTreeTransfer.getInstance().setObject(selection);
+        saveModelSelection(selection);
+    }
+
+    @Override
+    public void dragFinished(DragSourceEvent event) {
+        OutlineTreeTransfer.getInstance().setObject(null);
+        OutlineTreeTransfer.getInstance().setViewer(null);
+        if (event.doit) {
+            revertModelSelection();
+        } else {
+            modelSelection = null;
+        }
+    }
+
+    protected void revertModelSelection() {
+        List<EditPart> list = new ArrayList<EditPart>();
+        Object editpart;
+        for (int i = 0; i < modelSelection.size(); i++) {
+            editpart = getViewer().getEditPartRegistry().get(modelSelection.get(i));
+            if (editpart != null) {
+                list.add((EditPart) editpart);
+            }
+        }
+        getViewer().setSelection(new StructuredSelection(list));
+        modelSelection = null;
+    }
+
+    protected void saveModelSelection(List<Part> editPartSelection) {
+        modelSelection = new ArrayList<Part>();
+        for (int i = 0; i < editPartSelection.size(); i++) {
+            // EditPart editpart = (EditPart) editPartSelection.get(i);
+            // modelSelection.add((Part) editpart.getModel());
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeTransferDropListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeTransferDropListener.java
new file mode 100644 (file)
index 0000000..d638de8
--- /dev/null
@@ -0,0 +1,327 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.dnd.AbstractTransferDropTargetListener;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.tizen.efluibuilder.model.command.ChangeOrderPartCommand;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+/**
+ * A tree transfer class for drag and drop.
+ * 
+ * @see AbstractTransferDropTargetListener
+ */
+class OutlineTreeTransferDropListener extends AbstractTransferDropTargetListener {
+
+    /**
+     * Constructor.
+     * 
+     * @param viewer
+     *            a {@link EditPartViewer}
+     * @see AbstractTransferDropTargetListener
+     */
+    public OutlineTreeTransferDropListener(EditPartViewer viewer) {
+        super(viewer, OutlineTreeTransfer.getInstance());
+        setEnablementDeterminedByCommand(true);
+    }
+
+    @Override
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    protected Request createTargetRequest() {
+        if (OutlineTreeTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            ChangeBoundsRequest request = new ChangeBoundsRequest(RequestConstants.REQ_MOVE);
+            request.setEditParts((List) OutlineTreeTransfer.getInstance().getObject());
+            request.getExtendedData().put("source", getCurrentEvent().data);
+            return request;
+        } else {
+            return null;
+        }
+    }
+
+    private Command getMoveCommand(EditPart srcEditPart, EditPart targetEditPart) {
+        if (srcEditPart != null && targetEditPart != null &&
+                srcEditPart.getModel() instanceof Part && targetEditPart.getModel() instanceof Part) {
+            Part srcPart = (Part) srcEditPart.getModel();
+            Part targetPart = (Part) targetEditPart.getModel();
+            if (srcEditPart.getParent() == targetEditPart && srcPart.getNextSibling() != null) {
+                return new ChangeOrderPartCommand(srcPart, null);
+            } else if (srcEditPart.getParent() == targetEditPart.getParent() && srcPart.getNextSibling() != targetPart) {
+                return new ChangeOrderPartCommand(srcPart, targetPart);
+            }
+        }
+        return null;
+    }
+
+    @Override
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    protected Command getCommand() {
+        if (OutlineTreeTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            Request request = getTargetRequest();
+            if (request instanceof ChangeBoundsRequest && getTargetEditPart() != null) {
+                ChangeBoundsRequest req = (ChangeBoundsRequest) request;
+                List editparts = req.getEditParts();
+                if (editparts.size() == 1) {
+                    EditPart sourceEditPart = (EditPart) editparts.get(0);
+                    EditPart targetEditPart = getTargetEditPart();
+                    return getMoveCommand(sourceEditPart, targetEditPart);
+                }
+            }
+        }
+        return null;
+
+    }
+
+    protected String getCommandName() {
+        if (OutlineTreeTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            if (isMove()) {
+                return RequestConstants.REQ_MOVE;
+            }
+            return RequestConstants.REQ_ADD;
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    protected Collection getExclusionSet() {
+        if (OutlineTreeTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            List selection = getViewer().getSelectedEditParts();
+            List exclude = new ArrayList(selection);
+            exclude.addAll(includeChildren(selection));
+            return exclude;
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    protected void handleDragOver() {
+        if (getCommand() != null) {
+            getCurrentEvent().detail = DND.DROP_MOVE;
+            getCurrentEvent().feedback = DND.FEEDBACK_SELECT;
+        } else {
+            getCurrentEvent().detail = DND.DROP_NONE;
+            getCurrentEvent().feedback = DND.FEEDBACK_NONE;
+        }
+        //
+        // if (OutlineTreeTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType))
+        // {
+        // if (OutlineTreeTransfer.getInstance().getViewer() != getViewer()) {
+        // getCurrentEvent().detail = DND.DROP_NONE;
+        // return;
+        // }
+        //
+        // Part target = null;
+        // Part part = null;
+        // TreeItem treeItem = null;
+        // TreeEditPart treeEditPart = null;
+        // Rectangle rect = null;
+        // Point point = null;
+        // ChangeBoundsRequest request = (ChangeBoundsRequest) getTargetRequest();
+        //
+        // List<EditPart> list =
+        // OutlineTreeTransfer.getInstance().getViewer().getSelectedEditParts();
+        // if (list == null || list.size() == 0) {
+        // return;
+        // }
+        //
+        // Part source = (Part) (list.get(0)).getModel();
+        // if (getTargetEditPart() == null) {
+        // return;
+        // }
+        // point = request.getLocation();
+        // treeEditPart = (TreeEditPart) getTargetEditPart().getViewer().findObjectAt(point);
+        // target = (Part) treeEditPart.getModel();
+        // part = (Part) getTargetEditPart().getModel();
+        // if (getCommand() == null) {
+        // getCurrentEvent().detail = DND.DROP_NONE;
+        // getCurrentEvent().feedback = DND.FEEDBACK_NONE;
+        // } else {
+        // getCurrentEvent().detail = DND.DROP_MOVE;
+        // getCurrentEvent().feedback = DND.FEEDBACK_INSERT_BEFORE;
+        // }
+        //
+        // getCurrentEvent().detail = DND.DROP_MOVE;
+        // if (target != null) {
+        // ComponentDescriptor componentDescriptor =
+        // part.getOwnerDocumentPart().getComponentDescriptor();
+        // if (componentDescriptor.canHaveChild((ComponentPart) target, (ComponentPart) source)) {
+        // getCurrentEvent().feedback = DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND |
+        // DND.FEEDBACK_SELECT;
+        //
+        // } else if ((target.equals(part))
+        // || (target.getParent() != null && ((!componentDescriptor.canHaveChild((ComponentPart)
+        // target.getParent(), (ComponentPart) source))
+        // || (target.getParent().equals(((ComponentPart) target).getOwnerViewPart()))
+        // || (target.equals(((ComponentPart) target).getOwnerViewPart()))))) {
+        // getCurrentEvent().detail = DND.DROP_NONE;
+        // getCurrentEvent().feedback = DND.FEEDBACK_NONE;
+        // } else if (treeEditPart.getWidget() instanceof TreeItem) {
+        // treeItem = (TreeItem) treeEditPart.getWidget();
+        // rect = treeItem.getBounds();
+        // if (isNextPosion(rect, point)) {
+        // getCurrentEvent().feedback = DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND |
+        // DND.FEEDBACK_INSERT_AFTER;
+        // } else {
+        // getCurrentEvent().feedback = DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND |
+        // DND.FEEDBACK_INSERT_BEFORE;
+        // }
+        // } else {
+        // getCurrentEvent().feedback = DND.FEEDBACK_SCROLL | DND.FEEDBACK_EXPAND |
+        // DND.FEEDBACK_INSERT_BEFORE;
+        // }
+        // } else {
+        // getCurrentEvent().detail = DND.DROP_NONE;
+        // getCurrentEvent().feedback = DND.FEEDBACK_NONE;
+        // }
+        // super.handleDragOver();
+        // }
+        super.handleDragOver();
+    }
+
+    // private boolean isNextPosion(Rectangle rect, Point point) {
+    // Rectangle temp = rect;
+    // temp.y = rect.y + (rect.height / 2);
+    // temp.height = rect.height / 2;
+    //
+    // if (temp.contains(point.x, point.y)) {
+    // return true;
+    // } else {
+    // return false;
+    // }
+    // }
+
+    @SuppressWarnings("rawtypes")
+    protected EditPart getSourceEditPart() {
+        if (OutlineTreeTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            List selection = (List) OutlineTreeTransfer.getInstance().getObject();
+            if (selection == null || selection.isEmpty() || !(selection.get(0) instanceof EditPart)) {
+                return null;
+            }
+            return (EditPart) selection.get(0);
+        } else {
+            return null;
+        }
+    }
+
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    protected List includeChildren(List list) {
+        List result = new ArrayList();
+        for (int i = 0; i < list.size(); i++) {
+            List children = ((EditPart) list.get(i)).getChildren();
+            result.addAll(children);
+            result.addAll(includeChildren(children));
+        }
+        return result;
+    }
+
+    @Override
+    public boolean isEnabled(DropTargetEvent event) {
+        if (OutlineTreeTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            if (event.detail != DND.DROP_MOVE) {
+                return false;
+            }
+            return super.isEnabled(event);
+        } else {
+            return false;
+        }
+    }
+
+    @SuppressWarnings("rawtypes")
+    protected boolean isMove() {
+        if (OutlineTreeTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            EditPart source = getSourceEditPart();
+            if (source == null) {
+                return false;
+            }
+            // for moving to child of other parent
+            // Part sourcePart = (Part) source.getModel();
+            // Part targetPart = null;
+            // if(getTargetEditPart() != null) {
+            // targetPart = (Part) getTargetEditPart().getModel();
+            // }
+            //
+            List selection = (List) OutlineTreeTransfer.getInstance().getObject();
+            for (int i = 0; i < selection.size(); i++) {
+                EditPart ep = (EditPart) selection.get(i);
+                if (ep.getParent() != source.getParent()) {
+                    return false;
+                }
+
+            }
+            return source.getParent() == getTargetEditPart();
+
+            // for moving to child of other parent
+            // return sourcePart.getParent().getPartDescriptor().equals((targetPart != null) ?
+            // targetPart
+            // .getPartDescriptor() : null);
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    protected void updateTargetRequest() {
+        if (OutlineTreeTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            ChangeBoundsRequest request = (ChangeBoundsRequest) getTargetRequest();
+            request.setLocation(getDropLocation());
+            request.setType(getCommandName());
+        }
+    }
+
+    @Override
+    protected void handleDrop() {
+        if (OutlineTreeTransfer.getInstance().isSupportedType(getCurrentEvent().currentDataType)) {
+            // Object obj = getCurrentEvent().data;
+            // if (obj != null) {
+            // List<EditPart> list = (List<EditPart>) obj;
+            // Part source = (Part) (list.get(0)).getModel();
+            // if (source != null) {
+            // EditPart ep =
+            // (EditPart) getViewer().getEditPartRegistry().get(source.getPartId());
+            // if (ep != null) {
+            // getViewer().select(ep);
+            // }
+            // }
+            // }
+            super.handleDrop();
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeViewer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineTreeViewer.java
new file mode 100644 (file)
index 0000000..5ecba42
--- /dev/null
@@ -0,0 +1,232 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.dnd.TemplateTransfer;
+import org.eclipse.gef.ui.parts.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.TreeEditor;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSource;
+import org.eclipse.swt.dnd.DropTarget;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.IPartChangedListener;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartMutation;
+import org.tizen.efluibuilder.model.part.PartObserver;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.ui.editor.dnd.listener.OutlineDropTargetListener;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+/**
+ * A tree viewer class for outline page.
+ */
+public final class OutlineTreeViewer extends TreeViewer implements IPartChangedListener {
+    private TreeEditor editor = null;
+    private DragSource dragSource = null;
+    private DropTarget dropTarget = null;
+    private OutlineTreeTransferDragListener outlineTreeTransferDragListener = null;
+    private OutlineTreeTransferDropListener outlineTreeTransferDropListener = null;
+    private OutlineDropTargetListener outlineDropTargetListener = null;
+    private PartObserver observer = null;
+
+    @Override
+    public Control createControl(Composite parent) {
+        super.createControl(parent);
+        editor = new TreeEditor((Tree) getControl());
+        editor.horizontalAlignment = SWT.LEFT;
+        editor.grabHorizontal = true;
+
+        setDragSource(null);
+        setDropTarget(null);
+
+        addDragSourceListener();
+        addDropTargetListener();
+        getControl().setBackground(ColorResources.OUTLINE_BACKGROUND); // for advux
+        return getControl();
+    }
+
+    /**
+     * Gets tree editor in outline page.
+     * 
+     * @return a {@link TreeEditor}
+     */
+    public TreeEditor getTreeEditor() {
+        return editor;
+    }
+
+    public void refreshSelection() {
+        super.fireSelectionChanged();
+    }
+
+    private void addDragSourceListener() {
+        dragSource = new DragSource(this.getControl(), DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK | DND.DROP_DEFAULT);
+        Transfer[] types = { OutlineTreeTransfer.getInstance() };
+        dragSource.setTransfer(types);
+        outlineTreeTransferDragListener = new OutlineTreeTransferDragListener(this);
+        dragSource.addDragListener(outlineTreeTransferDragListener);
+    }
+
+    private void addDropTargetListener() {
+        dropTarget = new DropTarget(this.getControl(), DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK | DND.DROP_DEFAULT);
+        Transfer[] types = { TemplateTransfer.getInstance(), OutlineTreeTransfer.getInstance() };
+        dropTarget.setTransfer(types);
+        outlineTreeTransferDropListener = new OutlineTreeTransferDropListener(this);
+        dropTarget.addDropListener(outlineTreeTransferDropListener);
+        outlineDropTargetListener = new OutlineDropTargetListener(this);
+        dropTarget.addDropListener(outlineDropTargetListener);
+    }
+
+    @Override
+    public void setContents(Object contents) {
+
+        if (contents instanceof ViewsPart) {
+            super.setContents(contents);
+            this.observer = new PartObserver(this);
+            Part viewsPart = (ViewsPart) contents;
+            observer.observe(viewsPart.getParent());
+
+            expandAll();
+
+            if (viewsPart.getOwnerDocumentPart().isValidDocument() == false) {
+                setEnabled(false);
+            }
+        }
+    }
+
+    private void expandAll() {
+        Tree tree = (Tree) getControl();
+        TreeItem[] items = tree.getItems();
+        for (TreeItem item : items) {
+            expandChild(item);
+        }
+    }
+
+    private void expandChild(TreeItem item) {
+        item.setExpanded(true);
+        TreeItem[] items = item.getItems();
+        for (TreeItem child : items) {
+            expandChild(child);
+        }
+    }
+
+    @Override
+    public void partsChanged(List<PartMutation> mutations, PartObserver observer, String sender) {
+        if (sender.equals(PartObserver.MESSAGE_VALID_XML)) {
+            setEnabled(true);
+        } else if (sender.equals(PartObserver.MESSAGE_INVALID_XML)) {
+            setEnabled(false);
+            return;
+        }
+        HashMap<Part, String> partMapToRefresh = new HashMap<Part, String>();
+        boolean isViewChanged = false;
+        Map<Part, String> partMapToSelect = new HashMap<Part, String>();
+        int addedMutationSize = 0;
+        int removedMutationSize = 0;
+        Part addedPartToSelect = null;
+
+        for (PartMutation mutation : mutations) {
+            String mutationType = mutation.getType();
+            if (mutationType.equals(PartMutation.PARTS_ADDED)) {
+                addedMutationSize++;
+                for (Part part : mutation.getAddedParts()) {
+                    addedPartToSelect = part;
+                    if (part instanceof ViewPart) {
+                        isViewChanged = true;
+                    } else if (part instanceof ComponentPart) {
+                        partMapToSelect.put(part, "");
+                    }
+                }
+            } else if (mutationType.equals(PartMutation.PARTS_REMOVED)) {
+                removedMutationSize++;
+                for (Part part : mutation.getRemovedParts()) {
+                    if (part instanceof ViewPart) {
+                        isViewChanged = true;
+                    }
+                }
+            }
+
+            if (mutationType.equals(PartMutation.PARTS_ADDED) || mutationType.equals(PartMutation.PARTS_REMOVED)
+                    || mutationType.equals(PartMutation.PARTS_ORDER_CHANGED) || mutationType.equals(PartMutation.PROPERTY_CHANGED)) {
+                if (mutation.getTargetPart() instanceof ComponentPart) {
+                    // FIXED: When parts with parent relation are removed,
+                    // cannot get DocumentPart from it.
+                    partMapToRefresh.put(mutation.getTargetPart(), "");
+                } else if (mutation.getTargetPart() instanceof ViewsPart) {
+                    isViewChanged = true;
+                }
+            }
+
+        }
+
+        if (isViewChanged) {
+            getContents().refresh();
+            // Part viewsPart = (Part) getContents().getModel();
+            // String strStrupView = viewsPart.getPropertyValue(LayoutSchemaConstants.STARTUP);
+            for (Object model : getContents().getChildren()) {
+                Part childPart = (Part) (((EditPart) model).getModel());
+                if (childPart.getParent() != null) {
+                    ((EditPart) model).refresh();
+                }
+                // if (strStrupView != null &&
+                // strStrupView.equals(childPart.getPropertyValue(LayoutSchemaConstants.ID))) {
+                // ((EditPart) model).refresh();
+                // break;
+                // }
+            }
+        }
+
+        for (Part child : partMapToRefresh.keySet()) {
+            OutlineViewEditPart editPart = (OutlineViewEditPart) getEditPartRegistry().get(child.getUniqueId());
+            if (editPart != null && ((Part) (editPart.getModel())).getParent() != null) {
+                editPart.refresh();
+            }
+        }
+
+        if (addedMutationSize == 1 && removedMutationSize == 0 && addedPartToSelect != null) {
+            EditPart editPart = (EditPart) getEditPartRegistry().get(addedPartToSelect.getUniqueId());
+            if (editPart != null) {
+                this.select(editPart);
+            }
+        }
+
+    }
+
+    public void setEnabled(boolean enabled) {
+        getControl().setEnabled(enabled);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineViewEditPart.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/OutlineViewEditPart.java
new file mode 100644 (file)
index 0000000..fe79248
--- /dev/null
@@ -0,0 +1,355 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang3.StringEscapeUtils;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.editparts.AbstractTreeEditPart;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.TreeEditor;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolTip;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.actions.ActionFactory;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.ComponentValidator;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+/**
+ * A tree editpart class for outline page.
+ * 
+ * @see AbstractTreeEditPart
+ */
+public class OutlineViewEditPart extends AbstractTreeEditPart {
+    private Request request;
+    private ToolTip tooltip;
+    private IActionBars actionBars;
+    private ActionRegistry registry;
+
+    public OutlineViewEditPart(IActionBars actionBars, ActionRegistry registry) {
+        this.actionBars = actionBars;
+        this.registry = registry;
+    }
+
+    private boolean isValidPart(Part part) {
+        if (part != null && part instanceof ComponentPart && part.getOwnerDocumentPart() != null
+                && part.getOwnerDocumentPart().getComponentDescriptor().getWidgetDescriptor(part.getDescriptorId()) != null) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    protected List<Part> getModelChildren() {
+        List<Part> children = new ArrayList<Part>();
+        for (Part part : ((Part) getModel()).getChildren()) {
+            if (isValidPart(part) == true) {
+                children.add(part);
+            }
+        }
+        return children;
+    }
+
+    @Override
+    public void activate() {
+        super.activate();
+    }
+
+    @Override
+    public void deactivate() {
+        super.deactivate();
+    }
+
+    @Override
+    protected void createEditPolicies() {
+        installEditPolicy(EditPolicy.TREE_CONTAINER_ROLE, new OutlineEditPolicy());
+    }
+
+    public String getId() {
+        Part part = ((Part) getModel());
+        return part.getUniqueId();
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    protected void registerModel() {
+        getViewer().getEditPartRegistry().put(getId(), this);
+    }
+
+    @Override
+    protected void refreshVisuals() {
+        refreshWidgetText();
+        refreshWidgetImage();
+    }
+
+    private void refreshWidgetText() {
+        Part model = (Part) getModel();
+        if (!((model.getType() == PartType.COMPONENT) || (model.getType() == PartType.VIEW)))
+            return;
+
+        String text = model.getPropertyValue(ModelConstants.PROPERTY_ID);
+        if (model.getOwnerDocumentPart() == null) { //prevent dangling
+            return;
+        }
+        ComponentDescriptor componentDescriptor = model.getOwnerDocumentPart().getComponentDescriptor();
+        if (model.getParent() instanceof ViewsPart
+                && model.getParent().getPropertyValue(LayoutSchemaConstants.STARTUP).equals(model.getPropertyValue(LayoutSchemaConstants.ID))) {
+            String unicodeCh = "\u27AA ";
+            // String unicodeCh = "\u27A2 ";
+            // String unicodeCh = "\u279C ";
+            // String unicodeCh = "\u00BB ";
+            StringEscapeUtils.unescapeJava(unicodeCh);
+            // text += " <" + componentDescriptor.getDisplayName((ComponentPart) model) + "> - " +
+            // LayoutSchemaConstants.STARTUP;
+            // text = unicodeCh + text + " <" + componentDescriptor.getDisplayName((ComponentPart)
+            // model) + ">";
+            text += " <" + componentDescriptor.getDisplayName((ComponentPart) model) + ">  " + unicodeCh;
+        } else if ((model.getType() == PartType.VIEW) && model.getPropertyValue(LayoutSchemaConstants.TYPE).equals(LayoutSchemaConstants.POPUP)) {
+            text += " <" + componentDescriptor.getDisplayName((ComponentPart) model) + "> - " + LayoutSchemaConstants.POPUP;
+        } else {
+            text += " <" + componentDescriptor.getDisplayName((ComponentPart) model) + ">";
+        }
+
+        setWidgetText(text);
+
+    }
+
+    private void refreshWidgetImage() {
+        Part model = (Part) getModel();
+        if (!((model.getType() == PartType.COMPONENT) || (model.getType() == PartType.VIEW)) || model.getOwnerDocumentPart() == null)
+            return;
+
+        ComponentDescriptor componentDescriptor = model.getOwnerDocumentPart().getComponentDescriptor();
+        String icon = componentDescriptor.getIcon16((ComponentPart) model);
+        Assert.notNull(icon, model.getDescriptorId());
+        Image image = ImageResources.getImage(BuilderConstants.ICON_DIR + icon);
+        Assert.notNull(image);
+        setWidgetImage(image);
+    }
+
+    @Override
+    public void performRequest(Request request) {
+        if (request.getType() == OutlineConstants.REQ_RENAME) {
+            this.request = request;
+            renameTreeItem();
+        }
+    }
+
+    private void renameTreeItem() {
+        final Part model = (Part) getModel();
+        final Tree tree = (Tree) getViewer().getControl();
+        TreeItem item = (TreeItem) this.getWidget();
+        TreeEditor treeEditor = ((OutlineTreeViewer) getViewer()).getTreeEditor();
+
+        Control oldEditor = treeEditor.getEditor();
+        if (oldEditor != null) {
+            oldEditor.dispose();
+        }
+
+        final Text newEditor = new Text(tree, SWT.NONE);
+        String text[] = item.getText().split(" ");
+        newEditor.setText(text[0]);
+        newEditor.selectAll();
+        newEditor.setFocus();
+        actionBars.clearGlobalActionHandlers();
+        actionBars.updateActionBars();
+
+        newEditor.addKeyListener(new KeyAdapter() {
+            @Override
+            public void keyPressed(KeyEvent event) {
+                switch (event.keyCode) {
+                    case SWT.CR:
+                    case SWT.KEYPAD_CR:
+                        String message = canCommitID(model, newEditor.getText());
+                        if (message.equals(ComponentValidator.OK)) {
+                            commitID(newEditor.getText());
+                            newEditor.dispose();
+                            hideTooltipText();
+                        } else {
+                            newEditor.setText(model.getPropertyValue(ModelConstants.PROPERTY_ID));
+                            newEditor.selectAll();
+                            showTooltipText(newEditor, message);
+                        }
+                        setGlobalActions();
+                        actionBars.updateActionBars();
+                        break;
+                    case SWT.ESC:
+                        newEditor.dispose();
+                        tree.setFocus();
+                        setGlobalActions();
+                        actionBars.updateActionBars();
+                        break;
+                    default:
+                        // do nothing
+                        break;
+                }
+            }
+        });
+
+        newEditor.addFocusListener(new FocusListener() {
+
+            @Override
+            public void focusLost(FocusEvent e) {
+                String message = canCommitID(model, newEditor.getText());
+                if (message.equals(ComponentValidator.OK)) {
+                    commitID(newEditor.getText());
+                    hideTooltipText();
+                } else {
+                    newEditor.setText(model.getPropertyValue(ModelConstants.PROPERTY_ID));
+                    showTooltipText(newEditor, message);
+                }
+
+                setGlobalActions();
+                actionBars.updateActionBars();
+                newEditor.dispose();
+            }
+
+            @Override
+            public void focusGained(FocusEvent e) {
+            }
+        });
+
+        treeEditor.setEditor(newEditor, item);
+    }
+
+    private void setGlobalActions() {
+        String id = ActionFactory.UNDO.getId();
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionFactory.REDO.getId();
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionFactory.DELETE.getId();
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionFactory.COPY.getId();
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionFactory.CUT.getId();
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionFactory.PASTE.getId();
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        actionBars.updateActionBars();
+    }
+
+    private void showTooltipText(Text newEditor, String text) {
+        tooltip = new ToolTip(newEditor.getShell(), SWT.BALLOON);
+        tooltip.setMessage(text);
+
+        Point location = newEditor.toDisplay(newEditor.getSize().x, newEditor.getSize().y);
+
+        tooltip.setLocation(location.x - newEditor.getSize().x + newEditor.getBorderWidth(), location.y - newEditor.getBorderWidth());
+        tooltip.setVisible(true);
+
+        newEditor.addFocusListener(new FocusListener() {
+
+            @Override
+            public void focusLost(FocusEvent e) {
+                hideTooltipText();
+            }
+
+            @Override
+            public void focusGained(FocusEvent e) {
+                // Do nothing
+            }
+        });
+    }
+
+    private void hideTooltipText() {
+        if (tooltip != null) {
+            tooltip.setVisible(false);
+        }
+    }
+
+    private String canCommitID(Part model, String newValue) {
+        return new ComponentValidator().canSetPropertyValue(model, ModelConstants.PROPERTY_ID, newValue);
+    }
+
+    public void refreshChildren2() {
+        List<OutlineViewEditPart> children = this.getChildren();
+        List<Part> modelChildren = this.getModelChildren();
+        List<EditPart> removedList = new ArrayList<EditPart>();
+        boolean isExist = false;
+        for (int i = 0; i < children.size(); i++) {
+            isExist = false;
+            for (int j = 0; j < modelChildren.size(); j++) {
+                if (children.get(i).getModel() == modelChildren.get(j)) {
+                    isExist = true;
+                    break;
+                }
+                if (isExist == false) {
+                    removedList.add(children.get(i));
+                }
+            }
+        }
+        for (EditPart editpart : removedList) {
+            if (editpart.getParent() != null && (editpart.getParent() instanceof OutlineViewEditPart)) {
+                ((OutlineViewEditPart) editpart.getParent()).removeChild(editpart);
+                // this.removeChild(editpart);
+            }
+        }
+        super.refreshChildren();
+    }
+
+    @SuppressWarnings("unchecked")
+    private void commitID(String newName) {
+        request.getExtendedData().put(OutlineConstants.NEW_NAME, newName);
+
+        CommandStack stack = getViewer().getEditDomain().getCommandStack();
+        stack.execute(getCommand(request));
+    }
+
+    @Override
+    public void refresh() {
+        refreshChildren();
+        refreshVisuals();
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineAbstractAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineAbstractAction.java
new file mode 100644 (file)
index 0000000..bedbbea
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline.actions;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.ui.actions.SelectionAction;
+import org.eclipse.ui.IWorkbenchPart;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.app.AppManager;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.model.snippet.ISnippet;
+import org.tizen.efluibuilder.model.snippet.ISnippetManager;
+import org.tizen.efluibuilder.model.snippet.SnippetManager;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUnmarshaller;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditor;
+import org.tizen.efluibuilder.ui.views.outline.OutlineViewEditPart;
+import org.w3c.dom.Document;
+
+
+public abstract class OutlineAbstractAction extends SelectionAction {
+
+    protected final Logger logger = LoggerFactory.getLogger(getClass());
+
+    private EditPart rootEditPart = null;
+    private DesignViewer viewer = null;
+
+    public OutlineAbstractAction(IWorkbenchPart part) {
+        super(part);
+        DesignEditor designEditor = (DesignEditor) part;
+        rootEditPart = designEditor.getViewer().getRootEditPart();
+        viewer = designEditor.getViewer();
+    }
+
+    protected ViewPart getLastViewPart() {
+        List<ViewPart> selectedViewParts = getSelectedViewParts();
+        if (selectedViewParts.isEmpty()) {
+            if (rootEditPart.getViewer().getContents() != null) {
+                Object viewsPartObj = this.rootEditPart.getViewer().getContents().getModel();
+                if (viewsPartObj instanceof ViewsPart) {
+                    ViewsPart viewsPart = (ViewsPart) viewsPartObj;
+                    int childrenSize = viewsPart.getChildren().size();
+                    if (childrenSize > 0) {
+                        return (ViewPart) viewsPart.getChildren().get(childrenSize - 1);
+                    }
+                }
+            }
+            return null;
+        }
+
+        return selectedViewParts.get(0);
+    }
+
+    protected List<ViewPart> getSelectedViewParts() {
+        List<ViewPart> views = new ArrayList<ViewPart>();
+        List<?> selections = getSelectedObjects();
+        for (Object object : selections) {
+            if (!(object instanceof OutlineViewEditPart)) {
+                continue;
+            }
+            OutlineViewEditPart editPart = (OutlineViewEditPart) object;
+            Object model = editPart.getModel();
+            if (model instanceof ViewPart) {
+                views.add((ViewPart) model);
+            } else if (model instanceof ComponentPart) {
+                ComponentPart componentPart = (ComponentPart) model;
+                views.add(componentPart.getOwnerViewPart());
+            }
+        }
+        return views;
+    }
+
+    // for ctxpopup, popup
+    protected Command createAddTemplateViewCommand(String key, ViewPart selectedViewPart) {
+        try {
+            String newViewName = null;
+            String platform = null;
+            ISnippetManager manager = SnippetManager.getDefault();
+            Collection<ISnippet> templates = manager.getViewTemplates();
+
+            Document document = null;
+
+            for (ISnippet template : templates) {
+                if (!template.getCategory().equals(ISnippet.CATEGORY_SYSTEM)) {
+                    continue;
+                }
+                if (template.getName().equals(key)) {
+                    document = template.getModel();
+                    break;
+                }
+            }
+
+            if (document != null) {
+                DocumentPart docPart = (DocumentPart) PartUtil.createPart(PartType.DOCUMENT, null);
+                platform = AppManager.getAppManager().getPlatform();
+                docPart.setPlatform(platform);
+
+                PartUnmarshaller unmarshaller = new PartUnmarshaller();
+                Part part = unmarshaller.unmarshall(docPart, document, false);
+
+                // get ViewPart from part
+                Part viewPart = (part instanceof ViewsPart) ? part.getChildren().get(0) : part;
+                Part parent = selectedViewPart.getParent();
+                Part nextSibiling = selectedViewPart.getNextSibling();
+
+                Point screenSize = viewer.getMScreenQualifierManager().getScreenSize();
+                Point viewPosition = DesignEditorUtil.getNextViewPosition(parent, screenSize.x, screenSize.y);
+                viewPart.setPropertyValue("id", newViewName);
+                viewPart.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_X, Integer.toString(viewPosition.x));
+                viewPart.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_Y, Integer.toString(viewPosition.y));
+
+                return PartUtil.createAddPartCommand(parent, viewPart, nextSibiling);
+            }
+            return null;
+        } catch (RuntimeException e) {
+            logger.error(e.getMessage(), e);
+            throw e;
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return null;
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineCreateTemplateAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineCreateTemplateAction.java
new file mode 100644 (file)
index 0000000..c8e3f80
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.views.outline.actions;
+
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.views.outline.Messages;
+import org.tizen.efluibuilder.ui.views.outline.OutlineConstants;
+import org.tizen.efluibuilder.ui.wizard.snippet.NewViewTemplateWizard;
+
+
+public class OutlineCreateTemplateAction extends OutlineAbstractAction {
+
+    public static final String ID = OutlineConstants.CREATE_TEMPLATE_VIEW;
+
+    public OutlineCreateTemplateAction(IWorkbenchPart part) {
+        super(part);
+    }
+
+    private boolean isActivePageDesignTab() {
+        IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+        if (!(editorPart instanceof CombineEditorPart)) {
+            return false;
+        }
+
+        CombineEditorPart combineEditorPart = (CombineEditorPart) editorPart;
+        if ((combineEditorPart.getGraphiclaDataManager() != null) && (combineEditorPart.getActivePage() == CombineEditorPart.DESIGN_TAB)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        if ((getLastViewPart() == null) || (!isActivePageDesignTab())) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public void run() {
+        // create wizard
+        NewViewTemplateWizard wizard = new NewViewTemplateWizard();
+        wizard.setModel(getLastViewPart()); // FIXME
+
+        // dialog open
+        Shell shell = Display.getDefault().getActiveShell();
+        WizardDialog dialog = new WizardDialog(shell, wizard);
+        dialog.setPageSize(600, 300);
+        dialog.open();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.ui.actions.WorkbenchPartAction#init()
+     */
+    @Override
+    protected void init() {
+        super.init();
+        setText(Messages.ACTION_CREATE_TEMPLATE_VIEW_TITLE);
+        setId(ID);
+        // ImageDescriptor descriptor =
+        // AbstractUIPlugin.imageDescriptorFromPlugin(BuilderPlugin.PLUGIN_ID,
+        // Messages.ACTION_NEW_EMPTY_VIEW_ICON);
+        // setImageDescriptor(descriptor);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineNewViewCtxPopupAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineNewViewCtxPopupAction.java
new file mode 100644 (file)
index 0000000..291698c
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.views.outline.actions;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.views.outline.Messages;
+import org.tizen.efluibuilder.ui.views.outline.OutlineConstants;
+
+
+public class OutlineNewViewCtxPopupAction extends OutlineAbstractAction {
+
+    public static final String ID = OutlineConstants.ADD_VIEW_CTXPOPUP;
+
+    public OutlineNewViewCtxPopupAction(IWorkbenchPart part) {
+        super(part);
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        if (getLastViewPart() == null) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public void run() {
+        Command command = createAddTemplateViewCommand(OutlineConstants.KEY_CTXPOPUP_VIEW, getLastViewPart());
+        if (command != null) {
+            CommandStack commandStack = getCommandStack();
+            commandStack.execute(command);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.ui.actions.WorkbenchPartAction#init()
+     */
+    @Override
+    protected void init() {
+        super.init();
+        setText(Messages.ACTION_ADD_VIEW_CTXPOPUP_TITLE);
+        setId(ID);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineNewViewPopupAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineNewViewPopupAction.java
new file mode 100644 (file)
index 0000000..44748bc
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.views.outline.actions;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.ui.views.outline.Messages;
+import org.tizen.efluibuilder.ui.views.outline.OutlineConstants;
+
+
+public class OutlineNewViewPopupAction extends OutlineAbstractAction {
+
+    public static final String ID = OutlineConstants.ADD_VIEW_POPUP;
+
+    public OutlineNewViewPopupAction(IWorkbenchPart part) {
+        super(part);
+    }
+
+    @Override
+    protected boolean calculateEnabled() {
+        if (getLastViewPart() == null) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public void run() {
+        Command command = createAddTemplateViewCommand(OutlineConstants.KEY_POPUP_VIEW, getLastViewPart());
+        if (command != null) {
+            CommandStack commandStack = getCommandStack();
+            commandStack.execute(command);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.gef.ui.actions.WorkbenchPartAction#init()
+     */
+    @Override
+    protected void init() {
+        super.init();
+        setText(Messages.ACTION_ADD_VIEW_POPUP_TITLE);
+        setId(ID);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineNewViewTemplateAction.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/outline/actions/OutlineNewViewTemplateAction.java
new file mode 100644 (file)
index 0000000..3ceecc5
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.outline.actions;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPart;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.ui.views.outline.Messages;
+import org.tizen.efluibuilder.ui.views.outline.OutlineConstants;
+import org.tizen.efluibuilder.ui.wizard.snippet.NewViewWizard;
+
+
+public final class OutlineNewViewTemplateAction extends OutlineAbstractAction {
+
+    DesignViewer viewer = null;
+    public OutlineNewViewTemplateAction(DesignViewer viewer, IWorkbenchPart part) {
+        super(part);
+        this.viewer = viewer;
+    }
+
+    @Override
+    protected void init() {
+        super.init();
+        setText(Messages.ACTION_ADD_VIEW_TEMPLATE_TITLE);
+        setId(OutlineConstants.ADD_VIEW_TEMPLATE);
+    }
+
+    @Override
+    public boolean calculateEnabled() {
+        if (getLastViewPart() == null) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public void run() {
+        // create wizard
+        NewViewWizard wizard = new NewViewWizard(viewer);
+        wizard.setModel(getLastViewPart());
+
+        // dialog open
+        Shell shell = Display.getDefault().getActiveShell();
+        WizardDialog dialog = new WizardDialog(shell, wizard);
+        dialog.setPageSize(600, 300);
+        int result = dialog.open();
+        if (result == Dialog.OK) {
+            Command command = wizard.getCommnad();
+            if (command != null) {
+                CommandStack commandStack = getCommandStack();
+                commandStack.execute(command);
+            }
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/CategoryComposite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/CategoryComposite.java
new file mode 100644 (file)
index 0000000..dd1271d
--- /dev/null
@@ -0,0 +1,291 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.events.IExpansionListener;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.tizen.efluibuilder.ui.resources.FontResources;
+import org.tizen.efluibuilder.ui.views.properties.method.Editable;
+
+
+/**
+ * A category composite class. This includes the {@link ExpandableComposite}.
+ */
+public class CategoryComposite extends Composite {
+
+    private ExpandableComposite expandableComposite;
+    private FoldingComposite foldingComposite;
+    private Label briefLabel;
+    private String brief = null;
+    private List<Editable> methods = new ArrayList<Editable>();
+    private List<String> foldings = new ArrayList<String>();
+    private IExpansionListener foldingListener = new IExpansionListener() {
+
+        @Override
+        public void expansionStateChanging(ExpansionEvent e) {
+            // TODO Auto-generated method stub
+
+        }
+
+        @Override
+        public void expansionStateChanged(ExpansionEvent e) {
+            if (foldingComposite != null && !foldingComposite.isDisposed()) {
+                GridData data = (GridData) foldingComposite.getLayoutData();
+                if (e.getState()) {
+                    data.exclude = false;
+                    foldingComposite.setVisible(true);
+                } else {
+                    data.exclude = true;
+                    foldingComposite.setVisible(false);
+                }
+                layout();
+            }
+        }
+    };
+
+    /**
+     * Constructs a new instance of this class given its parent and category name.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param name
+     *            category name
+     * @param brief
+     *            brief message
+     * @param folding
+     *            folding information
+     */
+    public CategoryComposite(Composite parent, String name, String brief, List<String> foldings) {
+        super(parent, SWT.NONE);
+        init();
+        createExpandableComposite(name);
+        this.brief = brief;
+        briefLabel = createBriefLabel();
+        setFoldings(foldings);
+    }
+
+    protected void init() {
+        setLayout(new FormLayout());
+    }
+
+    @Override
+    public void dispose() {
+        expandableComposite.removeExpansionListener(foldingListener);
+        methods.clear();
+
+        Control client = expandableComposite.getClient();
+        if (client != null) {
+            client.dispose();
+        }
+
+        if (briefLabel != null) {
+            briefLabel.dispose();
+        }
+
+        super.dispose();
+    }
+
+    /**
+     * Gets category name.
+     * 
+     * @return category name
+     */
+    public String getCategoryName() {
+        return expandableComposite.getText();
+    }
+
+    /**
+     * Gets {@link ExpandableComposite}.
+     * 
+     * @return {@link ExpandableComposite}
+     */
+    public ExpandableComposite getExpandableComposite() {
+        return expandableComposite;
+    }
+
+    protected void createExpandableComposite(String name) {
+        expandableComposite = new ExpandableComposite(this, SWT.FILL, ExpandableComposite.TITLE_BAR | ExpandableComposite.FOCUS_TITLE
+                | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        expandableComposite.setText(name);
+
+        FormData data = new FormData();
+        data.left = new FormAttachment(0, 20);
+        data.right = new FormAttachment(100, -28);
+        expandableComposite.setLayoutData(data);
+
+        expandableComposite.addExpansionListener(foldingListener);
+    }
+
+    protected Label createBriefLabel() {
+        Label label = new Label(expandableComposite, SWT.NONE);
+        label.setForeground(getDisplay().getSystemColor(SWT.COLOR_BLUE));
+        label.setFont(FontResources.BOLD);
+
+        expandableComposite.setTextClient(label);
+        return label;
+    }
+
+    /**
+     * Sets the client to expandable composite. The client must not be null and must be a direct
+     * child of this container.
+     * 
+     * @param client
+     */
+    public void setClient(Control client) {
+        expandableComposite.setClient(client);
+    }
+
+    /**
+     * Gets a client with property name.
+     * 
+     * @param childPropertyName
+     * @return
+     */
+    public Composite getClient(String childPropertyName) {
+        if (childPropertyName != null
+                && (foldings == null || !foldings.contains(childPropertyName) || foldingComposite == null || foldingComposite.isDisposed())) {
+            return (Composite) expandableComposite.getClient();
+        }
+        return foldingComposite.getClient();
+    }
+
+    /**
+     * Adds the listener that will be notified when the expansion state changes.
+     * 
+     * @param listener
+     *            the listener to add
+     */
+    public void addExpansionListener(IExpansionListener listener) {
+        expandableComposite.addExpansionListener(listener);
+    }
+
+    public void setBriefMessage(String key, String value) {
+        if (brief == null || brief.isEmpty()) {
+            return;
+        }
+        String msg = brief.replaceAll("%" + key + "%", value);
+
+        for (Editable method : methods) {
+            String methodName = method.getMethodName();
+            String methodValue = method.getValue();
+            if (methodValue == null || methodValue.isEmpty()) {
+                methodValue = method.getDefaultValue();
+            }
+
+            msg = msg.replaceAll("%" + methodName + "%", methodValue);
+        }
+
+        if (briefLabel != null && !briefLabel.isDisposed()) {
+            briefLabel.dispose();
+            briefLabel = null;
+        }
+
+        briefLabel = createBriefLabel();
+        if (briefLabel != null) {
+            briefLabel.setText(msg);
+        }
+        expandableComposite.layout();
+
+        // Logger logger = LoggerFactory.getLogger(CategoryComposite.class);
+        // logger.info("brief : " + msg);
+    }
+
+    /**
+     * Sets a method to list.
+     * 
+     * @param method
+     *            a {@link Editable}
+     */
+    public void addMethod(Editable method) {
+        if (method != null) {
+            methods.add(method);
+        }
+    }
+
+    /**
+     * Returns true if this {@link CategoryComposite} contains a specified {@link Editable}.
+     * 
+     * @param method
+     *            a specified {@link Editable}
+     * @return true if this {@link CategoryComposite} contains a specified {@link Editable}
+     */
+    public boolean hasMethod(Editable method) {
+        return methods.contains(method);
+    }
+
+    /**
+     * Refreshes brief message on this {@link CategoryComposite}.
+     */
+    public void refreshBrief() {
+        String msg = null;
+        if (brief == null || brief.isEmpty()) {
+            return;
+        }
+        msg = brief;
+
+        for (Editable method : methods) {
+            String methodName = method.getMethodName();
+            String methodValue = method.getValue();
+            if (methodValue == null || methodValue.isEmpty()) {
+                methodValue = method.getDefaultValue();
+            }
+
+            msg = msg.replaceAll("%" + methodName + "%", methodValue);
+        }
+
+        if (briefLabel != null && !briefLabel.isDisposed()) {
+            briefLabel.dispose();
+            briefLabel = null;
+        }
+        briefLabel = createBriefLabel();
+        if (briefLabel != null && !msg.equals(brief)) {
+            briefLabel.setText(msg);
+        }
+
+        expandableComposite.layout();
+    }
+
+    private void setFoldings(List<String> foldings) {
+        if (foldings == null || foldings.isEmpty()) {
+            return;
+        }
+
+        this.foldings = foldings;
+        foldingComposite = new FoldingComposite(this, SWT.NONE, getParent());
+        GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+        foldingComposite.setLayoutData(data);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/ConstraintsUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/ConstraintsUtil.java
new file mode 100644 (file)
index 0000000..2dc8b1a
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.tizen.efluibuilder.model.descriptors.PropertyConditionDescriptor;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.ComponentValidator;
+import org.tizen.efluibuilder.ui.views.properties.method.Editable;
+
+
+public class ConstraintsUtil {
+
+    public static void applyConstraintsToEditable(Part model, ComponentDescriptor partDescriptor, Collection<Editable> collection, Editable editable) {
+        List<PropertyConditionDescriptor> conditions = editable.getConditions();
+
+        boolean enableForTargetCondition = true;
+        if (conditions != null) {
+            for (PropertyConditionDescriptor condition : conditions) {
+                String conditionName = condition.getName();
+
+                Editable target = null;
+                for (Editable e : collection) {
+                    if (editable.getMethodName().equals(condition.getTarget())) {
+                        target = e;
+                    }
+                }
+                if (target != null) {
+                    String conditionValue = condition.getValue();
+                    boolean match = conditionValue != null ? conditionValue.equals(editable.getValue()) : false;
+                    if (conditionName.equals(PropertyConditionDescriptor.ENABLE_PROPERTY)) {
+                        target.setEnabled(match);
+                    } else if (conditionName.equals(PropertyConditionDescriptor.DISABLE_PROPERTY)) {
+                        enableForTargetCondition &= !match;
+                        target.setEnabled(enableForTargetCondition);
+                    } else if (conditionName.equals(PropertyConditionDescriptor.NOTIFY_PROPERTY)) {
+                        target.refreshValue(editable.getMethodName(), editable.getValue());
+                    }
+                }
+            }
+        }
+    }
+
+    public static String validateProperty(PropertiesUIController uiController, String propName, String newValue, Editable method) {
+        String message = new ComponentValidator().canSetPropertyValue(uiController.getBasePartModel(), propName, newValue);
+
+        if (!message.equals(ComponentValidator.OK)) {
+            return message;
+        }
+
+        List<PropertyConditionDescriptor> conditions = method.getConditions();
+
+        if (conditions != null) {
+            for (PropertyConditionDescriptor condition : conditions) {
+                String conditionName = condition.getName();
+                if (conditionName.equals(PropertyConditionDescriptor.INTEGER_MIN_BY) ||
+                        conditionName.equals(PropertyConditionDescriptor.INTEGER_MAX_BY)) {
+                    String comparePropName = condition.getValue();
+                    Editable editable = uiController.getEditableFromAttributeName(comparePropName);
+
+                    if (editable == null) {
+                        return ComponentValidator.ERROR;
+                    }
+                    message = new ComponentValidator().canSetPropertyValue(condition, newValue,
+                                                                           editable.getValue(), editable.getDisplayName());
+                    if (!message.equals(ComponentValidator.OK)) {
+                        break;
+                    }
+                } // else if (other condition)
+            }
+        }
+
+        return message;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/EdjeControlUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/EdjeControlUtil.java
new file mode 100644 (file)
index 0000000..3e0ad20
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.swt.widgets.Display;
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.ui.views.properties.method.ComboEditable;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleEditMethod;
+
+
+public class EdjeControlUtil {
+    public static void updateStyleEditable(Part model, Map<String, Map<String, List<String>>> customStyleMap, ComponentDescriptor partDescriptor,
+                                           final StyleEditMethod method) {
+        PropertyDescriptor property = partDescriptor.getPropertyDescriptor(model.getParent(), (ComponentPart) model, LayoutSchemaConstants.STYLE);
+        List<ConstantDescriptor> descriptors = property.getTypeDescriptor().getAvailableConstant();
+        String componentName = model.getDescriptorId();
+        boolean isItemContainer = false;
+        if (partDescriptor.getWidgetDescriptor(componentName).getContainerID() != null) {
+            componentName = partDescriptor.getWidgetDescriptor(componentName).getContainerID();
+            isItemContainer = true;
+        }
+        method.updateItems(componentName, descriptors, customStyleMap, isItemContainer);
+    }
+
+    public static void updateEdjGroupEditable(List<String> groupNames, final ComboEditable editable, boolean isAsync) {
+        if (groupNames != null) {
+            final List<ConstantDescriptor> items = new ArrayList<ConstantDescriptor>();
+            for (int i = 0; i < groupNames.size(); i++) {
+                items.add(new ConstantDescriptor(groupNames.get(i), groupNames.get(i)));
+            }
+
+            if (isAsync) {
+                Display.getDefault().asyncExec(new Runnable() {
+                    @Override
+                    public void run() {
+                        editable.resetItems(items);
+                        if (editable.getIndex(editable.getValue()) != -1) {
+                            editable.setValue(editable.getValue());
+                        } else if (items.size() > 0){
+                            editable.setValue(items.get(0).getValue());
+                        }
+                    }
+                });
+            } else {
+                editable.resetItems(items);
+                if (editable.getIndex(editable.getValue()) != -1) {
+                    editable.setValue(editable.getValue());
+                } else if (items.size() > 0){
+                    editable.setValue(items.get(0).getValue());
+                }
+            }
+        }
+    }
+
+    public static void updateEdjGroupEditable(List<String> groupNames, final ComboEditable editable) {
+        updateEdjGroupEditable(groupNames, editable, false);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/EventDelegater.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/EventDelegater.java
new file mode 100644 (file)
index 0000000..bc183bb
--- /dev/null
@@ -0,0 +1,414 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.model.descriptors.ContentDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.ConfigurationPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.IPartChangedListener;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartMutation;
+import org.tizen.efluibuilder.model.part.PartObserver;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.part.VariationPart;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.ComponentValidator;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.mscreen.configurator.IScreenConfigurationSelectionChangedListener;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+import org.tizen.efluibuilder.ui.views.properties.method.ComboEditable;
+import org.tizen.efluibuilder.ui.views.properties.method.Editable;
+import org.tizen.efluibuilder.ui.views.properties.method.EditableEvent;
+import org.tizen.efluibuilder.ui.views.properties.method.IValueChangeListener;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleEDJManager;
+
+import edjResourceSyncManager.EdjResourceChangedEvent;
+import edjResourceSyncManager.EdjResourceSyncManager;
+import edjResourceSyncManager.IEdjResourceChangeListener;
+
+
+public class EventDelegater
+        implements IPartChangedListener, IValueChangeListener, IEdjResourceChangeListener,
+        IScreenConfigurationSelectionChangedListener {
+
+    private PartControlUtil partControlUtil = null;
+    private PropertiesUIController uiController = null;
+    private StyleEDJManager styleEDJManager = null;
+    private EdjResourceSyncManager edjResourceSyncManager = null;
+    private ComponentDescriptor partDescriptor = null;
+    private Part documentPart = null;
+    private CommandStack commandStack;
+    private PartObserver partObserver = null;
+
+    public EventDelegater(Part documentPart, PropertiesUIController uiController, StyleEDJManager styleEDJManager,
+            EdjResourceSyncManager edjResourceSyncManager, PartControlUtil partControlUtil, CommandStack commandStack) {
+        this.documentPart = documentPart;
+        this.partDescriptor = ((DocumentPart) documentPart).getComponentDescriptor();
+        this.uiController = uiController;
+        this.styleEDJManager = styleEDJManager;
+        this.edjResourceSyncManager = edjResourceSyncManager;
+        this.commandStack = commandStack;
+        this.partControlUtil = partControlUtil;
+
+        bindListeners();
+    }
+
+    private void bindListeners() {
+        partObserver = new PartObserver(this);
+        partObserver.observe(documentPart);
+        edjResourceSyncManager.addListener(this);
+        partControlUtil.getMScreenQualifierManager().addConfigureSelectionChangedListener(this);
+    }
+
+    private void executeCommand(Command cmd) {
+        if (cmd != null && cmd.canExecute()) {
+            commandStack.execute(cmd);
+        }
+    }
+
+    @Override
+    public void valueChanged(EditableEvent event) {
+        // if (isStoryboardConnectionSelected()) {
+        // this.handleStoryboardConnectionChanged(event);
+        // } else {
+        this.handleEditableValueChanged(event);
+        // }
+    }
+
+    @Override
+    public void valueModified(EditableEvent event) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void partsChanged(List<PartMutation> mutations, PartObserver observer, String sender) {
+        Part model = uiController.getBasePartModel();
+        boolean isChildChanged = false;
+        Set<String> changedPropertySet = new HashSet<String>();
+        for (PartMutation mutation : mutations) {
+            if (model != null && !model.equals(mutation.getTargetPart()))
+                continue;
+
+            if (isChildChanged == false) {
+                if (mutation.getType().equals(PartMutation.PARTS_ADDED) && isChildChanged == false) {
+                    boolean updatedComponent = false;
+                    for (Part child : mutation.getAddedParts()) {
+                        if (child.getType() == PartType.COMPONENT && !updatedComponent) {
+                            isChildChanged = true;
+                        }
+                    }
+                } else if (mutation.getType().equals(PartMutation.PARTS_REMOVED) && isChildChanged == false) {
+                    for (Part child : mutation.getRemovedParts()) {
+                        if (child.getType() == PartType.COMPONENT) {
+                            isChildChanged = true;
+                        }
+                    }
+                }
+            }
+            if (mutation.getType().equals(PartMutation.PROPERTY_CHANGED)) {
+                Part targetPart = mutation.getTargetPart();
+                if (targetPart.getType() == PartType.COMPONENT) {
+                    changedPropertySet.add(mutation.getPropertyName());
+                }
+            }
+        }
+
+        for (String key : changedPropertySet) {
+            uiController.updateEditable(key);
+        }
+
+    }
+
+    @Override
+    public void edjResourceChanged(EdjResourceChangedEvent event) {
+        String filePath;
+        Part partModel = uiController.getBasePartModel();
+
+        filePath = event.path;
+        if (event.type == EdjResourceChangedEvent.TYPE_GROUP_NAMES_CHANGED) {
+            if (partControlUtil.checkPartType(partModel, LayoutSchemaConstants.LAYOUT) &&
+                    filePath.equals(partControlUtil.getRealResourcePath(partModel, LayoutSchemaConstants.SRC))) {
+                uiController.updateEdjGroupEditable(event.groupNames);
+            }
+        } else if (event.type == EdjResourceChangedEvent.TYPE_STYLE_LIST_CHANGED) {
+            if (filePath.equals(styleEDJManager.getCustomThemePath())) {
+                uiController.updateStyleListEditable(event.styleNames);
+            }
+        }
+    }
+
+    @Override
+    public void configurationSelected(MScreenQualifierManager mscreenManager) {
+        uiController.updateMScreenProperty();
+    }
+
+    // private void handleStoryboardConnectionChanged(EditableEvent event) {
+    // Part model = uiController.getBasePartModel();
+    // ISBTabManager sbTabManager = storyboardController.getsbTabManager();
+    // ConnectionData connectionData = uiController.getBaseConnectionModel();
+    // String key = event.getKey();
+    // String value = event.getValue();
+    //
+    // if (key.equals(PropertiesConstant.PROPERTY_TARGET_VIEW)) {
+    // Part targetView = null;
+    // Part viewsPart = PartUtil.findViewsPart(documentPart);
+    // for (Part view : viewsPart.getChildren()) {
+    // if (view.getPropertyValue(LayoutSchemaConstants.ID).equals(value)) {
+    // targetView = view;
+    // break;
+    // }
+    // }
+    // sbTabManager.changeConnectionTarget(connectionData, targetView);
+    // } else if (key.equals(PropertiesConstant.PROPERTY_LOCATION_X)) {
+    // Page pageModel = uiController.getBasePageModel();
+    // storyboardController.getsbTabManager().movePage(pageModel, Integer.parseInt(value),
+    // pageModel.getLocation().y);
+    // } else if (key.equals(PropertiesConstant.PROPERTY_LOCATION_Y)) {
+    // Page pageModel = uiController.getBasePageModel();
+    // storyboardController.getsbTabManager().movePage(pageModel, pageModel.getLocation().x,
+    // Integer.parseInt(value));
+    // } else if (key.equals(PropertiesConstant.NAVI_VIEW_PROP) &&
+    // model.getDescriptorId().equals(Messages.StoryboardViewer_EFL_NAVIFRAME)) {
+    // List<ConnectionData> srcConnections = ((ComponentPart) model).getSourceConnections();
+    // if (srcConnections != null && !srcConnections.isEmpty()) {
+    // ConnectionData connData = srcConnections.get(0);
+    // if (value.isEmpty()) {
+    // sbTabManager.deleteConnection(connData);
+    // } else {
+    // String viewName = value.substring(1);
+    // Part viewPart = partControlUtil.getViewPartFromName(viewName);
+    // sbTabManager.changeConnectionTarget(connData, viewPart);
+    // }
+    // } else {
+    // String firstDisplayView = event.getValue();
+    // if (!firstDisplayView.isEmpty()) {
+    // String targetViewName = firstDisplayView.substring(1);
+    // ConnectionData connData = new
+    // ConnectionData(model.getPropertyValue(LayoutSchemaConstants.ID),
+    // model.getParent().getPropertyValue(LayoutSchemaConstants.ID));
+    // connData.setConnectionProperty(PropertiesConstant.PROPERTY_TARGET_VIEW, targetViewName,
+    // false);
+    // Part targetPart = partControlUtil.getViewPartFromName(targetViewName);
+    // sbTabManager.createConnection(new Connection(model, targetPart, connData));
+    // }
+    // }
+    // } else if (key.equals(ModelConstants.PROPERTY_ID) &&
+    // !(value.equals(model.getPropertyValue(key)))) {
+    // Page pageModel = uiController.getBasePageModel();
+    // sbTabManager.updateViewLocationMap(pageModel,
+    // model.getPropertyValue(model.getPropertyValue(key)), value);
+    // }
+    //
+    // }
+
+    private Command getCommandFromEditableEvent(Part model, EditableEvent event) {
+        String key = event.getKey();
+        String value = event.getValue();
+
+        CompoundCommand compCmd = new CompoundCommand();
+        if (key.equals(TypeDescriptor.ID_OF_ITEM_ADD)) {
+            // only execute AddPartVariationCommand for item widget
+            List<ContentDescriptor> contentList = partDescriptor.getWidgetDescriptor(model.getDescriptorId()).getRelation().getContents();
+            if (contentList.get(0) != null) {
+                Part item =
+                        PartUtil.createPartWithInitValue((DocumentPart) documentPart, PartType.COMPONENT, model, contentList.get(0).getPartIds().get(0));
+                // compCmd.add(new AddPartCommand(model, item, null, partDescriptor));
+                // compCmd.add(new AddPartVariationCommand(partDescriptor, msManager, model,
+                // item, null));
+                compCmd.add(PartUtil.createAddPartCommand(model, item, null));
+            }
+        } else {
+            if (model instanceof ViewPart) {
+                if (LayoutSchemaConstants.ID.equals(key)) {
+                    compCmd.add(PartUtil.createSetViewPropertyIdCommand((ViewPart) model, value));
+                } else {
+                    compCmd.add(PartUtil.createSetPropertyCommand(model, key, value));
+                }
+            } else {
+                ConfigurationPart currentConfigurationPart = partControlUtil.getMScreenQualifierManager().getCurrentConfigurePart();
+                if (currentConfigurationPart == null) {
+                    return null;
+                }
+                if (currentConfigurationPart.isCommon()) {
+                    compCmd.add(PartUtil.createSetPropertyCommand(model, key, value));
+                } else {
+                    List<String> variationProperties = new ArrayList<String>(Arrays.asList(LayoutSchemaConstants.VARIATION_PROPERTIES));
+                    if ((model instanceof ComponentPart) && (variationProperties.contains(key))) {
+                        ComponentPart part = (ComponentPart) model;
+                        VariationPart variationPart = part.getVariationPart(currentConfigurationPart.getPropertyValue(LayoutSchemaConstants.ID));
+                        if (variationPart != null) {
+                            compCmd.add(PartUtil.createSetPropertyCommand(variationPart, key, value));
+                        } else {
+                            variationPart = (VariationPart) PartUtil.createPartWithInitValue((DocumentPart) documentPart, PartType.VARIATION, part, null);
+                            compCmd.add(PartUtil.createVariationPartCommand(part, variationPart,
+                                                                            currentConfigurationPart.getPropertyValue(LayoutSchemaConstants.ID),
+                                                                            LayoutSchemaConstants.TRUE));
+                            compCmd.add(PartUtil.createSetPropertiesCommand(model, variationPart, partControlUtil.getPackProperties(part.getParent())));
+                            if (variationProperties.contains(key)) {
+                                compCmd.add(PartUtil.createSetPropertyCommand(variationPart, key, value));
+                            }
+                        }
+                    } else {
+                        compCmd.add(PartUtil.createSetPropertyCommand(model, key, value));
+                    }
+                }
+            }
+        }
+
+        /*
+         * In case of "layout" component, When "src" attribute is changed, "group" attribute also
+         * should be changed.
+         */
+        if (model.getDescriptorId().equals(LayoutSchemaConstants.LAYOUT) &&
+                key.equals(LayoutSchemaConstants.SRC)) {
+            List<ConstantDescriptor> items = new ArrayList<ConstantDescriptor>();
+            String filePath = value;
+            if (filePath != null) {
+                ArrayList<String> groupNames = edjResourceSyncManager.getGroupNames(filePath);
+                if (groupNames != null) {
+                    for (int i = 0; i < groupNames.size(); i++) {
+                        items.add(new ConstantDescriptor(groupNames.get(i), groupNames.get(i)));
+                    }
+                }
+                ComboEditable combo = (ComboEditable) this.uiController.getEditableFromAttributeName(LayoutSchemaConstants.GROUP);
+                if (combo != null) {
+                    combo.resetItems(items);
+                    String groupName = "";
+                    if (items.isEmpty() == false) {
+                        groupName = items.get(0).getValue();
+                    }
+                    compCmd.add(PartUtil.createSetPropertyCommand(model, LayoutSchemaConstants.GROUP,
+                                                                  groupName));
+                }
+
+            }
+        }
+        // Switch children of Panes.
+        else if (key.equals(LayoutSchemaConstants.PANES_PACK) && LayoutSchemaConstants.PANES.equals(model.getParent().getDescriptorId())) {
+            List<Part> children = model.getParent().getChildren();
+            for (int i = 0; i < children.size(); i++) {
+                if (model != children.get(i)) {
+                    String oppositeValue = LayoutSchemaConstants.PANES_PACK_LEFT;
+                    if ("left".equals(value)) {
+                        oppositeValue = LayoutSchemaConstants.PANES_PACK_RIGHT;
+                    }
+                    compCmd.add(PartUtil.createSetPropertyCommand(children.get(i), LayoutSchemaConstants.PANES_PACK, oppositeValue));
+                    break;
+                }
+            }
+        }
+        if (!compCmd.isEmpty()) {
+            return compCmd;
+        }
+        return null;
+    }
+
+    private boolean processChangedEvent(EditableEvent event) {
+        String key = event.getKey();
+        String value = event.getValue();
+        Editable method = event.getMethod();
+        Part model = null;
+        if (uiController.getCurrentModel() != null) {
+            model = uiController.getCurrentModel().get(0);
+        }
+        if (model == null) {
+            return false;
+        } else if (model instanceof EventPart) {
+            return true;
+        }
+
+        String oldValue = model.getPropertyValue(key);
+        method.hideErrorTooltip();
+
+        String message = ConstraintsUtil.validateProperty(uiController, key, value, method);
+        boolean isValid = false;
+        if (ComponentValidator.OK.equals(message)) {
+            isValid = true;
+        }
+
+        if (!isValid) {
+            uiController.refreshEditable(method.getMethodName(), oldValue);
+            uiController.showErrorToolTip(method.getMethodName(), message);
+        }
+        return isValid;
+    }
+
+    private boolean isStoryboardProperty(String propertyName) {
+        if (propertyName.equals(PropertiesConstant.PROPERTY_LOCATION_X) || propertyName.equals(PropertiesConstant.PROPERTY_LOCATION_Y)) {
+            return true;
+        }
+        return false;
+    }
+
+    private void handleEditableValueChanged(EditableEvent event) {
+        CompoundCommand compCmd = new CompoundCommand();
+        Command cmd = null;
+        Part part;
+
+        boolean isAllValid = true;
+        List<Part> parts = null;
+        if (uiController.getBaseConnectionModel() != null) {
+            parts = uiController.getConnectionModel();
+        } else {
+            parts = uiController.getPartModel();
+        }
+        for (int i = 0; i < parts.size(); i++) {
+            part = parts.get(i);
+            if (processChangedEvent(event) == false) {
+                isAllValid = false;
+                break;
+            }
+        }
+        if (isAllValid) {
+            for (int i = 0; i < parts.size(); i++) {
+                part = parts.get(i);
+                cmd = getCommandFromEditableEvent(part, event);
+                if (cmd != null) {
+                    compCmd.add(cmd);
+                }
+            }
+        }
+
+        if (compCmd.isEmpty() == false) {
+            executeCommand(compCmd);
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/FoldingComposite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/FoldingComposite.java
new file mode 100644 (file)
index 0000000..c2fd876
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+
+
+public class FoldingComposite extends Composite {
+    private static Logger logger = LoggerFactory.getLogger(FoldingComposite.class);
+    private Composite ancestor;
+    private Composite client;
+    private boolean selection = false;
+    private Composite toggleComposite;
+    private Label toggle;
+    private MouseListener toggleListener = new MouseListener() {
+
+        @Override
+        public void mouseUp(MouseEvent e) {
+            if (selection) {
+                selection = false;
+                Image image = ImageResources.getImage(ImageResources.PROPERTIES_DOWN_ARROW);
+                toggle.setImage(image);
+                setClientVisible(false);
+            } else {
+                selection = true;
+                Image image = ImageResources.getImage(ImageResources.PROPERTIES_UP_ARROW);
+                toggle.setImage(image);
+                setClientVisible(true);
+            }
+
+            if (ancestor != null) {
+                ancestor.layout();
+            }
+
+        }
+
+        @Override
+        public void mouseDown(MouseEvent e) {
+            // TODO Auto-generated method stub
+
+        }
+
+        @Override
+        public void mouseDoubleClick(MouseEvent e) {
+            // TODO Auto-generated method stub
+
+        }
+    };
+
+    /**
+     * Constructs a new instance of this class given its parent and a style value describing its
+     * behavior and appearance. And ancestor needs for layout.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param ancestor
+     *            a widget which the parent of parent
+     */
+    public FoldingComposite(Composite parent, int style, Composite ancestor) {
+        super(parent, style);
+        logger.error("second_folding_closed.png is used");
+        this.ancestor = ancestor;
+        setLayout(new GridLayout());
+        createToggle();
+        createClient();
+    }
+
+    private void createToggle() {
+        logger.error("second_folding_closed.png is used");
+        // toggle composite
+        toggleComposite = new Composite(this, SWT.BORDER);
+
+        toggleComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+        GridLayout layout = new GridLayout();
+        layout.marginHeight = 0;
+        toggleComposite.setLayout(layout);
+
+        // toggle
+        toggle = new Label(toggleComposite, SWT.NONE);
+        // FIXME : followin image is removed
+        Image image = ImageResources.getImage(ImageResources.PROPERTIES_SECOND_FOLDING_CLOSED);
+        toggle.setImage(image);
+        GridData data = new GridData(SWT.CENTER, SWT.CENTER, true, false);
+        toggle.setLayoutData(data);
+
+        toggleComposite.addMouseListener(toggleListener);
+        toggle.addMouseListener(toggleListener);
+
+    }
+
+    private void createClient() {
+        client = new Composite(this, SWT.NONE);
+        client.setLayout(new GridLayout(2, true));
+
+        client.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+        // initial visible = false
+        setClientVisible(false);
+    }
+
+    /**
+     * Gets a client {@link Composite}.
+     * 
+     * @return client {@link Composite}
+     */
+    public Composite getClient() {
+        return client;
+    }
+
+    private void setClientVisible(boolean visible) {
+        if (client == null || client.isDisposed() || !(client.getLayoutData() instanceof GridData)) {
+            return;
+        }
+        GridData data = (GridData) client.getLayoutData();
+        data.exclude = !visible;
+        client.setVisible(visible);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PartControlUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PartControlUtil.java
new file mode 100644 (file)
index 0000000..a4c35d3
--- /dev/null
@@ -0,0 +1,227 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.model.descriptors.PropertyConditionDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+
+import graphicalDataManager.GraphicalDataManager;
+
+
+public class PartControlUtil {
+
+    private MScreenQualifierManager mscreenMgr = null;
+    private GraphicalDataManager gdataMgr = null;
+    private ComponentDescriptor partDescriptor = null;
+    private Map<String, List<PropertyDescriptor>> multipleEditablePropertyMap = new HashMap<String, List<PropertyDescriptor>>();
+
+    public PartControlUtil(MScreenQualifierManager mscreenMgr, GraphicalDataManager gdataMgr, ComponentDescriptor partDescriptor) {
+        this.mscreenMgr = mscreenMgr;
+        this.gdataMgr = gdataMgr;
+        this.partDescriptor = partDescriptor;
+    }
+
+    public MScreenQualifierManager getMScreenQualifierManager() {
+        return mscreenMgr;
+    }
+
+    public GraphicalDataManager getGraphicalDataManager() {
+        return gdataMgr;
+    }
+
+    public Part getCurrentScreenPart() {
+        return mscreenMgr.getCurrentConfigurePart();
+    }
+
+    public String getCurrentScreenID() {
+        Part currentScreenPart = getCurrentScreenPart(); 
+        if (currentScreenPart != null) {
+            return currentScreenPart.getPropertyValue(LayoutSchemaConstants.ID);
+        }
+        return null;
+    }
+
+    public String getRealResourcePath(Part model, String propertyName) {
+        if (mscreenMgr == null || gdataMgr == null || gdataMgr.getRenderDataGenerator() == null) {
+            return null;
+        }
+        return this.gdataMgr.getRenderDataGenerator().getRealPathFromResourceProperty(model, propertyName, mscreenMgr.getCurrentDevice(),
+                                                                                      mscreenMgr.getCurrentLocale());
+    }
+
+    public boolean checkPartType(Part part, String partType) {
+        if (part != null && partType.equals(part.getDescriptorId())) {
+            return true;
+        }
+        return false;
+    }
+
+    public Part getViewPartFromName(String viewName) {
+        CombineEditorPart editor = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+        Part viewsPart = PartUtil.findViewsPart(editor.getDocumentPart());
+        for (Part view : viewsPart.getChildren()) {
+            if (viewName.equals(view.getPropertyValue(LayoutSchemaConstants.ID))) {
+                return view;
+            }
+        }
+        return null;
+    }
+
+    public List<String> getPackProperties(Part parent) {
+        List<String> keys = null;
+        String descriptorId = null;
+        if (parent != null) {
+            descriptorId = parent.getDescriptorId();
+        }
+
+        if (LayoutSchemaConstants.GRID.equals(descriptorId)) {
+            keys = new ArrayList<String>(Arrays.asList(LayoutSchemaConstants.GRID_PACK_PROPERTIES));
+        } else if (LayoutSchemaConstants.TABLE.equals(descriptorId)) {
+            keys = new ArrayList<String>(Arrays.asList(LayoutSchemaConstants.TABLE_PACK_PROPERTIES));
+        } else if (LayoutSchemaConstants.PANES.equals(descriptorId)) {
+            keys = new ArrayList<String>(Arrays.asList(LayoutSchemaConstants.PANES_PACK_PROPERTIES));
+        }
+        return keys;
+    }
+
+    public List<PropertyDescriptor> getMultiEditableProperties(List<Part> parts) {
+        List<PropertyDescriptor> properties = new ArrayList<PropertyDescriptor>();
+        if (parts.size() > 0) {
+            if (PartControlUtil.isAllEqualType(parts) == true) {
+                Part basePart = parts.get(0);
+                properties.addAll(this.getMultiEditableProperties(basePart.getDescriptorId()));
+            }
+
+            Part basePart = parts.get(0);
+            if (PartControlUtil.isSameParentType(parts) &&
+                    (LayoutSchemaConstants.GRID.equals(basePart.getParent().getDescriptorId()) ||
+                            LayoutSchemaConstants.TABLE.equals(basePart.getParent().getDescriptorId()))) {
+                properties.addAll(partDescriptor.getChildUIComponentPropertyDescriptors(basePart.getParent().getDescriptorId()));
+            }
+        }
+        return properties;
+    }
+
+    private List<PropertyDescriptor> getMultiEditableProperties(String descriptorId) {
+        if (this.multipleEditablePropertyMap.get(descriptorId) == null) {
+            boolean isAccept = true;
+            List<PropertyDescriptor> properties = new ArrayList<PropertyDescriptor>();
+            List<PropertyDescriptor> descriptors = this.partDescriptor.getPropertyDescriptors(null, descriptorId);
+            for (PropertyDescriptor desc : descriptors) {
+                isAccept = true;
+                if (desc.getPropertyName().equals(LayoutSchemaConstants.ID) || desc.getPropertyName().equals(LayoutSchemaConstants.EVENT)) {
+                    continue;
+                }
+                for (PropertyConditionDescriptor condition : desc.getConditionDescriptors()) {
+                    if (condition.getName().equals(PropertyConditionDescriptor.DISABLE_PROPERTY) ||
+                            condition.getName().equals(PropertyConditionDescriptor.ENABLE_PROPERTY) ||
+                            condition.getName().equals(PropertyConditionDescriptor.INTEGER_MIN_BY) ||
+                            condition.getName().equals(PropertyConditionDescriptor.INTEGER_MAX_BY)) {
+                        isAccept = false;
+                        break;
+                    }
+                }
+                if (isAccept == true) {
+                    properties.add(desc);
+                }
+            }
+            multipleEditablePropertyMap.put(descriptorId, properties);
+        }
+        return multipleEditablePropertyMap.get(descriptorId);
+    }
+
+    public static boolean isAllEqualType(List<Part> parts) {
+        if (parts.isEmpty()) {
+            return false;
+        }
+
+        if (parts.size() > 1) {
+            for (int i = 1; i < parts.size(); i++) {
+                if (parts.get(i).getDescriptorId() == null ||
+                        parts.get(i - 1).getDescriptorId() == null ||
+                        (parts.get(i).getDescriptorId().equals(parts.get(i - 1).getDescriptorId()) == false)) {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    public static boolean isAllComponentPart(List<Part> parts) {
+        for (int i = 0; i < parts.size(); i++) {
+            if (parts.get(i) instanceof ComponentPart == false) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public static boolean isSameParentType(List<Part> parts) {
+        if (parts.isEmpty()) {
+            return false;
+        }
+        for (int i = 1; i < parts.size(); i++) {
+            if (parts.get(i - 1).getParent().getDescriptorId().equals(parts.get(i).getParent().getDescriptorId()) == false) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public String getMultiPartPropertyValue(List<Part> parts, String propertyName) {
+        String prevValue = null, value = null;
+        ComponentPart part;
+
+        String configurationID = this.getCurrentScreenID();
+
+        if (parts.size() == 1) {
+            return ((ComponentPart) (parts.get(0))).getPropertyValue(configurationID, propertyName);
+        }
+
+        for (int i = 0; i < parts.size(); i++) {
+            part = (ComponentPart) (parts.get(i));
+            value = part.getPropertyValue(configurationID, propertyName);
+            if (i > 0) {
+                if (prevValue != null && value != null && prevValue.equals(value) == false)
+                    return null;
+            }
+            prevValue = value;
+        }
+        return value;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesConstant.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesConstant.java
new file mode 100644 (file)
index 0000000..38ae7ae
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+/**
+ * A properties page constants class.
+ */
+public class PropertiesConstant {
+    public static final String ATTRIBUTES = "Attributes"; //$NON-NLS-1$
+    public static final String EVENT = "Events"; //$NON-NLS-1$
+    public static final String STYLE = "Style"; //$NON-NLS-1$
+
+    public static final String EVENT_ADD = "<<Add>>"; //$NON-NLS-1$
+    public static final int INDEX_EVENT_ADD = 0;
+    public static final String EVENT_CUSTOM = "<<Custom event handler>>"; //$NON-NLS-1$
+    public static final int INDEX_EVENT_CUSTOM = 1;
+    public static final String CATEGORY_WIDGET_SPEC = "General"; //$NON-NLS-1$
+
+    public static final String GET_TARGET = "%target%"; //$NON-NLS-1$
+    public static final String EVENT_REPLACE_PAGE = "%page%"; //$NON-NLS-1$
+    public static final String EVENT_REPLACE_OBJECT = "%object%"; //$NON-NLS-1$
+    public static final String EVENT_REPLACE_EVENT = "%event%"; //$NON-NLS-1$
+    public static final String STYLE_REPLACE_ID = "%id%"; //$NON-NLS-1$
+    public static final String STYLE_REPLACE_PAGE_ID = "%pageid%"; //$NON-NLS-1$
+
+    public static final String NO_CONTENTS = "nocontents"; //$NON-NLS-1$
+    public static final String NO_CONTENTS_MSG = "No selected contents"; //$NON-NLS-1$
+
+    public static final String PROPERTY_RESET = "Reset"; //$NON-NLS-1$
+    public static final String PROPERTY_RESET_TOOLTIP = "Reset default value"; //$NON-NLS-1$
+    public static final String PROPERTY_DELETE_TOOLTIP = "Delete event handler"; //$NON-NLS-1$
+    public static final String STYLE_RESET_TOOLTIP = "Reset value"; //$NON-NLS-1$
+    public static final String STYLE_ERROR_INVALID_UNITS = "Invalid use of units. Only use px, %, em and cm."; //$NON-NLS-1$
+    public static final String STYLE_FONT_FAMILY_TOOLTIP = "font-family may be expressed differently depending on the target."; //$NON-NLS-1$
+
+    /*
+     * Images in Properties view
+     */
+    public static final String DIALOG_TITLE_OPEN = "Open"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_ALL = "*.*"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_PNG = "*.png"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_JPG = "*.jpg"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_JPEG = "*.jpeg"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_GIF = "*.gif"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_ICO = "*.ico"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_MP4 = "*.mp4"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_OGG = "*.ogg"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_WEBM = "*.webm"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_MPEG = "*.mpeg"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_ALL_IMAGE = "All image files (*.jpg;*.png;*.gif)"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_JPEG = "JPEG (*.jpg;*.jpeg)"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_PNG = "PNG (*.png)"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_GIF = "GIF (*.gif)"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_ICO = "ICO (*.ico)"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_ALL = "All files (*.*)"; //$NON-NLS-1$
+
+    public static final String DIALOG_FILTER_EDC = "*.edc"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_EDJ = "*.edj"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_ALL_LAYOUT = "All layout files (*.edc;*.edj)"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_EDC = "EDC (*.edc)"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_EDJ = "EDJ (*.edj)"; //$NON-NLS-1$
+
+    public static final String DIALOG_FILTER_TXT = "*.txt"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_TXT = "TEXT (*.txt)"; //$NON-NLS-1$
+
+    public static final String DIALOG_FILTER_NAME_ALL_AUDIO = "All audio files (*.mp4;*.ogg;*.mpeg)"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_MP4 = "MP4 (*.mp4)"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_OGG = "OGG (*.ogg)"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_MPEG = "MPEG (*.mpeg)"; //$NON-NLS-1$
+
+    public static final String DIALOG_FILTER_NAME_ALL_VIDEO = "All video files (*.mp4;*.ogg;*.webm)"; //$NON-NLS-1$
+    public static final String DIALOG_FILTER_NAME_WEBM = "WEBM (*.webm)"; //$NON-NLS-1$
+
+    public static final String DIALOG_COLOR_SELECTOR = "Color selector"; //$NON-NLS-1$
+
+    public static final String STYLE_PROPERTY_COLUMN_NAME = "Element"; //$NON-NLS-1$
+    public static final String STYLE_VALUE_COLUMN_NAME = "Value"; //$NON-NLS-1$
+
+    public static final int STYLE_PROPERTY_COLUMN_SIZE = 150;
+    public static final int STYLE_VALUE_COLUMN_SIZE = 150;
+
+    public static final int ATTRIBUTES_MIN_WIDTH_SIZE = 200;
+    public static final int ACTION_MIN_WIDTH_SIZE = 260;
+    public static final int STYLE_MIN_WIDTH_SIZE = 350;
+
+    public static final String TEXT_NONE = "None"; //$NON-NLS-1$
+    public static final String NONE = "(" + TEXT_NONE + ")"; //$NON-NLS-1$
+
+    public static final String PROPERTY_DATE_FORMAT = "yyyy/MM/dd"; //$NON-NLS-1$
+    public static final String PROPERTY_TIME_FORMAT = "HH:mm:ss"; //$NON-NLS-1$
+
+    public static final String EVENT_PREFIX = "on"; //$NON-NLS-1$
+    public static final String CUSTOM_EVENT_DIALOG_TITLE = "Custom event"; //$NON-NLS-1$
+    public static final String CUSTOM_EVENT_DIALOG_CONTENT = "Enter the event name (such as 'click')."; //$NON-NLS-1$
+    public static final String EVENT_INVALID_MESSAGE_1 = "Invalid character is used."; //$NON-NLS-1$
+    public static final String EVENT_INVALID_MESSAGE_2 = "The first word cannot be 'on'."; //$NON-NLS-1$
+    public static final String EVENT_INVALID_MESSAGE_3 = "Must be different from the name of UI Component event"; //$NON-NLS-1$
+    public static final String EVENT_INVALID_MESSAGE_4 = "Already exists."; //$NON-NLS-1$
+
+    // StoryBoard_START
+    public static final String PROPERTY_SOURCE = "Source"; //$NON-NLS-1$
+    public static final String PROPERTY_TARGET = "Target"; //$NON-NLS-1$
+    public static final String PROPERTY_COMMON = "Common"; //$NON-NLS-1$
+    public static final String PROPERTY_SPECIFICATION = "Specification"; //$NON-NLS-1$
+    public static final String PROPERTY_WIDGET_ID = "WidgetID"; //$NON-NLS-1$
+    public static final String PROPERTY_WIDGET_ID_DISPLAY_NAME = "Widget ID"; //$NON-NLS-1$
+    public static final String PROPERTY_PARENT_VIEW = "ParentView"; //$NON-NLS-1$
+    public static final String PROPERTY_PARENT_VIEW_DISPLAY_NAME = "Parent View"; //$NON-NLS-1$
+    public static final String PROPERTY_TARGET_VIEW = "target"; //$NON-NLS-1$
+    public static final String PROPERTY_TARGET_VIEW_DISPLAY_NAME = "Target View"; //$NON-NLS-1$
+    public static final String PROPERTY_PREV_BUTTON = "prev"; //$NON-NLS-1$
+    public static final String PROPERTY_PREV_BUTTON_DISPLAY_NAME = "Previous Button"; //$NON-NLS-1$
+    public static final String PROPERTY_NEXT_BUTTON = "next"; //$NON-NLS-1$
+    public static final String PROPERTY_NEXT_BUTTON_DISPLAY_NAME = "Next Button"; //$NON-NLS-1$
+    public static final String PROPERTY_STYLE = "style"; //$NON-NLS-1$
+    public static final String PROPERTY_STYLE_DISPLAY_NAME = "Style"; //$NON-NLS-1$
+    public static final String PROPERTY_LOCATION_X = "location_x"; //$NON-NLS-1$
+    public static final String PROPERTY_LOCATION_Y = "location_y"; //$NON-NLS-1$
+    public static final String NAVI_VIEW_PROP = "view"; //$NON-NLS-1$
+    public static final String PROPERTY_WRAPPER = "connection_wrapper"; //$NON-NLS-1$
+    public static final String PROPERTY_EVENTNAME = "event_name"; //$NON-NLS-1$
+    // StoryBoard_END
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesModelProvider.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesModelProvider.java
new file mode 100644 (file)
index 0000000..4a24985
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+* UI Builder
+*
+* Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditor;
+import org.tizen.efluibuilder.ui.editor.texteditor.TextEditor;
+
+
+public class PropertiesModelProvider {
+    public static List<?> getModelFromSelection(IWorkbenchPart part, ISelection selection) {
+        if (!(selection instanceof StructuredSelection) || selection.isEmpty()) {
+            return null;
+        }
+
+        if (!(part instanceof ContentOutline || part instanceof CombineEditorPart)) {
+            return null;
+        }
+
+        Object selectedPage = ((CombineEditorPart) part).getSelectedPage();
+        if (!(((selectedPage instanceof DesignEditor) || (selectedPage instanceof TextEditor)) || selectedPage instanceof Composite)) {
+            return null;
+        }
+
+        IStructuredSelection ss = (IStructuredSelection) selection;
+        List<?> model = ss.toList();
+        return model;
+    }
+
+    public static boolean isAllPartModel(List<?> model) {
+        boolean ret = false;
+        for (Object obj : model) {
+            if (obj instanceof EditPart && ((EditPart) obj).getModel() instanceof Part) {
+                ret = true;
+            } else {
+                ret = false;
+                break;
+            }
+        }
+        return ret;
+    }
+
+    public static PropertyViewModelSet getPropertyViewModelSet(List<?> selectionModel) {
+        List<Part> partModel = new ArrayList<Part>();
+        List<Part> connectionModel = new ArrayList<Part>();
+        List<EditPart> selectedEditPart = new ArrayList<EditPart>();
+
+        if (isAllPartModel(selectionModel) == true) {
+            for (Object obj : selectionModel) {
+                Part part = (Part) (((EditPart) obj).getModel());
+                if (part.getParent() == null) { // dangling part
+                    return null;
+                }
+                if (part instanceof EventPart) {
+                    connectionModel.add(part);
+                    continue;
+                } else if (part instanceof ViewsPart) {
+                    continue;
+                }
+                partModel.add(part);
+            }
+        } else {
+            return null;
+        }
+
+        if (PartControlUtil.isAllComponentPart(partModel) == false
+        // || PartControlUtil.isAllEqualType(partModel) == false
+        ) {
+            partModel.clear();
+        }
+
+        for (Object obj : selectionModel) {
+            selectedEditPart.add((EditPart) obj);
+        }
+        return new PropertyViewModelSet(selectedEditPart, partModel, connectionModel);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesPage.java
new file mode 100644 (file)
index 0000000..d6efe75
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+import java.util.List;
+
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.part.Page;
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.editor.designeditor.DesignEditor;
+import org.tizen.efluibuilder.ui.editor.texteditor.TextEditor;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleEDJManager;
+
+import edjResourceSyncManager.EdjResourceSyncManager;
+import graphicalDataManager.GraphicalDataManager;
+
+
+/**
+ * Page-book page for the {@link PropertySheet}. This page is activated in PageDesigner.
+ */
+public final class PropertiesPage extends Page implements IPropertySheetPage {
+    private PropertiesPageComposite pageComposite;
+    private CommandStack commandStack = null;
+    private ActionRegistry registry = null;
+    private Part documentPart;
+    private EdjResourceSyncManager edjResSyncMgr = null;
+    private GraphicalDataManager graphicalDataMgr = null;
+    private StyleEDJManager styleEDJManager = null;
+    private MScreenQualifierManager screenQualifierMgr = null;
+    private EventDelegater eventDelegater = null;
+    private PropertiesUIController uiController = null;
+
+    CombineEditorPart editor = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();    
+
+    public PropertiesPage(CommandStack commandStack, ActionRegistry registry, Part documentPart, EdjResourceSyncManager edjResSyncMgr,
+            GraphicalDataManager graphicalDataMgr, StyleEDJManager styleEDJManager) {
+        this.commandStack = commandStack;
+        this.registry = registry;
+        this.documentPart = documentPart;
+        this.edjResSyncMgr = edjResSyncMgr;
+        this.graphicalDataMgr = graphicalDataMgr;
+        this.styleEDJManager = styleEDJManager;
+
+    }
+
+    @Override
+    public void createControl(Composite parent) {
+        Control control = getControl();
+        if (control != null && !control.isDisposed()) {
+            return;
+        }
+        CombineEditorPart editor = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+        screenQualifierMgr = editor.getDesignEditor().getViewer().getMScreenQualifierManager();
+        uiController = new PropertiesUIController();
+        PartControlUtil partControlUtil = new PartControlUtil(screenQualifierMgr, graphicalDataMgr, ((DocumentPart) documentPart).getComponentDescriptor());
+        eventDelegater =
+                new EventDelegater(documentPart, uiController, styleEDJManager, edjResSyncMgr, partControlUtil, commandStack);
+        pageComposite =
+                new PropertiesPageComposite(parent, SWT.NONE, commandStack, documentPart, edjResSyncMgr, graphicalDataMgr, styleEDJManager, screenQualifierMgr,
+                                            uiController);
+
+        uiController.initContent(pageComposite, ((DocumentPart) documentPart).getComponentDescriptor(), eventDelegater, partControlUtil,
+                                 styleEDJManager.getProjectVersion());
+        createActions();
+    }
+
+    @Override
+    public void setFocus() {
+        getControl().setFocus();
+    }
+
+    @Override
+    public void dispose() {
+        if (pageComposite != null) {
+            pageComposite.dispose();
+        }
+        registry = null;
+        super.dispose();
+    }
+
+    private boolean isAcceptableSelection(IWorkbenchPart part, ISelection selection) {
+        if (!(selection instanceof StructuredSelection) || selection.isEmpty())
+            return false;
+
+        if (!(part instanceof ContentOutline)) {
+            if (!(part instanceof CombineEditorPart)) {
+                return false;
+            }
+
+            Object selectedPage = ((CombineEditorPart) part).getSelectedPage();
+            if (!(((selectedPage instanceof DesignEditor) || (selectedPage instanceof TextEditor)) || selectedPage instanceof Composite)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+        if (isAcceptableSelection(part, selection)) {
+            IStructuredSelection ss = (IStructuredSelection) selection;
+            List<?> selections = ss.toList();
+            PropertyViewModelSet modelSet =
+                    PropertiesModelProvider.getPropertyViewModelSet(selections);
+            if (modelSet != null) {
+                uiController.setModel(modelSet);
+            }
+        }
+    }
+
+    @Override
+    public Control getControl() {
+        return pageComposite;
+    }
+
+    private void createActions() {
+        IActionBars actionBars = getSite().getActionBars();
+
+        String id = ActionFactory.UNDO.getId();
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        id = ActionFactory.REDO.getId();
+        actionBars.setGlobalActionHandler(id, registry.getAction(id));
+
+        actionBars.updateActionBars();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesPageComposite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesPageComposite.java
new file mode 100644 (file)
index 0000000..4dbbda1
--- /dev/null
@@ -0,0 +1,797 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.EventDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor.UnusedEditors;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.renderDataGenerator.RenderDataGenerator;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+import org.tizen.efluibuilder.storyboard.codegenerator.CodeGeneratorUtil;
+import org.tizen.efluibuilder.storyboard.codegenerator.Messages;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.FontResources;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.views.properties.event.AbstractEventComposite;
+import org.tizen.efluibuilder.ui.views.properties.event.EventComposite;
+import org.tizen.efluibuilder.ui.views.properties.events.HandlerCodeWriter;
+import org.tizen.efluibuilder.ui.views.properties.method.ComboEditable;
+import org.tizen.efluibuilder.ui.views.properties.method.Editable;
+import org.tizen.efluibuilder.ui.views.properties.method.Editable.MethodType;
+import org.tizen.efluibuilder.ui.views.properties.method.EditableCreationFactory;
+import org.tizen.efluibuilder.ui.views.properties.method.NoContentEditable;
+import org.tizen.efluibuilder.ui.views.properties.method.TextEditable;
+import org.tizen.efluibuilder.ui.views.properties.method.ViewsComboEditable;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleEDJManager;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleEditMethod;
+
+import edjResourceSyncManager.EdjResourceSyncManager;
+import graphicalDataManager.GraphicalDataManager;
+
+
+/**
+ * 
+ * @author jungwook.ryu This class is just merged AttributesTab, EventTab, PropertiesTabItem classes
+ *         and adjust UI layout. TODO After refactoring the Model, this class should be
+ *         refactorizing.
+ */
+public class PropertiesPageComposite extends Composite {
+    // If size of content is same CONTENT_MIN_SIZE, horizontal scrollbar will be shown.
+    private final int CONTENT_MIN_SIZE = 280;
+
+    // PropertiesTabItem
+    private ScrolledComposite scrolledComposite;
+    private Composite content;
+    private Composite attrTitleComposite;
+    private Composite eventTitleComposite;
+    private String infoText;
+    // private CLabel selectedWidgetLabel;
+    private Canvas selectedWidgetLabel;
+
+    // private Canvas selectedWidgetLabel;
+    private ComponentDescriptor partDescriptor;
+    // AttributesTab
+    private List<CategoryComposite> categories = new ArrayList<CategoryComposite>();
+    private EditableCreationFactory factory;
+    private CommandStack commandStack;
+    // EventTab
+    private Composite eventComposite;
+    private List<AbstractEventComposite> eventComposites = new ArrayList<AbstractEventComposite>();
+    // StoryBoard_START
+    private Composite connectionEventDetailsContent;
+    private HandlerCodeWriter codeWriter = new HandlerCodeWriter();
+    // StoryBoard_END
+
+    private EdjResourceSyncManager edjResSyncMgr = null;
+    private RenderDataGenerator renderDataGenerator = null;
+    private StyleEDJManager styleEDJManager = null;
+    private MScreenQualifierManager screenQualifierMgr = null;
+
+    private PropertiesUIController uiController = null;
+
+    private Listener listener = new Listener() {
+        @Override
+        public void handleEvent(Event event) {
+            switch (event.type) {
+                case SWT.MouseWheel:
+                    Point origin = scrolledComposite.getOrigin();
+                    origin.y += (event.count * -1) * 10;
+                    scrolledComposite.setOrigin(origin);
+                    break;
+                default:
+                    break;
+            }
+        }
+    };
+
+    public PropertiesPageComposite(Composite parent, int style, CommandStack commandStack, Part documentPart, EdjResourceSyncManager edjResSyncMgr,
+            GraphicalDataManager graphicalDataMgr, StyleEDJManager styleEDJManager, MScreenQualifierManager screenQualifierMgr,
+            PropertiesUIController uiController) {
+        super(parent, style);
+        createContent(this);
+        this.commandStack = commandStack;
+        if (documentPart == null) {
+            return;
+        }
+        this.partDescriptor = ((DocumentPart) documentPart).getComponentDescriptor();
+
+        // new ActionEventDelegater(this);
+        factory = EditableCreationFactory.getInstance();
+
+        this.edjResSyncMgr = edjResSyncMgr;
+        this.styleEDJManager = styleEDJManager;
+        this.renderDataGenerator = graphicalDataMgr.getRenderDataGenerator();
+        this.screenQualifierMgr = screenQualifierMgr;
+        this.uiController = uiController;
+    }
+
+    private void layoutStoryboardContent() {
+        List<Part> possibleTargetViews = new ArrayList<Part>();
+        List<Editable> editableList = new ArrayList<Editable>();
+        boolean naviframeFlag = false;
+        if (uiController.getConnectionCount() != 1) {
+            addNoContentEditable();
+            return;
+        }
+
+        Part eventPart = uiController.getBaseConnectionModel();
+        Part sourcePart = eventPart != null ? eventPart.getParent() : null;
+        if (eventPart == null || sourcePart == null) {
+            return;
+        }
+        Part sourceViewPart = ((ComponentPart) sourcePart).getOwnerViewPart();
+        ComponentDescriptor componentDescriptor = sourcePart.getOwnerDocumentPart().getComponentDescriptor();
+        String sourceId = eventPart.getParent().getPropertyValue(LayoutSchemaConstants.ID);
+        String sourceViewId = sourceViewPart.getPropertyValue(LayoutSchemaConstants.ID);
+        String targetViewId = eventPart.getPropertyValue(LayoutSchemaConstants.EVENT_TARGET);
+        String signalId = eventPart.getPropertyValue(LayoutSchemaConstants.EVENT_SIGNAL);
+        String functionName = eventPart.getPropertyValue(LayoutSchemaConstants.EVENT_FUNCTION_NAME);
+        String functionNamePost = functionName + "_post";
+        String eventInfo = componentDescriptor.getEventInfo((ComponentPart) sourcePart, signalId);
+
+        if (sourceId.equals(Messages.StoryboardViewer_EFL_NAVIFRAME)) {
+            naviframeFlag = true;
+        }
+
+        attrTitleComposite = createTitleComposite(PropertiesConstant.ATTRIBUTES, 18, 0);
+        CategoryComposite categorySource = getCategory(PropertiesConstant.PROPERTY_SOURCE, 4);
+        Composite clientSourceComposite = categorySource.getClient(PropertiesConstant.PROPERTY_SOURCE);
+
+        Editable methodWidgetID = new TextEditable(clientSourceComposite, SWT.NONE, MethodType.ATTRIBUTE, PropertiesConstant.PROPERTY_WIDGET_ID,
+                                                   sourceId, PropertiesConstant.PROPERTY_WIDGET_ID_DISPLAY_NAME, false);
+        methodWidgetID.setEnabled(false);
+        editableList.add(methodWidgetID);
+
+        Editable methodParentView = new TextEditable(clientSourceComposite, SWT.NONE, MethodType.ATTRIBUTE, PropertiesConstant.PROPERTY_PARENT_VIEW,
+                                                     sourceViewId, PropertiesConstant.PROPERTY_PARENT_VIEW_DISPLAY_NAME, false);
+        methodParentView.setEnabled(false);
+        editableList.add(methodParentView);
+
+        CategoryComposite categoryTarget = getCategory(PropertiesConstant.PROPERTY_TARGET, 4);
+        Composite clientTargetComposite = categoryTarget.getClient(PropertiesConstant.PROPERTY_TARGET);
+        ViewsComboEditable methodTargetView =
+                new ViewsComboEditable(clientTargetComposite, SWT.NONE, MethodType.ATTRIBUTE, PropertiesConstant.PROPERTY_TARGET_VIEW,
+                                     targetViewId,
+                                     PropertiesConstant.PROPERTY_TARGET_VIEW_DISPLAY_NAME, false);
+        CombineEditorPart editor = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+        Part viewsPart = PartUtil.findViewsPart(editor.getDocumentPart());
+
+        for (Part view : viewsPart.getChildren()) {
+            if (!(view.getPropertyValue(LayoutSchemaConstants.ID).equals(sourceViewId))) {
+                possibleTargetViews.add(view);
+            }
+        }
+        methodTargetView.setItems(possibleTargetViews);
+        editableList.add(methodTargetView);
+
+        CategoryComposite categorySpecification = getCategory(PropertiesConstant.PROPERTY_SPECIFICATION, 4);
+        Composite clientSpecificationComposite = categorySpecification.getClient(PropertiesConstant.PROPERTY_SPECIFICATION);
+        Editable methodPrevButton = new TextEditable(clientSpecificationComposite, SWT.NONE, MethodType.ATTRIBUTE, PropertiesConstant.PROPERTY_PREV_BUTTON,
+                                                     "NULL", PropertiesConstant.PROPERTY_PREV_BUTTON_DISPLAY_NAME, false);
+        methodPrevButton.setEnabled(false);
+        editableList.add(methodPrevButton);
+
+        Editable methodNextButton = new TextEditable(clientSpecificationComposite, SWT.NONE, MethodType.ATTRIBUTE, PropertiesConstant.PROPERTY_NEXT_BUTTON,
+                                                     "NULL", PropertiesConstant.PROPERTY_NEXT_BUTTON_DISPLAY_NAME, false);
+        methodNextButton.setEnabled(false);
+        editableList.add(methodNextButton);
+
+        Editable methodStyle = new TextEditable(clientSpecificationComposite, SWT.NONE, MethodType.ATTRIBUTE, PropertiesConstant.PROPERTY_STYLE, "NULL",
+                                                PropertiesConstant.PROPERTY_STYLE_DISPLAY_NAME, false);
+        methodStyle.setEnabled(false);
+        editableList.add(methodStyle);
+
+        for (Editable m : editableList) {
+            if (naviframeFlag) {
+                m.setEnabled(false);
+            }
+            m.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
+            m.setLabelRightData(32, 0);
+            m.setControlRightData(100, 0);
+            m.refresh();
+            uiController.addEditable(m.getMethodName(), m);
+        }
+
+        // layout events
+        content.setEnabled(true);
+        if (naviframeFlag) {
+            return;
+        }
+        eventTitleComposite = createTitleComposite(PropertiesConstant.EVENT, 10, -10);
+        final String viewName = sourceViewId;
+
+        connectionEventDetailsContent = new Composite(content, SWT.NONE);
+        connectionEventDetailsContent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+        connectionEventDetailsContent.setLayout(new FormLayout());
+        Composite textComposite = new Composite(connectionEventDetailsContent, SWT.BORDER);
+        FormData formData = new FormData();
+        formData.left = new FormAttachment(0, 40);
+        formData.right = new FormAttachment(100, -35);
+        formData.height = 22;
+        textComposite.setLayoutData(formData);
+        textComposite.setLayout(new FillLayout());
+
+        Label eventLabel = new Label(textComposite, SWT.NONE);
+        eventLabel.setForeground(ColorResources.PROPERTIES_EVENT_LABEL);
+        eventLabel.setText(signalId);
+
+        // pre handler
+
+        Composite eventNameComposite = new Composite(content, SWT.NONE);
+
+        eventNameComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+        eventNameComposite.setLayout(new FormLayout());
+        Text eventName = new Text(eventNameComposite, SWT.BORDER);
+        eventName.setText(functionName);
+        eventName.setEnabled(false);
+        formData = new FormData();
+        formData.left = new FormAttachment(0, 40);
+        formData.right = new FormAttachment(100, -50);
+        formData.height = 22;
+        eventName.setLayoutData(formData);
+
+        Label btnGoButton = new Label(eventNameComposite, SWT.NONE);
+        Image image = ImageResources.getImage(ImageResources.PROPERTIES_EVENT_ARROW_BTN_NOR);
+        formData = new FormData();
+        formData.left = new FormAttachment(eventName, 5);
+        btnGoButton.setLayoutData(formData);
+        btnGoButton.setImage(image);
+        btnGoButton.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseUp(MouseEvent arg0) {
+                codeWriter.addConnectionHandlerFunction(functionName, viewName, CodeGeneratorUtil.getEventParams(sourcePart, signalId), eventInfo, false);
+            }
+        });
+
+        // post handler
+        eventNameComposite = new Composite(content, SWT.NONE);
+
+        eventNameComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+        eventNameComposite.setLayout(new FormLayout());
+        eventName = new Text(eventNameComposite, SWT.BORDER);
+        eventName.setText(functionNamePost);
+        eventName.setEnabled(false);
+        formData = new FormData();
+        formData.left = new FormAttachment(0, 40);
+        formData.right = new FormAttachment(100, -50);
+        formData.height = 22;
+        eventName.setLayoutData(formData);
+
+        btnGoButton = new Label(eventNameComposite, SWT.NONE);
+        image = ImageResources.getImage(ImageResources.PROPERTIES_EVENT_ARROW_BTN_NOR);
+        formData = new FormData();
+        formData.left = new FormAttachment(eventName, 5);
+        btnGoButton.setLayoutData(formData);
+        btnGoButton.setImage(image);
+        btnGoButton.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseUp(MouseEvent arg0) {
+                codeWriter.addConnectionHandlerFunction(functionName, viewName, CodeGeneratorUtil.getEventParams(sourcePart, signalId), eventInfo, true);
+            }
+        });
+    }
+
+    private void addNoContentEditable() {
+        Editable method = new NoContentEditable(content, MethodType.ATTRIBUTE);
+        method.setLayoutData(new GridData(GridData.CENTER, GridData.FILL, true, true, 2, 1));
+        uiController.addEditable(method.getMethodName(), method);
+    }
+
+    private void layoutContent() {
+        Part model = uiController.getBasePartModel();
+        if (model == null || model.getType() == PartType.VIEWS || model.getParent() == null
+                || (uiController.getPartModel().size() > 1 && uiController.getMultiEditableProperties().isEmpty())) {
+            // if (uiController.getSelection().size() > 1) {
+            // // not surpported
+            // // TODO
+            // Editable method = new MultiSelectMethod(content, MethodType.ATTRIBUTE);
+            // method.setLayoutData(new GridData(GridData.CENTER, GridData.FILL, true, true, 2, 1));
+            // uiController.addEditable(method.getMethodName(), method);
+            // } else {
+            // Editable method = new NoContentEditable(content, MethodType.ATTRIBUTE);
+            // method.setLayoutData(new GridData(GridData.CENTER, GridData.FILL, true, true, 2, 1));
+            // uiController.addEditable(method.getMethodName(), method);
+            // }
+            addNoContentEditable();
+        } else {
+            ComponentPart part = null;
+            ComponentPart parentPart = null;
+            if (model instanceof ComponentPart) {
+                part = (ComponentPart) model;
+            } else {
+                throw new IllegalArgumentException("The model must be ComponentPart: " + model);
+            }
+
+            if (model.getParent() instanceof ComponentPart) {
+                parentPart = (ComponentPart) model.getParent();
+            }
+
+            // Add Attribute title
+            attrTitleComposite = createTitleComposite(PropertiesConstant.ATTRIBUTES, 18, 0);
+
+            List<PropertyDescriptor> properties;
+            if (uiController.getPartModel().size() > 1) {
+                properties = uiController.getMultiEditableProperties();
+            } else {
+                properties = partDescriptor.getPropertyDescriptors(parentPart, part);
+            }
+
+            // Get category count
+            Set<String> categories = new HashSet<String>();
+            for (PropertyDescriptor property : properties) {
+                String categoryName = property.getCategory();
+                if (property.checkUnusedEditors(UnusedEditors.PROPERTIES)) { // TODO
+                    continue;
+                }
+
+                categories.add(categoryName);
+            }
+
+            // Add properties component
+            for (PropertyDescriptor property : properties) {
+                // StoryBoard_START
+                CombineEditorPart editor = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+                if ((property.getPropertyName().equals(PropertiesConstant.PROPERTY_LOCATION_X)
+                        || property.getPropertyName().equals(PropertiesConstant.PROPERTY_LOCATION_Y))
+                        && editor.getActivePage() == CombineEditorPart.DESIGN_TAB) {
+                    continue;
+                }
+                // StoryBoard_END
+                if (property.checkUnusedEditors(UnusedEditors.PROPERTIES)) {
+                    continue;
+                }
+
+                String groupName = property.getCategory();
+                CategoryComposite category = getCategory(groupName, categories.size());
+                // String value =
+                // part.getPropertyValue(currentConfigurationPart.getPropertyValue(LayoutSchemaConstants.ID),
+                // property.getPropertyName());
+                String value = uiController.getPartControlUtil().getMultiPartPropertyValue(uiController.getPartModel(),
+                                                                                           property.getPropertyName());
+                Editable method = factory.createMethod(category.getClient(property.getPropertyName()), property, value, MethodType.ATTRIBUTE, false);
+                if (method == null) {
+                    continue;
+                } else if (property.getPropertyName().equals("type") && (part.getType() == PartType.VIEW)) {
+                    method.setEnabled(false);
+                } else if (property.getPropertyName().equals("name") && (part.getType() == PartType.VIEW)) {
+                    method.setEnabled(false);
+                } else if (model.getDescriptorId().equals(LayoutSchemaConstants.LAYOUT) &&
+                        property.getPropertyName().equals(LayoutSchemaConstants.GROUP)) {
+                    String filePath =
+                            renderDataGenerator.getRealPathFromResourceProperty(model,
+                                                                                LayoutSchemaConstants.SRC, screenQualifierMgr.getCurrentDevice(),
+                                                                                screenQualifierMgr.getCurrentLocale());
+                    ArrayList<String> groupNames = edjResSyncMgr.getGroupNames(filePath);
+                    EdjeControlUtil.updateEdjGroupEditable(groupNames, (ComboEditable) method);
+                } else if ((property.getTypeDescriptor().getType() == TypeDescriptor.Types.EFL_STYLE)) {
+                    String version = styleEDJManager.getProjectVersion();
+                    if (StyleEDJManager.isLaterVersion3_0(version)) {
+                        EdjeControlUtil.updateStyleEditable(model, styleEDJManager.getCustomStyleNames(), partDescriptor, (StyleEditMethod) method);
+                        ((StyleEditMethod) method).setStyleEDJManager(styleEDJManager);
+                        ((StyleEditMethod) method).setPropertiesPageComposite(this);
+                    }
+                }
+                if (property.getInlineValue() != null && property.getInlineValue().equals("true")) {
+                    GridData data = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
+                    method.setLayoutData(data);
+                    method.setLabelRightData(65, 1);
+                    method.setControlRightData(100, 0);
+                } else {
+                    method.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
+                    method.setLabelRightData(35, 0);
+                    method.setControlRightData(100, 0);
+                }
+
+                // addListenerToMethod(method);
+                changeResetState(method);
+                method.refresh();
+                uiController.addEditable(property.getPropertyName(), method);
+                // methods.add(method);
+            }
+        }
+
+        // layout events
+        if (model == null || (model.getType() == PartType.VIEWS) || model.getParent() == null) {
+            // Do nothing
+        } else if (uiController.getPartModel().size() > 1) {
+            // Do nothing
+        } else {
+            /* get event trigger list */
+            List<EventDescriptor> events = partDescriptor.getEventDescriptors((ComponentPart) model);
+            if (events != null && events.isEmpty() == false) {
+                eventTitleComposite = createTitleComposite(PropertiesConstant.EVENT, 10, -8);
+                eventComposite = createEventComposite();
+                // check already exist event handler in model
+                EventComposite actionEventComposite;
+                for (EventDescriptor event : events) {
+                    actionEventComposite = new EventComposite(eventComposite, event, model, this);
+                    if (actionEventComposite != null) {
+                        eventComposites.add(actionEventComposite);
+                        actionEventComposite.updateState();
+                    }
+                }
+            }
+        }
+
+    }
+
+    private Composite createEventComposite() {
+        Composite eventComposite = new Composite(content, SWT.NONE);
+        eventComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+        GridLayout layout = new GridLayout(1, false);
+        layout.marginHeight = 0;
+        layout.marginWidth = 0;
+        layout.horizontalSpacing = 0;
+        layout.verticalSpacing = 5;
+        eventComposite.setLayout(layout);
+
+        return eventComposite;
+    }
+
+    // DONE
+    public void refresh() {
+        if (content.isDisposed()) {
+            return;
+        }
+        clear();
+
+        if (uiController.getBaseConnectionModel() != null && uiController.getBasePartModel() != null) {
+            addNoContentEditable();
+        } else if (uiController.getBaseConnectionModel() != null) {
+            layoutStoryboardContent();
+            refreshConnectionInfo();
+        } else {
+            layoutContent();
+            if (PartControlUtil.isAllEqualType(uiController.getPartModel()) == true) {
+                uiController.applyConstraints(); // apply conditions after all methods are created
+            }
+        }
+        content.pack();
+        refreshInfoArea(); // TODO : FIXME
+        resizeScrolledComposite();
+    }
+
+    /**
+     * Changes reset state after compare {@link Editable} and value of property in model.
+     * 
+     * @param method
+     *            a {@link Editable}
+     */
+    public void changeResetState(Editable method) {
+        boolean canReset = false;
+        Part basePart = uiController.getBasePartModel();
+        if (basePart == null) {
+            return;
+        }
+        for (String key : basePart.getProperties().keySet()) {
+            if (key.equals(method.getMethodName())) {
+                canReset = true;
+                break;
+            }
+        }
+
+        method.enableFuncButton(canReset);
+    }
+
+    public CommandStack getCommandStack() {
+        return commandStack;
+    }
+
+    // ////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+    private void createContent(Composite parent) {
+        parent.setLayout(new FormLayout());
+
+        Composite info = makeInfoArea(parent);
+
+        scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
+        scrolledComposite.setLayout(new FillLayout());
+        FormData data = new FormData();
+        data.top = new FormAttachment(info, 0);
+        data.bottom = new FormAttachment(100, 0);
+        data.left = new FormAttachment(0, 0);
+        data.right = new FormAttachment(100, 0);
+        scrolledComposite.setLayoutData(data);
+
+        scrolledComposite.setExpandHorizontal(true);
+        scrolledComposite.setExpandVertical(true);
+        scrolledComposite.setMinSize(parent.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+
+        content = new Composite(scrolledComposite, SWT.NONE);
+        content.setBackground(ColorResources.PROPERTIES_CONTENT_BG);
+        content.setBackgroundMode(SWT.INHERIT_DEFAULT);
+
+        GridLayout layout = new GridLayout(1, false);
+        layout.marginHeight = 0;
+        layout.marginWidth = 0;
+        layout.horizontalSpacing = 0;
+        layout.verticalSpacing = 5;
+        content.setLayout(layout);
+
+        scrolledComposite.setContent(content);
+        scrolledComposite.addListener(SWT.MouseWheel, listener);
+        scrolledComposite.addControlListener(new ControlAdapter() {
+            @Override
+            public void controlResized(ControlEvent event) {
+                resizeScrolledComposite();
+            }
+        });
+        scrolledComposite.setMinSize(content.computeSize(310, SWT.DEFAULT));
+    }
+
+    private void refreshInfoArea() {
+        Part model = uiController.getBasePartModel();
+        if (model == null || (model.getType() == PartType.VIEWS) || model.getParent() == null || (uiController.getPartModel().size() > 1)) {
+            selectedWidgetLabel.setData("KEY_IMAGE", null);
+            selectedWidgetLabel.setData("KEY_TEXT", BuilderConstants.EMPTY);
+            // selectedWidgetLabel.setImage(null);
+            // selectedWidgetLabel.setText(BuilderConstants.EMPTY);
+            selectedWidgetLabel.redraw();
+            return;
+        }
+        String iconPath = partDescriptor.getIcon16((ComponentPart) model);
+        Image image = ImageResources.getImage(BuilderConstants.ICON_DIR + iconPath);
+        if (image != null) {
+            // selectedWidgetLabel.setImage(image);
+            selectedWidgetLabel.setData("KEY_IMAGE", image);
+        }
+        infoText = partDescriptor.getDisplayName((ComponentPart) model);
+        // selectedWidgetLabel.setText(infoText);
+        selectedWidgetLabel.setData("KEY_TEXT", infoText);
+        selectedWidgetLabel.redraw();
+    }
+
+    /*
+     * e.g. "Properties > Button"
+     */
+    private Composite makeInfoArea(Composite parent) {
+        Composite info = new Composite(parent, SWT.NONE);
+        FormData formData = new FormData();
+        formData.top = new FormAttachment(0, 0);
+        formData.height = 35;
+        formData.left = new FormAttachment(0, 0);
+        formData.right = new FormAttachment(100, 0);
+        info.setLayoutData(formData);
+        info.setBackground(ColorResources.PROPERTIES_TITLE_BG);
+        info.setLayout(new FormLayout());
+
+        /*
+         * Title Line
+         */
+        Composite lineComp = new Composite(info, SWT.NONE);
+        lineComp.setBackground(ColorResources.PROPERTIES_SEPERARTOR);
+        formData = new FormData();
+        formData.left = new FormAttachment(0, 0);
+        formData.right = new FormAttachment(100, 0);
+        formData.height = 1;
+        lineComp.setLayoutData(formData);
+
+        /*
+         * Component (e.g. Button..)
+         */
+        selectedWidgetLabel = new Canvas(info, SWT.NONE);
+        formData = new FormData();
+        formData.top = new FormAttachment(0, 9);
+        formData.left = new FormAttachment(0, 15);
+        formData.right = new FormAttachment(100, 0);
+
+        selectedWidgetLabel.setLayoutData(formData);
+        selectedWidgetLabel.addPaintListener(new PaintListener() {
+            @Override
+            public void paintControl(PaintEvent e) {
+                e.gc.setBackground(ColorResources.PROPERTIES_TITLE_BG);
+                e.gc.fillRectangle(0, 0, e.width, e.height);
+
+                Image image = (Image) selectedWidgetLabel.getData("KEY_IMAGE");
+                String text = (String) selectedWidgetLabel.getData("KEY_TEXT");
+                int x = 0;
+                if (image != null) {
+                    e.gc.drawImage(image, x, 1);
+                    x += image.getBounds().width + 6;
+                }
+                if (text != null) {
+                    e.gc.drawText(text, x, 0);
+                }
+            }
+        });
+        return info;
+    }
+
+    /**
+     * Resize the {@link ScrolledComposite} on this item.
+     */
+    public void resizeScrolledComposite() {
+        scrolledComposite.setMinSize(content.computeSize(CONTENT_MIN_SIZE, SWT.DEFAULT));
+    }
+
+    private CategoryComposite getCategory(String categoryName, int categoryCount) {
+        if (categoryName == null || categoryName.isEmpty()) {
+            categoryName = PropertiesConstant.CATEGORY_WIDGET_SPEC;
+        }
+
+        for (CategoryComposite category : categories) {
+            if (category.getCategoryName().equals(categoryName)) {
+                return category;
+            }
+        }
+
+        // create new category
+        CategoryComposite categoryComposite = createCategory(categoryName);
+
+        if (categories.size() < categoryCount) { // Separator to divide categories in Attributes
+            drawSeparator(18, ColorResources.PROPERTIES_ATTR_SEPERATOR);
+        } else { // Separator to divide Attributes and Event
+            drawSeparator(0, ColorResources.PROPERTIES_SEPERARTOR);
+        }
+
+        return categoryComposite;
+    }
+
+    private void drawSeparator(int widthGap, final Color color) {
+        Composite separatorComposite = new Composite(content, SWT.None);
+        separatorComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+        separatorComposite.setLayout(new FormLayout());
+
+        Composite separator = new Composite(separatorComposite, SWT.NONE);
+        FormData formData = new FormData();
+        formData.left = new FormAttachment(0, widthGap);
+        formData.right = new FormAttachment(100, -widthGap);
+        formData.height = 1;
+        separator.setLayoutData(formData);
+        separator.setBackground(color);
+    }
+
+    private CategoryComposite createCategory(String categoryName) {
+        CategoryComposite categoryComposite = new CategoryComposite(content, categoryName, BuilderConstants.EMPTY, null);
+        categoryComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+        categoryComposite.addExpansionListener(new ExpansionAdapter() {
+
+            @Override
+            public void expansionStateChanged(ExpansionEvent e) {
+                content.layout();
+            }
+        });
+
+        Composite composite = new Composite(categoryComposite.getExpandableComposite(), SWT.NONE);
+        categoryComposite.setClient(composite);
+
+        GridLayout layout = new GridLayout(2, false);
+        layout.marginWidth = 0;
+        layout.verticalSpacing = 5;
+        layout.marginBottom = 0;
+        layout.marginTop = 0;
+        composite.setLayout(layout);
+
+        categories.add(categoryComposite);
+
+        return categoryComposite;
+    }
+
+    private void clear() {
+        // Attribute
+        for (CategoryComposite category : categories) {
+            category.dispose();
+        }
+
+        if (attrTitleComposite != null) {
+            attrTitleComposite.dispose();
+            attrTitleComposite = null;
+        }
+        if (eventTitleComposite != null) {
+            eventTitleComposite.dispose();
+            eventTitleComposite = null;
+        }
+        for (Control control : content.getChildren()) {
+            control.dispose();
+        }
+        categories.clear();
+        uiController.clearEditables();
+
+        // Event
+        // StoryBoard_START
+        if (connectionEventDetailsContent != null && !connectionEventDetailsContent.isDisposed()) {
+            connectionEventDetailsContent.dispose();
+            connectionEventDetailsContent = null;
+        }
+        // StoryBoard_END
+
+        eventComposites.clear();
+    }
+
+    private void refreshConnectionInfo() {
+        if (uiController.getBaseConnectionModel() != null) {
+            // selectedWidgetLabel.setImage(null);
+            // selectedWidgetLabel.setText("<Connection>");
+
+            selectedWidgetLabel.setData("KEY_IMAGE", null);
+            selectedWidgetLabel.setData("KEY_TEXT", "Connection");
+            selectedWidgetLabel.redraw();
+        }
+    }
+
+    private Composite createTitleComposite(String title, int topMargin, int bottomMargin) {
+        Composite titleComp = new Composite(content, SWT.NONE);
+        titleComp.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+        titleComp.setLayout(new FormLayout());
+        FormData formData = new FormData();
+        formData.left = new FormAttachment(0, 16);
+        formData.top = new FormAttachment(0, topMargin);
+        formData.bottom = new FormAttachment(100, bottomMargin);
+
+        Label titleLabel = new Label(titleComp, SWT.NONE);
+        titleLabel.setFont(FontResources.BOLD);
+        titleLabel.setText(title);
+        titleLabel.setLayoutData(formData);
+
+        return titleComp;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesUIController.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertiesUIController.java
new file mode 100644 (file)
index 0000000..f273a4f
--- /dev/null
@@ -0,0 +1,226 @@
+/*
+* UI Builder
+*
+* Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gef.EditPart;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.ui.views.properties.method.ComboEditable;
+import org.tizen.efluibuilder.ui.views.properties.method.Editable;
+import org.tizen.efluibuilder.ui.views.properties.method.EditableCreationFactory;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleEditMethod;
+
+
+public class PropertiesUIController {
+    private PropertiesPageComposite pageComposite = null;
+    private Map<String, Editable> editableMap = new HashMap<String, Editable>();
+    private ComponentDescriptor partDescriptor;
+    private PropertyViewModelSet model;
+    private EventDelegater eventDelegater = null;
+    private PartControlUtil partControlUtil = null;
+    private String projectVersion = "";
+    private List<PropertyDescriptor> multiEditableProperties = null;
+
+    public void initContent(PropertiesPageComposite pageComposite, ComponentDescriptor partDescriptor, EventDelegater pageChangeListener,
+                            PartControlUtil partControlUtil, String projectVersion) {
+        this.partDescriptor = partDescriptor;
+        this.eventDelegater = pageChangeListener;
+        this.projectVersion = projectVersion;
+        this.pageComposite = pageComposite;
+        this.partControlUtil = partControlUtil;
+    }
+
+    public void refreshUI() {
+        pageComposite.refresh();
+    }
+
+    public void updateMScreenProperty() {
+        if (getPartModel().size() == 1 && getBasePartModel() instanceof ComponentPart && getBasePartModel().getParent() instanceof ComponentPart) {
+            ComponentPart part = (ComponentPart) getBasePartModel();
+            List<PropertyDescriptor> descriptors = partDescriptor.getPropertyDescriptors(part.getParent().getDescriptorId(), part.getDescriptorId());
+            for (PropertyDescriptor descriptor : descriptors) {
+                for (String varitionPropertyName : LayoutSchemaConstants.VARIATION_PROPERTIES) {
+                    if (descriptor.getPropertyName().equals(varitionPropertyName))
+                        this.refreshEditable(descriptor.getPropertyName(), part.getPropertyValue(partControlUtil.getCurrentScreenID(),
+                                                                                                 descriptor.getPropertyName()));
+                }
+            }
+        }
+    }
+
+    public void updateEdjGroupEditable(List<String> groupNames) {
+        final Editable editable = getEditableFromAttributeName(LayoutSchemaConstants.GROUP);
+        if (editable != null && editable instanceof ComboEditable) {
+            EdjeControlUtil.updateEdjGroupEditable(groupNames, (ComboEditable) editable, true);
+        }
+    }
+
+    public void updateStyleListEditable(Map<String, Map<String, List<String>>> map) {
+        Part model = this.getBasePartModel();
+        Editable editable = this.getEditableFromAttributeName(LayoutSchemaConstants.STYLE);
+        if (editable instanceof StyleEditMethod) {
+            StyleEditMethod styleEditable = (StyleEditMethod) editable;
+            EdjeControlUtil.updateStyleEditable(model, map, partDescriptor, styleEditable);
+        }
+    }
+
+    public Editable getEditableFromAttributeName(String name) {
+        return editableMap.get(name);
+    }
+
+    public PropertyViewModelSet getModel() {
+        return model;
+    }
+
+    public List<Part> getPartModel() {
+        if (model != null) {
+            return model.partModel;
+        }
+        return null;
+    }
+
+    public List<Part> getConnectionModel() {
+        if (model != null) {
+            return model.connectionModel;
+        }
+        return null;
+    }
+
+    public int getConnectionCount() {
+        return model != null ? model.connectionModel.size() : 0;
+    }
+
+    public Part getBasePartModel() {
+        if (model != null && model.partModel.size() > 0) {
+            return model.partModel.get(0);
+        }
+        return null;
+    }
+
+    public Part getBaseConnectionModel() {
+        if (model != null && model.connectionModel.size() > 0) {
+            return model.connectionModel.get(0);
+        }
+        return null;
+    }
+
+    public List<Part> getCurrentModel() {
+        if (getBasePartModel() != null && getBaseConnectionModel() != null) {
+            return null;
+        } else if (getBaseConnectionModel() != null) {
+            return getConnectionModel();
+        } else if (getBasePartModel() != null) {
+            return getPartModel();
+        }
+        return null;
+    }
+
+    public List<EditPart> getSelection() {
+        return model.selection;
+    }
+
+    public void setModel(PropertyViewModelSet model) {
+        this.model = model;
+        multiEditableProperties = partControlUtil.getMultiEditableProperties(model.partModel);
+        EditableCreationFactory.getInstance().setModel(getBasePartModel());
+        EditableCreationFactory.getInstance().setProjectVersion(projectVersion);
+        refreshContent();
+    }
+
+    public void clearEditables() {
+        for (Editable editable : editableMap.values()) {
+            editable.dispose();
+        }
+        this.editableMap.clear();
+    }
+
+    public void addEditable(String name, Editable editable) {
+        this.editableMap.put(name, editable);
+        bindEditableListener(editable);
+    }
+
+    private void bindEditableListener(Editable editable) {
+        editable.setValueChangedListener(this.eventDelegater);
+    }
+
+    public void updateEditable(String propertyName) {
+        Editable editable = editableMap.get(propertyName);
+        if (editable != null) {
+            editable.refreshValue(propertyName, partControlUtil.getMultiPartPropertyValue(this.getPartModel(), propertyName));
+        }
+    }
+
+    public void refreshContent() {
+        pageComposite.refresh();
+        pageComposite.layout();
+    }
+
+    public void refreshEditable(String propertyName, String propertyValue) {
+        Editable editable = getEditableFromAttributeName(propertyName);
+        if (editable != null) {
+            editable.refreshValue(propertyName, propertyValue);
+        }
+    }
+
+    public void showErrorToolTip(String propertyName, String message) {
+        Editable editable = getEditableFromAttributeName(propertyName);
+        if (editable != null) {
+            editable.showErrorToolTip(message);
+        }
+    }
+
+    public void applyConstraints() {
+        for (Editable editable : editableMap.values()) {
+            ConstraintsUtil.applyConstraintsToEditable(getBasePartModel(), partDescriptor, editableMap.values(), editable);
+        }
+    }
+
+    public PartControlUtil getPartControlUtil() {
+        return this.partControlUtil;
+    }
+
+    public List<PropertyDescriptor> getMultiEditableProperties() {
+        return this.multiEditableProperties;
+    }
+
+    public HashSet<String> getViewTransitionTrigger(Part part) {
+        HashSet<String> hashSet = new HashSet<String>();
+        for (Part child : part.getChildren()) {
+            if (child instanceof EventPart && child.hasProperty(LayoutSchemaConstants.EVENT_CONNECTION)) {
+                hashSet.add(child.getPropertyValue(LayoutSchemaConstants.EVENT_SIGNAL));
+            }
+        }
+        return hashSet;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertyViewModelSet.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/PropertyViewModelSet.java
new file mode 100644 (file)
index 0000000..1b808b0
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+* UI Builder
+*
+* Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+
+package org.tizen.efluibuilder.ui.views.properties;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.tizen.efluibuilder.model.part.Part;
+
+
+public class PropertyViewModelSet {
+    public List<Part> partModel = null;
+    public List<Part> connectionModel = null;    
+    public List<EditPart> selection = null;
+
+    public PropertyViewModelSet(List<EditPart> selection, List<Part> partModel, List<Part> connectionModel) {
+        this.selection = selection;
+        this.partModel = partModel;
+        this.connectionModel = connectionModel;        
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/AbstractEventComposite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/AbstractEventComposite.java
new file mode 100644 (file)
index 0000000..68e82e2
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.event;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+
+
+public abstract class AbstractEventComposite extends Composite {
+
+    private Composite composite;
+
+    public AbstractEventComposite(Composite parent) {
+        super(parent, SWT.NONE);
+        setLayout();
+        composite = createControl(this);
+    }
+
+    protected abstract void setLayout();
+
+    protected abstract Composite createControl(Composite parent);
+
+    protected abstract void initContents();
+
+    protected Composite getComposite() {
+        return composite;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/EventComposite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/EventComposite.java
new file mode 100644 (file)
index 0000000..62dd66a
--- /dev/null
@@ -0,0 +1,238 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.event;
+
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseTrackAdapter;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.tizen.efluibuilder.model.descriptors.EventDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesPageComposite;
+
+
+public class EventComposite extends AbstractEventComposite {
+    private Canvas btnNewButton;
+    private boolean hasEventHandler = false;
+    private Label event;
+    private Part part;
+    private EventDescriptor descriptor;
+    private PropertiesPageComposite propertiesPage;
+
+    /**
+     * @param parent
+     *            {@link Composite}
+     * @param descriptor
+     *            {@link EventDescriptor}
+     * @param part
+     *            {@link Part}
+     * @param propertiesPage
+     *            {@link PropertiesPageComposite}
+     */
+    public EventComposite(Composite parent, EventDescriptor descriptor, Part part, PropertiesPageComposite propertiesPage) {
+        super(parent);
+        this.descriptor = descriptor;
+        this.part = part;
+        this.propertiesPage = propertiesPage;
+
+        initContents();
+    }
+    
+    @Override
+    protected void setLayout() {
+        GridLayout layout = new GridLayout(1, false);
+        layout.marginHeight = 0;
+        layout.marginWidth = 0;
+        layout.horizontalSpacing = 0;
+        layout.verticalSpacing = 0;
+        setLayout(layout);
+        setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+    }
+
+    @Override
+    protected Composite createControl(Composite parent) {
+        Composite compositeEventName = new Composite(parent, SWT.NONE);
+        compositeEventName.setLayoutData(new GridData(GridData.FILL_BOTH));
+        compositeEventName.setLayout(new FormLayout());
+
+        Composite textComposite = new Composite(compositeEventName, SWT.BORDER);
+        FormData formData = new FormData();
+        formData.top = new FormAttachment(0, 0);
+        formData.left = new FormAttachment(0, 42);
+        formData.right = new FormAttachment(100, -65);
+        formData.bottom = new FormAttachment(0, 24);
+        textComposite.setLayoutData(formData);
+        textComposite.setLayout(new FillLayout());
+
+        event = new Label(textComposite, SWT.NONE);
+        event.setForeground(ColorResources.PROPERTIES_EVENT_LABEL);
+
+        btnNewButton = new Canvas(compositeEventName, SWT.NONE);
+        FormData fd_btnNewButton = new FormData();
+        fd_btnNewButton.top = new FormAttachment(0, 0);
+        fd_btnNewButton.left = new FormAttachment(textComposite, 9);
+        fd_btnNewButton.bottom = new FormAttachment(0, 24);
+        fd_btnNewButton.width = 24;
+        fd_btnNewButton.height = 24;
+        btnNewButton.setLayoutData(fd_btnNewButton);
+
+        addButtonListener2(btnNewButton);
+        btnNewButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_PLUS_NOR));
+
+        return compositeEventName;
+    }
+
+    @Override
+    protected void initContents() {
+        event.setText(" " + descriptor.getEventDisplayName());
+    }
+
+    /**
+     * add button listeners and icons
+     * 
+     * @param btnNewButton
+     */
+    private void addButtonListener2(final Canvas btnNewButton) {
+        btnNewButton.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseUp(MouseEvent e) {
+                if (hasEventHandler) {
+                    return;
+                }
+                addEventHandlerComposite(null);
+                updateLayout();
+                propertiesPage.resizeScrolledComposite();
+            }
+
+            @Override
+            public void mouseDown(MouseEvent e) {
+                if (hasEventHandler) {
+                    return;
+                }
+                btnNewButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_PLUS_SEL));
+                btnNewButton.redraw();
+            }
+        });
+        btnNewButton.addMouseTrackListener(new MouseTrackAdapter() {
+            @Override
+            public void mouseEnter(MouseEvent arg0) {
+                if (hasEventHandler) {
+                    return;
+                }
+                btnNewButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_PLUS_MV));
+                btnNewButton.redraw();
+            }
+
+            @Override
+            public void mouseExit(MouseEvent arg0) {
+                if (!hasEventHandler) {
+                    btnNewButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_PLUS_NOR));
+                    btnNewButton.redraw();
+                }
+            }
+        });
+        btnNewButton.addPaintListener(new PaintListener() {
+            @Override
+            public void paintControl(PaintEvent e) {
+                Image image = (Image) btnNewButton.getData();
+                e.gc.drawImage(image, 0, 0);
+            }
+        });
+    }
+
+    /**
+     * add EventHandlerComposite
+     * 
+     * @return
+     */
+    private void addEventHandlerComposite(EventPart part) {
+        new EventHandlerComposite(this, this, part);
+        setHasEventHandler(true);
+    }
+
+    public void setHasEventHandler(boolean hasEventHandler) {
+        this.hasEventHandler = hasEventHandler;
+        if (hasEventHandler) {
+            btnNewButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_PLUS_DIM));
+            btnNewButton.redraw();
+        } else {
+            btnNewButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_PLUS_NOR));
+            btnNewButton.redraw();
+        }
+    }
+
+    /**
+     * call composite.layout() for redraw
+     */
+    public void updateLayout() {
+        getParent().getParent().layout();
+    }
+
+    /**
+     * update EventComposite state
+     */
+    public void updateState() {
+        List<EventPart> partActions = ((ComponentPart) part).getEventParts(descriptor.getEventName());
+        if ((partActions != null) && (partActions.size() != 0)) {
+            for (EventPart partAction : partActions) {
+                if (!partAction.hasProperty(LayoutSchemaConstants.EVENT_CONNECTION)) {
+                    addEventHandlerComposite(partAction);
+                } else {
+                    setHasEventHandler(true);
+                }
+            }
+        }
+    }
+    
+    public Part getPart() {
+        return part;
+    }
+    
+    public EventDescriptor getDescriptor() {
+        return descriptor;
+    }
+    
+    public PropertiesPageComposite getPropertiesPage() {
+        return propertiesPage;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/EventHandlerComposite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/EventHandlerComposite.java
new file mode 100644 (file)
index 0000000..fc1f19d
--- /dev/null
@@ -0,0 +1,474 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.event;
+
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseTrackAdapter;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.EventParamDescriptor;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.EventPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.ComponentValidator;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.views.properties.events.HandlerCodeManager;
+
+
+public class EventHandlerComposite extends AbstractEventComposite {
+
+    private EventComposite eventComposite;
+    private EventPart eventPart;
+    private Text combo;
+    private String oldComboText;
+    private HandlerCodeManager codeWriter = new HandlerCodeManager();
+
+    /**
+     * @param parent
+     *            {@link Composite}
+     * @param eventComposite
+     *            {@link EventComposite}
+     * @param javaScriptFuncIndex
+     */
+    public EventHandlerComposite(Composite parent, EventComposite eventComposite, EventPart eventPart) {
+        super(parent);
+        this.eventComposite = eventComposite;
+        this.eventPart = eventPart;
+
+        initContents();
+    }
+
+    @Override
+    protected void setLayout() {
+        GridLayout layout = new GridLayout(1, false);
+        layout.marginHeight = 3;
+        layout.marginWidth = 0;
+        layout.horizontalSpacing = 0;
+        layout.verticalSpacing = 0;
+        setLayout(layout);
+        setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.swt.widgets.Widget#dispose()
+     */
+    @Override
+    public void dispose() {
+        Composite composite = getComposite();
+        if (composite != null)
+            composite.dispose();
+
+        super.dispose();
+    }
+
+    @Override
+    protected Composite createControl(Composite parent) {
+        Composite composite = new Composite(parent, SWT.NONE);
+        composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+        composite.setLayout(new FormLayout());
+
+        /*
+         * Arrow icon
+         */
+        Canvas arrowIcon = new Canvas(composite, SWT.NONE);
+        FormData formData = new FormData();
+        formData.top = new FormAttachment(0, 8);
+        formData.left = new FormAttachment(0, 29);
+        formData.width = 7;
+        formData.height = 7;
+        arrowIcon.setLayoutData(formData);
+        arrowIcon.addPaintListener(new PaintListener() {
+            @Override
+            public void paintControl(PaintEvent e) {
+                Image image = ImageResources.getImage(ImageResources.PROPERTIES_EVENT_ARROW);
+                e.gc.drawImage(image, 0, 0);
+            }
+        });
+
+        /*
+         * Listener Text
+         */
+        combo = new Text(composite, SWT.BORDER);
+        formData = new FormData();
+        formData.top = new FormAttachment(0, 0);
+        formData.left = new FormAttachment(arrowIcon, 6);
+        formData.right = new FormAttachment(100, -87);
+        combo.setLayoutData(formData);
+        addListenersToCombo();
+
+        /*
+         * Delete listener button
+         */
+        Canvas btnDeleteButton = new Canvas(composite, SWT.NONE);
+        FormData fd_btnDeleteButton = new FormData();
+        fd_btnDeleteButton.top = new FormAttachment(0, 0);
+        fd_btnDeleteButton.left = new FormAttachment(combo, 4);
+        fd_btnDeleteButton.bottom = new FormAttachment(0, 24);
+        fd_btnDeleteButton.width = 24;
+        fd_btnDeleteButton.height = 24;
+        btnDeleteButton.setLayoutData(fd_btnDeleteButton);
+
+        addDeleteButtonListener(btnDeleteButton);
+        btnDeleteButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_DELETE_NOR));
+        /*
+         * Go to source code button
+         */
+        Canvas btnGoButton = new Canvas(composite, SWT.NONE);
+        FormData fd_btnGoButton = new FormData();
+        fd_btnGoButton.top = new FormAttachment(0, 0);
+        fd_btnGoButton.left = new FormAttachment(btnDeleteButton, 4);
+        fd_btnGoButton.bottom = new FormAttachment(0, 24);
+        fd_btnGoButton.width = 24;
+        fd_btnGoButton.height = 24;
+        btnGoButton.setLayoutData(fd_btnGoButton);
+
+        addGoButtonListener(btnGoButton);
+        btnGoButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_ARROW_BTN_NOR));
+
+        return composite;
+    }
+
+    @Override
+    protected void initContents() {
+        setValidatedValue(getDefaultCode());
+    }
+
+    /**
+     * go button listeners and icons
+     * 
+     * @param btnGoButton
+     */
+    private void addGoButtonListener(final Canvas btnGoButton) {
+        btnGoButton.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseUp(MouseEvent e) {
+                btnGoButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_ARROW_BTN_NOR));
+                btnGoButton.redraw();
+                valueChanged();
+            }
+
+            @Override
+            public void mouseDown(MouseEvent e) {
+                btnGoButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_ARROW_BTN_SEL));
+                btnGoButton.redraw();
+            }
+        });
+        btnGoButton.addMouseTrackListener(new MouseTrackAdapter() {
+            @Override
+            public void mouseEnter(MouseEvent e) {
+                btnGoButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_ARROW_BTN_MV));
+                btnGoButton.redraw();
+            }
+
+            @Override
+            public void mouseExit(MouseEvent arg0) {
+                btnGoButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_ARROW_BTN_NOR));
+                btnGoButton.redraw();
+            }
+        });
+
+        btnGoButton.addPaintListener(new PaintListener() {
+            @Override
+            public void paintControl(PaintEvent e) {
+                Image image = (Image) btnGoButton.getData();
+                e.gc.drawImage(image, 0, 0);
+            }
+        });
+    }
+
+    /**
+     * delete button listeners and icons
+     * 
+     * @param btnDeleteButton
+     */
+    private void addDeleteButtonListener(final Canvas btnDeleteButton) {
+        btnDeleteButton.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseUp(MouseEvent e) {
+                btnDeleteButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_DELETE_NOR));
+                removeEventHandlerComposite();
+            }
+
+            @Override
+            public void mouseDown(MouseEvent e) {
+                btnDeleteButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_DELETE_SEL));
+                btnDeleteButton.redraw();
+            }
+        });
+        btnDeleteButton.addMouseTrackListener(new MouseTrackAdapter() {
+            @Override
+            public void mouseEnter(MouseEvent e) {
+                btnDeleteButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_DELETE_MV));
+                btnDeleteButton.redraw();
+            }
+
+            @Override
+            public void mouseExit(MouseEvent arg0) {
+                btnDeleteButton.setData(ImageResources.getImage(ImageResources.PROPERTIES_EVENT_DELETE_NOR));
+                btnDeleteButton.redraw();
+            }
+        });
+        btnDeleteButton.addPaintListener(new PaintListener() {
+            @Override
+            public void paintControl(PaintEvent e) {
+                Image image = (Image) btnDeleteButton.getData();
+                e.gc.drawImage(image, 0, 0);
+            }
+        });
+    }
+
+    /**
+     * removeEventHandlerComposite
+     */
+    private void removeEventHandlerComposite() {
+        removeEventPart();
+        dispose();
+
+        eventComposite.setHasEventHandler(false);
+        eventComposite.updateLayout();
+        eventComposite.getPropertiesPage().resizeScrolledComposite();
+    }
+
+    private String getDefaultCode() {
+        String eventName = eventComposite.getDescriptor().getEventName();
+        String defaultCode = null;
+        if (eventPart == null) {
+            defaultCode = getDefaultCode(eventName);
+        } else {
+            if (eventPart.getPropertyValue(LayoutSchemaConstants.EVENT_FUNCTION_NAME) == null) {
+                defaultCode = getDefaultCode(eventName);
+                eventPart.setPropertyValue(LayoutSchemaConstants.EVENT_FUNCTION_NAME, defaultCode);
+            } else {
+                defaultCode = eventPart.getPropertyValue(LayoutSchemaConstants.EVENT_FUNCTION_NAME);
+            }
+        }
+        return defaultCode;
+    }
+
+    private String getDefaultCode(String eventName) {
+        String defaultCode = eventComposite.getDescriptor().getEventTypeDescriptor().getDefaultCode();
+        ComponentPart model = (ComponentPart) eventComposite.getPart();
+        String widgetID = model.getPropertyValue(BuilderConstants.PROPERTY_ID);
+        if (widgetID == null) {
+            widgetID = "";
+        }
+
+        String viewID = model.getOwnerViewPart().getPropertyValue(BuilderConstants.PROPERTY_ID);
+        if (viewID == null) {
+            viewID = "";
+        }
+
+        return EventHandlerUtil.getDefaultEventHandlerName(viewID, widgetID, eventName, defaultCode);
+    }
+
+    /**
+     * setValidatedValue
+     * 
+     * @param value
+     * @return
+     */
+    private boolean setValidatedValue(String value) {
+        if (value == null) {
+            return false;
+        }
+        if (value.matches(BuilderConstants.REGULAREXPRESSION)) {
+            setValue(value);
+            return true;
+        } else {
+            // FIXME ""
+            if (this.oldComboText == null) {
+                combo.setText("");
+            } else {
+                combo.setText(this.oldComboText);
+            }
+            return false;
+        }
+    }
+
+    /**
+     * setValue
+     * 
+     * @param value
+     */
+    private void setValue(String value) {
+        combo.setText(value);
+        this.oldComboText = value;
+    }
+
+    /**
+     * valueChanged
+     */
+    private void valueChanged() {
+        Part part = eventComposite.getPart();
+        if (!(part instanceof ComponentPart)) {
+            return;
+        }
+        CommandStack commandStack = eventComposite.getPropertiesPage().getCommandStack();
+        if (commandStack == null) {
+            return;
+        }
+        ComponentPart componentPart = (ComponentPart) part;
+        // page id
+        String viewID = componentPart.getOwnerViewPart().getPropertyValue(BuilderConstants.PROPERTY_ID);
+        if (viewID == null) {
+            viewID = "";
+        }
+
+        String eventName = combo.getText();
+        String signal = eventComposite.getDescriptor().getEventName();
+        ComponentDescriptor componentDescriptor = componentPart.getOwnerDocumentPart().getComponentDescriptor();
+        List<EventParamDescriptor> params = componentDescriptor.getEventParams(componentPart, signal);
+        String eventInfo = componentDescriptor.getEventInfo(componentPart, signal);
+        if (eventPart == null) {
+            // add handler func
+            codeWriter.addHandlerFunction(eventName, viewID, params, eventInfo);
+            eventPart = (EventPart) PartUtil.createPartWithInitValue(componentPart.getOwnerDocumentPart(), PartType.EVENT, componentPart,
+                                                                     LayoutSchemaConstants.EVENT);
+            Command command = PartUtil.createEventPartCommand(componentPart, eventPart, eventName, signal);
+            commandStack.execute(command);
+        } else if (eventPart.getPropertyValue(LayoutSchemaConstants.EVENT_FUNCTION_NAME) == null) {
+            // add hanlder func and set EVENT_FUNCTION_NAME/EVENT_SIGNAL property
+            codeWriter.addHandlerFunction(eventName, viewID, params, eventInfo);
+            CompoundCommand compCmd = new CompoundCommand();
+            compCmd.add(PartUtil.createSetPropertyCommand(componentPart, LayoutSchemaConstants.EVENT_FUNCTION_NAME, eventName));
+            compCmd.add(PartUtil.createSetPropertyCommand(componentPart, LayoutSchemaConstants.EVENT_SIGNAL, eventName));
+            commandStack.execute(compCmd);
+        } else {
+            // modify handler func
+            String oldEventName = eventPart.getPropertyValue(LayoutSchemaConstants.EVENT_FUNCTION_NAME);
+            if (!eventName.equals(oldEventName)) {
+                EventPart newEventPart = (EventPart) PartUtil.createPart(PartType.EVENT, null, componentPart);
+                CompoundCommand compundCmd = new CompoundCommand();
+                compundCmd.add(PartUtil.createRemovePartCommand(componentPart, eventPart));
+                compundCmd.add(PartUtil.createAddPartCommand(componentPart, newEventPart, null));
+                commandStack.execute(compundCmd);
+            } else {
+                ComponentValidator ComponentValidator = new ComponentValidator();
+                if ((ComponentValidator.getUsedEventNameCount(componentPart, oldEventName) == 1)
+                        && (ComponentValidator.getUsedEventNameCount(componentPart, eventName) == 0)) {
+                    codeWriter.modifyHandlerFunction(oldEventName, eventName, viewID);
+                    Command command = PartUtil.createSetPropertyCommand(componentPart, LayoutSchemaConstants.EVENT_FUNCTION_NAME, eventName);
+                    commandStack.execute(command);
+                } else {
+                    codeWriter.addHandlerFunction(eventName, viewID, params, eventInfo);
+                    if (eventPart.getIndex() == -1) {
+                        Command command = PartUtil.createAddPartCommand(componentPart, eventPart, null);
+                        commandStack.execute(command);
+                    }
+                }
+            }
+        }
+
+    }
+
+    /**
+     * addListenersToCombo
+     */
+    private void addListenersToCombo() {
+        combo.addListener(SWT.Traverse, new Listener() {
+
+            @Override
+            public void handleEvent(Event event) {
+
+                switch (event.type) {
+                    case SWT.Traverse:
+                        if (event.detail == SWT.TRAVERSE_RETURN) {
+                            if (setValidatedValue(combo.getText())) {
+                                valueChanged();
+                            }
+                        } else if (event.detail == SWT.TRAVERSE_ESCAPE) {
+                            removeEventHandlerComposite();
+                        }
+                        break;
+
+                    default:
+                        break;
+                }
+            }
+        });
+
+        combo.addListener(SWT.MouseDoubleClick, new Listener() {
+
+            @Override
+            public void handleEvent(Event event) {
+
+                switch (event.type) {
+                    case SWT.MouseDoubleClick:
+                        setValidatedValue(combo.getText());
+                        valueChanged();
+                        break;
+                    default:
+                        break;
+                }
+            }
+        });
+    }
+
+    private void removeEventPart() {
+        if (eventPart == null) {
+            return;
+        }
+        Part part = eventComposite.getPart();
+        if (!(part instanceof ComponentPart)) {
+            return;
+        }
+        CommandStack commandStack = eventComposite.getPropertiesPage().getCommandStack();
+        if (commandStack == null) {
+            return;
+        }
+        ComponentPart componentPart = (ComponentPart) part;
+        String viewID = componentPart.getOwnerViewPart().getPropertyValue(BuilderConstants.PROPERTY_ID);
+        String oldEventName = eventPart.getPropertyValue(LayoutSchemaConstants.EVENT_FUNCTION_NAME);
+        if ((oldEventName != null) && (new ComponentValidator().getUsedEventNameCount(componentPart, oldEventName) == 1)) {
+            codeWriter.deleteHandlerFunction(oldEventName, viewID);
+        }
+
+        commandStack.execute(PartUtil.createRemovePartCommand(componentPart, eventPart));
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/EventHandlerUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/event/EventHandlerUtil.java
new file mode 100644 (file)
index 0000000..dfddcc5
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.event;
+
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+
+
+public class EventHandlerUtil {
+
+    /**
+     * return default event handler function
+     *
+     * @param viewId
+     *            ex)view1
+     * @param componentId
+     *            ex)button1
+     * @param eventName
+     *            ex) clicked
+     * @param defaultCode
+     *            ex)%page%_%object%_%event%
+     * @return ex)view1_button1_onclicked
+     */
+    public static String getDefaultEventHandlerName(String viewId, String componentId, String eventName, String defaultCode) {
+        if (eventName.contains(",")) {
+            String[] split = eventName.split(",");
+            String results = split[0];
+            StringBuffer buf = new StringBuffer();
+            for (int i = 1; i < split.length; i++) {
+                // results += BuilderConstants.UNDERSCORE + split[i];
+                buf.append(BuilderConstants.UNDERSCORE);
+                buf.append(split[i]);
+            }
+            results = results + buf.toString();
+            eventName = results;
+        }
+        defaultCode = defaultCode.replace(PropertiesConstant.EVENT_REPLACE_PAGE, viewId);
+        defaultCode = defaultCode.replace(PropertiesConstant.EVENT_REPLACE_OBJECT, componentId);
+        defaultCode = defaultCode.replace(PropertiesConstant.EVENT_REPLACE_EVENT, PropertiesConstant.EVENT_PREFIX + eventName);
+
+        return defaultCode;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/HandlerCodeManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/HandlerCodeManager.java
new file mode 100644 (file)
index 0000000..bb103a0
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.events;
+
+import java.util.List;
+
+import org.tizen.efluibuilder.model.descriptors.EventParamDescriptor;
+
+
+public class HandlerCodeManager {
+    private IHandlerCodeWriter codeWriter = null;
+
+    public HandlerCodeManager() {
+        codeWriter = new HandlerCodeWriter();
+    }
+
+    /**
+     * Adds a event handler function
+     * 
+     * @param part
+     * @param funcName
+     * @param pageID
+     * @param params
+     */
+    public void addHandlerFunction(String funcName, String pageID, List<EventParamDescriptor> params, String eventInfo) {
+        if (codeWriter == null) {
+            return;
+        }
+        codeWriter.addHandlerFunction(funcName, pageID, params, eventInfo);
+    }
+
+    /**
+     * Modify a event handler function
+     * 
+     * @param part
+     * @param oldFuncName
+     * @param newFuncName
+     * @param pageID
+     */
+    public void modifyHandlerFunction(String oldFuncName, String newFuncName, String pageID) {
+        if (codeWriter == null) {
+            return;
+        }
+        codeWriter.modifyHandlerFunction(oldFuncName, newFuncName, pageID);
+    }
+
+    /**
+     * Delete a event handler function
+     * 
+     * @param funcName
+     * @param pageID
+     */
+    public void deleteHandlerFunction(String funcName, String pageID) {
+        codeWriter.deleteHandlerFunction(funcName, pageID);
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/HandlerCodeWriter.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/HandlerCodeWriter.java
new file mode 100644 (file)
index 0000000..d36fd8f
--- /dev/null
@@ -0,0 +1,617 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.events;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.ui.CDTUITools;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.codegenerator.CodeGeneratorException;
+import org.tizen.efluibuilder.codegenerator.event.EventCodeGenerator;
+import org.tizen.efluibuilder.codegenerator.event.EventCodeGeneratorUtil;
+import org.tizen.efluibuilder.codegenerator.event.IEventCodeGenerator;
+import org.tizen.efluibuilder.model.descriptors.EventParamDescriptor;
+import org.tizen.efluibuilder.storyboard.codegenerator.CodeGeneratorConstants;
+import org.tizen.efluibuilder.storyboard.codegenerator.CodeGeneratorUtil;
+import org.tizen.efluibuilder.storyboard.codegenerator.Messages;
+
+
+class VisitForEFL extends ASTVisitor {
+    private List<Integer> _funcOffsetList = new ArrayList<Integer>();
+    private List<Integer> _funcLengthList = new ArrayList<Integer>();
+    private List<String> _funcNameList = new ArrayList<String>();
+    private List<Integer> _funcNameLengthList = new ArrayList<Integer>();
+    private List<Integer> _funcBodyOffsetList = new ArrayList<Integer>();
+    private List<Integer> _funcBodyLengthList = new ArrayList<Integer>();
+    private List<Integer> _funcSpecifierOffsetList = new ArrayList<Integer>();
+
+    VisitForEFL() {
+        this.shouldVisitDeclarations = true;
+        // this.includeInactiveNodes = true;
+    }
+
+    public int visit(IASTDeclaration declaration) {
+        if (declaration instanceof IASTFunctionDefinition) {
+            IASTFunctionDefinition func = (IASTFunctionDefinition) declaration;
+            IASTFunctionDeclarator func_name_expr = func.getDeclarator();
+            IASTStatement func_body_expr = func.getBody();
+            IASTDeclSpecifier func_specifier_expr = func.getDeclSpecifier();
+
+            _funcNameList.add(func_name_expr.getName().toString());
+            _funcNameLengthList.add(func_name_expr.getName().toString().length());
+            _funcOffsetList.add(func_name_expr.getFileLocation().getNodeOffset());
+            _funcLengthList.add(func_name_expr.getFileLocation().getNodeLength());
+            _funcBodyOffsetList.add(func_body_expr.getFileLocation().getNodeOffset());
+            _funcBodyLengthList.add(func_body_expr.getFileLocation().getNodeLength());
+            _funcSpecifierOffsetList.add(func_specifier_expr.getFileLocation().getNodeOffset());
+        }
+        return PROCESS_CONTINUE;
+    }
+
+    public List<Integer> getFuncBodyOffsetList() {
+        return _funcBodyOffsetList;
+    }
+
+    public List<Integer> getFuncBodyLengthList() {
+        return _funcBodyLengthList;
+    }
+
+    public List<Integer> getFuncOffsetList() {
+        return _funcOffsetList;
+    }
+
+    public List<Integer> getFuncLengthList() {
+        return _funcLengthList;
+    }
+
+    public List<String> getFuncNameList() {
+        return _funcNameList;
+    }
+
+    public List<Integer> getFuncNameLengthList() {
+        return _funcNameLengthList;
+    }
+
+    public List<Integer> getFuncSpecifierOffsetList() {
+        return _funcSpecifierOffsetList;
+    }
+}
+
+
+public class HandlerCodeWriter implements IHandlerCodeWriter {
+    static final String PAGENAME = "$(page_name)";
+    public static final String FUNCNAME = "%FuncName%"; //$NON-NLS-1$
+    public static final String FUNCPARAMS = "%FuncParams%"; //$NON-NLS-1$
+    public static final String EVENTINFO = "$(eventInfo)"; //$NON-NLS-1$
+    static final String EVENT_HANDLER_FUNCTION = "void " + FUNCNAME + "(" + FUNCPARAMS + ") {\n\t\n}\n\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+    private ITextEditor _editor;
+    private IDocument _document;
+
+    private List<String> _funcNameList = new ArrayList<String>();
+    private List<Integer> _funcNameLengthList = new ArrayList<Integer>();
+    private List<Integer> _funcOffsetList = new ArrayList<Integer>();
+    private List<Integer> _funcLengthList = new ArrayList<Integer>();
+    private List<Integer> _funcBodyOffsetList = new ArrayList<Integer>();
+    private List<Integer> _funcBodyLengthList = new ArrayList<Integer>();
+
+    private int findHandlerFunction(String funcName) {
+        return _funcNameList.indexOf(funcName);
+    }
+
+    private int getFuncNameLength(int index) {
+        return _funcNameLengthList.get(index);
+    }
+
+    private int getFuncOffset(int index) {
+        return _funcOffsetList.get(index);
+    }
+
+    private int getFuncBodyLength(int index) {
+        return _funcBodyLengthList.get(index);
+    }
+
+    private int getFuncBodyOffset(int index) {
+        return _funcBodyOffsetList.get(index);
+    }
+
+    private int getFuncLength(int index) {
+        return _funcLengthList.get(index);
+    }
+
+    private IFile getFile(String id) {
+        IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+
+        if (editorPart == null) {
+            return null;
+        }
+
+        IFileEditorInput input = (IFileEditorInput) editorPart.getEditorInput();
+        IFile file = input.getFile();
+        IProject project = file.getProject();
+        IFile eventHandlerFile = EventCodeGeneratorUtil.getEventHandlerFile(project, id);
+        if (eventHandlerFile.exists()) {
+            return eventHandlerFile;
+        }
+
+        IEventCodeGenerator generator = new EventCodeGenerator(project);
+        try {
+            generator.addView(id);
+        } catch (CodeGeneratorException e) {
+            e.printStackTrace();
+        }
+
+        return eventHandlerFile;
+    }
+
+    private IEditorPart openEditor(final IFile ifile) {
+        // editor open
+        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+
+        try {
+            IDE.openEditor(page, ifile);
+        } catch (PartInitException e) {
+        }
+
+        return page.getActiveEditor();
+    }
+
+    private boolean initEditor(String pageID) {
+        IFile ifile = getFile(pageID);
+        // IFile ifile = getFile();
+        if ((ifile == null) || (!ifile.exists())) {
+            return false;
+        }
+
+        IEditorPart part = openEditor(ifile);
+        if (!(part instanceof ITextEditor)) {
+            return false;
+        }
+
+        _editor = (ITextEditor) part;
+        IDocumentProvider provider = _editor.getDocumentProvider();
+        _document = provider.getDocument(_editor.getEditorInput());
+
+        createFuncInfoUsingAST(part);
+
+        return true;
+    }
+
+    private void createFuncInfoUsingAST(IEditorPart part) {
+        VisitForEFL visitor = new VisitForEFL();
+        ITranslationUnit tu = (ITranslationUnit) CDTUITools.getEditorInputCElement(part.getEditorInput());
+        if (tu != null) {
+            try {
+                // IASTTranslationUnit ast = tu.getAST(null, ITranslationUnit.AST_SKIP_ALL_HEADERS |
+                // ITranslationUnit.AST_SKIP_FUNCTION_BODIES |
+                // ITranslationUnit.AST_PARSE_INACTIVE_CODE);
+                IASTTranslationUnit ast = tu.getAST(null, ITranslationUnit.AST_SKIP_ALL_HEADERS | ITranslationUnit.AST_SKIP_FUNCTION_BODIES);
+
+                if (null != ast) {
+                    ast.accept(visitor);
+                    _funcNameList = visitor.getFuncNameList();
+                    _funcNameLengthList = visitor.getFuncNameLengthList();
+                    _funcOffsetList = visitor.getFuncOffsetList();
+                    _funcLengthList = visitor.getFuncLengthList();
+                    _funcBodyOffsetList = visitor.getFuncBodyOffsetList();
+                    _funcBodyLengthList = visitor.getFuncBodyLengthList();
+                    // _funcSpecifierOffsetList = visitor.getFuncSpecifierOffsetList();
+                }
+            } catch (CoreException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public void addConnectionHandlerFunction(String funcName, String pageID, List<EventParamDescriptor> params, String eventInfo, boolean isPost) {
+        if (!initEditor(pageID)) {
+            return;
+        }
+
+        String handlerCode = _document.get();
+        String postFuncName = funcName + CodeGeneratorConstants.WRAPPER_POST;
+        String currentFuncName = funcName;        
+        if (isPost) {
+            currentFuncName = postFuncName;
+        }
+
+        int index = findHandlerFunction(currentFuncName);
+        if (index != -1) {
+            _editor.setHighlightRange(handlerCode.indexOf('{', (getFuncOffset(index) + getFuncLength(index))) + 3, 0, true);// move
+            return;
+        }
+
+//        setFocusStoryBoardEditor();
+        String comments = (eventInfo == null || eventInfo.isEmpty()) ? BuilderConstants.EMPTY
+                : ("/**".concat(BuilderConstants.NEW_LINE).concat(eventInfo).concat(BuilderConstants.NEW_LINE))
+                        .replace(BuilderConstants.NEW_LINE, System.getProperty("line.separator").concat(" * ")).concat(System.getProperty("line.separator"))
+                        .concat(" */").concat(System.getProperty("line.separator"));
+
+        String funcParam = ""; //$NON-NLS-1$
+
+        if (params != null) {
+            StringBuffer funcParamBuffer = new StringBuffer();
+            for (EventParamDescriptor param : params) {
+                funcParamBuffer.append(param.getName()).append(Messages.CodeGenerator_COMMA);
+            }
+            funcParam = funcParamBuffer.substring(0, funcParamBuffer.length() - 2);
+        }
+
+        handlerCode = handlerCode.concat(comments);
+
+        if (isPost) {
+            funcParam = CodeGeneratorConstants.WRAPPER_PARAM + funcParam;
+            handlerCode = handlerCode + CodeGeneratorUtil.getFunctionDefinition(pageID, funcName, CodeGeneratorConstants.TYPE_POST);
+        } else {
+            handlerCode = handlerCode + CodeGeneratorUtil.getFunctionDefinition(pageID, funcName, CodeGeneratorConstants.TYPE_PRE);
+        }
+        
+        handlerCode = handlerCode.replace(FUNCNAME, currentFuncName);
+        handlerCode = handlerCode.replace(FUNCPARAMS, funcParam);
+        handlerCode = handlerCode.replace(PAGENAME, pageID);
+
+        _document.set(handlerCode);
+        _editor.setHighlightRange(handlerCode.lastIndexOf('{') + 3, 0, true);
+    }
+
+    /**
+     * Adds a event handler function in the java script file.
+     * 
+     * @param funcName
+     * @param pageID
+     * @param params
+     */
+    public void addHandlerFunction(String funcName, String pageID, List<EventParamDescriptor> params, String eventInfo) {
+        if (!initEditor(pageID)) {
+            return;
+        }
+
+        String comments = eventInfo == null || eventInfo.isEmpty() ? BuilderConstants.EMPTY
+                : ("/**".concat(BuilderConstants.NEW_LINE).concat(eventInfo).concat(BuilderConstants.NEW_LINE))
+                        .replace(BuilderConstants.NEW_LINE, System.getProperty("line.separator").concat(" * ")).concat(System.getProperty("line.separator"))
+                        .concat(" */").concat(System.getProperty("line.separator"));
+
+        String handlerCode = _document.get();
+        int index = findHandlerFunction(funcName);
+        // int index = findHandlerFullFunction(fullFuncName);
+        if (index == -1) {
+            String funcParam = "";
+            if (params != null) {
+                StringBuffer sb = new StringBuffer();
+                for (EventParamDescriptor param : params) {
+                    sb.append(param.getName() + ", ");
+                }
+                funcParam = sb.toString();
+                funcParam = funcParam.substring(0, funcParam.length() - 2); // remove
+            }
+            handlerCode = handlerCode.concat(comments);
+            handlerCode = handlerCode + EVENT_HANDLER_FUNCTION;
+            handlerCode = handlerCode.replace(FUNCNAME, funcName);
+            handlerCode = handlerCode.replace(FUNCPARAMS, funcParam);
+            handlerCode = handlerCode.replace(PAGENAME, pageID);
+
+            _document.set(handlerCode);
+            _editor.setHighlightRange(_document.getLength() - 5, 0, true); // move
+                                                                           // cursor
+        } else {
+            _editor.setHighlightRange(handlerCode.indexOf('{', (getFuncOffset(index) + getFuncLength(index))) + 3, 0, true);// move
+                                                                                                                            // cursor
+                                                                                                                            // //3
+                                                                                                                            // =
+                                                                                                                            // {\n\t
+        }
+    }
+
+    /**
+     * Modify a event handler function in the java script file.
+     * 
+     * @param oldFuncName
+     * @param newFuncName
+     * @param pageID
+     */
+    public void modifyHandlerFunction(String oldFuncName, String newFuncName, String pageID) {
+        if (!initEditor(pageID)) {
+            return;
+        }
+
+        int index = findHandlerFunction(oldFuncName);
+
+        if (index == -1) {
+        } else {
+            try {
+                _document.replace(getFuncOffset(index), getFuncNameLength(index), newFuncName);
+            } catch (BadLocationException e) {
+            }
+            String handlerCode = _document.get();
+            _editor.setHighlightRange(handlerCode.indexOf('{', (getFuncOffset(index) + getFuncLength(index))) + 3, 0, true);// move
+                                                                                                                            // cursor
+                                                                                                                            // //3
+                                                                                                                            // =
+                                                                                                                            // {\n\t
+        }
+        // Storyboard_START
+        // Modify the post function
+        createFuncInfoUsingAST(_editor);
+        index = findHandlerFunction(oldFuncName + CodeGeneratorConstants.WRAPPER_POST);
+        if (index == -1) {
+        } else {
+            try {
+                _document.replace(getFuncOffset(index), getFuncNameLength(index), newFuncName + CodeGeneratorConstants.WRAPPER_POST);
+            } catch (BadLocationException e) {
+                LoggerFactory.getLogger(HandlerCodeWriter.class).error(e.getMessage());
+            }
+        }
+        // Storyboard_END
+    }
+
+    /**
+     * Delete a event handler function in the java script file.
+     * 
+     * @param funcName
+     * @param pageID
+     */
+    public void deleteHandlerFunction(String funcName, String pageID) {
+        if (!initEditor(pageID)) {
+            return;
+        }
+
+        int index = findHandlerFunction(funcName);
+
+        if (index == -1) {
+        } else {
+            try {
+                String handlerCode = _document.get();
+                _editor.setHighlightRange(handlerCode.indexOf('{', (getFuncOffset(index) + getFuncLength(index))) + 3, 0, true);// move
+                                                                                                                                // cursor
+                                                                                                                                // //3
+                                                                                                                                // =
+                                                                                                                                // {\n\t
+
+                commentOutFullFunction(index);
+                // Storyboard_START
+                createFuncInfoUsingAST(_editor);
+                int i = findHandlerFunction(funcName + CodeGeneratorConstants.WRAPPER_POST);
+                if (i != -1) {
+                    commentOutFullFunction(i);
+                }
+                // Storyboard_END
+            } catch (BadLocationException e) {
+            }
+        }
+    }
+
+    // StoryBoard_START
+    /**
+     * Add event handler for the storyboard connection.
+     * 
+     * @param funcName
+     * @param pageID
+     * @param params
+     * @param targetView
+     */
+    public void addConnectionHandler(String funcName, String pageID, List<EventParamDescriptor> params, String eventInfo) {
+        if (!initEditor(pageID)) {
+            return;
+        }
+        setFocusStoryBoardEditor();
+        String comments = (eventInfo == null || eventInfo.isEmpty()) ? BuilderConstants.EMPTY
+                : ("/**".concat(BuilderConstants.NEW_LINE).concat(eventInfo).concat(BuilderConstants.NEW_LINE))
+                        .replace(BuilderConstants.NEW_LINE, System.getProperty("line.separator").concat(" * ")).concat(System.getProperty("line.separator"))
+                        .concat(" */").concat(System.getProperty("line.separator"));
+
+        String handlerCode = _document.get();
+        String funcParam = ""; //$NON-NLS-1$
+
+        int index = findHandlerFunction(funcName);
+        if (index == -1) {
+            if (params != null) {
+                StringBuffer funcParamBuffer = new StringBuffer();
+                for (EventParamDescriptor param : params) {
+                    funcParamBuffer.append(param.getName()).append(Messages.CodeGenerator_COMMA);
+                }
+                funcParam = funcParamBuffer.substring(0, funcParamBuffer.length() - 2);
+            }
+            handlerCode = handlerCode.concat(comments);
+            handlerCode = handlerCode + CodeGeneratorUtil.getFunctionDefinition(pageID, funcName, CodeGeneratorConstants.TYPE_PRE);
+            handlerCode = handlerCode.replace(FUNCNAME, funcName);
+            handlerCode = handlerCode.replace(FUNCPARAMS, funcParam);
+            handlerCode = handlerCode.replace(PAGENAME, pageID);
+
+            // Add post_method
+            String postFuncName = funcName + CodeGeneratorConstants.WRAPPER_POST;
+            funcParam = CodeGeneratorConstants.WRAPPER_PARAM + funcParam;
+            index = findHandlerFunction(funcName + CodeGeneratorConstants.WRAPPER_POST);
+            if (index == -1) {
+                handlerCode = handlerCode + CodeGeneratorUtil.getFunctionDefinition(pageID, funcName, CodeGeneratorConstants.TYPE_POST);
+                handlerCode = handlerCode.replace(FUNCNAME, postFuncName);
+                handlerCode = handlerCode.replace(FUNCPARAMS, funcParam);
+                handlerCode = handlerCode.replace(PAGENAME, pageID);
+            }
+
+            _document.set(handlerCode);
+            _editor.setHighlightRange(handlerCode.lastIndexOf('{') + 3, 0, true);
+        } else {
+            // Add wrapper comment
+            index = findHandlerFunction(funcName);
+            addWrapperComment(index, pageID, funcName, CodeGeneratorConstants.TYPE_PRE);
+            createFuncInfoUsingAST(_editor);
+            index = findHandlerFunction(funcName + CodeGeneratorConstants.WRAPPER_POST);
+            addWrapperComment(index, pageID, funcName, CodeGeneratorConstants.TYPE_POST);
+            _editor.setHighlightRange(handlerCode.indexOf('{', (getFuncOffset(index) + getFuncLength(index))) + 3, 0, true);
+        }
+    }
+
+    /**
+     * Comment out the event handler for storyboard
+     * 
+     * @param funcName
+     * @param pageID
+     */
+    public void deleteConnectionHandler(String funcName, String pageID) {
+        if (!initEditor(pageID)) {
+            return;
+        }
+        setFocusStoryBoardEditor();
+
+        int index = findHandlerFunction(funcName);
+
+        if (index != -1) {
+            try {
+                deleteWrapperComment(index);
+
+                // Update post method
+                createFuncInfoUsingAST(_editor);
+                String postFuncName = funcName + CodeGeneratorConstants.WRAPPER_POST;
+                int i = findHandlerFunction(postFuncName);
+                if (i != -1)
+                    deleteWrapperComment(i);
+            } catch (BadLocationException e) {
+            }
+            String handlerCode = _document.get();
+            _editor.setHighlightRange(handlerCode.indexOf('{', (getFuncOffset(index) + getFuncLength(index))) + 3, 0, true);
+        }
+    }
+
+    /**
+     * Modify connection properties
+     * 
+     * @param funcName
+     * @param pageID
+     */
+    /*
+     * public void modifyConnectionHandler(String funcName, String pageID, ConnectionData
+     * connectionData) { if (!initEditor(pageID)) { return; } setFocusStoryBoardEditor();
+     * 
+     * int index = findHandlerFunction(funcName);
+     * 
+     * if (index != -1) { String handlerCode = _document.get(); String functionBody =
+     * handlerCode.substring(getFuncOffset(index) + getFuncLength(index), getFuncBodyOffset(index) +
+     * getFuncBodyLength(index)); int changeIndex =
+     * functionBody.indexOf(Messages.CodeGenerator_CHANGE_PAGE_METHOD); if (changeIndex != -1) { int
+     * changeEnd = functionBody.indexOf(Messages.CodeGenerator_CHANGE_END, changeIndex); int
+     * changeStart = functionBody.lastIndexOf(Messages.CodeGenerator_CHANGE_START, changeIndex) - 1;
+     * int len = changeEnd - changeStart; String modifiedCode =
+     * CodeGeneratorUtil.getChangePage(connectionData); try {
+     * _document.replace(getFuncBodyOffset(index) + changeStart, len, modifiedCode); } catch
+     * (BadLocationException e) { // TODO Auto-generated catch block e.printStackTrace(); }
+     * _editor.setHighlightRange(handlerCode.indexOf('{', (getFuncOffset(index) +
+     * getFuncLength(index))) + 3, 0, true); } } }
+     */
+
+    /**
+     * Set Focus to WYSIWYG editor
+     * 
+     * @param
+     */
+    private void setFocusStoryBoardEditor() {
+        // Set focus to WYSIWYG editor
+        IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+        if (editorPart == null) {
+            return;
+        }
+        IFileEditorInput input = (IFileEditorInput) editorPart.getEditorInput();
+        IProject project = input.getFile().getProject();
+        IFolder iLayoutFolder = project.getFolder(CodeGeneratorConstants.LAYOUT_FOLDER);
+        IFile ifile = iLayoutFolder.getFile(CodeGeneratorConstants.LAYOUT_XML);
+
+        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+        try {
+            IDE.openEditor(page, ifile);
+        } catch (PartInitException e) {
+            LoggerFactory.getLogger(HandlerCodeWriter.class).error(e.getMessage());
+        }
+    }
+
+    /**
+     * Delete single line wrapper comment from function
+     * 
+     * @param index
+     * @throws BadLocationException
+     */
+    private void deleteWrapperComment(int index) throws BadLocationException {
+        String handlerCode = _document.get();
+        String functionBody = handlerCode.substring(getFuncOffset(index), getFuncBodyOffset(index) + getFuncBodyLength(index));
+        int commentStart = functionBody.indexOf(CodeGeneratorConstants.WRAPPER_COMMENT) - 1;
+        int commentEnd = functionBody.indexOf("\n", commentStart) + 1;
+        if (commentStart >= 0 && commentEnd >= 0)
+            _document.replace(getFuncOffset(index) + commentStart, commentEnd - commentStart, "");
+    }
+
+    /**
+     * Comment out the whole function
+     * 
+     * @param index
+     * @throws BadLocationException
+     */
+    private void commentOutFullFunction(int index) throws BadLocationException {
+        int pos = getFuncOffset(index);
+        while (_document.getChar(pos - 1) != '\n') {
+            pos--;
+        }
+        _document.replace(pos, 0, "//");
+
+        int count = 1;
+        for (int i = getFuncOffset(index); i <= getFuncBodyOffset(index) + getFuncBodyLength(index) + (count * 2); i++) {
+            if (_document.getChar(i - 1) == '\n') {
+                _document.replace(i, 0, "//");
+                count++;
+            }
+        }
+    }
+
+    private void addWrapperComment(int index, String pageID, String funcName, String type) {
+        String handlerCode = _document.get();
+        String fulFunctionBody = handlerCode.substring(getFuncOffset(index), getFuncBodyOffset(index) + getFuncBodyLength(index));
+        String functionHeader = handlerCode.substring(getFuncOffset(index), getFuncOffset(index) + getFuncLength(index) + 3);
+        String functionBody = handlerCode.substring(getFuncOffset(index) + getFuncLength(index) + 3, getFuncBodyOffset(index) + getFuncBodyLength(index));
+        functionBody = functionHeader + CodeGeneratorUtil.getWrapperComment(pageID, funcName, type) + functionBody;
+        handlerCode = handlerCode.replace(fulFunctionBody, functionBody);
+        _document.set(handlerCode);
+    }
+    // StoryBoard_END
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/HandlerNameValidator.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/HandlerNameValidator.java
new file mode 100644 (file)
index 0000000..a358351
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.events;
+
+import java.util.List;
+
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.EventDescriptor;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+
+
+public class HandlerNameValidator implements IInputValidator {
+
+    private List<EventDescriptor> descriptors;
+    private List<String> events;
+
+    public HandlerNameValidator(List<EventDescriptor> descriptors, List<String> events) {
+        this.descriptors = descriptors;
+        this.events = events;
+    }
+
+    @Override
+    public String isValid(String newText) {
+        if (newText.isEmpty()) {
+            return newText;
+        } else if (!newText.matches(BuilderConstants.REGULAREXPRESSION)) {
+            return PropertiesConstant.EVENT_INVALID_MESSAGE_1;
+        } else if (newText.startsWith(PropertiesConstant.EVENT_PREFIX)) {
+            return PropertiesConstant.EVENT_INVALID_MESSAGE_2;
+        } else {
+            String value = newText.toLowerCase();
+            for (EventDescriptor desc : descriptors) {
+                String eventName = desc.getEventDisplayName().toLowerCase();
+                if (eventName.equals(value)) {
+                    return PropertiesConstant.EVENT_INVALID_MESSAGE_3;
+                }
+            }
+
+            value = PropertiesConstant.EVENT_PREFIX + value;
+            for (String name : events) {
+                if (name.equals(value)) {
+                    return PropertiesConstant.EVENT_INVALID_MESSAGE_4;
+                }
+            }
+        }
+        return null;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/IHandlerCodeWriter.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/events/IHandlerCodeWriter.java
new file mode 100644 (file)
index 0000000..f3978c8
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.events;
+
+import java.util.List;
+
+import org.tizen.efluibuilder.model.descriptors.EventParamDescriptor;
+
+
+public interface IHandlerCodeWriter {
+
+    public void addHandlerFunction(String funcName, String pageID, List<EventParamDescriptor> params, String eventInfo);
+
+    public void modifyHandlerFunction(String oldFuncName, String newFuncName, String pageID);
+
+    public void deleteHandlerFunction(String funcName, String pageID);
+
+    // StoryBoard_START
+    public void addConnectionHandler(String funcName, String pageID, List<EventParamDescriptor> params, String eventInfo);
+
+    public void deleteConnectionHandler(String funcName, String pageID);
+
+    // public void modifyConnectionHandler(String Name, String pageID, ConnectionData
+    // connectionData);
+    // StoryBoard_END
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/CheckScaleEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/CheckScaleEditable.java
new file mode 100644 (file)
index 0000000..5c5efca
--- /dev/null
@@ -0,0 +1,375 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import java.text.DecimalFormat;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Scale;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.PropertyConditionDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.ui.widgets.TizenScale;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+/**
+ * This class creates a 'Scale component' and then adds it to the parent {@link Composite}.
+ */
+public class CheckScaleEditable extends Editable {
+
+    private Button check;
+    private TizenScale scale;
+    private Text scaleValue;
+    private PropertyDescriptor parentDescriptor;
+    private Listener listener;
+    private Listener textListener;
+    private Listener checkListener;
+    private boolean checkEnabled;
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @param parentDescriptor
+     *            property descriptor
+     */
+    public CheckScaleEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc,
+            PropertyDescriptor parentDescriptor, boolean checkEnabled) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+        this.parentDescriptor = parentDescriptor;
+        this.checkEnabled = checkEnabled;
+    }
+
+    @Override
+    public void dispose() {
+        if (scale != null && !scale.isDisposed()) {
+            scale.removeListener(SWT.MouseUp, listener);
+            scale.removeListener(SWT.Selection, listener);
+        }
+
+        if (scaleValue != null && !scaleValue.isDisposed()) {
+            scaleValue.removeListener(SWT.Traverse, textListener);
+            scaleValue.removeListener(SWT.FocusOut, textListener);
+        }
+
+        if (check != null && !check.isDisposed()) {
+            check.removeListener(SWT.Selection, checkListener);
+        }
+
+        super.dispose();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.tizen.webuibuilder.ui.views.properties.method.Method#refreshValue(java.lang.String,
+     * java.lang.String)
+     */
+    @Override
+    public void refreshValue(String name, String value) {
+        Control control = getControl();
+        if (control == null || control.isDisposed()) {
+            return;
+        }
+
+        if (value == null) {
+            value = BuilderConstants.EMPTY;
+        }
+
+        super.refreshValue(name, value);
+
+        if (value != null && !value.isEmpty()) {
+            if (value.equals(LayoutSchemaConstants.ALIGN_H_FILL)) {
+                scale.setSelection(0);
+                scaleValue.setText(value);
+                setState(false);
+            } else {
+                Double defaultValue = Double.parseDouble(value);
+                scale.setSelection((int) (defaultValue * 100));
+                scaleValue.setText(value);
+                setState(true);
+            }
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.tizen.webuibuilder.ui.views.properties.method.Method#createControl()
+     */
+    @Override
+    protected Control createControl() {
+        Composite composite = new Composite(this, SWT.NONE);
+        composite.setLayout(new FormLayout());
+
+        /** check */
+        check = new Button(composite, SWT.CHECK);
+        FormData data = new FormData();
+        data = new FormData(20, 15);
+        data.left = new FormAttachment(0, 0);
+        data.top = new FormAttachment(0, 5);
+        check.setLayoutData(data);
+        checkListener = createCheckListener();
+        check.addListener(SWT.Selection, checkListener);
+
+        /** scale */
+        scale = new TizenScale(composite, SWT.HORIZONTAL);
+        data = new FormData();
+        data.left = new FormAttachment(check, 5);
+        data.top = new FormAttachment(0, 0);
+        data.height = 24;
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_LINUX)) {
+            data.right = new FormAttachment(100, -45);
+        } else {
+            data.right = new FormAttachment(100, -40);
+        }
+        scale.setLayoutData(data);
+        listener = createScaleListener();
+        scale.addListener(SWT.MouseUp, listener);
+
+        scale.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent arg0) {
+                String value = String.format("%d", scale.getSelection());
+                String convertedValue = convertIntToDouble(value);
+                scaleValue.setText(convertedValue);
+                modifyValue(convertedValue);
+            }
+        });
+
+        /** scale value */
+        scaleValue = new Text(composite, SWT.CENTER | SWT.BORDER);
+        scaleValue.setTextLimit(4);
+        data = new FormData();
+        data.left = new FormAttachment(scale, 5);
+        data.right = new FormAttachment(100, 0);
+        data.top = new FormAttachment(0);
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_LINUX)) {
+            data.height = 24;
+        }
+
+        scaleValue.setLayoutData(data);
+
+        textListener = createScaleTextListener();
+        scaleValue.addListener(SWT.Traverse, textListener);
+        scaleValue.addListener(SWT.FocusOut, textListener);
+
+        if (getValue().equals(LayoutSchemaConstants.ALIGN_H_FILL)) {
+            setState(false);
+        } else {
+            setState(true);
+        }
+
+        return composite;
+    }
+
+    private Listener createScaleTextListener() {
+        Listener textListener = new Listener() {
+
+            @Override
+            public void handleEvent(Event event) {
+                Text text = (Text) event.widget;
+
+                switch (event.type) {
+                    case SWT.Traverse:
+                        if (event.detail == SWT.TRAVERSE_RETURN) {
+                            setValue(text.getText());
+                            refreshValue(getMethodName(), getValue());
+                        } else if (event.detail == SWT.TRAVERSE_ESCAPE) {
+                            modifyValue(BuilderConstants.EMPTY);
+                            refreshValue(getMethodName(), getValue());
+                        }
+                        break;
+                    case SWT.FocusOut:
+                        setValue(text.getText());
+                        break;
+
+                    default:
+                        break;
+                }
+            }
+        };
+
+        return textListener;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.tizen.webuibuilder.ui.views.properties.method.Method#setConditions(java.util.List)
+     */
+    @Override
+    public void setConditions(List<PropertyConditionDescriptor> conditions) {
+        if (conditions.size() > 0) {
+            if (conditions.get(0).getValue() != null) {
+                scale.setMinimum(Integer.parseInt(conditions.get(0).getValue()) * 100);
+                scale.setMaximum(Integer.parseInt(conditions.get(1).getValue()) * 100);
+                scale.setIncrement(1);
+
+                String value = getValue();
+                if (value == null || value.isEmpty()) {
+                    if (parentDescriptor.getDefaultValue().equals(LayoutSchemaConstants.ALIGN_H_FILL)) {
+                        scale.setSelection(0);
+                        scaleValue.setText(value);
+                    } else {
+                        Double defaultValue = Double.parseDouble(parentDescriptor.getDefaultValue());
+                        scale.setSelection((int) (defaultValue * 100));
+                        scaleValue.setText(parentDescriptor.getDefaultValue());
+                    }
+                } else if (value.equals(LayoutSchemaConstants.ALIGN_H_FILL)) {
+                    scale.setSelection(0);
+                    scaleValue.setText(value);
+                } else {
+                    Double defaultValue = Double.parseDouble(value);
+                    scale.setSelection((int) (defaultValue * 100));
+                    scaleValue.setText(value);
+                }
+            }
+        }
+    }
+
+    /**
+     * This method creates a {@link Listener} for the mouse event at the {@link Scale}.
+     * 
+     * @param target
+     *            own class ({@link Editable})
+     * @return a {@link Listener}
+     */
+    private Listener createScaleListener() {
+        Listener listener = new Listener() {
+
+            @Override
+            public void handleEvent(Event event) {
+                String value = String.format("%d", scale.getSelection());
+                String convertedValue = null;
+
+                switch (event.type) {
+                    case SWT.MouseUp:
+                        convertedValue = convertIntToDouble(value);
+                        scaleValue.setText(convertedValue);
+                        setValue(convertedValue);
+                        break;
+                    default:
+                        break;
+                }
+
+            }
+        };
+
+        return listener;
+    }
+
+    private Listener createCheckListener() {
+        Listener listener = new Listener() {
+
+            @Override
+            public void handleEvent(Event event) {
+                if (check == null || check.isDisposed()) {
+                    return;
+                }
+                String value = null;
+                switch (event.type) {
+                    case SWT.Selection:
+                        if (check.getSelection()) {
+                            value = LayoutSchemaConstants.ALIGN_H_FILL;
+                            setValue(value);
+                            refreshValue(getMethodName(), value);
+                        } else {
+                            value = "0.5";
+                            setValue(value);
+                            refreshValue(getMethodName(), value);
+                        }
+                        break;
+                    default:
+                        break;
+                }
+
+            }
+        };
+
+        return listener;
+    }
+
+    private void setState(Boolean enabled) {
+        check.setSelection(!enabled);
+        scale.setEnabled(enabled);
+        scaleValue.setEnabled(enabled);
+
+        check.setVisible(checkEnabled);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.tizen.webuibuilder.ui.views.properties.method.Method#getControlLayoutData()
+     */
+    @Override
+    protected FormData getControlLayoutData() {
+        FormData data = super.getControlLayoutData();
+
+        data.right = new FormAttachment(80, 0);
+        return data;
+    }
+
+    private String convertIntToDouble(String value) {
+        DecimalFormat format = new DecimalFormat("0.##");
+        return format.format(Double.parseDouble(value) / 100);
+    }
+
+    @Override
+    public void setValue(String value) {
+        if (getValue().equals(value)) {
+            return;
+        }
+        super.setValue(value);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ColorData.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ColorData.java
new file mode 100644 (file)
index 0000000..576345f
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.graphics.RGB;
+
+
+/**
+ * This class creates a color data model that contains Alpha value and {@link RGB} value.
+ */
+public class ColorData {
+
+    private int alphaValue;
+    private RGB rgbValue;
+
+    /**
+     * Construct
+     * 
+     * @param alpha
+     *            alpha value of the {@link ColorData}
+     * @param rgb
+     *            a {@link RGB}
+     */
+    public ColorData(int alpha, RGB rgb) {
+        alphaValue = alpha;
+        rgbValue = rgb;
+    }
+
+    /**
+     * This method returns the alpha value of the {@link ColorData}.
+     * 
+     * @return alpha value of the {@link ColorData}
+     */
+    public int getAlphaValue() {
+        return alphaValue;
+    }
+
+    /**
+     * This method returns the {@link RGB} of the {@link ColorData}.
+     * 
+     * @return a {@link RGB}
+     */
+    public RGB getRGBValue() {
+        return rgbValue;
+    }
+
+    /**
+     * This method set alpha value of the {@link ColorData}.
+     * 
+     * @param value
+     *            new alpha value of the {@link ColorData}
+     */
+    public void setAlphaValue(int value) {
+        alphaValue = value;
+    }
+
+    /**
+     * This method set {@link RGB} value of the {@link ColorData}.
+     * 
+     * @param value
+     *            new {@link RGB}
+     */
+    public void setRGBValue(RGB value) {
+        rgbValue = value;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ColorListEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ColorListEditable.java
new file mode 100644 (file)
index 0000000..68de02b
--- /dev/null
@@ -0,0 +1,341 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.MouseTrackAdapter;
+import org.eclipse.swt.events.MouseTrackListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.common.util.SWTUtil;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.widgets.UIBLabel;
+
+
+public class ColorListEditable extends ColorPickerEditable {
+    private static final String KEY_COLOR_NAME = "color";
+    private static final String KEY_IMAGE = "image";
+
+    private final RGB EMPTYCOLOR = getDisplay().getSystemColor(SWT.COLOR_WHITE).getRGB();
+
+    private List<ConstantDescriptor> items;
+    private Map<String, Composite> colorCompositeMap = new HashMap<String, Composite>();
+    private Map<String, CLabel> colorLabelMap = new HashMap<String, CLabel>();
+    private Map<String, Canvas> colorButtonMap = new HashMap<String, Canvas>();
+    private Map<String, Canvas> resetButtonMap = new HashMap<String, Canvas>();
+    private Map<String, String> currentColorMap = new HashMap<String, String>();
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see Editable
+     */
+    public ColorListEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc,
+            List<ConstantDescriptor> items) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+        this.items = items;
+        Composite control = (Composite) getControl();
+        for (int i = 0; i < items.size(); i++) {
+            String colorName = items.get(i).getValue();
+            colorCompositeMap.put(colorName, createColorComposite(control, colorName));
+        }
+        addListener();
+    }
+
+    @Override
+    public void refreshValue(String name, String value) {
+        if (name.equals(LayoutSchemaConstants.COLORS)) {
+            currentColorMap = PartUtil.getPartColors(value);
+            if (currentColorMap == null) {
+                currentColorMap = new HashMap<String, String>();
+            }
+            for (int i = 0; i < items.size(); i++) {
+                String colorName = items.get(i).getValue();
+                if (currentColorMap.get(colorName) != null) {
+                    resetButtonMap.get(colorName).setVisible(true);
+                } else {
+                    resetButtonMap.get(colorName).setVisible(false);
+                }
+            }
+        } else if (name.equals(LayoutSchemaConstants.STYLE)) {
+            for (int i = 0; i < items.size(); i++) {
+                String styleList = items.get(i).getRequired();
+                CLabel colorLabel = colorLabelMap.get(items.get(i).getValue());
+                if (styleList != null && !styleList.matches("(.*;|)" + value + "(;.*|)")) {
+                    colorLabel.setForeground(ColorResources.PROPERTIES_ATTR_LABEL_DIM);
+                } else {
+                    colorLabel.setForeground(ColorResources.PROPERTIES_ATTR_LABEL);
+                }
+            }
+        }
+        Iterator<Canvas> iterButton = colorButtonMap.values().iterator();
+        while (iterButton.hasNext()) {
+            iterButton.next().redraw();
+        }
+    }
+
+    @Override
+    protected Control createControl() {
+        Composite control = new Composite(this, SWT.NONE);
+        FillLayout layout = new FillLayout();
+        layout.spacing = 10;
+        layout.type = SWT.VERTICAL;
+        control.setLayout(layout);
+        return control;
+    }
+
+    private Composite createColorComposite(Composite control, String colorName) {
+        Composite colorComposite = new Composite(control, SWT.NONE);
+        colorComposite.setLayout(new FormLayout());
+        CLabel label = new UIBLabel(colorComposite, SWT.NONE);
+        label.setText(colorName);
+        FormData formData = new FormData();
+        formData.left = new FormAttachment(0, 0);
+        formData.right = new FormAttachment(55, 0);
+        formData.top = new FormAttachment(0, 0);
+        formData.bottom = new FormAttachment(100, 0);
+        label.setLayoutData(formData);
+        colorLabelMap.put(colorName, label);
+
+        Canvas btnColor = new Canvas(colorComposite, SWT.NONE);
+        formData = new FormData();
+        formData.left = new FormAttachment(label, 5);
+        formData.width = 25;
+        formData.height = 25;
+        formData.bottom = new FormAttachment(100, 0);
+        btnColor.setLayoutData(formData);
+        btnColor.setData(colorName);
+        colorButtonMap.put(colorName, btnColor);
+
+        Canvas btnResetButton = new Canvas(colorComposite, SWT.NONE);
+        formData = new FormData();
+        formData.left = new FormAttachment(btnColor, 10);
+        formData.bottom = new FormAttachment(0, 24);
+        formData.width = 24;
+        formData.height = 24;
+        btnResetButton.setLayoutData(formData);
+        btnResetButton.setData(KEY_COLOR_NAME, colorName);
+        btnResetButton.setData(KEY_IMAGE, ImageResources.getImage(ImageResources.METHOD_COLOR_RESET_NOR));
+        resetButtonMap.put(colorName, btnResetButton);
+
+        return colorComposite;
+    }
+
+    @Override
+    protected FormData getControlLayoutData() {
+        FormData data = new FormData();
+        data.left = new FormAttachment(0, 16);
+        data.right = new FormAttachment(100, 0);
+        return data;
+    }
+
+    @Override
+    public void setEnabled(boolean enabled) {
+        getControl().setEnabled(enabled);
+    }
+
+    @Override
+    public void setValue(String value) {
+        setValue(value, true);
+        canSetValue = false;
+    }
+
+    protected void setCurrentRGB(String hex) {
+        if (!hex.startsWith(BuilderConstants.SHARP)) {
+            hex = BuilderConstants.SHARP + hex;
+        }
+        currentRGB = SWTUtil.convertHexadecimalToRGB(hex);
+        currentColorMap.put((String) colorButton.getData(), hex);
+        isEmptyColor = false;
+    }
+
+    @Override
+    protected String getColorValue(String colorName) {
+        return PartUtil.convertColorMapToPropertyValue(currentColorMap);
+    }
+
+    private void resetColor(String colorName) {
+        currentColorMap.remove(colorName);
+        setValue(getColorValue(null));
+    }
+
+    @Override
+    public void dispose() {
+        removesListeners();
+        closeColorDialog();
+        super.dispose();
+    }
+
+    @Override
+    public void setLabelTooltipText(String tooltip) {
+        // Do nothing
+    }
+
+    /************************************************
+     * Event Listener
+     **********************************************/
+    private void addListener() {
+        for (int i = 0; i < items.size(); i++) {
+            String colorName = items.get(i).getValue();
+            Canvas btnColor = colorButtonMap.get(colorName);
+            btnColor.addPaintListener(btnColorPaintListener);
+            btnColor.addMouseListener(btnColorMouseListener);
+            Canvas btnReset = resetButtonMap.get(colorName);
+            btnReset.addPaintListener(btnResetPaintListener);
+            btnReset.addMouseListener(btnResetMouseListener);
+            btnReset.addMouseTrackListener(btnResetMouseTrackListener);
+        }
+    }
+
+    private void removesListeners() {
+        for (int i = 0; i < items.size(); i++) {
+            String colorName = items.get(i).getValue();
+            Canvas btnColor = colorButtonMap.get(colorName);
+            if (btnColor != null && !btnColor.isDisposed()) {
+                btnColor.removePaintListener(btnColorPaintListener);
+                btnColor.removeMouseListener(btnColorMouseListener);
+            }
+            Canvas btnReset = resetButtonMap.get(colorName);
+            if (btnReset != null && !btnReset.isDisposed()) {
+                btnReset.removePaintListener(btnResetPaintListener);
+                btnReset.removeMouseListener(btnResetMouseListener);
+                btnReset.removeMouseTrackListener(btnResetMouseTrackListener);
+            }
+        }
+    }
+
+    private MouseListener btnColorMouseListener = new MouseAdapter() {
+        @Override
+        public void mouseUp(MouseEvent e) {
+            if (colorDialog != null && !colorDialog.isDisposed()) {
+                closeColorDialog();
+            }
+            colorButton = (Canvas) e.widget;
+            String color = currentColorMap.get(colorButton.getData());
+            currentRGB = (color == null) ? EMPTYCOLOR : SWTUtil.convertHexadecimalToRGB(color);
+            createColorDialog();
+            openColorDialog();
+        }
+    };
+
+    private PaintListener btnColorPaintListener = new PaintListener() {
+        @Override
+        public void paintControl(PaintEvent e) {
+            Canvas colorButton = (Canvas) (e.widget);
+            String colorName = (String) colorButton.getData();
+            RGB currentRGB = (currentColorMap.get(colorName) == null) ? EMPTYCOLOR : SWTUtil.convertHexadecimalToRGB(currentColorMap.get(colorName));
+
+            Rectangle rect = colorButton.getClientArea();
+            e.gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_GRAY));
+            e.gc.drawRectangle(rect.x, rect.y, rect.width - 1, rect.height - 1);
+            Color color = new Color(e.display, currentRGB.red, currentRGB.green, currentRGB.blue);
+            e.gc.setBackground(color);
+            e.gc.fillRectangle(rect.x + 1, rect.y + 1, rect.width - 2, rect.height - 2);
+            color.dispose();
+            e.gc.dispose();
+        }
+    };
+
+    private PaintListener btnResetPaintListener = new PaintListener() {
+        @Override
+        public void paintControl(PaintEvent e) {
+            Image image = (Image) (e.widget).getData(KEY_IMAGE);
+            e.gc.drawImage(image, 0, 0);
+        }
+    };
+
+    private MouseListener btnResetMouseListener = new MouseAdapter() {
+        @Override
+        public void mouseUp(MouseEvent e) {
+            Canvas btnReset = (Canvas) e.widget;
+            btnReset.setData(KEY_IMAGE, ImageResources.getImage(ImageResources.METHOD_COLOR_RESET_NOR));
+            String colorName = (String) btnReset.getData(KEY_COLOR_NAME);
+            resetColor(colorName);
+        }
+
+        @Override
+        public void mouseDown(MouseEvent e) {
+            Canvas btnReset = (Canvas) e.widget;
+            btnReset.setData(KEY_IMAGE, ImageResources.getImage(ImageResources.METHOD_COLOR_RESET_SEL));
+            btnReset.redraw();
+        }
+    };
+
+    private MouseTrackListener btnResetMouseTrackListener = new MouseTrackAdapter() {
+        @Override
+        public void mouseEnter(MouseEvent e) {
+            Canvas btnReset = (Canvas) e.widget;
+            btnReset.setData(KEY_IMAGE, ImageResources.getImage(ImageResources.METHOD_COLOR_RESET_MV));
+            btnReset.redraw();
+        }
+
+        @Override
+        public void mouseExit(MouseEvent e) {
+            Canvas btnReset = (Canvas) e.widget;
+            btnReset.setData(KEY_IMAGE, ImageResources.getImage(ImageResources.METHOD_COLOR_RESET_NOR));
+            btnReset.redraw();
+        }
+    };
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ColorPickerEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ColorPickerEditable.java
new file mode 100644 (file)
index 0000000..146cf4f
--- /dev/null
@@ -0,0 +1,385 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.browser.BrowserFunction;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.ui.dialog.ColorPickerDialog;
+import org.tizen.common.util.BrowserWrapper;
+import org.tizen.common.util.SWTUtil;
+import org.tizen.efluibuilder.BuilderConstants;
+
+
+public class ColorPickerEditable extends Editable {
+
+    private Logger logger = LoggerFactory.getLogger(ColorPickerEditable.class);
+
+    // Control
+    protected Canvas colorButton;
+    protected RGB currentRGB;
+
+    // ColorPickerDialog
+    protected static int COLOR_DIALOG_WIDTH = 360;
+    protected static int COLOR_DIALOG_HEIGHT = 180;
+    protected static int COLOR_DIALOG_X_MARGIN = 30;
+    protected static int COLOR_DIALOG_Y_MARGIN = 30;
+    protected static String COLOR_PREFIX_FOR_URL = "?color="; //$NON-NLS-1$
+
+    protected Shell colorDialog;
+    protected BrowserWrapper browserWrapper;
+    protected boolean canSetValue = false;
+    protected boolean isEmptyColor = true;
+
+    // Listeners
+    private Listener dialogListener = new Listener() {
+
+        @Override
+        public void handleEvent(Event event) {
+            if (colorDialog == null || colorDialog.isDisposed()) {
+                return;
+            }
+            switch (event.type) {
+                case SWT.Activate:
+                    logger.debug("ColorPickerDialog activated");
+                    break;
+                case SWT.Deactivate:
+                    logger.debug("ColorPickerDialog deactivated");
+                    if (canSetValue) {
+                        String color = SWTUtil.convertRGBToHexadecimal(currentRGB);
+                        setValue(getColorValue(color));
+                    }
+                    closeColorDialog();
+                    break;
+                case SWT.MouseUp:
+                    canSetValue = true;
+                    break;
+                default:
+                    break;
+            }
+
+        }
+    };
+    private PaintListener paintListener = new PaintListener() {
+
+        @Override
+        public void paintControl(PaintEvent e) {
+            if (currentRGB == null) {
+                resetCurrentRGB();
+            }
+            e.gc.setBackground(new Color(e.display, currentRGB.red, currentRGB.green, currentRGB.blue));
+            // e.gc.setAlpha(userAlpha);
+            Rectangle rect = colorButton.getClientArea();
+
+            e.gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_GRAY));
+            e.gc.drawRectangle(rect.x, rect.y, rect.width - 1, rect.height - 1);
+            e.gc.setBackground(new Color(e.display, currentRGB.red, currentRGB.green, currentRGB.blue));
+            e.gc.fillRectangle(rect.x + 1, rect.y + 1, rect.width - 2, rect.height - 2);
+
+            e.gc.dispose();
+        }
+    };
+
+    private MouseListener mouseListener = new MouseListener() {
+
+        @Override
+        public void mouseUp(MouseEvent e) {
+            if (colorDialog != null && !colorDialog.isDisposed()) {
+                closeColorDialog();
+            }
+            createColorDialog();
+            openColorDialog();
+        }
+
+        @Override
+        public void mouseDown(MouseEvent e) {
+            // TODO Auto-generated method stub
+
+        }
+
+        @Override
+        public void mouseDoubleClick(MouseEvent e) {
+            // TODO Auto-generated method stub
+
+        }
+    };
+
+    private Listener displayListener = new Listener() {
+
+        @Override
+        public void handleEvent(Event arg0) {
+            switch (arg0.type) {
+                case SWT.MouseDown:
+                    if (colorDialog != null && !colorDialog.isDisposed()) {
+                        Rectangle rec = colorDialog.getBounds();
+                        Point pt = colorDialog.toControl(Display.getDefault().getCursorLocation());
+
+                        if (pt.x < 0 || pt.x > rec.width || pt.y < 0 || pt.y > rec.height) {
+                            if (canSetValue) {
+                                String color = SWTUtil.convertRGBToHexadecimal(currentRGB);
+                                setValue(getColorValue(color));
+                            }
+                            closeColorDialog();
+                        }
+                    }
+                    break;
+            }
+        }
+    };
+
+    private class ColorFunction extends BrowserFunction {
+        ColorFunction(Browser browser) {
+            super(browser, ColorPickerDialog.GET_COLOR_FUNCTION);
+        }
+
+        public Object function(Object[] arguments) {
+            if (arguments.length > 0 && (arguments[0] instanceof String)) {
+                String hex = (String) arguments[0];
+                StringBuilder builder = new StringBuilder(BuilderConstants.SHARP);
+                builder.append(hex);
+                modifyValue(builder.toString());
+                setCurrentRGB(hex);
+                colorButton.redraw();
+            }
+            return null;
+        }
+
+    }
+
+    /**
+     * Construct
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     */
+    public ColorPickerEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+        Color defaultColor = getDisplay().getSystemColor(SWT.COLOR_WHITE);
+        setCurrentRGB(defaultColor);
+        isEmptyColor = true;
+        addListeners();
+    }
+
+    @Override
+    protected Control createControl() {
+        Composite composite = new Composite(this, SWT.NONE);
+        composite.setLayout(new FormLayout());
+        colorButton = new Canvas(composite, SWT.NONE);
+        FormData data = new FormData(25, 25);
+        // data.left = new FormAttachment(0, 0);
+        // data.top = new FormAttachment(10, 0);
+        // data.bottom = new FormAttachment(90, 0);
+        colorButton.setLayoutData(data);
+        resetCurrentRGB();
+
+        return composite;
+    }
+
+    @Override
+    public void refreshValue(String name, String value) {
+        super.refreshValue(name, value);
+        if (colorButton != null) {
+            if (value == null || value.isEmpty()) {
+                resetCurrentRGB();
+            } else {
+                setCurrentRGB(value);
+            }
+
+            colorButton.redraw();
+        }
+    }
+
+    @Override
+    public void setValue(String value) {
+        if (value == null || value.isEmpty()) {
+            resetCurrentRGB();
+            super.setValue(BuilderConstants.EMPTY);
+        } else {
+            setCurrentRGB(value);
+            super.setValue(value);
+        }
+        canSetValue = false;
+    }
+
+    private void addListeners() {
+        if (colorButton != null) {
+            colorButton.addPaintListener(paintListener);
+            colorButton.addMouseListener(mouseListener);
+        }
+
+    }
+
+    private void removesListeners() {
+        if (colorButton != null && !colorButton.isDisposed()) {
+            colorButton.removePaintListener(paintListener);
+            colorButton.removeMouseListener(mouseListener);
+        }
+
+    }
+
+    @Override
+    public void dispose() {
+        removesListeners();
+        closeColorDialog();
+        super.dispose();
+    }
+
+    protected void resetCurrentRGB() {
+        Color defaultColor = getDisplay().getSystemColor(SWT.COLOR_WHITE);
+        setCurrentRGB(defaultColor);
+        isEmptyColor = true;
+    }
+
+    protected void setCurrentRGB(String hex) {
+        if (!hex.startsWith(BuilderConstants.SHARP)) {
+            hex = BuilderConstants.SHARP + hex;
+        }
+        currentRGB = SWTUtil.convertHexadecimalToRGB(hex);
+        isEmptyColor = false;
+    }
+
+    private void setCurrentRGB(Color color) {
+        currentRGB = new RGB(color.getRed(), color.getGreen(), color.getBlue());
+        isEmptyColor = false;
+    }
+
+    protected Canvas getColorButton() {
+        return colorButton;
+    }
+
+    protected RGB getCurrentRGB() {
+        return currentRGB;
+    }
+
+    protected void createColorDialog() {
+        colorDialog = new Shell(getShell(), SWT.NO_TRIM | SWT.ON_TOP);
+        colorDialog.setLayout(new FillLayout());
+        // shell.setLocation(100, 100);
+        Point ll = colorButton.getLocation();
+        Point ls = colorButton.getSize();
+        Rectangle sRect = getShell().getBounds();
+
+        Point location = colorButton.toDisplay(ll.x, ll.y + ls.y);
+        if (sRect.x + sRect.width - location.x < COLOR_DIALOG_WIDTH) {
+            location.x = sRect.x + sRect.width - COLOR_DIALOG_WIDTH - COLOR_DIALOG_X_MARGIN;
+        }
+
+        if (sRect.y + sRect.height - location.y < COLOR_DIALOG_HEIGHT) {
+            location.y = location.y - COLOR_DIALOG_HEIGHT - COLOR_DIALOG_Y_MARGIN;
+        }
+
+        colorDialog.setLocation(location);
+        colorDialog.setSize(COLOR_DIALOG_WIDTH, COLOR_DIALOG_HEIGHT);
+        browserWrapper = new BrowserWrapper(ColorPickerDialog.createBrowser(colorDialog));
+
+        StringBuilder urlBuilder = new StringBuilder();
+        urlBuilder.append(ColorPickerDialog.getColorPickerURL());
+        String color = SWTUtil.convertRGBToHexadecimal(currentRGB);
+
+        urlBuilder.append(COLOR_PREFIX_FOR_URL + color);
+        final String url = urlBuilder.toString();
+
+        // reset browser
+        browserWrapper.setText(BuilderConstants.EMPTY);
+        browserWrapper.setUrl(url);
+
+        new ColorFunction(browserWrapper.getBrowser());
+
+        colorDialog.addListener(SWT.Activate, dialogListener);
+        colorDialog.addListener(SWT.Deactivate, dialogListener);
+        browserWrapper.getBrowser().addListener(SWT.MouseUp, dialogListener);
+
+        Display.getDefault().addFilter(SWT.MouseDown, displayListener);
+    }
+
+    protected void closeColorDialog() {
+        if (colorDialog == null || colorDialog.isDisposed()) {
+            return;
+        } else {
+            colorDialog.removeListener(SWT.Activate, dialogListener);
+            colorDialog.removeListener(SWT.Deactivate, dialogListener);
+            browserWrapper.getBrowser().removeListener(SWT.MouseUp, dialogListener);
+
+            Display.getDefault().removeFilter(SWT.MouseDown, displayListener);
+
+            browserWrapper.dispose();
+            colorDialog.close();
+            canSetValue = false;
+        }
+    }
+
+    protected void openColorDialog() {
+        if (colorDialog == null || colorDialog.isDisposed()) {
+            return;
+        } else {
+            colorDialog.open();
+        }
+    }
+
+    @Override
+    public void setLabelTooltipText(String tooltip) {
+        if (checkControl(getLabel())) {
+            getLabel().setToolTipText(tooltip);
+        } else {
+            colorButton.setToolTipText(tooltip);
+        }
+    }
+
+    protected String getColorValue(String color) {
+        return color;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ComboEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ComboEditable.java
new file mode 100644 (file)
index 0000000..43eaeae
--- /dev/null
@@ -0,0 +1,207 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+
+
+/**
+ * A ComboMethod for ENUM type in the {@link TypeDescriptor.Types}
+ */
+public class ComboEditable extends Editable {
+
+    private List<ConstantDescriptor> items = null;
+    private SelectionAdapter comboListener = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            Combo combo = (Combo) getControl();
+            int index = combo.getSelectionIndex();
+            ConstantDescriptor descriptor = items.get(index);
+            /*
+             * This comments to solve the problem that if the value is empty string for
+             * efl.icon@standardicon, display name that is a value.
+             * 
+             * It means display name should not be a value.
+             */
+
+            // if (!descriptor.getValue().isEmpty()) {
+            setValue(descriptor.getValue());
+            // } else {
+            // setValue(descriptor.getDisplayName());
+            // }
+
+        }
+    };
+
+    /**
+     * Constructor.
+     * 
+     * @see Editable
+     */
+    public ComboEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+    }
+
+    @Override
+    protected Control createControl() {
+        Combo combo = new Combo(this, SWT.READ_ONLY | SWT.DROP_DOWN);
+        return combo;
+    }
+
+    @Override
+    public void dispose() {
+        Combo combo = (Combo) getControl();
+        if (combo != null && !combo.isDisposed()) {
+            combo.removeSelectionListener(comboListener);
+        }
+
+        super.dispose();
+    }
+
+    /**
+     * Sets items for combo.
+     * 
+     * @param items
+     *            list of {@link ConstantDescriptor}
+     */
+    public void setItems(List<ConstantDescriptor> items) {
+        if (getControl().isDisposed()) {
+            logger.error("Control is disposed");
+            return;
+        }
+
+        this.items = items;
+        List<String> texts = new ArrayList<String>();
+        for (ConstantDescriptor item : items) {
+            texts.add(item.getDisplayName());
+        }
+        String[] names = texts.toArray(new String[0]);
+
+        Combo combo = (Combo) getControl();
+        combo.setItems(names);
+        if (names.length == 0) {
+            combo.setEnabled(false);
+        }
+        // selection
+        String value = getValue();
+        if (value.equals(BuilderConstants.EMPTY)) {
+            combo.select(0);
+        } else {
+            int index = getIndex(value);
+            combo.select(index);
+        }
+        combo.addSelectionListener(comboListener);
+    }
+
+    /**
+     * Gets index by value
+     * 
+     * @param value
+     * @return index of value.
+     */
+    public int getIndex(String value) {
+        List<ConstantDescriptor> items = getComboItems();
+        Assert.notNull(items);
+        for (int i = 0; i < items.size(); i++) {
+            ConstantDescriptor descriptor = items.get(i);
+            if (value.equals(descriptor.getValue())) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    protected List<ConstantDescriptor> getComboItems() {
+        return items;
+    }
+
+    protected FormData getControlLayoutData() {
+        FormData data = super.getControlLayoutData();
+        data.bottom = new FormAttachment(100, 0);
+        data.height = 25;
+        return data;
+    }
+
+    @Override
+    public void refreshValue(String name, String value) {
+        Combo combo = (Combo) getControl();
+        int index = -1;
+        for (int i = 0; i < items.size(); i++) {
+            if (items.get(i).getValue().equals(value)) {
+                index = i;
+                break;
+            }
+        }
+        if (index != -1) {
+            combo.select(index);
+        }
+        super.refreshValue(name, value);
+    }
+
+    public void resetItems(List<ConstantDescriptor> items) {
+        if (getControl().isDisposed()) {
+            logger.error("Control is disposed");
+            return;
+        }
+
+        this.items = items;
+        List<String> texts = new ArrayList<String>();
+        for (ConstantDescriptor item : items) {
+            texts.add(item.getDisplayName());
+        }
+        String[] names = texts.toArray(new String[0]);
+
+        Combo combo = (Combo) getControl();
+        combo.removeAll();
+        if (names.length == 0) {
+            combo.setEnabled(false);
+            return;
+        }
+        combo.setEnabled(true);
+        combo.setItems(names);
+        // selection
+        String value = getValue();
+        if (value.equals(BuilderConstants.EMPTY)) {
+            combo.select(0);
+        } else {
+            int index = getIndex(value);
+            combo.select(index);
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/DoubleEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/DoubleEditable.java
new file mode 100644 (file)
index 0000000..2951113
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * A IntegerMethod for INTEGER type property.
+ */
+public class DoubleEditable extends TextEditable {
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see Editable
+     */
+    public DoubleEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+
+        super(parent, style, type, name, value, displayName, hasFunc);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/Editable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/Editable.java
new file mode 100644 (file)
index 0000000..440b5da
--- /dev/null
@@ -0,0 +1,737 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.ToolTip;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.PropertyConditionDescriptor;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+
+
+/**
+ * Method used on {@link PropertiesTabItem}.
+ */
+public abstract class Editable extends Composite {
+    protected Logger logger = LoggerFactory.getLogger(Editable.class);
+
+    public enum MethodType {
+        ATTRIBUTE, EVENT_HANDLER, STYLE, ACTION, ANIMATION
+    }
+
+    private MethodType type;
+    private String name;
+    private String value;
+    private String displayName;
+    private String defaultValue;
+
+    private Label funcButton;
+    private MenuItem menuItem;
+    private MenuItem menuItemCreateFrame;
+    private boolean enableReset = false;
+    private boolean enableControl = true;
+    private CLabel label;
+    private Control control;
+
+    private ToolTip tooltip;
+    private List<PropertyConditionDescriptor> conditions = new ArrayList<PropertyConditionDescriptor>();
+
+    private IValueChangeListener listener;
+
+    private boolean first = true;
+
+    /**
+     * Constructs a new instance of this class given its parent and style value. And MethodType,
+     * property name, property value, diplay name, has function button value.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     */
+    public Editable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+        super(parent, style);
+
+        setFields(type, name, value, displayName);
+        init(hasFunc);
+    }
+
+    private void setFields(MethodType type, String name, String value, String displayName) {
+        if (value == null) {
+            value = BuilderConstants.EMPTY;
+        }
+        this.type = type;
+        this.name = name;
+        this.value = value;
+        this.displayName = displayName;
+    }
+
+    @Override
+    public void dispose() {
+        if (tooltip != null) {
+            tooltip.dispose();
+            tooltip = null;
+        }
+        super.dispose();
+    }
+
+    private void init(boolean hasFunc) {
+        setMethodLayout();
+
+        if (hasFunc) {
+            funcButton = createFuncButton();
+        }
+
+        label = createLabel();
+        control = createControl();
+
+        if (checkControl(funcButton)) {
+            funcButton.setLayoutData(getFuncLayoutData());
+        }
+
+        if (checkControl(control)) {
+            control.setLayoutData(getControlLayoutData());
+        }
+
+        if (checkControl(label)) {
+            label.setLayoutData(getLabelLayoutData());
+        }
+
+    }
+
+    private Label createFuncButton() {
+        final Label button = new Label(this, SWT.NONE);
+        Image image = ImageResources.getImage(ImageResources.METHOD_RESET);
+        button.setImage(image);
+        button.setToolTipText(getMenuTooltip());
+
+        // TODO : read model.
+        button.setEnabled(false);
+
+        final Menu menu = new Menu(button.getShell());
+
+        menuItem = createMenuItems(menu);
+        if (getType() == MethodType.STYLE) {
+            menuItemCreateFrame = createMenuItem_CreateFrame(menu);
+            // menuItemCreateFrame.setEnabled(false);
+        }
+
+        button.addMouseListener(new MouseListener() {
+
+            @Override
+            public void mouseUp(MouseEvent e) {
+                Rectangle rect = button.getBounds();
+                Point menuLocation = button.toDisplay(rect.x, rect.height);
+
+                menu.setLocation(menuLocation);
+                menu.setVisible(true);
+
+            }
+
+            @Override
+            public void mouseDown(MouseEvent e) {
+
+            }
+
+            @Override
+            public void mouseDoubleClick(MouseEvent e) {
+
+            }
+        });
+
+        return button;
+    }
+
+    /**
+     * Gets tool tip message of function button.
+     * 
+     * @return tool tip message. Default "Reset default value"
+     */
+    protected String getMenuTooltip() {
+        return PropertiesConstant.PROPERTY_RESET_TOOLTIP;
+    }
+
+    /**
+     * Creates menu item.
+     * 
+     * @param menu
+     *            a {@link Menu} which will be the parent of the new instance (cannot be null)
+     * @return a {@link MenuItem}
+     */
+    protected MenuItem createMenuItems(Menu menu) {
+        MenuItem menuItem = new MenuItem(menu, SWT.NONE);
+        menuItem.setText(PropertiesConstant.PROPERTY_RESET);
+        return menuItem;
+    }
+
+    /**
+     * Creates menu item for Animator.
+     * 
+     * @param menu
+     *            a {@link Menu} which will be the parent of the new instance (cannot be null)
+     * @return a {@link MenuItem}
+     */
+    protected MenuItem createMenuItem_CreateFrame(Menu menu) {
+        MenuItem menuItem = new MenuItem(menu, SWT.NONE);
+        menuItem.setText("Create Frame");
+        return menuItem;
+    }
+
+    /**
+     * Adds the selection listener to the menu item who will be notified when the menu item is
+     * selected by the user.
+     * 
+     * @param listener
+     *            a {@link SelectionAdapter}
+     */
+    public void addMenuListener(SelectionAdapter listener) {
+        if (menuItem != null) {
+            menuItem.addSelectionListener(listener);
+        }
+    }
+
+    /**
+     * Adds the selection listener to the animator menu item who will be notified when the menu item
+     * is selected by the user.
+     * 
+     * @param listener
+     *            a {@link SelectionAdapter}
+     */
+    public void addCreateFrameMenuListener(SelectionAdapter listener) {
+        if (menuItemCreateFrame != null) {
+            menuItemCreateFrame.setEnabled(true);
+            menuItemCreateFrame.addSelectionListener(listener);
+        }
+    }
+
+    private void setMethodLayout() {
+        FormLayout layout = new FormLayout();
+        setLayout(layout);
+    }
+
+    /**
+     * Gets the {@link FormData} for function button.
+     * 
+     * @return the new {@link FormData}
+     */
+    protected FormData getFuncLayoutData() {
+        FormData data = new FormData();
+
+        data.top = new FormAttachment(0, 0);
+        data.bottom = new FormAttachment(100, 0);
+        data.left = new FormAttachment(0, 10);
+        data.right = new FormAttachment(0, 20);
+        return data;
+    }
+
+    /**
+     * Gets the {@link FormData} for label
+     * 
+     * @return the new {@link FormData}
+     */
+    protected FormData getLabelLayoutData() {
+        FormData data = new FormData();
+        data.right = new FormAttachment(25, 0);
+        data.top = new FormAttachment(0, 0);
+        data.bottom = new FormAttachment(100, 0);
+        if (checkControl(funcButton)) {
+            data.left = new FormAttachment(funcButton, 5);
+        } else {
+            data.left = new FormAttachment(0, 15);
+        }
+        return data;
+    }
+
+    /**
+     * Gets the {@link FormData} for control.
+     * 
+     * @return the new {@link FormData}
+     */
+    protected FormData getControlLayoutData() {
+        FormData data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.bottom = new FormAttachment(100, 0);
+
+        if (checkControl(label)) {
+            data.left = new FormAttachment(label, 0);
+        } else {
+            data.left = new FormAttachment(0, 0);
+        }
+        data.width = 200;
+        return data;
+    }
+
+    /**
+     * Sets label width.
+     * 
+     * @param numerator
+     *            the percentage of the position
+     * @param offset
+     *            the offset of the side from the position
+     */
+    public void setLabelRightData(int numerator, int offset) {
+        if (!checkControl(label)) {
+            return;
+        }
+        FormData data = getLabelLayoutData();
+        data.right = new FormAttachment(numerator, offset);
+
+        label.setLayoutData(data);
+    }
+
+    /**
+     * Sets control width.
+     * 
+     * @param numerator
+     *            the percentage of the position
+     * @param offset
+     *            the offset of the side from the position
+     */
+    public void setControlRightData(int numerator, int offset) {
+        if (!checkControl(control)) {
+            return;
+        }
+
+        FormData data = getControlLayoutData();
+        data.right = new FormAttachment(numerator, offset);
+
+        control.setLayoutData(data);
+    }
+
+    private CLabel createLabel() {
+        if (displayName == null || displayName.isEmpty()) {
+            return null;
+        }
+
+        CLabel label = EditableUtil.createCLabel(this, displayName);
+
+        return label;
+    }
+
+    /**
+     * Returns the SWT control for this {@link Editable}.
+     * 
+     * @return the SWT control for this {@link Editable}, or <code>null</code> if this {@link Editable}
+     *         does not have a control
+     */
+    public Control getControl() {
+        return control;
+    }
+
+    /**
+     * Returns the label for this {@link Editable}.
+     * 
+     * @return the label for this {@link Editable}, or <code>null</code> if this {@link Editable} does
+     *         not have a label
+     */
+    public CLabel getLabel() {
+        return label;
+    }
+
+    /**
+     * Gets a method name.
+     * 
+     * @return a method name
+     */
+    public String getMethodName() {
+        return name;
+    }
+
+    /**
+     * Gets a value of this {@link Editable}.
+     * 
+     * @return a value
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Gets a display name of this {@link Editable}.
+     * 
+     * @return a display name
+     */
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    /**
+     * Creates the SWT control for this {@link Editable} under the parent control.
+     * 
+     * @return new SWT control
+     */
+    abstract protected Control createControl();
+
+    /**
+     * Refreshes the value.
+     * 
+     * @param name
+     *            the {@link Editable} name
+     * @param value
+     *            the new value
+     */
+    public void refreshValue(String name, String value) {
+        this.value = value;
+    }
+
+    @Override
+    public void setEnabled(boolean enabled) {
+        super.setEnabled(enabled);
+
+        if (funcButton != null && !funcButton.isDisposed()) {
+            funcButton.setEnabled(enableReset & enabled);
+        }
+
+        CLabel label = getLabel();
+        if (label != null && !label.isDisposed()) {
+            label.setEnabled(enabled);
+        }
+
+        setControlable(enabled);
+        // Control control = getControl();
+        // if (control != null && !control.isDisposed()) {
+        // control.setEnabled(enabled);
+        // }
+    }
+
+    /**
+     * Sets tool tip text to the label of {@link Editable}.
+     * 
+     * @param tooltip
+     *            the tool tip text
+     */
+    public void setLabelTooltipText(String tooltip) {
+        if (checkControl(label)) {
+            label.setToolTipText(tooltip);
+        } else {
+            control.setToolTipText(tooltip);
+        }
+
+    }
+
+    /**
+     * Shows error message to the control of {@link Editable}.
+     * 
+     * @param text
+     *            the error message
+     */
+    public void showErrorToolTip(String text) {
+        tooltip = new ToolTip(getShell(), SWT.ICON_WARNING | SWT.BALLOON);
+        tooltip.setText(text);
+
+        Point location = control.toDisplay(control.getSize().x, control.getSize().y);
+
+        tooltip.setLocation(location.x - control.getSize().x + control.getBorderWidth(), location.y - control.getBorderWidth());
+        tooltip.setVisible(true);
+
+        Timer timer = new Timer();
+        TimerTask timerTask = new TimerTask() {
+            @Override
+            public void run() {
+                Display.getDefault().asyncExec(new Runnable() {
+
+                    @Override
+                    public void run() {
+                        hideErrorTooltip();
+                    }
+                });
+            }
+        };
+
+        timer.schedule(timerTask, 2000);
+        //
+        // control.addFocusListener(new FocusListener() {
+        //
+        // @Override
+        // public void focusLost(FocusEvent e) {
+        // if (tooltip != null) {
+        // Timer timer = new Timer();
+        // TimerTask timerTask = new TimerTask() {
+        // @Override
+        // public void run() {
+        // Display.getDefault().asyncExec(new Runnable() {
+        //
+        // @Override
+        // public void run() {
+        // hideErrorTooltip();
+        // }
+        // });
+        // }
+        // };
+        //
+        // timer.schedule(timerTask, 2000);
+        // }
+        // }
+        //
+        // @Override
+        // public void focusGained(FocusEvent e) {
+        // // Do nothing
+        // }
+        // });
+    }
+
+    /**
+     * Hides error message on the control of {@link Editable}.
+     */
+    public void hideErrorTooltip() {
+        if (tooltip != null && !tooltip.isDisposed()) {
+            tooltip.setVisible(false);
+            tooltip.dispose();
+            tooltip = null;
+        }
+    }
+
+    /**
+     * Sets conditions.
+     * 
+     * @param conditions
+     *            list of {@link PropertyConditionDescriptor}
+     */
+    public void setConditions(List<PropertyConditionDescriptor> conditions) {
+        this.conditions = conditions;
+    }
+
+    /**
+     * Gets conditions.
+     * 
+     * @return list of {@link PropertyConditionDescriptor}
+     */
+    public List<PropertyConditionDescriptor> getConditions() {
+        return conditions;
+    }
+
+    /**
+     * Enables the function button if the argument is <code>true</code>, and disables it otherwise.
+     * A disabled function button is typically not selectable from the user interface and draws with
+     * an inactive or "grayed" look.
+     * 
+     * @param enable
+     */
+    public void enableFuncButton(boolean enable) {
+        if (funcButton != null && !funcButton.isDisposed()) {
+            funcButton.setEnabled(enable);
+            enableReset = enable;
+        }
+    }
+
+    /**
+     * Gets a function button.
+     * 
+     * @return a function button. It's SWT {@link Label}.
+     */
+    protected Label getFuncButton() {
+        return funcButton;
+    }
+
+    /**
+     * Returns <code>false</code> if the widget has been disposed or null, and <code>true</code>
+     * otherwise.
+     * 
+     * @param control
+     * @return
+     */
+    protected boolean checkControl(Control control) {
+        if (control != null && !control.isDisposed()) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * Sets the default value.
+     * 
+     * @param defaultValue
+     *            the default value
+     */
+    public void setDefaultValue(String defaultValue) {
+        this.defaultValue = defaultValue;
+    }
+
+    /**
+     * Gets the default value.
+     * 
+     * @return the default value of this {@link Editable}
+     */
+    public String getDefaultValue() {
+        return defaultValue == null ? BuilderConstants.EMPTY : defaultValue;
+    }
+
+    /**
+     * Refreshes the this {@link Editable}
+     */
+    public void refresh() {
+        refreshValue(name, value);
+    }
+
+    /**
+     * Sets a {@link IValueChangeListener} who will be notified when the value is changed by the
+     * user.
+     * 
+     * @param listener
+     *            a {@link IValueChangeListener}
+     */
+    public void setValueChangedListener(IValueChangeListener listener) {
+        this.listener = listener;
+    }
+
+    /**
+     * Gets a {@link IValueChangeListener} of this {@link Editable}.
+     * 
+     * @return a {@link IValueChangeListener}
+     */
+    public IValueChangeListener getValueChangedListener() {
+        return listener;
+    }
+
+    /**
+     * Sets the value to the {@link Editable} by the argument.
+     * 
+     * @param value
+     *            the new value
+     */
+    public void setValue(String value) {
+        setValue(value, true);
+    }
+
+    /**
+     * Sets the value to the {@link Editable} by the value argument.
+     * 
+     * @param value
+     *            the new value
+     * @param undoable
+     *            whether undo is possible
+     */
+    public void setValue(String value, boolean undoable) {
+        if (getValue().equals(value)) {
+            return;
+        }
+        this.value = value;
+        if (!first) {
+            modifyValue(BuilderConstants.EMPTY);
+            first = false;
+        }
+
+        hideErrorTooltip();
+
+        IValueChangeListener listener = getValueChangedListener();
+
+        if (listener != null) {
+            listener.valueChanged(new EditableEvent(this, getMethodName(), value, undoable));
+        }
+    }
+
+    public void modifyValue(String value) {
+        modifyValue(getMethodName(), value);
+    }
+
+    public void modifyValue(String key, String value) {
+        IValueChangeListener listener = getValueChangedListener();
+
+        if (listener != null) {
+            listener.valueModified(new EditableEvent(this, key, value));
+        }
+    }
+
+    /**
+     * Gets the {@link MethodType} of this {@link Editable}
+     * 
+     * @return
+     */
+    public MethodType getType() {
+        return type;
+    }
+
+    /**
+     * Enables the SWT control of this {@link Editable} if the argument is <code>true</code>, and
+     * disables it otherwise
+     * 
+     * @param controlable
+     *            the new enable state
+     */
+    public void setControlable(boolean controlable) {
+        // Because the control fixed with enableControl.
+        if (!enableControl) {
+            controlable = enableControl;
+        }
+
+        Control control = getControl();
+        if (control instanceof Composite) {
+            Composite composite = (Composite) control;
+            composite.setEnabled(controlable);
+            Control[] children = composite.getChildren();
+            for (Control child : children) {
+                child.setEnabled(controlable);
+            }
+        } else {
+            control.setEnabled(controlable);
+        }
+    }
+
+    public void fixEnableOfControl(boolean enable) {
+        enableControl = enable;
+        setControlable(enable);
+    }
+
+    @Override
+    public String toString() {
+        return getClass().getSimpleName() + " " + getMethodName();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EditableCreationFactory.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EditableCreationFactory.java
new file mode 100644 (file)
index 0000000..86f2416
--- /dev/null
@@ -0,0 +1,263 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor.Types;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.ModelConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+import org.tizen.efluibuilder.ui.views.properties.method.Editable.MethodType;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleEDJManager;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleEditMethod;
+
+
+/**
+ * A factory class for method create.
+ */
+public final class EditableCreationFactory {
+
+    private Part model = null;
+    private String projectVersion = null;
+    private static EditableCreationFactory instance = null;
+
+    private EditableCreationFactory() {
+    }
+
+    /**
+     * Gets a {@link EditableCreationFactory}.
+     * 
+     * @return a {@link EditableCreationFactory}
+     */
+    public static EditableCreationFactory getInstance() {
+        if (instance == null) {
+            instance = new EditableCreationFactory();
+        }
+        return instance;
+    }
+
+    /**
+     * Sets a {@link Part}
+     * 
+     * @param model
+     *            a {@link Part}
+     */
+    public void setModel(Part model) {
+        this.model = model;
+    }
+
+    public void setProjectVersion(String version) {
+        this.projectVersion = version;
+    }
+
+    /**
+     * Creates a new {@link Editable} given its parent and {@link PropertyDescriptor}, method type,
+     * has function button.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param property
+     *            a {@link PropertyDescriptor}
+     * @param value
+     *            property value
+     * @param methodType
+     *            a {@link MethodType}
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @return
+     */
+    public Editable createMethod(Composite parent, PropertyDescriptor property, String value, MethodType methodType, boolean hasFunc) {
+        Editable method = null;
+        TypeDescriptor descriptor = property.getTypeDescriptor();
+        if (descriptor == null) {
+            return null;
+        }
+
+        Types type = descriptor.getType();
+
+        if (value == null) {
+            value = BuilderConstants.EMPTY;
+        }
+
+        String name = property.getPropertyName();
+        String displayName = property.getPropertyDisplayName();
+
+        switch (type) {
+            case LISTITEM_CLASS:
+            case ENUM:
+                List<ConstantDescriptor> enums = property.getTypeDescriptor().getAvailableConstant();
+                if (enums.size() == 2) {
+                    RadioEditable radio = new RadioEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                    radio.setItems(enums);
+                    method = radio;
+                } else {
+                    ComboEditable combo = new ComboEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                    combo.setItems(enums);
+                    method = combo;
+                }
+                break;
+            case DYNAMIC_COMBO:
+                enums = property.getTypeDescriptor().getAvailableConstant();
+                ComboEditable combo = new ComboEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                combo.setItems(enums);
+                method = combo;
+                break;
+            case EFL_STYLE:
+                if (StyleEDJManager.isLaterVersion3_0(projectVersion)) {
+                    method = new StyleEditMethod(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                } else {
+                    enums = property.getTypeDescriptor().getAvailableConstant();
+                    combo = new ComboEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                    combo.setItems(enums);
+                    method = combo;
+                }
+                break;
+            case COLORS:
+                enums = property.getTypeDescriptor().getAvailableConstant();
+                method = new ColorListEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc, enums);
+                break;
+            case IMAGE:
+                method = new ImageEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                break;
+            case LAYOUT_RESOURCE:
+                method = new LayoutResourceEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                break;
+            case TEXT_RESOURCE:
+                method = new TextResourceEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                break;
+            case COLOR:
+                method = new ColorPickerEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                break;
+            case SUB_VIEW:
+                // is naviframe
+                Assert.isTrue(model.getDescriptorId().equals(ModelConstants.KEY_WIDGET_NAVIFRAME));
+
+                // current view
+                Part viewPart = model.getParent();
+                Assert.isTrue(viewPart.getDescriptorId().equals(ModelConstants.KEY_PART_VIEW));
+                String currentViewId = viewPart.getPropertyValue(LayoutSchemaConstants.ID);
+
+                CombineEditorPart editor = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+                Part viewsPart = PartUtil.findViewsPart(editor.getDocumentPart());
+
+                List<ConstantDescriptor> constants = new ArrayList<ConstantDescriptor>();
+                constants.add(new ConstantDescriptor("", PropertiesConstant.NONE));
+
+                for (Part view : viewsPart.getChildren()) {
+                    String id = view.getPropertyValue(LayoutSchemaConstants.ID);
+                    // ignore current view
+                    if (id.equals(currentViewId)) {
+                        continue;
+                    }
+
+                    boolean hasSubview = false;
+                    for (Part child : view.getChildren()) {
+                        if (child.getType() == PartType.VIEW) {
+                            hasSubview = true;
+                            break;
+                        }
+                    }
+
+                    // ignore view which has naviframe
+                    if (hasSubview) {
+                        continue;
+                    }
+
+                    // currently value : # + id
+                    // TODO : Remove #
+                    ConstantDescriptor desc = new ConstantDescriptor(BuilderConstants.SHARP + id, id);
+                    constants.add(desc);
+                }
+
+                ComboEditable comboMethod = new ComboEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                comboMethod.setItems(constants);
+                method = comboMethod;
+                break;
+            case GROUP:
+                method = new GroupEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc, null, property);
+                break;
+            case INTEGER:
+                method = new IntegerEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                break;
+            case DOUBLE:
+                method = new DoubleEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                break;
+            case EMPTY:
+                method = new EmptyEditable(parent, SWT.NONE, methodType);
+                break;
+            case SCALE_INTEGER:
+                method = new ScaleEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc, property);
+                break;
+            case SCALE:
+                method = new CheckScaleEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc, property, false);
+                break;
+            case CHECK_SCALE:
+                method = new CheckScaleEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc, property, true);
+                break;
+            case GROUP_TEXT:
+                method = new TextStyleEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc, null, property);
+                break;
+            case ITEM_ADD:
+                method = new ItemAddEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                break;
+            case RM_STRING: // for RM - localization
+                method = new RMTextEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                break;
+            case STRING:
+            case UNKNOWN:
+            default:
+                if (name.equals(BuilderConstants.PROPERTY_ID)) {
+                    method = new TextEditable(parent, SWT.NONE, methodType, name, value, displayName, false);
+                } else {
+                    method = new TextEditable(parent, SWT.NONE, methodType, name, value, displayName, hasFunc);
+                }
+                break;
+        }
+
+        if (method != null)
+
+        {
+            method.setDefaultValue(property.getDefaultValue());
+            method.setConditions(property.getConditionDescriptors());
+            method.setLabelTooltipText(property.getTooltip());
+        }
+
+        return method;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EditableEvent.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EditableEvent.java
new file mode 100644 (file)
index 0000000..6258632
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+/**
+ * Method event class for {@link IValueChangeListener}.
+ */
+public class EditableEvent {
+
+    private Editable method;
+    private String key;
+    private String value;
+    private boolean undoable = true;
+
+    // TODO : Will be removed.
+    private String selector;
+
+    /**
+     * Constructor.
+     * 
+     * @param method
+     *            a source {@link Editable}
+     * @param key
+     *            property name
+     * @param value
+     *            property value
+     */
+    public EditableEvent(Editable method, String key, String value) {
+        this(method, key, value, true);
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param method
+     *            a source {@link Editable}
+     * @param key
+     *            property name
+     * @param value
+     *            property value
+     * @param undoable
+     *            whether undo is possible
+     */
+    public EditableEvent(Editable method, String key, String value, boolean undoable) {
+        this.method = method;
+        this.key = key;
+        this.value = value;
+        this.undoable = undoable;
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param method
+     *            a source {@link Editable}
+     * @param key
+     *            property name
+     * @param value
+     *            property value
+     * @param undoable
+     *            whether undo is possible
+     * @param selector
+     *            a selector name.
+     */
+    public EditableEvent(Editable method, String key, String value, boolean undoable, String selector) {
+        this(method, key, value, true);
+        this.selector = selector;
+    }
+
+    /**
+     * Gets property value.
+     * 
+     * @return value
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Gets property name.
+     * 
+     * @return property name
+     */
+    public String getKey() {
+        return key;
+    }
+
+    /**
+     * Gets undoable.
+     * 
+     * @return <code>true</code> if undoable is true, and <code>false</code> otherwise
+     */
+    public boolean getUndoable() {
+        return undoable;
+    }
+
+    /**
+     * Gets a selector name.
+     * 
+     * @return a selector name.
+     */
+    public String getSelector() {
+        return selector;
+    }
+
+    /**
+     * Gets a {@link Editable}.
+     * 
+     * @return a {@link Editable}
+     */
+    public Editable getMethod() {
+        return method;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EditableUtil.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EditableUtil.java
new file mode 100644 (file)
index 0000000..c769fd7
--- /dev/null
@@ -0,0 +1,741 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import java.awt.Color;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.ColorDialog;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.mscreen.configurator.MscreenConstants;
+import org.tizen.efluibuilder.mscreen.rm.AutoCompleteTextUtil;
+import org.tizen.efluibuilder.mscreen.rm.ResourceManagerUtil;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+import org.tizen.efluibuilder.ui.widgets.UIBLabel;
+
+
+/**
+ * Utilities class for {@link Editable}.
+ */
+public class EditableUtil {
+
+    /**
+     * Creates a new {@link Label}.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param text
+     *            the new text
+     * @return a new {@link Label}
+     */
+    public static Label createLabel(Composite parent, String text) {
+        Label label = new Label(parent, SWT.NONE);
+        label.setText(text);
+        return label;
+    }
+
+    /**
+     * Creates a new {@link CLabel}.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param text
+     *            the new text
+     * @return a new {@link CLabel}
+     */
+    public static CLabel createCLabel(Composite parent, String text) {
+        CLabel label = new UIBLabel(parent, SWT.NONE);
+        label.setText(text);
+        return label;
+    }
+
+    /**
+     * Creates a new {@link Spinner}.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param value
+     *            the new value
+     * @return a new {@link Spinner}
+     */
+    public static Spinner createSpinner(Composite parent, String value) {
+        Spinner spinner = new Spinner(parent, SWT.BORDER);
+        spinner.setMinimum(0);
+        spinner.setMaximum(9999);
+        spinner.setIncrement(1);
+        spinner.setTextLimit(4);
+        spinner.setSelection(0);
+        return spinner;
+    }
+
+    /**
+     * Creates a new {@link CCombo}. This CCombo style is SWT.READ_ONLY.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @return a new {@link CCombo}
+     */
+    public static CCombo createCombo(Composite parent) {
+        CCombo combo = new CCombo(parent, SWT.READ_ONLY | SWT.BORDER | SWT.NO_FOCUS | SWT.FLAT);
+
+        return combo;
+    }
+
+    /**
+     * Creates a new {@link CCombo}.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @return a new {@link CCombo}
+     */
+    public static CCombo createInputCombo(Composite parent) {
+        CCombo combo = new CCombo(parent, SWT.BORDER | SWT.FLAT);
+
+        return combo;
+    }
+
+    /**
+     * Creates a new {@link ToolBar} for font.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @return a new {@link ToolBar}
+     */
+    public static ToolBar createFontToolbar(Composite parent) {
+        ToolBar toolbar = new ToolBar(parent, SWT.HORIZONTAL | SWT.NO_FOCUS);
+
+        ToolItem item = new ToolItem(toolbar, SWT.FLAT);
+        ToolItem item1 = new ToolItem(toolbar, SWT.FLAT);
+        ToolItem item2 = new ToolItem(toolbar, SWT.FLAT);
+        ToolItem item3 = new ToolItem(toolbar, SWT.FLAT);
+
+        Image image = ImageResources.getImage(ImageResources.METHOD_BOLD);
+        item.setImage(image);
+
+        image = ImageResources.getImage(ImageResources.METHOD_ITALIC);
+        item1.setImage(image);
+
+        image = ImageResources.getImage(ImageResources.METHOD_UNDER_LINE);
+        item2.setImage(image);
+
+        image = ImageResources.getImage(ImageResources.METHOD_CANCEL_LINE);
+        item3.setImage(image);
+
+        return toolbar;
+    }
+
+    /**
+     * Creates a new {@link ToolBar} for align.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @return a new {@link ToolBar}
+     */
+    public static ToolBar createAlignToolbar(Composite parent) {
+        ToolBar toolbar = new ToolBar(parent, SWT.HORIZONTAL | SWT.NO_FOCUS);
+
+        ToolItem item = new ToolItem(toolbar, SWT.FLAT);
+        ToolItem item1 = new ToolItem(toolbar, SWT.FLAT);
+        ToolItem item2 = new ToolItem(toolbar, SWT.FLAT);
+
+        Image image = ImageResources.getImage(ImageResources.METHOD_ALIGN_LEFT);
+        item.setImage(image);
+        image = ImageResources.getImage(ImageResources.METHOD_ALIGN_CENTER);
+        item1.setImage(image);
+        image = ImageResources.getImage(ImageResources.METHOD_ALIGN_RIGHT);
+        item2.setImage(image);
+
+        return toolbar;
+    }
+
+    // public static Listener createNumberingListener(final Method target) {
+    // Listener textListener = new Listener() {
+    //
+    // private Method method = target;
+    // private boolean hasFocus = false;
+    // private boolean hadFocusOnMousedown = false;
+    //
+    // @Override
+    // public void handleEvent(Event event) {
+    // Combo spinner = (Combo) event.widget;
+    //
+    // if (spinner != method.getControl()) {
+    // return;
+    // }
+    //
+    // switch (event.type) {
+    // case SWT.Traverse:
+    // if (event.detail == SWT.TRAVERSE_RETURN) {
+    // method.setValue(spinner.getText());
+    // } else if (event.detail == SWT.TRAVERSE_ESCAPE) {
+    // method.refreshValue(method.getMethodName(), method.getValue());
+    // }
+    //
+    // break;
+    // case SWT.FocusIn:
+    // // text.selectAll();
+    // spinner.getDisplay().asyncExec(new Runnable() {
+    //
+    // @Override
+    // public void run() {
+    // hasFocus = true;
+    // }
+    // });
+    // break;
+    // case SWT.FocusOut:
+    // method.setValue(spinner.getText());
+    // hasFocus = false;
+    // break;
+    // case SWT.MouseDown:
+    // hadFocusOnMousedown = hasFocus;
+    // break;
+    // case SWT.MouseUp:
+    // if (!hadFocusOnMousedown) {
+    // spinner.setFocus();
+    // // text.selectAll();
+    // }
+    // break;
+    // case SWT.MouseDoubleClick:
+    // method.setValue(spinner.getText());
+    // break;
+    // default:
+    // break;
+    // }
+    // }
+    // };
+    //
+    // return textListener;
+    // }
+
+    /**
+     * Creates a Listener for spinner.
+     * 
+     * @param target
+     *            a target {@link Editable}
+     * @return a {@link Listener}
+     */
+    public static Listener createSpinnerListener(final Editable target) {
+        Listener textListener = new Listener() {
+
+            private Editable method = target;
+            private boolean hasFocus = false;
+            private boolean hadFocusOnMousedown = false;
+
+            @Override
+            public void handleEvent(Event event) {
+                Spinner spinner = (Spinner) event.widget;
+
+                if (spinner != method.getControl()) {
+                    return;
+                }
+
+                switch (event.type) {
+                    case SWT.Traverse:
+                        if (event.detail == SWT.TRAVERSE_RETURN) {
+                            method.setValue(spinner.getText());
+                        } else if (event.detail == SWT.TRAVERSE_ESCAPE) {
+                            method.refreshValue(method.getMethodName(), method.getValue());
+                        }
+
+                        break;
+                    case SWT.FocusIn:
+                        // text.selectAll();
+                        spinner.getDisplay().asyncExec(new Runnable() {
+
+                            @Override
+                            public void run() {
+                                hasFocus = true;
+                            }
+                        });
+                        break;
+                    case SWT.FocusOut:
+                        method.setValue(spinner.getText());
+                        hasFocus = false;
+                        break;
+                    case SWT.MouseDown:
+                        hadFocusOnMousedown = hasFocus;
+                        break;
+                    case SWT.MouseUp:
+                        if (!hadFocusOnMousedown) {
+                            spinner.setFocus();
+                            // text.selectAll();
+                        }
+                        break;
+                    case SWT.MouseDoubleClick:
+                        method.setValue(spinner.getText());
+                        break;
+                    default:
+                        break;
+                }
+            }
+        };
+
+        return textListener;
+    }
+
+    /**
+     * Creates a Listener for combo.
+     * 
+     * @param target
+     *            a target {@link Editable}
+     * @return a {@link Listener}
+     */
+    public static Listener createComboListener(final Editable target) {
+        Listener textListener = new Listener() {
+
+            private Editable method = target;
+            private boolean hasFocus = false;
+            private boolean hadFocusOnMousedown = false;
+
+            @Override
+            public void handleEvent(Event event) {
+                Combo combo = (Combo) event.widget;
+
+                if (combo != method.getControl()) {
+                    return;
+                }
+
+                switch (event.type) {
+                    case SWT.Traverse:
+                        if (event.detail == SWT.TRAVERSE_RETURN) {
+                            method.setValue(combo.getText());
+                        } else if (event.detail == SWT.TRAVERSE_ESCAPE) {
+                            method.refreshValue(method.getMethodName(), method.getValue());
+                        }
+
+                        break;
+                    case SWT.FocusIn:
+                        // text.selectAll();
+                        combo.getDisplay().asyncExec(new Runnable() {
+
+                            @Override
+                            public void run() {
+                                hasFocus = true;
+                            }
+                        });
+                        break;
+                    case SWT.FocusOut:
+                        method.setValue(combo.getText());
+                        hasFocus = false;
+                        break;
+                    case SWT.MouseDown:
+
+                        hadFocusOnMousedown = hasFocus;
+                        Point pt = new Point(0, combo.getText().length());
+                        combo.setSelection(pt);
+                        break;
+                    case SWT.MouseUp:
+                        if (!hadFocusOnMousedown) {
+                            combo.setFocus();
+                            // text.selectAll();
+                        }
+                        break;
+                    case SWT.MouseDoubleClick:
+                        method.setValue(combo.getText());
+                        break;
+                    // case SWT.Selection:
+                    // method.setValue(combo.getText());
+                    // break;
+                    default:
+                        break;
+                }
+            }
+        };
+
+        return textListener;
+    }
+
+    /**
+     * Creates Listener for size combo.
+     * 
+     * @param target
+     *            a target {@link Editable}
+     * @return a {@link Listener}
+     */
+    public static Listener createSizeComboListener(final Editable target, final double increment) {
+        Listener textListener = new Listener() {
+
+            private Editable method = target;
+            private boolean hasFocus = false;
+            private boolean hadFocusOnMousedown = false;
+            private Point mousePt = null;
+            private boolean moveFlag = false;
+
+            @Override
+            public void handleEvent(Event event) {
+                if (!(event.widget instanceof Combo)) {
+                    return;
+                }
+                Combo combo = (Combo) event.widget;
+
+                switch (event.type) {
+                    case SWT.Traverse:
+                        if (event.detail == SWT.TRAVERSE_RETURN) {
+                            method.setValue(combo.getText());
+                        } else if (event.detail == SWT.TRAVERSE_ESCAPE) {
+                            method.modifyValue(BuilderConstants.EMPTY);
+                            method.refreshValue(method.getMethodName(), method.getValue());
+                        } {
+                        Point pt = new Point(0, combo.getText().length());
+                        combo.setSelection(pt);
+                    }
+
+                        break;
+                    case SWT.FocusIn:
+                        // text.selectAll();
+                        combo.getDisplay().syncExec(new Runnable() {
+
+                            @Override
+                            public void run() {
+                                hasFocus = true;
+                            }
+                        });
+                        break;
+                    case SWT.FocusOut:
+                        method.setValue(combo.getText());
+                        hasFocus = false;
+                        break;
+                    case SWT.MouseDown:
+                        mousePt = new Point(event.x, event.y);
+
+                        hadFocusOnMousedown = hasFocus;
+                        Point pt = new Point(0, combo.getText().length());
+                        combo.setSelection(pt);
+                        break;
+                    case SWT.MouseUp:
+                        if (mousePt != null && moveFlag) {
+                            mousePt = null;
+                            moveFlag = false;
+                            method.setValue(combo.getText());
+                        }
+                        hadFocusOnMousedown = false;
+                        // if (!hadFocusOnMousedown) {
+                        // combo.setFocus();
+                        // // text.selectAll();
+                        // }
+                        break;
+                    case SWT.MouseDoubleClick:
+                        method.setValue(combo.getText());
+                        break;
+                    case SWT.MouseMove: {
+                        if (hadFocusOnMousedown) {
+                            moveFlag = true;
+                            // long startTime = System.nanoTime();
+                            if (combo != null && combo.getText() != null && mousePt != null) {
+                                double valueDouble = 0;
+                                String text = combo.getText();
+                                if (!text.isEmpty() && text.matches(BuilderConstants.FLOATVALUE)) {
+                                    valueDouble = Double.parseDouble(combo.getText());
+                                }
+                                if (mousePt.y - BuilderConstants.countPerPx > event.y) {
+                                    double result = valueDouble + increment;
+                                    int intValue = (int) result;
+                                    String value = BuilderConstants.EMPTY;
+                                    if (result - intValue != 0) {
+                                        value = String.format("%.2f", result);
+                                    } else {
+                                        value = String.valueOf(intValue);
+                                    }
+
+                                    combo.setText(value);
+                                    method.modifyValue(value);
+                                    mousePt.y = mousePt.y - 10;
+                                } else if (mousePt.y + BuilderConstants.countPerPx < event.y) {
+                                    double result = valueDouble - increment;
+                                    int intValue = (int) result;
+                                    String value = BuilderConstants.EMPTY;
+                                    if (result - intValue != 0) {
+                                        value = String.format("%.2f", result);
+                                    } else {
+                                        value = String.valueOf(intValue);
+                                    }
+                                    combo.setText(value);
+                                    method.modifyValue(value);
+                                    mousePt.y = mousePt.y + 10;
+                                }
+                            }
+                        }
+                    }
+                        break;
+
+                    case SWT.Selection: {
+                        method.setValue(combo.getText());
+                        // because not validate from combo box value
+                    }
+                        break;
+                    default:
+                        break;
+                }
+            }
+        };
+
+        return textListener;
+    }
+
+    private static String replaceCharacter(String str) {
+        str = str.replaceAll("\"", "&quot;");
+        return str;
+    }
+
+    /* ==[START]== added by SBC for AutoCompleteText(RM) */
+
+    /**
+     * This function is used to check the AutoCompleteText feature. ResourceMananger (Resource /
+     * Locale). reference to widget descriptor xml and MethodCreationFactory
+     * 
+     * @param text
+     *            a text {@link Text}
+     * @param target
+     *            a target {@link Editable}
+     * @return a {@link Listener}
+     */
+    private static boolean canAutoComplete(Editable target) {
+        if ((target instanceof ResourceEditable) || (target instanceof RMTextEditable)) {
+            return true;
+        } else {
+            return false;
+        }
+        // return (target instanceof RMTextMethod) ? true : false;
+
+    }
+
+    /**
+     * This function is enable "AutoCompleteText"(Key assistance Interlock for M-Screen and
+     * ResourceMananger (Resource / Locale). reference to widget descriptor xml and
+     * MethodCreationFactory
+     * 
+     * @param text
+     *            a text {@link Text}
+     * @param target
+     *            a target {@link Editable}
+     * @return a {@link Listener}
+     */
+    private static void enableAutoCompleteText(Text text, Editable target) {
+
+        if (!canAutoComplete(target)) {
+            return;
+        }
+
+        CombineEditorPart combineEditorPart = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+        IProject project = combineEditorPart.getProject();
+        String shortcutPrefixString = null;
+
+        String[] keyStrings = null;
+        ResourceManagerUtil rmWrapper = new ResourceManagerUtil(project);
+        Image image = ImageResources.getImage(ImageResources.METHOD_ICON_FILE_LABEL_ITEM);
+        if (target instanceof ResourceEditable) {
+            /*
+             * Target UI Component: ImageMethod(BG, Image, Icon, gengriditem, gengridlist),
+             * LayoutResourceMethod(edc)
+             */
+            shortcutPrefixString = MscreenConstants.RESOURCE_KEY;
+            keyStrings = rmWrapper.getAllResourceKeys(shortcutPrefixString, ((ResourceEditable) target).getResourceFileExtentions());
+        } else { // This is only TextMethod
+            /*
+             * Target UI Component: Button, Label, gengriditem, gengridlist,etc..
+             */
+            shortcutPrefixString = MscreenConstants.LOCALE_KEY;
+            keyStrings = rmWrapper.getMsgKeys(shortcutPrefixString);
+        }
+        if (keyStrings != null) {
+            AutoCompleteTextUtil.setAutoCompletion(text, keyStrings, shortcutPrefixString, image);
+        }
+    }
+
+    /* ==[END]== added by SBC for AutoCompleteText(RM) */
+
+    /**
+     * Creates Listener for text.
+     * 
+     * @param target
+     *            a target {@link Editable}
+     * @return a {@link Listener}
+     */
+    public static Listener createTextListener(final Editable target) {
+        Listener textListener = new Listener() {
+
+            private boolean hasFocus = false;
+            private boolean hadFocusOnMousedown = false;
+            private String textStr = null;
+
+            @Override
+            public void handleEvent(Event event) {
+                Text text = (Text) event.widget;
+
+                if (text != target.getControl()) {
+                    return;
+                }
+
+                switch (event.type) {
+                    case SWT.Traverse:
+                        if (event.detail == SWT.TRAVERSE_RETURN) {
+                            textStr = replaceCharacter(text.getText());
+                            target.setValue(textStr);
+                        } else if (event.detail == SWT.TRAVERSE_ESCAPE) {
+                            target.refreshValue(target.getMethodName(), target.getValue());
+                        } else {
+                            break;
+                        }
+                        // text.selectAll();
+                        break;
+                    case SWT.FocusIn:
+                        /* added by SBC for AutoCompleteText(RM) */
+                        enableAutoCompleteText(text, target);
+                        text.selectAll();
+
+                        text.getDisplay().asyncExec(new Runnable() {
+
+                            @Override
+                            public void run() {
+                                hasFocus = true;
+                            }
+                        });
+                        break;
+                    case SWT.FocusOut:
+                        textStr = replaceCharacter(text.getText());
+                        target.setValue(textStr);
+                        hasFocus = false;
+                        if (text.isDisposed() == false) {
+                            text.clearSelection();
+                        }
+                        break;
+                    case SWT.MouseDown:
+                        hadFocusOnMousedown = hasFocus;
+                        break;
+                    case SWT.MouseUp:
+                        if (!hadFocusOnMousedown) {
+                            text.setFocus();
+                            text.selectAll();
+                        }
+                        break;
+                    case SWT.MouseDoubleClick:
+                        textStr = replaceCharacter(text.getText());
+                        target.setValue(textStr);
+                        break;
+                    default:
+                        break;
+                }
+            }
+        };
+
+        return textListener;
+    }
+
+    /**
+     * Creates Listener for color.
+     * 
+     * @param target
+     *            a target {@link Editable}
+     * @return a {@link SelectionListener}
+     */
+    public static SelectionListener createColorListener(final Editable target) {
+        SelectionAdapter listener = new SelectionAdapter() {
+
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                ColorDialog dialog = new ColorDialog(target.getShell());
+                dialog.setText(PropertiesConstant.DIALOG_COLOR_SELECTOR);
+                String value = target.getValue();
+                if (value == null || value.isEmpty()) {
+                    value = "0";
+                }
+                Color color = Color.decode(value);
+                dialog.setRGB(new RGB(color.getRed(), color.getGreen(), color.getBlue()));
+
+                RGB newColor = dialog.open();
+                if (newColor == null) {
+                    return;
+                } else {
+                    String hex = String.format("#%02x%02x%02x", newColor.red, newColor.green, newColor.blue);
+                    target.setValue(hex);
+                }
+            }
+        };
+        return listener;
+    }
+
+    /**
+     * Creates Listener for color2.
+     * 
+     * @param target
+     *            a target {@link Editable}
+     * @return a {@link SelectionListener}
+     */
+    public static SelectionListener createColor2Listener(final Editable target) {
+        SelectionAdapter listener = new SelectionAdapter() {
+
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                ColorDialog dialog = new ColorDialog(target.getShell());
+                dialog.setText(PropertiesConstant.DIALOG_COLOR_SELECTOR);
+                String value = target.getValue();
+                if (value == null || value.isEmpty()) {
+                    value = "0, 0, 0";
+                }
+
+                String[] values = value.split(", ");
+                if (values.length != 3) {
+                    return;
+                }
+
+                int[] colors = { 0, 0, 0 };
+                for (int i = 0; i < values.length; i++) {
+                    colors[i] = Integer.parseInt(values[i]);
+                }
+
+                dialog.setRGB(new RGB(colors[0], colors[1], colors[2]));
+
+                RGB newColor = dialog.open();
+                if (newColor == null) {
+                    return;
+                } else {
+                    String ret = newColor.red + ", " + newColor.green + ", " + newColor.blue;
+                    target.setValue(ret);
+                }
+            }
+        };
+        return listener;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EmptyEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/EmptyEditable.java
new file mode 100644 (file)
index 0000000..f5691d3
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+
+
+/**
+ * A EmptyMethod for EMPTY type in the {@link TypeDescriptor.Types}
+ */
+public class EmptyEditable extends Editable {
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see Editable
+     */
+    public EmptyEditable(Composite parent, int style, MethodType type) {
+        super(parent, style, type, BuilderConstants.EMPTY, null, null, false);
+    }
+
+    @Override
+    protected Control createControl() {
+        Label label = new Label(this, SWT.NONE);
+        label.setVisible(false);
+        return label;
+    }
+
+    /**
+     * Gets the {@link FormData} for control.
+     * 
+     * @return the new {@link FormData}
+     */
+    protected FormData getControlLayoutData() {
+        FormData data = new FormData();
+        data.height = 27;
+        return data;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/GroupEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/GroupEditable.java
new file mode 100644 (file)
index 0000000..e525219
--- /dev/null
@@ -0,0 +1,411 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.model.util.ComponentValidator;
+
+
+/**
+ * A GroupMethod for GROUP type in the {@link TypeDescriptor.Types}
+ */
+public class GroupEditable extends Editable implements IGroupEditable, IValueChangeListener {
+
+    private List<Editable> methods = new ArrayList<Editable>();
+    private PropertyDescriptor parentDescriptor;
+    private Object model;
+    protected Editable recentEditedMethod;
+    private Map<String, String> childValues = new HashMap<String, String>();
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @param model
+     *            a {@link AnimatorPart}
+     * @param parentDescriptor
+     *            a {@link PropertyDescriptor} for group type.
+     */
+    public GroupEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc, Object model,
+            PropertyDescriptor parentDescriptor) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+        this.model = model;
+        this.parentDescriptor = parentDescriptor;
+        createChildMethods();
+        refreshValue(name, value);
+    }
+
+    @Override
+    public List<Editable> getChildMethods() {
+        return methods;
+    }
+
+    @Override
+    public Editable getChildMethod(String key) {
+        for (Editable child : methods) {
+            if (child.getMethodName().equals(key)) {
+                return child;
+            }
+        }
+        return null;
+    }
+
+    @Override
+    protected Control createControl() {
+        Composite composite = new Composite(this, SWT.NONE);
+        FormLayout layout = new FormLayout();
+        // GridLayout layout = new GridLayout(2, true);
+        composite.setLayout(layout);
+        return composite;
+    }
+
+    @Override
+    public Composite getControl() {
+        return (Composite) super.getControl();
+    }
+
+    @Override
+    protected FormData getFuncLayoutData() {
+        FormData data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.bottom = new FormAttachment(100, 0);
+        data.left = new FormAttachment(0, 10);
+        data.right = new FormAttachment(0, 20);
+        return data;
+    }
+
+    @Override
+    protected FormData getControlLayoutData() {
+        FormData data = new FormData();
+        data.top = new FormAttachment(0, 0);
+        data.bottom = new FormAttachment(100, 0);
+        data.right = new FormAttachment(100, 0);
+
+        if (checkControl(getLabel())) {
+            data.left = new FormAttachment(getLabel(), 0);
+        } else if (checkControl(getFuncButton())) {
+            data.left = new FormAttachment(getFuncButton(), 0);
+        } else {
+            data.left = new FormAttachment(0, 0);
+        }
+
+        return data;
+    }
+
+    @Override
+    protected FormData getLabelLayoutData() {
+        FormData data = new FormData();
+        data.right = new FormAttachment(25, 0);
+
+        // data.bottom = new FormAttachment(100, 0);
+        if (checkControl(getFuncButton())) {
+            data.top = new FormAttachment(getFuncButton(), 0, SWT.CENTER);
+            data.left = new FormAttachment(getFuncButton(), 5);
+        } else {
+            data.top = new FormAttachment(0, 0);
+            data.left = new FormAttachment(0, 0);
+        }
+        return data;
+    }
+
+    /**
+     * Gets a parent descriptor.
+     * 
+     * @return a {@link PropertyDescriptor}
+     */
+    protected PropertyDescriptor getParentDescriptor() {
+        return parentDescriptor;
+    }
+
+    /**
+     * Creates child method.
+     */
+    protected void createChildMethods() {
+        if (parentDescriptor == null) {
+            return;
+        }
+        EditableCreationFactory factory = EditableCreationFactory.getInstance();
+        for (PropertyDescriptor child : parentDescriptor.getChildPropertyDescriptors()) {
+            String value = "";
+            Editable method = factory.createMethod(getControl(), child, value, getType(), false);
+            if (method == null) {
+                continue;
+            } else {
+                int methodSize = methods.size();
+                FormData data = new FormData();
+
+                if (methodSize >= 2) {
+                    data.top = new FormAttachment(methods.get(methodSize - 2), 3);
+                } else {
+                    data.top = new FormAttachment(0, 0);
+                }
+
+                if (methodSize % 2 == 0) {
+                    data.left = new FormAttachment(0, 0);
+                    data.right = new FormAttachment(50, 0);
+                } else {
+                    data.left = new FormAttachment(50, 5);
+                    data.right = new FormAttachment(100, 0);
+                }
+                // data.height = 25;
+                // GridData data = new GridData(GridData.FILL, GridData.FILL, true, true);
+                String displayName = method.getDisplayName();
+                if (displayName != null && displayName.length() < 4) {
+                    method.setLabelRightData(18, 0);
+                } else {
+                    method.setLabelRightData(32, 0);
+                }
+
+                method.setControlRightData(100, 0);
+
+                method.setLayoutData(data);
+                method.setValueChangedListener(this);
+                method.setLabelTooltipText(parentDescriptor.getPropertyName());
+                methods.add(method);
+            }
+
+            addChildKeyValue(child.getPropertyName(), value);
+
+        }
+    }
+
+    // /**
+    // * Gets child value given its key.
+    // *
+    // * @param key
+    // * child property name.
+    // * @return value
+    // */
+    // protected String getChildValue(String key) {
+    // String value = BuilderConstants.EMPTY;
+    // MethodType type = getType();
+    // switch (type) {
+    // case ATTRIBUTE:
+    // // TODO : cast part
+    // // Part part = (Part) model;
+    // break;
+    // case STYLE:
+    // // TODO : get value from selector
+    // // CssSelector selector = (CssSelector) model;
+    // // value = selector.getPropertyValue(key);
+    // break;
+    // case EVENT_HANDLER:
+    // break;
+    // default:
+    // break;
+    // }
+    // return value;
+    // }
+
+    /**
+     * Resets default value of children.
+     */
+    protected void resetChilden() {
+        for (Editable child : methods) {
+            child.refreshValue(child.getMethodName(), child.getDefaultValue());
+        }
+    }
+
+    @Override
+    public void refreshValue(String name, String value) {
+        super.refreshValue(name, value);
+
+        if (value == null || value.isEmpty() || value.equals("none")) {
+            resetChilden();
+            return;
+        }
+        MethodType type = getType();
+        switch (type) {
+            case ATTRIBUTE:
+                // TODO : cast part
+                // Part part = (Part) model;
+                break;
+            case STYLE:
+                // StyleValue cssValue =
+                // new CssReader().createStyleValue(value,
+                // (StylePropertyDescriptor) parentDescriptor);
+                // if (cssValue == null) {
+                // break;
+                // }
+                // List<StyleComponent> components = cssValue.getComponents();
+                //
+                // // For GroupValueMethod
+                // if (components.size() == 1) {
+                // components = components.get(0).getParameters();
+                // }
+                //
+                // int compoSize = components.size();
+                // int compoIndex = 0;
+                // for (int i = 0; i < methods.size(); i++) {
+                // Method child = methods.get(i);
+                // if (child instanceof EmptyMethod) {
+                // continue;
+                // }
+                // if (compoSize >= i) {
+                // String childValue = components.get(compoIndex).getValue();
+                // child.refreshValue(child.getMethodName(), childValue);
+                // compoIndex++;
+                // addChildKeyValue(child.getMethodName(), childValue);
+                // }
+                // }
+
+                break;
+            case EVENT_HANDLER:
+                break;
+            default:
+                break;
+        }
+
+    }
+
+    @Override
+    public void valueChanged(EditableEvent event) {
+        String key = event.getKey();
+        String value = event.getValue();
+        Editable childMethod = event.getMethod();
+
+        String message = validateStyle(key, value);
+        if (!message.equals(ComponentValidator.OK)) {
+            childMethod.refreshValue(key, childValues.get(key));
+            childMethod.showErrorToolTip(message);
+            return;
+        }
+
+        addChildKeyValue(key, value);
+        recentEditedMethod = childMethod;
+
+        String fullValue = getResultValue(event.getKey(), event.getValue());
+        if (fullValue != null) {
+            setValue(fullValue);
+        }
+    }
+
+    @Override
+    public void valueModified(EditableEvent event) {
+        String value = getResultValue(event.getKey(), event.getValue());
+        if (value != null) {
+            modifyValue(value);
+        }
+    }
+
+    protected String getResultValue(String childKey, String childValue) {
+        if (childKey == null || childValue == null) {
+            return null;
+        }
+        String resultValue = BuilderConstants.EMPTY;
+        int size = methods.size();
+        for (int i = 0; i < size; i++) {
+            Editable child = methods.get(i);
+            if (child instanceof EmptyEditable) {
+                continue;
+            } else if (child.getMethodName().equals(childKey)) {
+                resultValue += childValue;
+            } else {
+                String val = child.getValue();
+                if (val == null || val.isEmpty()) {
+                    val = child.getDefaultValue();
+                }
+
+                resultValue += val;
+            }
+            if (i + 1 != size) {
+                resultValue += BuilderConstants.SPACE;
+            }
+        }
+        return resultValue;
+    }
+
+    protected String validateStyle(String key, String value) {
+        String message = ComponentValidator.OK;
+        PropertyDescriptor descriptor = parentDescriptor.getChildPropertyDescriptor(key);
+
+        message = new ComponentValidator().canSetStyleDeclarationValue(descriptor, value);
+        return message;
+    }
+
+    /**
+     * Gets a model.
+     * 
+     * @return model
+     */
+    protected Object getModel() {
+        return model;
+    }
+
+    @Override
+    public void setEnabled(boolean enabled) {
+        super.setEnabled(enabled);
+
+        for (Editable method : methods) {
+            method.setEnabled(enabled);
+        }
+    }
+
+    @Override
+    public void showErrorToolTip(String text) {
+        if (recentEditedMethod != null) {
+            recentEditedMethod.showErrorToolTip(text);
+        } else {
+            super.showErrorToolTip(text);
+        }
+    }
+
+    protected void addChildKeyValue(String key, String value) {
+        if (value == null) {
+            value = BuilderConstants.EMPTY;
+        }
+        childValues.put(key, value);
+    }
+
+    protected String getChildValue(String key) {
+        return childValues.get(key);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/IGroupEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/IGroupEditable.java
new file mode 100644 (file)
index 0000000..c201a6a
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import java.util.List;
+
+
+/**
+ * Interface for GroupMethod.
+ */
+public interface IGroupEditable {
+
+    /**
+     * Gets child Method lists.
+     * 
+     * @return list of {@link Editable}
+     */
+    public List<Editable> getChildMethods();
+
+    /**
+     * Gets a child Method
+     * 
+     * @param key
+     *            a method name
+     * @return a child method or null
+     */
+    public Editable getChildMethod(String key);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/IValueChangeListener.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/IValueChangeListener.java
new file mode 100644 (file)
index 0000000..4953035
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+/**
+ * A listener for {@link Editable}.
+ */
+public interface IValueChangeListener {
+
+    /**
+     * Called when a value is changed.
+     * 
+     * @param event
+     *            a {@link EditableEvent}
+     */
+    void valueChanged(EditableEvent event);
+
+    /**
+     * Called when a value is modified.
+     * 
+     * @param event
+     *            a {@link EditableEvent}
+     */
+    void valueModified(EditableEvent event);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ImageEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ImageEditable.java
new file mode 100644 (file)
index 0000000..660035c
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.gef.dnd.model.RMResource;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+
+
+/**
+ * A ImageMethod for IMAGE type in the {@link TypeDescriptor.Types}
+ */
+public class ImageEditable extends ResourceEditable {
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see ResourceEditable
+     */
+    public ImageEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+        super(parent, style, type, name, value, displayName, hasFunc, RMResource.IMAGE);
+        Image image = ImageResources.getImage(ImageResources.METHOD_IMAGE);
+        setDialogButtonImage(image);
+    }
+
+    @Override
+    protected String[] getFilterExtensions() {
+        String[] s = { PropertiesConstant.DIALOG_FILTER_JPG + BuilderConstants.SEMICOLON + PropertiesConstant.DIALOG_FILTER_JPEG // JPEG
+                , PropertiesConstant.DIALOG_FILTER_PNG // PNG
+                , PropertiesConstant.DIALOG_FILTER_GIF // GIF
+                , PropertiesConstant.DIALOG_FILTER_ICO // ICO
+                ,
+                PropertiesConstant.DIALOG_FILTER_JPG + BuilderConstants.SEMICOLON + PropertiesConstant.DIALOG_FILTER_PNG + BuilderConstants.SEMICOLON
+                        + PropertiesConstant.DIALOG_FILTER_GIF // All
+                                                               // Image
+                                                               // Files
+                , PropertiesConstant.DIALOG_FILTER_ALL }; // ALL
+
+        return s;
+    }
+
+    @Override
+    protected String[] getFilterNames() {
+        String[] s = { PropertiesConstant.DIALOG_FILTER_NAME_JPEG, PropertiesConstant.DIALOG_FILTER_NAME_PNG, PropertiesConstant.DIALOG_FILTER_NAME_GIF,
+                PropertiesConstant.DIALOG_FILTER_NAME_ICO, PropertiesConstant.DIALOG_FILTER_NAME_ALL_IMAGE, PropertiesConstant.DIALOG_FILTER_NAME_ALL };
+
+        return s;
+    }
+
+    @Override
+    protected int getDefaultIndex() {
+        return 4;
+    }
+
+    @Override
+    public void setValue(String value) {
+        switch (getType()) {
+            case STYLE:
+                if (!value.isEmpty() && !value.startsWith("url")) {
+                    value = "url(\'" + value + "\')";
+                }
+
+                break;
+            case ATTRIBUTE:
+            case EVENT_HANDLER:
+            default:
+                break;
+        }
+        super.setValue(value);
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/IntegerEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/IntegerEditable.java
new file mode 100644 (file)
index 0000000..a1346f3
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * A IntegerMethod for INTEGER type property.
+ */
+public class IntegerEditable extends TextEditable {
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see Editable
+     */
+    public IntegerEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+
+        super(parent, style, type, name, value, displayName, hasFunc);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ItemAddEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ItemAddEditable.java
new file mode 100644 (file)
index 0000000..6e530bb
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+
+
+/**
+ * A UrlMethod for URL type in the {@link TypeDescriptor.Types}
+ */
+public class ItemAddEditable extends Editable {
+
+    private SelectionListener listener;
+    private Button button;
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see Editable
+     */
+    public ItemAddEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+    }
+
+    @Override
+    protected Control createControl() {
+        // Control combo = super.createControl();
+        /*
+         * spinner = new Spinner(this, SWT.BORDER); spinner.setMinimum(0);
+         * spinner.setMaximum(99999); spinner.setIncrement(1); spinner.setTextLimit(4);
+         * spinner.setSelection(0);
+         * 
+         * Listener spinnerListener = createSpinnerListener(this); spinner.addListener(SWT.Traverse,
+         * spinnerListener); // spinner.addListener(SWT.FocusIn, spinnerListener);
+         * spinner.addListener(SWT.FocusOut, spinnerListener); // spinner.addListener(SWT.MouseDown,
+         * spinnerListener); // spinner.addListener(SWT.MouseUp, spinnerListener); //
+         * spinner.addListener(SWT.MouseDoubleClick, spinnerListener);
+         * spinner.addListener(SWT.Verify, spinnerListener);
+         * 
+         * return spinner;
+         * 
+         * //spinner.addListener(SWT.Traverse, comboListener);
+         * 
+         * //return spinner;
+         */
+
+        button = new Button(this, SWT.PUSH);
+        button.setText("Add item");
+        listener = createAddButtonListener(this);
+        button.addSelectionListener(listener);
+        return button;
+    }
+
+    @Override
+    public void dispose() {
+        // if (spinner != null && !spinner.isDisposed()) {
+        // spinner.removeListener(SWT.Traverse, listener);
+        // spinner.removeListener(SWT.FocusOut, listener);
+        // spinner.removeListener(SWT.Verify, listener);
+        // }
+
+        if (button != null && !button.isDisposed()) {
+            button.removeSelectionListener(listener);
+        }
+        super.dispose();
+    }
+
+    // @Override
+    // public void setValue(String value) {
+    // if (value == null) {
+    // return;
+    // }
+    // super.setValue(value);
+    // }
+
+    // @Override
+    // public void refreshValue(String name, String value) {
+    // super.refreshValue(name, value);
+    //
+    // // Spinner spinner = (Spinner) getControl();
+    // // spinner.setSelection(Integer.parseInt(value));
+    // }
+
+    // @Override
+    // public void setDefaultValue(String defaultValue) {
+    // super.setDefaultValue(defaultValue);
+    //
+    // Spinner spinner = (Spinner) getControl();
+    // if (defaultValue != null && !defaultValue.isEmpty()) {
+    // spinner.setSelection(Integer.parseInt(defaultValue));
+    // setValue(defaultValue);
+    // } else {
+    // spinner.setSelection(0);
+    // setValue("0");
+    // }
+    // }
+
+    protected SelectionListener createAddButtonListener(final Editable target) {
+        SelectionListener listener = new SelectionListener() {
+            private Editable method = target;
+            private int index = 0;
+
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                String str = Integer.toString(index++);
+                method.setValue(str);
+                method.enableFuncButton(false);
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        };
+        return listener;
+    }
+
+    /*
+     * private Listener createSpinnerListener(final Method target) { Listener textListener = new
+     * Listener() {
+     * 
+     * private Method method = target; // private boolean hasFocus = false; // private boolean
+     * hadFocusOnMousedown = false;
+     * 
+     * @Override public void handleEvent(Event event) { //Spinner spinner = (Spinner) event.widget;
+     * 
+     * if (spinner != method.getControl()) { return; }
+     * 
+     * switch (event.type) { case SWT.Traverse: if (event.detail == SWT.TRAVERSE_RETURN) {
+     * method.setValue(spinner.getText()); } else if (event.detail == SWT.TRAVERSE_ESCAPE) {
+     * method.refreshValue(method.getMethodName(), method.getValue()); }
+     * 
+     * break; // case SWT.FocusIn: // // text.selectAll(); // spinner.getDisplay().asyncExec(new
+     * Runnable() { // // @Override // public void run() { // hasFocus = true; // } // }); // break;
+     * case SWT.FocusOut: method.setValue(spinner.getText()); //hasFocus = false; break; // case
+     * SWT.MouseDown: // hadFocusOnMousedown = hasFocus; // break; // case SWT.MouseUp: // if
+     * (!hadFocusOnMousedown) { // spinner.setFocus(); // // text.selectAll(); // } // break; //
+     * case SWT.MouseDoubleClick: // method.setValue(spinner.getText()); // break; case SWT.Verify:
+     * if (event.keyCode == 0) { method.setValue(spinner.getText()); } break; default: break; } } };
+     * 
+     * return textListener; }
+     */
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/LayoutResourceEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/LayoutResourceEditable.java
new file mode 100644 (file)
index 0000000..76bd72a
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.efluibuilder.gef.dnd.model.RMResource;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+
+
+/**
+ * A LayoutResourceMethod for LAYOUT type in the {@link TypeDescriptor.Types}
+ */
+public class LayoutResourceEditable extends ResourceEditable {
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see ResourceEditable
+     */
+    public LayoutResourceEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+        super(parent, style, type, name, value, displayName, hasFunc, RMResource.LAYOUT);
+        Image image = ImageResources.getImage(ImageResources.METHOD_IMAGE);
+        setDialogButtonImage(image);
+    }
+
+    @Override
+    protected String[] getFilterExtensions() {
+        String[] s = { /* PropertiesConstant.DIALOG_FILTER_EDC, */PropertiesConstant.DIALOG_FILTER_EDJ,
+                /*
+                 * PropertiesConstant.DIALOG_FILTER_EDC + BuilderConstants.SEMICOLON +
+                 * PropertiesConstant.DIALOG_FILTER_EDJ,
+                 */
+                PropertiesConstant.DIALOG_FILTER_ALL }; // ALL
+
+        return s;
+    }
+
+    @Override
+    protected String[] getFilterNames() {
+        String[] s = { /* PropertiesConstant.DIALOG_FILTER_NAME_EDC, */PropertiesConstant.DIALOG_FILTER_NAME_EDJ,
+                /* PropertiesConstant.DIALOG_FILTER_NAME_ALL_LAYOUT, */
+                PropertiesConstant.DIALOG_FILTER_NAME_ALL };
+
+        return s;
+    }
+
+    @Override
+    protected int getDefaultIndex() {
+        return 0;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/NoContentEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/NoContentEditable.java
new file mode 100644 (file)
index 0000000..9d83e0b
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+
+
+/**
+ * A no content method. It just display the "No selected contents".
+ */
+public class NoContentEditable extends Editable {
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param type
+     *            a {@link MethodType}
+     */
+    public NoContentEditable(Composite parent, MethodType type) {
+        super(parent, SWT.NONE, type, PropertiesConstant.NO_CONTENTS, null, PropertiesConstant.NO_CONTENTS_MSG, false);
+    }
+
+    @Override
+    protected FormData getLabelLayoutData() {
+        FormData data = new FormData();
+        data.bottom = new FormAttachment(50, 0);
+
+        return data;
+    }
+
+    @Override
+    protected Control createControl() {
+        return null;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/RMTextEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/RMTextEditable.java
new file mode 100644 (file)
index 0000000..05d8073
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * A IntegerMethod for INTEGER type property.
+ */
+public class RMTextEditable extends TextEditable {
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see Editable
+     */
+    public RMTextEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+
+        super(parent, style, type, name, value, displayName, hasFunc);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/RadioEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/RadioEditable.java
new file mode 100644 (file)
index 0000000..15736f2
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+
+
+/**
+ * A RadioMethod for ENUM type that item size is 2 in the {@link TypeDescriptor.Types}
+ */
+public class RadioEditable extends Editable {
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see Editable
+     */
+    public RadioEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+    }
+
+    @Override
+    protected Control createControl() {
+        Composite composite = new Composite(this, SWT.NULL);
+        composite.setLayout(new FormLayout());
+        return composite;
+    }
+
+    @Override
+    public void refreshValue(String name, String value) {
+        super.refreshValue(name, value);
+
+        Composite composite = (Composite) getControl();
+
+        Control[] children = composite.getChildren();
+
+        for (int i = 0; i < children.length; i++) {
+            Button child = (Button) children[i];
+            if (value.equals(child.getData())) {
+                child.setSelection(true);
+            } else {
+                child.setSelection(false);
+            }
+        }
+
+    }
+
+    /**
+     * Sets items for radio control.
+     * 
+     * @param items
+     *            list of {@link ConstantDescriptor}
+     */
+    public void setItems(List<ConstantDescriptor> items) {
+        Listener listener = createListener();
+
+        Button cursor = null;
+        for (ConstantDescriptor item : items) {
+            Button radio = new Button((Composite) getControl(), SWT.RADIO);
+            FormData formData = new FormData();
+            formData.top = new FormAttachment(0, 4);
+            formData.left = (cursor == null ? new FormAttachment(0, 0) : new FormAttachment(cursor, 20));
+            cursor = radio;
+            radio.setLayoutData(formData);
+            radio.setText(item.getDisplayName());
+            if (item.getValue().isEmpty()) {
+                radio.setData(item.getValue());
+            } else {
+                radio.setData(item.getDisplayName());
+            }
+
+            if ((getValue().equals(item.getValue()) || (getValue().equals(item.getDisplayName())))) {
+                radio.setSelection(true);
+            }
+
+            radio.addListener(SWT.Selection, listener);
+        }
+    }
+
+    private Listener createListener() {
+        Listener listener = new Listener() {
+
+            @Override
+            public void handleEvent(Event event) {
+                Button radio = (Button) event.widget;
+                if (radio.getSelection()) {
+                    setValue((String) radio.getData());
+                }
+            }
+        };
+
+        return listener;
+    }
+
+    @Override
+    public void setEnabled(boolean enabled) {
+        super.setEnabled(enabled);
+
+        Composite composite = (Composite) getControl();
+
+        Control[] children = composite.getChildren();
+
+        for (int i = 0; i < children.length; i++) {
+            children[i].setEnabled(enabled);
+        }
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ResourceEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ResourceEditable.java
new file mode 100644 (file)
index 0000000..536f1a3
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.efluibuilder.gef.dnd.model.RMResource;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+
+
+/**
+ * A ResourceMethod for resource of project.
+ */
+public class ResourceEditable extends TextEditable {
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see TextEditable
+     */
+    public ResourceEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+    }
+
+    // for RM START
+    int resourceType;
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see TextEditable
+     */
+    public ResourceEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc, int resourceType) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+        this.resourceType = resourceType;
+    }
+
+    public String[] getResourceFileExtentions() {
+        return RMResource.getResourceFileExtentionsByType(resourceType);
+    }
+
+    // for RM END
+
+    @Override
+    protected FormData getControlLayoutData() {
+        return super.getControlLayoutData();
+    }
+
+    @Override
+    public void setControlRightData(int numerator, int offset) {
+        super.setControlRightData(numerator, offset);
+    }
+
+    /**
+     * Gets using extensions for file dialog.
+     * 
+     * @return string array
+     * @deprecated This function is deprecated because of unused file selector dialog. (policy of
+     *             resource managing)
+     */
+    @Deprecated
+    protected String[] getFilterExtensions() {
+        String[] s = { PropertiesConstant.DIALOG_FILTER_ALL };
+        return s;
+    }
+
+    /**
+     * Gets using filter name for file dialog.
+     * 
+     * @return string array
+     * @deprecated This function is deprecated because of unused file selector dialog. (policy of
+     *             resource managing) *
+     */
+    @Deprecated
+    protected String[] getFilterNames() {
+        String[] s = { PropertiesConstant.DIALOG_FILTER_NAME_ALL };
+        return s;
+    }
+
+    /**
+     * Gets default index.
+     * 
+     * @return default index
+     */
+    protected int getDefaultIndex() {
+        return 0;
+    }
+
+    @Override
+    public void setEnabled(boolean enabled) {
+        super.setEnabled(enabled);
+        // dialogButton.setEnabled(enabled); // commented: for M-Screen > Resource Manager
+    }
+
+    /**
+     * Sets dialog button image.
+     * 
+     * @return string array
+     * @deprecated This function is deprecated because of unused file selector dialog. (policy of
+     *             resource managing) *
+     */
+    @Deprecated
+    protected void setDialogButtonImage(Image image) {
+        // dialogButton.setImage(image); // commented: for M-Screen > Resource Manager
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ScaleEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ScaleEditable.java
new file mode 100644 (file)
index 0000000..9e7fecb
--- /dev/null
@@ -0,0 +1,385 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import java.text.DecimalFormat;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Scale;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.PropertyConditionDescriptor;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+import org.tizen.efluibuilder.ui.widgets.TizenScale;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+/**
+ * This class creates a 'Scale component' and then adds it to the parent {@link Composite}.
+ */
+public class ScaleEditable extends Editable {
+
+    private TizenScale scale;
+    private Text scaleValue;
+    private PropertyDescriptor parentDescriptor;
+    private Listener listener;
+    private Listener textListener;
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @param parentDescriptor
+     *            property descriptor
+     */
+    public ScaleEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc,
+            PropertyDescriptor parentDescriptor) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+        this.parentDescriptor = parentDescriptor;
+    }
+
+    @Override
+    public void dispose() {
+        if (scale != null && !scale.isDisposed()) {
+            scale.removeListener(SWT.MouseUp, listener);
+            scale.removeListener(SWT.Selection, listener);
+        }
+        if (scaleValue != null && !scaleValue.isDisposed()) {
+            scaleValue.removeListener(SWT.Traverse, textListener);
+            scaleValue.removeListener(SWT.FocusIn, textListener);
+            scaleValue.removeListener(SWT.FocusOut, textListener);
+            scaleValue.removeListener(SWT.MouseDown, textListener);
+            scaleValue.removeListener(SWT.MouseUp, textListener);
+            scaleValue.removeListener(SWT.MouseDoubleClick, textListener);
+            scaleValue.removeListener(SWT.MouseMove, textListener);
+            scaleValue.removeListener(SWT.Selection, textListener);
+        }
+
+        super.dispose();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.tizen.webuibuilder.ui.views.properties.method.Method#refreshValue(java.lang.String,
+     * java.lang.String)
+     */
+    @Override
+    public void refreshValue(String name, String value) {
+        Control control = getControl();
+        if (control == null || control.isDisposed()) {
+            return;
+        }
+
+        if (value == null) {
+            value = BuilderConstants.EMPTY;
+        }
+
+        super.refreshValue(name, value);
+
+        if (value != null && !value.isEmpty()) {
+            scale.setSelection(convertStringToInt(value));
+            scaleValue.setText(value);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.tizen.webuibuilder.ui.views.properties.method.Method#createControl()
+     */
+    @Override
+    protected Control createControl() {
+        Composite composite = new Composite(this, SWT.NONE);
+        composite.setLayout(new FormLayout());
+
+        /** scale */
+        scale = new TizenScale(composite, SWT.HORIZONTAL);
+        FormData data = new FormData();
+        data.left = new FormAttachment(0, 0);
+        data.top = new FormAttachment(0, 0);
+        data.height = 24;
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_LINUX)) {
+            data.right = new FormAttachment(100, -45);
+        } else {
+            data.right = new FormAttachment(100, -40);
+        }
+        scale.setLayoutData(data);
+        // scale.addListener(SWT.Selection, createScaleListener(this));
+        listener = createScaleListener();
+
+        scale.addListener(SWT.MouseUp, listener);
+        scale.addListener(SWT.Selection, listener);
+
+        /** scale value */
+        scaleValue = new Text(composite, SWT.CENTER | SWT.BORDER);
+        scaleValue.setTextLimit(4);
+        data = new FormData(25, 15);
+        data.left = new FormAttachment(scale, 5);
+        data.right = new FormAttachment(100, 0);
+        data.top = new FormAttachment(0);
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_LINUX)) {
+            data.height = 24;
+        }
+        scaleValue.setLayoutData(data);
+
+        textListener = createScaleTextListener();
+        // scaleValue.addKeyListener(createTextListener(this));
+        scaleValue.addListener(SWT.Traverse, textListener);
+        scaleValue.addListener(SWT.FocusIn, textListener);
+        scaleValue.addListener(SWT.FocusOut, textListener);
+        scaleValue.addListener(SWT.MouseDown, textListener);
+        scaleValue.addListener(SWT.MouseUp, textListener);
+        scaleValue.addListener(SWT.MouseDoubleClick, textListener);
+        scaleValue.addListener(SWT.MouseMove, textListener);
+        scaleValue.addListener(SWT.Selection, textListener);
+
+        return composite;
+    }
+
+    private Listener createScaleTextListener() {
+        Listener textListener = new Listener() {
+
+            private boolean hasFocus = false;
+            private boolean hadFocusOnMousedown = false;
+            private Point mousePt = null;
+
+            @Override
+            public void handleEvent(Event event) {
+                Text text = (Text) event.widget;
+
+                switch (event.type) {
+                    case SWT.Traverse:
+                        if (event.detail == SWT.TRAVERSE_RETURN) {
+                            setValue(convertString(text.getText()));
+                        } else if (event.detail == SWT.TRAVERSE_ESCAPE) {
+                            modifyValue(BuilderConstants.EMPTY);
+                            refreshValue(getMethodName(), getValue());
+                        }
+
+                        break;
+                    case SWT.FocusIn:
+                        // text.selectAll();
+                        text.getDisplay().syncExec(new Runnable() {
+
+                            @Override
+                            public void run() {
+                                hasFocus = true;
+                            }
+                        });
+                        break;
+                    case SWT.FocusOut:
+                        setValue(convertString(text.getText()));
+                        hasFocus = false;
+                        break;
+                    case SWT.MouseDown:
+                        mousePt = new Point(event.x, event.y);
+
+                        hadFocusOnMousedown = hasFocus;
+                        break;
+                    case SWT.MouseUp:
+                        if (mousePt != null) {
+                            mousePt = null;
+                            setValue(convertString(text.getText()));
+                        }
+                        if (!hadFocusOnMousedown) {
+                            text.setFocus();
+                            // text.selectAll();
+                        }
+                        break;
+                    case SWT.MouseDoubleClick:
+                        setValue(convertString(text.getText()));
+                        break;
+                    case SWT.MouseMove: {
+                        if (hadFocusOnMousedown) {
+                            // long startTime = System.nanoTime();
+                            if (text != null && text.getText() != null && mousePt != null) {
+                                int valueInt = 0;
+                                if (!text.getText().equals(BuilderConstants.EMPTY)) {
+                                    try {
+                                        float valueFloat = Float.parseFloat(text.getText());
+                                        valueInt = Math.round(valueFloat);
+                                        // valueInt = Integer.parseInt(combo.getText());
+                                    } catch (Exception e) {
+                                        break;
+                                    }
+                                }
+                                if (mousePt.y - BuilderConstants.countPerPx > event.y) {
+                                    String value = String.valueOf(valueInt + 1);
+                                    int max = scale.getMaximum();
+                                    int intValue = convertStringToInt(value);
+                                    if (intValue > max) {
+                                        value = String.valueOf(max);
+                                        intValue = max;
+                                    }
+
+                                    text.setText(value);
+                                    modifyValue(convertString(value));
+                                    scale.setSelection(intValue);
+                                    mousePt.y = mousePt.y - 10;
+                                } else if (mousePt.y + BuilderConstants.countPerPx < event.y) {
+                                    String value = String.valueOf(valueInt - 1);
+                                    int min = scale.getMinimum();
+                                    int intValue = convertStringToInt(value);
+                                    if (intValue < min) {
+                                        value = String.valueOf(min);
+                                        intValue = min;
+                                    }
+
+                                    text.setText(value);
+                                    modifyValue(convertString(value));
+                                    scale.setSelection(intValue);
+                                    mousePt.y = mousePt.y + 10;
+                                }
+                            }
+                        }
+                    }
+                        break;
+
+                    case SWT.Selection: {
+                        setValue(convertString(text.getText()), true);
+                        // because not validate from combo box value
+                    }
+                        break;
+                    default:
+                        break;
+                }
+            }
+        };
+
+        return textListener;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.tizen.webuibuilder.ui.views.properties.method.Method#setConditions(java.util.List)
+     */
+    @Override
+    public void setConditions(List<PropertyConditionDescriptor> conditions) {
+        if (conditions.size() > 0) {
+            if (conditions.get(0).getValue() != null) {
+                scale.setMinimum(Integer.parseInt(conditions.get(0).getValue()));
+                scale.setMaximum(Integer.parseInt(conditions.get(1).getValue()));
+                scale.setIncrement(1);
+
+                String value = getValue();
+                if (value == null || value.isEmpty()) {
+                    scale.setSelection(Integer.parseInt(parentDescriptor.getDefaultValue()));
+                    scaleValue.setText(parentDescriptor.getDefaultValue());
+                } else {
+                    scale.setSelection(convertStringToInt(value));
+                    scaleValue.setText(value);
+                }
+            }
+        }
+    }
+
+    /**
+     * This method creates a {@link Listener} for the mouse event at the {@link Scale}.
+     * 
+     * @param target
+     *            own class ({@link Editable})
+     * @return a {@link Listener}
+     */
+    private Listener createScaleListener() {
+        Listener listener = new Listener() {
+
+            @Override
+            public void handleEvent(Event event) {
+                String value = String.format("%d", scale.getSelection());
+
+                switch (event.type) {
+                    case SWT.MouseUp:
+                        scaleValue.setText(value);
+                        setValue(value);
+                        break;
+                    case SWT.Selection:
+                        scaleValue.setText(value);
+                        modifyValue(value);
+                        break;
+                    default:
+                        break;
+                }
+
+            }
+        };
+
+        return listener;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.tizen.webuibuilder.ui.views.properties.method.Method#getControlLayoutData()
+     */
+    @Override
+    protected FormData getControlLayoutData() {
+        FormData data = super.getControlLayoutData();
+
+        data.right = new FormAttachment(80, 0);
+        return data;
+    }
+
+    private String convertString(String value) {
+        DecimalFormat format = new DecimalFormat("#");
+        return format.format(convertStringToInt(value));
+    }
+
+    private int convertStringToInt(String value) {
+        int realValue = (int) (Float.parseFloat(value));
+        return realValue;
+    }
+
+    @Override
+    public void setValue(String value) {
+        if (getValue().equals(value)) {
+            return;
+        }
+        super.setValue(value);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/StyleEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/StyleEditable.java
new file mode 100644 (file)
index 0000000..c60c9a9
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * Method used on {@link PropertiesTabItem}.
+ */
+public abstract class StyleEditable extends Editable {
+    private String selectorName;
+
+    public StyleEditable(Composite parent, int style, MethodType type, String displayName, boolean hasFunc, String selectorName) {
+        super(parent, style, type, displayName, displayName, displayName, hasFunc);
+        this.selectorName = selectorName;
+    }
+
+    public String getSelectorName() {
+        return selectorName;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextEditable.java
new file mode 100644 (file)
index 0000000..07642ad
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+/**
+ * A TextMethod for TEXT type in the {@link TypeDescriptor.Types}
+ */
+public class TextEditable extends Editable {
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see Editable
+     */
+    public TextEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+    }
+
+    @Override
+    protected Control createControl() {
+        Text text = new Text(this, SWT.SINGLE | SWT.BORDER);
+
+        Listener textListener = EditableUtil.createTextListener(this);
+
+        text.addListener(SWT.Traverse, textListener);
+        text.addListener(SWT.FocusIn, textListener);
+        text.addListener(SWT.FocusOut, textListener);
+        text.addListener(SWT.MouseDown, textListener);
+        text.addListener(SWT.MouseUp, textListener);
+        text.addListener(SWT.MouseDoubleClick, textListener);
+
+        return text;
+    }
+
+    @Override
+    public void refreshValue(String name, String value) {
+        if (value == null) {
+            // return; //background-image has no default value so it need to null set empty
+            value = BuilderConstants.EMPTY;
+        }
+        super.refreshValue(name, value);
+
+        Text text = (Text) getControl();
+        if (!text.isDisposed()) {
+            text.setText(value);
+        }
+    }
+
+    @Override
+    public void setDefaultValue(String defaultValue) {
+        super.setDefaultValue(defaultValue);
+
+        Text text = (Text) getControl();
+        if (defaultValue != null && !defaultValue.isEmpty()) {
+            text.setMessage(BuilderConstants.OPEN_BRACKET + PropertiesConstant.TEXT_NONE + BuilderConstants.COLON + defaultValue
+                    + BuilderConstants.CLOSE_BRACKET);
+        } else {
+            text.setMessage(PropertiesConstant.NONE);
+        }
+    }
+
+    @Override
+    protected FormData getControlLayoutData() {
+        FormData data = super.getControlLayoutData();
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_LINUX)) {
+            data.height = 24;
+        }
+        data.width = 215;
+        return data;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextEditor.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextEditor.java
new file mode 100644 (file)
index 0000000..6027461
--- /dev/null
@@ -0,0 +1,216 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * This class creates a text editor and then adds it to the parent {@link Composite}.
+ */
+public class TextEditor {
+
+    public static final int VIEW_POINT_X = 80;
+    public static final int EDITOR_WIDTH = 60;
+    public static final int EDITOR_HEIGHT = 20;
+    private static final int LIMITED_LENGTH = 6;
+
+    private Composite parent;
+    private Label label;
+    private Text editor;
+
+    private final Color bgColor = new Color(null, 219, 218, 218);
+
+    /**
+     * Construct
+     * 
+     * @param parent
+     *            the parent {@link Composite}
+     * @param input
+     *            initial value
+     */
+    public TextEditor(final Composite parent, String input) {
+        this.parent = parent;
+        label = new Label(this.parent, SWT.CENTER | SWT.READ_ONLY | SWT.BORDER);
+        editor = new Text(this.parent, SWT.CENTER | SWT.BORDER);
+
+        label.setText(input);
+        /** set default background color */
+        label.setBackground(bgColor);
+        editor.setTextLimit(LIMITED_LENGTH);
+    }
+
+    /**
+     * This method shows the {@link Label} and hides the {@link Text}.
+     */
+    public void showLabel() {
+        label.setVisible(true);
+        editor.setVisible(false);
+    }
+
+    /**
+     * This method shows the {@link Text} and hides the {@link Label}.
+     */
+    public void showEditor() {
+        label.setVisible(false);
+        editor.setVisible(true);
+
+        editor.setText(label.getText());
+        editor.selectAll();
+        editor.setFocus();
+    }
+
+    /**
+     * This method returns the parent {@link Composite} of the {@link TextEditor}.
+     * 
+     * @return a {@link Composite}
+     */
+    public Composite getParent() {
+        return parent;
+    }
+
+    /**
+     * This method returns the {@link Label} of the {@link TextEditor}.
+     * 
+     * @return a {@link Label}
+     */
+    public Label getLabel() {
+        return label;
+    }
+
+    /**
+     * This method returns the {@link Text} of the {@link TextEditor}.
+     * 
+     * @return a {@link Text}
+     */
+    public Text getEditor() {
+        return editor;
+    }
+
+    /**
+     * This method set value of the {@link Label}.
+     * 
+     * @param value
+     *            new value of the {@link Label}
+     */
+    public void setLabel(String value) {
+        if (label == null || label.isDisposed()) {
+            return;
+        }
+        label.setText(value);
+    }
+
+    /**
+     * This method set {@link MouseListener} for the mouse event at the {@link Label}.
+     * 
+     * @param listener
+     *            a {@link MouseListener}
+     */
+    public void setLabelListener(MouseListener listener) {
+        label.addMouseListener(listener);
+    }
+
+    /**
+     * This method set {@link Listener} for the keyboard and mouse event at the {@link Text}.
+     * 
+     * @param listener
+     *            a {@link Listener}
+     */
+    public void setEditorListener(Listener listener) {
+        editor.addListener(SWT.FocusOut, listener);
+        editor.addListener(SWT.Traverse, listener);
+        editor.addListener(SWT.Deactivate, listener);
+    }
+
+    /**
+     * This method set top position of the {@link TextEditor} included in the 'Clip component'.
+     * 
+     * @param left
+     *            a {@link Label}, which is located on the left side
+     */
+    public void setTopPosition(final Label left) {
+        FormData topEditorData = new FormData();
+        topEditorData.left = new FormAttachment(left, 0);
+        // topEditorData.top = new FormAttachment(0, VIEW_POINT_Y);
+        topEditorData.top = new FormAttachment(0, 0);
+        topEditorData.right = new FormAttachment(left, EDITOR_WIDTH * 2);
+        // topEditorData.bottom = new FormAttachment(0, VIEW_POINT_Y + EDITOR_HEIGHT);
+        topEditorData.bottom = new FormAttachment(0, EDITOR_HEIGHT);
+        label.setLayoutData(topEditorData);
+        editor.setLayoutData(topEditorData);
+    }
+
+    /**
+     * This method set right position of the {@link TextEditor} included in the 'Clip component'.
+     * 
+     * @param left
+     *            a {@link Label}, which is located on the left side
+     */
+    public void setRightPosition(final Label left) {
+        FormData rightEditorData = new FormData();
+        rightEditorData.left = new FormAttachment(left, 0);
+        rightEditorData.top = new FormAttachment(0, EDITOR_HEIGHT);
+        rightEditorData.right = new FormAttachment(left, EDITOR_WIDTH * 2);
+        rightEditorData.bottom = new FormAttachment(0, EDITOR_HEIGHT * 2);
+        label.setLayoutData(rightEditorData);
+        editor.setLayoutData(rightEditorData);
+    }
+
+    /**
+     * This method set left position of the {@link TextEditor} included in the 'Clip component'.
+     */
+    public void setLeftPosition() {
+        FormData rightEditorData = new FormData();
+        rightEditorData.left = new FormAttachment(0, VIEW_POINT_X);
+        rightEditorData.top = new FormAttachment(0, EDITOR_HEIGHT);
+        rightEditorData.right = new FormAttachment(0, VIEW_POINT_X + EDITOR_WIDTH);
+        rightEditorData.bottom = new FormAttachment(0, EDITOR_HEIGHT * 2);
+        label.setLayoutData(rightEditorData);
+        editor.setLayoutData(rightEditorData);
+    }
+
+    /**
+     * This method set bottom position of the {@link TextEditor} included in the 'Clip component'.
+     * 
+     * @param left
+     *            a {@link Label}, which is located on the left side
+     */
+    public void setBottomPosition(final Label left) {
+        FormData bottomEditorData = new FormData();
+        bottomEditorData.left = new FormAttachment(left, 0);
+        bottomEditorData.top = new FormAttachment(0, EDITOR_HEIGHT * 2);
+        bottomEditorData.right = new FormAttachment(left, EDITOR_WIDTH * 2);
+        bottomEditorData.bottom = new FormAttachment(0, EDITOR_HEIGHT * 3);
+        label.setLayoutData(bottomEditorData);
+        editor.setLayoutData(bottomEditorData);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextResourceEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextResourceEditable.java
new file mode 100644 (file)
index 0000000..f5505d6
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.efluibuilder.gef.dnd.model.RMResource;
+import org.tizen.efluibuilder.model.descriptors.TypeDescriptor;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesConstant;
+
+
+/**
+ * A TextResourceMethod for TEXTRESOURCE type in the {@link TypeDescriptor.Types}
+ */
+public class TextResourceEditable extends ResourceEditable {
+
+    /**
+     * Constructor.
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @see ResourceEditable
+     */
+    public TextResourceEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+        super(parent, style, type, name, value, displayName, hasFunc, RMResource.TXT);
+        Image image = ImageResources.getImage(ImageResources.METHOD_IMAGE);
+        setDialogButtonImage(image);
+    }
+
+    @Override
+    protected String[] getFilterExtensions() {
+        String[] s = { PropertiesConstant.DIALOG_FILTER_TXT, PropertiesConstant.DIALOG_FILTER_ALL }; // ALL
+
+        return s;
+    }
+
+    @Override
+    protected String[] getFilterNames() {
+        String[] s = { PropertiesConstant.DIALOG_FILTER_NAME_TXT, PropertiesConstant.DIALOG_FILTER_NAME_ALL };
+
+        return s;
+    }
+
+    @Override
+    protected int getDefaultIndex() {
+        return 0;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextStyleEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/TextStyleEditable.java
new file mode 100644 (file)
index 0000000..f345685
--- /dev/null
@@ -0,0 +1,320 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import java.util.List;
+
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.PropertyDescriptor;
+
+
+/**
+ * This class creates a 'Text group component' and then adds it to the parent {@link Composite}.
+ */
+public class TextStyleEditable extends GroupEditable {
+
+    /**
+     * Construct
+     * 
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot be null)
+     * @param style
+     *            the style of widget to construct
+     * @param type
+     *            a {@link MethodType}
+     * @param name
+     *            property name
+     * @param value
+     *            property value
+     * @param displayName
+     *            display name
+     * @param hasFunc
+     *            <code>true</code> if the Method has function button, and <code>false</code>
+     *            otherwise
+     * @param model
+     *            a {@link Object}
+     * @param parentDescriptor
+     *            property descriptor
+     */
+    public TextStyleEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc, Object model,
+            PropertyDescriptor parentDescriptor) {
+        super(parent, style, type, name, value, displayName, hasFunc, model, parentDescriptor);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.tizen.webuibuilder.ui.views.properties.method.GroupMethod#createChildMethods()
+     */
+    protected void createChildMethods() {
+        PropertyDescriptor parentDescriptor = getParentDescriptor();
+        if (parentDescriptor == null) {
+            return;
+        }
+
+        EditableCreationFactory factory = EditableCreationFactory.getInstance();
+        List<Editable> methods = getChildMethods();
+        List<PropertyDescriptor> children = parentDescriptor.getChildPropertyDescriptors();
+
+        // int methodSize = methods.size();
+        // int widthMargin = 4;
+        int heightMargin = 4;
+
+        for (int index = 0; index < children.size(); index++) {
+            PropertyDescriptor child = children.get(index);
+            String value = getChildValue(child.getPropertyName());
+
+            Editable method = factory.createMethod(getControl(), child, value, MethodType.STYLE, false);
+            if (method == null) {
+                continue;
+            } else {
+                FormData data = new FormData();
+
+                switch (index) {
+                    case 0:
+                        /** font-family */
+                        data.top = new FormAttachment(0, 0);
+                        data.left = new FormAttachment(0, 0);
+                        data.right = new FormAttachment(49, 0);
+                        break;
+                    case 1:
+                        /** font-size */
+                        data.top = new FormAttachment(0, 0);
+                        data.left = new FormAttachment(methods.get(0), 5);
+                        data.right = new FormAttachment(100, 0);
+                        break;
+                    case 2:
+                        /** group-icon (font-weight / font-style / font-decoration) */
+                        data.top = new FormAttachment(methods.get(0), heightMargin);
+                        data.left = new FormAttachment(0, 0);
+                        data.right = new FormAttachment(40, 0);
+                        break;
+                    case 3:
+                        /** text-transform */
+                        data.top = new FormAttachment(methods.get(0), heightMargin);
+                        data.left = new FormAttachment(methods.get(index - 1), 0);
+                        data.right = new FormAttachment(70, 0);
+                        break;
+                    case 4:
+                        /** color */
+                        data.top = new FormAttachment(methods.get(0), heightMargin);
+                        data.left = new FormAttachment(methods.get(index - 1), 0);
+                        data.right = new FormAttachment(100, 0);
+                        break;
+                    case 5:
+                        /** text-align */
+                        data.top = new FormAttachment(methods.get(2), heightMargin);
+                        data.left = new FormAttachment(0, 0);
+                        data.right = new FormAttachment(40, 0);
+                        break;
+                    case 6:
+                        /** vertical-align */
+                        data.top = new FormAttachment(methods.get(2), heightMargin);
+                        data.left = new FormAttachment(methods.get(index - 1), 0);
+                        data.right = new FormAttachment(70, 0);
+                        break;
+                    case 7:
+                        /** letter-spacing */
+                        data.top = new FormAttachment(methods.get(5), heightMargin);
+                        data.left = new FormAttachment(0, 0);
+                        data.right = new FormAttachment(49, 0);
+                        break;
+                    case 8:
+                        /** line-height */
+                        data.top = new FormAttachment(methods.get(5), heightMargin);
+                        data.left = new FormAttachment(51, 0);
+                        data.right = new FormAttachment(100, 0);
+                        break;
+                    case 9:
+                        /** stroke-color */
+                        data.top = new FormAttachment(methods.get(7), heightMargin);
+                        data.left = new FormAttachment(0, 0);
+                        data.right = new FormAttachment(49, 0);
+                        break;
+                    case 10:
+                        /** stroke-width */
+                        data.top = new FormAttachment(methods.get(7), heightMargin);
+                        data.left = new FormAttachment(51, 0);
+                        data.right = new FormAttachment(100, 0);
+                        break;
+                    case 11:
+                        /** text-shadow */
+                        data.top = new FormAttachment(methods.get(9), heightMargin);
+                        data.left = new FormAttachment(0, 0);
+                        data.right = new FormAttachment(100, 0);
+                        // labelPosition = 17;
+                        break;
+                    default:
+                        break;
+                }
+
+                method.setControlRightData(100, 0);
+                method.setValueChangedListener(this);
+                method.setLayoutData(data);
+                method.setLabelRightData(0, 65);
+                method.setLabelTooltipText(child.getPropertyName());
+                methods.add(method);
+            }
+
+            addChildKeyValue(child.getPropertyName(), value);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.tizen.webuibuilder.ui.views.properties.method.GroupMethod#valueChanged(org.tizen.
+     * webuibuilder .ui.views.properties.method.MethodEvent)
+     */
+    // @Override
+    // public void valueChanged(MethodEvent event) {
+    // String childKey = event.getKey();
+    // String childValue = event.getValue();
+    // Method childMethod = event.getMethod();
+    //
+    // if (childKey == null || childValue == null) {
+    // return;
+    // }
+    //
+    // String message = validateStyle(childKey, childValue, childMethod);
+    // if (!message.equals(ComponentValidator.OK)) {
+    // refresh();
+    // childMethod.showErrorToolTip(message);
+    // return;
+    // }
+    //
+    // StringBuilder builder = new StringBuilder(childKey);
+    // builder.append(BuilderConstants.COLON);
+    // builder.append(childValue);
+    // recentEditedMethod = event.getMethod();
+    // setValue(builder.toString(), true);
+    // }
+
+    @Override
+    public void valueModified(EditableEvent event) {
+        String childKey = event.getKey();
+        String childValue = event.getValue();
+
+        if (childKey == null || childValue == null) {
+            return;
+        }
+
+        modifyValue(childKey, childValue);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.tizen.webuibuilder.ui.views.properties.method.Method#setValue(java.lang.String,
+     * boolean)
+     */
+    @Override
+    public void setValue(String value, boolean undoable) {
+        if (value != null && !value.isEmpty()) {
+            String[] values = value.split(":");
+
+            String realKey = values[0];
+            String realValue = BuilderConstants.EMPTY;
+            if (values.length > 1) {
+                realValue = values[1];
+            }
+            // refreshValue(realKey, realValue);
+            hideErrorTooltip();
+
+            IValueChangeListener listener = getValueChangedListener();
+
+            if (listener != null) {
+                listener.valueChanged(new EditableEvent(this, realKey, realValue, undoable));
+            }
+        } else {
+            /** value is null !! */
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.tizen.webuibuilder.ui.views.properties.method.GroupMethod#refreshValue(java.lang.String,
+     * java.lang.String)
+     */
+    @Override
+    public void refreshValue(String name, String value) {
+
+        if (name != null && name.equals(getMethodName()) && (value == null || value.isEmpty() || value.equals("none"))) {
+            resetChilden();
+            return;
+        }
+        if (name == null) {
+            name = BuilderConstants.EMPTY;
+        }
+
+        addChildKeyValue(name, value);
+
+        Editable child = getChildMethod(name);
+        if (child != null) {
+            child.refreshValue(name, value);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.tizen.webuibuilder.ui.views.properties.method.GroupMethod#getChildMethod(java.lang.String
+     * )
+     */
+    @Override
+    public Editable getChildMethod(String key) {
+        for (Editable child : getChildMethods()) {
+            if (child.getMethodName().equals(key)) {
+                return child;
+            } else if (child instanceof GroupEditable) {
+                GroupEditable groupChild = (GroupEditable) child;
+                Editable descendant = groupChild.getChildMethod(key);
+                if (descendant != null) {
+                    return descendant;
+                }
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public void refresh() {
+        // / Do nothing
+        return;
+    }
+
+    @Override
+    protected String getResultValue(String childKey, String childValue) {
+        StringBuilder builder = new StringBuilder(childKey);
+        builder.append(BuilderConstants.COLON);
+        builder.append(childValue);
+        return builder.toString();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/UserColorData.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/UserColorData.java
new file mode 100644 (file)
index 0000000..7b1d889
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.method;
+
+import org.eclipse.swt.graphics.RGB;
+
+
+/**
+ * This class creates a color data model that contains Alpha value and {@link RGB} value.
+ */
+public class UserColorData {
+
+    private ColorData color;
+    private int labelWidth;
+    private int labelHeight;
+
+    /**
+     * Construct
+     * 
+     * @param color
+     *            custom {@link ColorData}
+     * @param width
+     *            width of the area to represent the custom color
+     * @param height
+     *            height of the area to represent the custom color
+     */
+    public UserColorData(ColorData color, int width, int height) {
+        this.color = color;
+        labelWidth = width;
+        labelHeight = height;
+    }
+
+    /**
+     * This method returns color data.
+     * 
+     * @return a {@link ColorData}
+     */
+    public ColorData getColorData() {
+        return color;
+    }
+
+    /**
+     * This method returns width of the area to represent the custom color.
+     * 
+     * @return width of the area to represent the custom color
+     */
+    public int getLabelWidth() {
+        return labelWidth;
+    }
+
+    /**
+     * Thid method returns height of the area to represent the custom color.
+     * 
+     * @return height of the area to represent the custom color
+     */
+    public int getLabelHeight() {
+        return labelHeight;
+    }
+
+    /**
+     * This method set color data.
+     * 
+     * @param color
+     *            new {@link ColorData}
+     */
+    public void setColorData(ColorData color) {
+        this.color = color;
+    }
+
+    /**
+     * This method set width of the area to represent the custom color.
+     * 
+     * @param width
+     *            width of the area to represent the custom color
+     */
+    public void setLabelWidth(int width) {
+        labelWidth = width;
+    }
+
+    /**
+     * This method set height of the area to represent the custom color.
+     * 
+     * @param height
+     *            height of the area to represent the custom color
+     */
+    public void setLabelHeight(int height) {
+        labelHeight = height;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ViewsComboEditable.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/method/ViewsComboEditable.java
new file mode 100755 (executable)
index 0000000..4b90bf0
--- /dev/null
@@ -0,0 +1,114 @@
+/*\r
+ * UI Builder - StoryBoard\r
+ *\r
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - Samsung R&D Institute India, Bangalore\r
+ *\r
+ */\r
+\r
+\r
+package org.tizen.efluibuilder.ui.views.properties.method;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.widgets.Combo;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.tizen.efluibuilder.BuilderConstants;\r
+import org.tizen.efluibuilder.model.part.Part;\r
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;\r
+import org.tizen.efluibuilder.ui.views.properties.method.Editable;\r
+\r
+\r
+/**\r
+ * A combo method to show the views for selecting target view of connection.\r
+ */\r
+public class ViewsComboEditable extends Editable {\r
+\r
+    private List<Part> views;\r
+    private SelectionAdapter comboListener = new SelectionAdapter() {\r
+\r
+        @Override\r
+        public void widgetSelected(SelectionEvent e) {\r
+            selectedCombo();\r
+        }\r
+    };\r
+\r
+    public ViewsComboEditable(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {\r
+        super(parent, style, type, name, value, displayName, hasFunc);\r
+    }\r
+\r
+    @Override\r
+    protected Control createControl() {\r
+        Combo combo = new Combo(this, SWT.READ_ONLY | SWT.DROP_DOWN);\r
+        return combo;\r
+    }\r
+\r
+    public void setItems(List<Part> views) {\r
+        if (getControl().isDisposed()) {\r
+            return;\r
+        }\r
+        this.views = views;\r
+        Combo combo = (Combo) getControl();\r
+\r
+        List<String> temp = new ArrayList<String>();\r
+        for (Part view : views) {\r
+            temp.add(view.getPropertyValue(LayoutSchemaConstants.ID));\r
+        }\r
+        String[] names = temp.toArray(new String[0]);\r
+\r
+        combo.setItems(names);\r
+        combo.select(0);\r
+\r
+        combo.addSelectionListener(comboListener);\r
+        refreshValue(getMethodName(), getValue());\r
+    }\r
+\r
+    @Override\r
+    public void dispose() {\r
+        Combo combo = (Combo) getControl();\r
+        if (combo != null && !combo.isDisposed()) {\r
+            combo.removeSelectionListener(comboListener);\r
+        }\r
+\r
+        super.dispose();\r
+    }\r
+\r
+    protected void selectedCombo() {\r
+        Part selectedView = views.get(((Combo) getControl()).getSelectionIndex());\r
+        setValue(selectedView.getPropertyValue(LayoutSchemaConstants.ID));\r
+    }\r
+\r
+    @Override\r
+    public void refreshValue(String name, String value) {\r
+        if (value == null) {\r
+            value = BuilderConstants.EMPTY;\r
+        }\r
+        super.refreshValue(name, value);\r
+        if (views != null) {\r
+            for (int i = 0, cnt = views.size(); i < cnt; i++) {\r
+                if (value != null && value.equals(views.get(i).getPropertyValue(LayoutSchemaConstants.ID))) {\r
+                    ((Combo) getControl()).select(i);\r
+                }\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/ComponentDesignerExecuter.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/ComponentDesignerExecuter.java
new file mode 100644 (file)
index 0000000..50771f5
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.style;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.application.InstallPathConfig;
+import org.tizen.common.util.FileUtil;
+import org.tizen.common.util.HostUtil;
+import org.tizen.common.util.OSChecker;
+
+
+public class ComponentDesignerExecuter {
+    private static final String OPTION_W = "-w"; //$NON-NLS-1$
+    private static final String OPTION_O = "-o"; //$NON-NLS-1$
+    private static final String OPTION_EXPORT_EDJ = "--export-edj"; //$NON-NLS-1$
+    private static final String OPTION_EXPORT_EDC = "--export-edc"; //$NON-NLS-1$
+    private static final String ENV_FORMAT_WINDOWS = "set path=%s;%s;%s &&"; //$NON-NLS-1$
+    private static final String ENV_FORMAT_MAC = "PATH=%s:$PATH DYLD_LIBRARY_PATH=%s FONTCONFIG_PATH=%s"; //$NON-NLS-1$
+    private static final String ENV_FORMAT_LINUX = "PATH=%s:$PATH LD_LIBRARY_PATH=%s:%s:$LD_LIBRARY_PATH PKG_CONFIG_PATH=%s"; //$NON-NLS-1$
+    private static final String EXECUTE_FILE_NAME = "eflete"; //$NON-NLS-1$
+
+    private static Logger logger = LoggerFactory.getLogger(ComponentDesignerExecuter.class);
+
+    /**
+     * To run the Component designer, call this method with some arguments. some arguments is
+     * required, and others is optional.
+     * 
+     * @param widgetName
+     *            required (not null)
+     * @param srcStyleName
+     *            required (not null)
+     * @param srcItemStyleName
+     *            optional (this is needed when you edit an itemStyle.)
+     * @param exportStyleName
+     *            optional (If this is null, style will be overwritten as same name,).
+     * @param sourceEDJPath
+     *            required (not null)
+     * @param exportEDJpath
+     *            optional (If this is null, style will be overwritten to srcEDJPath.)
+     * @param exportEDCpath
+     *            edc will be exported several files. so this param must be a directory. optional
+     *            (If this is null, edc files will not be exported.)
+     */
+    public static void executeTool(String widgetName, String srcStyleName, String srcItemStyleName,
+                                   String exportStyleName, String srcEDJPath, String exportEDJpath, String exportEDCpath) {
+        final String command = getCommand(widgetName, srcStyleName, srcItemStyleName, exportStyleName,
+                                          srcEDJPath, exportEDJpath, exportEDCpath);
+        logger.debug(command);
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                HostUtil.returnExecute(command, null, false);
+            }
+        }).start();
+    }
+
+    /*
+     * In Ubuntu, execute command is like following as : {env} {tool execute binary} --export-edj
+     * {exportEDJ} --export-edc {exportEDC} -w {widget}:{srcStyle}:{srcItemStyle}[{exportEDJpath}]
+     * {srcEDJ}
+     */
+    private static String getCommand(String widgetName, String srcStyleName, String srcItemStyleName,
+                                     String exportStyleName, String srcEDJPath, String exportEDJPath, String exportEDCPath) {
+        String env = getEnv();
+        String ExecuteToolBinaryPath = getPathOfExecuteBinaryofTool();
+        String exportFileOption = getExportFileOption(exportEDJPath, exportEDCPath);
+        String styleOption = getStyleOption(widgetName, srcStyleName, srcItemStyleName, exportStyleName);
+        String redirectStream = "";
+        if (OSChecker.isWindows()) {
+            redirectStream = "1> NUL 2> NUL"; //$NON-NLS-1$
+        } else {
+            redirectStream = "1> /dev/null 2> /dev/null"; //$NON-NLS-1$
+        }
+        return env + " " + ExecuteToolBinaryPath + " " + exportFileOption + " " + styleOption + " " + srcEDJPath + " " + redirectStream;
+    }
+
+    private static String getEnv() {
+        String fullpathOfEflTool = getFullPathOfEflTool();
+        String fullpathOfComponentDesigner = getFullPathOfComponentDesigner();
+        String eflToolBin = FileUtil.appendPath(fullpathOfEflTool, "bin"); //$NON-NLS-1$
+        String eflToolLib = FileUtil.appendPath(fullpathOfEflTool, "lib"); //$NON-NLS-1$
+
+        if (OSChecker.isWindows()) {
+            String componentDesignerBin = FileUtil.appendPath(fullpathOfComponentDesigner, "bin"); //$NON-NLS-1$
+            return String.format(ENV_FORMAT_WINDOWS, eflToolBin, componentDesignerBin, "%path%"); //$NON-NLS-1$
+        } else if (OSChecker.isMAC()) {
+            String fontConfig = FileUtil.appendPath(fullpathOfEflTool, "etc"); //$NON-NLS-1$
+            fontConfig = FileUtil.appendPath(fontConfig, "font"); //$NON-NLS-1$
+            return String.format(ENV_FORMAT_MAC, eflToolBin, eflToolLib, fontConfig);
+        } else {
+            // export
+            // LD_LIBRARY_PATH=~/tizen-studio/tools/efl-tools/lib/:~/tizen-studio/tools/component-designer/lib
+            // export PKG_CONFIG_PATH=~/tizen-studio/tools/efl-tools/lib/pkgconfig
+            // export PATH=~/tizen-studio/tools/efl-tools/bin:$PATH
+            String componentDesignerLib = FileUtil.appendPath(fullpathOfComponentDesigner, "lib"); //$NON-NLS-1$
+            String eflToolPkgConfig = FileUtil.appendPath(eflToolLib, "pkgconfig"); //$NON-NLS-1$
+            return String.format(ENV_FORMAT_LINUX, eflToolBin, eflToolLib, componentDesignerLib, eflToolPkgConfig);
+        }
+    }
+
+    private static String getFullPathOfEflTool() {
+        IPath path = new Path(InstallPathConfig.getToolsPath()).append("efl-tools"); //$NON-NLS-1$
+        return path.toOSString();
+    }
+
+    private static String getFullPathOfComponentDesigner() {
+        IPath path = new Path(InstallPathConfig.getToolsPath()).append("component-designer"); //$NON-NLS-1$
+        return path.toOSString();
+    }
+
+    private static String getPathOfExecuteBinaryofTool() {
+        String pathOfComponentDesigner = getFullPathOfComponentDesigner();
+        String binPath = FileUtil.appendPath(pathOfComponentDesigner, "bin"); //$NON-NLS-1$
+        return FileUtil.appendPath(binPath, EXECUTE_FILE_NAME); // All of OS(Windows, Mac, Linux)
+                                                                // are same.
+    }
+
+    private static String getExportFileOption(String exportEDJPath, String exportEDCPath) {
+        String option = "";
+        if (exportEDJPath != null) {
+            option += OPTION_EXPORT_EDJ + " " + exportEDJPath + " ";
+        }
+        // if (exportEDCPath != null) {
+        // option += OPTION_EXPORT_EDC + " " + exportEDCPath;
+        // }
+        return option;
+    }
+
+    // -w widget:srcStyle{srcItemStyle[exportItemStyleName]}[exportStyleName]
+    private static String getStyleOption(String widgetName, String srcStyleName, String srcItemStyleName,
+                                         String exportStyleName) {
+        String option = OPTION_O + " " + OPTION_W + " " + widgetName + ":" + srcStyleName;
+        if (srcItemStyleName != null) {
+            option += "{" + srcItemStyleName;
+        }
+        if (exportStyleName != null) {
+            option += "[" + exportStyleName + "]";
+        }
+        if (srcItemStyleName != null) {
+            option += "}";
+        }
+        option = option.replaceAll("&", "\"&\"");
+        return option;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleEDJManager.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleEDJManager.java
new file mode 100644 (file)
index 0000000..cd2798e
--- /dev/null
@@ -0,0 +1,287 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.style;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.core.resources.IProject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.application.InstallPathConfig;
+import org.tizen.common.core.application.ProfileInfo;
+import org.tizen.common.core.application.ProfileVersionInfo;
+import org.tizen.efluibuilder.core.configurator.ConfiguratorConstants;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.renderer.IArguments;
+import org.tizen.efluibuilder.renderer.IRenderer;
+import org.tizen.efluibuilder.renderer.IRendererListener;
+import org.tizen.efluibuilder.renderer.RendererConstants;
+import org.tizen.efluibuilder.renderer.RendererFactory;
+import org.tizen.efluibuilder.renderer.event.RenderEvent;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+import edjResourceSyncManager.EdjResourceChangedEvent;
+import edjResourceSyncManager.EdjResourceSyncManager;
+import edjResourceSyncManager.IEdjResourceChangeListener;
+import edjResourceSyncManager.ResourceFileDuplicator;
+
+
+public class StyleEDJManager implements IRendererListener, IEdjResourceChangeListener {
+    private static Logger logger = LoggerFactory.getLogger(StyleEDJManager.class);
+    // To efl-renderer
+    private final static String DES_RES_ELM_THEME_PATH = "./res/theme/"; //$NON-NLS-1$
+    private final static String PATH_RESOURCE = "res"; //$NON-NLS-1$
+    private final static String PATH_CUSTOM_THEME = "theme"; //$NON-NLS-1$
+    private final static String CUSTOM_STYLE_EDJ = "custom_theme.edj"; //$NON-NLS-1$
+    private final static String DEFAULT_THEME_PATH = "efl-tool" + File.separator + "efl-renderer" + File.separator + "res" + File.separator + "theme"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+    private Part documentPart;
+    private IProject project;
+    private String version;
+    private String profile;
+    private List<String> defaultEDJs;
+    // Key : Widget, Value : Map<Style, List<itemStyle>>
+    private Map<String, Map<String, List<String>>> customStyleInfo = new HashMap<String, Map<String, List<String>>>();
+    // Key : "full path of defaultEDJ", Value : "Map<Widget, Map<Style, List<itemStyle>>>"
+    private Map<String, Map<String, Map<String, List<String>>>> defaultStyleInfo = new HashMap<String, Map<String, Map<String, List<String>>>>();
+    private IRenderer renderer;
+    private ResourceFileDuplicator resFileDuplicator = null;
+    private boolean isRendererInitialized;
+
+    public StyleEDJManager(Part documentPart, IProject project, String version, String profile, List<String> defaultEDJs,
+            ResourceFileDuplicator resFileDuplicator) {
+        this.documentPart = documentPart;
+        this.project = project;
+        this.version = version;
+        this.profile = profile;
+        this.defaultEDJs = defaultEDJs;
+        this.resFileDuplicator = resFileDuplicator;
+    }
+
+    public void init() {
+        int width = 100;
+        int height = 100;
+        RendererFactory factory = RendererFactory.getDefault();
+        renderer = factory.create(version, profile, project.getLocation().toString());
+        if (renderer != null) {
+            renderer.setName("");
+            renderer.addRendererListener(this);
+            renderer.create(width, height, getDefaultThemePathForEflRenderer(), getCustomThemePathForEflRenderer());
+        }
+    }
+
+    private String getDefaultStyleEDJPath(String edjFile) {
+        String eflRendererPath = "";
+        if (profile.contains(ConfiguratorConstants.PROFILE_WEARABLE)) {
+            ProfileInfo profileInfo = InstallPathConfig.getProfileInfo(ConfiguratorConstants.PROFILE_WEARABLE);
+            if (profileInfo != null) {
+                ProfileVersionInfo versionInfo = profileInfo.getVersionInfo(version);
+                eflRendererPath = (versionInfo != null) ? versionInfo.getVersionPath() : "";
+            }
+        } else {
+            eflRendererPath = InstallPathConfig.getPlatformToolsPath(profile, version);
+        }
+        return eflRendererPath + File.separator + DEFAULT_THEME_PATH + File.separator + edjFile;
+    }
+
+    public void setCustomStyleInfo(Map<String, Map<String, List<String>>> customStyleInfo) {
+        this.customStyleInfo = customStyleInfo;
+    }
+
+    public Map<String, Map<String, List<String>>> getCustomStyleNames() {
+        return customStyleInfo;
+    }
+
+    public Map<String, Map<String, Map<String, List<String>>>> getDefaultStyleInfoMap() {
+        return defaultStyleInfo;
+    }
+
+    public String getProjectVersion() {
+        return version;
+    }
+
+    public Part getDocumentPart() {
+        return documentPart;
+    }
+
+    public String findDefaultThemePath(String widgetName, String styleName) {
+        for (int i = 0; i < defaultEDJs.size(); i++) {
+            // Key : Widget, Value : Map<Style, List<itemStyle>>
+            Map<String, Map<String, List<String>>> widgets = defaultStyleInfo.get(getDefaultStyleEDJPath(defaultEDJs.get(i)));
+            Map<String, List<String>> styles = widgets.get(widgetName);
+            if (styles != null && styles.keySet().contains(styleName)) {
+                return getDefaultStyleEDJPath(defaultEDJs.get(i));
+            }
+        }
+        logger.error("Not exist in default theme files (" + widgetName + ", " + styleName + ")"); //$NON-NLS-1$
+        return null;
+    }
+
+    public String findParentStyle(Map<String, List<String>> styles, String itemStyleName) {
+        if (styles != null) {
+            for (Entry<String, List<String>> entry : styles.entrySet()) {
+                String parentStyle = entry.getKey();
+                List<String> itemStyles = entry.getValue();
+                if (itemStyles != null) {
+                    for (int i = 0; i < itemStyles.size(); i++) {
+                        if (itemStyles.get(i).equals(itemStyleName)) {
+                            return parentStyle;
+                        }
+                    }
+                }
+            }
+        }
+        logger.error("Item style(" + itemStyleName + ") has no parent style"); //$NON-NLS-1$ //$NON-NLS-2$
+        return null;
+    }
+
+    public String getDefaultThemePathForEflRenderer() {
+        StringBuffer themePath = new StringBuffer();
+        for (int i = 0; i < defaultEDJs.size(); i++) {
+            if (i > 0) {
+                themePath.append(":");
+            }
+            themePath.append(DES_RES_ELM_THEME_PATH + defaultEDJs.get(i));
+        }
+        return themePath.toString();
+    }
+
+    public String getCustomThemePathForEflRenderer() {
+        if (isExistCustomTheme()) {
+            String customThemePath = getCustomThemePath();
+            if (PlatformUtil.getOS().equals(PlatformUtil.OS_WIN32)) {
+                return resFileDuplicator.copyFileToTempFolder(customThemePath);
+            } else {
+                return customThemePath;
+            }
+        }
+        return null;
+    }
+
+    public void removeStyleFromCustomStyleEDJ(String widgetName, String styleName, String itemStyleName) {
+        if (renderer != null && isRendererInitialized) {
+            String path = getCustomThemePath();
+            if (path != null) {
+                if (itemStyleName == null) {
+                    customStyleInfo.get(widgetName).remove(styleName);
+                } else {
+                    customStyleInfo.get(widgetName).get(styleName).remove(itemStyleName);
+                }
+                renderer.requestRemoveStyleName(path, widgetName, styleName, itemStyleName);
+            }
+        }
+    }
+
+    public void overlayTheme() {
+        if (renderer != null && isRendererInitialized) {
+            renderer.requestOverlayTheme(getCustomThemePathForEflRenderer());
+        }
+    }
+
+    public boolean createCustomThemeDirectory() {
+        File themeDirectory = new File(project.getLocation().toString() + File.separator + PATH_RESOURCE + File.separator + PATH_CUSTOM_THEME);
+        if (!themeDirectory.mkdir()) {
+            logger.warn("It's failed to make the custom style directory."); //$NON-NLS-1$
+            return false;
+        }
+        return true;
+    }
+
+    public String getCustomThemeDirectoryPath() {
+        if (project != null && project.getLocation() != null) {
+            return project.getLocation().toString() + File.separator + PATH_RESOURCE + File.separator + PATH_CUSTOM_THEME;
+        }
+        return "";
+    }
+
+    public String getCustomThemePath() {
+        return getCustomThemeDirectoryPath() + File.separator + CUSTOM_STYLE_EDJ;
+    }
+
+    public boolean isExistCustomThemeDirectory() {
+        return new File(getCustomThemeDirectoryPath()).exists();
+    }
+
+    public boolean isExistCustomTheme() {
+        return new File(getCustomThemePath()).exists();
+    }
+
+    @Override
+    public void replyRender(RenderEvent event) {
+        // Do nothing
+    }
+
+    @Override
+    public void reply(final IArguments message) {
+        if (message.getId().equals(RendererConstants.EVENT_GET_STYLE_NAMES)) {
+            String path = (String) message.getArg(0);
+            @SuppressWarnings("unchecked")
+            Map<String, Map<String, List<String>>> styleMap = (Map<String, Map<String, List<String>>>) message.getArg(1);
+            if (path.equals(getCustomThemePath()) == false) {
+                defaultStyleInfo.put(path, styleMap);
+            }
+        } else if (message.getId().equals(RendererConstants.EVENT_CREATE)) {
+            this.isRendererInitialized = true;
+            for (int i = 0; i < defaultEDJs.size(); i++) {
+                renderer.requestGetStyleNames(getDefaultStyleEDJPath(defaultEDJs.get(i)));
+            }
+        } else if (message.getId().equals(RendererConstants.EVENT_REMOVE_STYLE_NAME)) {
+            logger.debug("Received EVENT_REMOVE_STYLE_NAME!!!"); //$NON-NLS-1$
+        } else if (message.getId().equals(RendererConstants.EVENT_OVERLAY_THEME)) {
+            logger.debug("Recevied EVENT_OVERLAY_STYLE!!!"); //$NON-NLS-1$
+        }
+    }
+
+    @Override
+    public void edjResourceChanged(EdjResourceChangedEvent event) {
+        if (event.type == EdjResourceChangedEvent.TYPE_CHANGED) {
+            String filePath = event.path;
+            if (event.styleNames != null && getCustomThemePath().equals(filePath)) {
+                logger.debug("custom theme file is changed."); //$NON-NLS-1$
+                overlayTheme();
+            }
+        } else if (event.type == EdjResourceChangedEvent.TYPE_REMOVED) {
+            String filePath = event.path;
+            if (EdjResourceSyncManager.CUSTOM_STYLE_EDJ.equals(filePath)) {
+                customStyleInfo = null;
+                logger.debug("custom theme file is removed."); //$NON-NLS-1$
+                overlayTheme();
+            }
+        }
+    }
+
+    public static boolean isLaterVersion3_0(String version) {
+        String[] beforeVersions = {
+                "2.3",
+                "2.3.1",
+                "2.3.2",
+                "2.4"
+        };
+        return (Arrays.asList(beforeVersions).contains(version)) == false;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleEditDialog.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleEditDialog.java
new file mode 100644 (file)
index 0000000..40c0747
--- /dev/null
@@ -0,0 +1,420 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.style;
+
+import java.util.Iterator;
+
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Widget;
+import org.tizen.efluibuilder.model.command.DisableUndoCommand;
+import org.tizen.efluibuilder.model.part.ComponentPart;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.PartType;
+import org.tizen.efluibuilder.model.util.ComponentDescriptor;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleInfo.StyleType;
+
+
+public class StyleEditDialog extends Dialog {
+    public static final int DIALOG_WIDTH = 510;
+    public static final int DIALOG_HEIGHT = 260;
+    private static final int LIST_HEIGHT = 100;
+    private static final int BUTTON_WIDTH = 86;
+    private static final int BUTTON_HEIGHT = 24;
+
+    private StyleEditMethod parent;
+    private StyleEDJManager styleEDJManager = null;
+    private java.util.List<StyleInfo> styles;
+    private Shell shell;
+    private List listStyle;
+    private Label lblDescript;
+    private Button btnExtend;
+    private Button btnModify;
+    private Button btnDelete;
+    private Button btnReset;
+
+    private SelectionListener listStyleSelectionListener = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            updateButtonState();
+        }
+    };
+
+    private KeyListener listStyleKeyListener = new KeyAdapter() {
+        @Override
+        public void keyReleased(KeyEvent e) {
+            updateButtonState();
+        }
+    };
+
+    private SelectionListener btnSelectionListener = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            StyleInfo styleInfo = getSelectedStyleInfo();
+            if (styleInfo == null) {
+                return;
+            }
+            Widget widget = e.widget;
+            if (widget == btnDelete) {
+                deleteStyle(true);
+                listStyle.remove(listStyle.getSelectionIndex());
+                updateButtonState();
+            } else if (widget == btnReset) {
+                deleteStyle(false);
+                int index = listStyle.getSelectionIndex();
+                styleInfo.setType(StyleType.DEFAULT);
+                listStyle.setItem(index, styleInfo.getStyleName());
+                updateButtonState();
+            } else if (widget == btnModify) {
+                editStyle(null);
+                shell.close();
+            } else if (widget == btnExtend) {
+                String exportStyleName = new StyleInputDialog(shell, styleInfo.getStyleName()).open();
+                if (exportStyleName != null) {
+                    editStyle(exportStyleName);
+                    shell.close();
+                }
+            }
+        }
+    };
+
+    private DisposeListener shellDisposeListener = new DisposeListener() {
+        @Override
+        public void widgetDisposed(DisposeEvent arg0) {
+            if (listStyle != null && !listStyle.isDisposed()) {
+                listStyle.removeSelectionListener(listStyleSelectionListener);
+                listStyle.removeKeyListener(listStyleKeyListener);
+            }
+            if (btnDelete != null && !btnDelete.isDisposed()) {
+                btnDelete.removeSelectionListener(btnSelectionListener);
+            }
+            if (btnModify != null && !btnModify.isDisposed()) {
+                btnModify.removeSelectionListener(btnSelectionListener);
+            }
+            if (btnExtend != null && !btnExtend.isDisposed()) {
+                btnExtend.removeSelectionListener(btnSelectionListener);
+            }
+            if (btnReset != null && !btnReset.isDisposed()) {
+                btnReset.removeSelectionListener(btnSelectionListener);
+            }
+            shell.removeDisposeListener(shellDisposeListener);
+        }
+    };
+
+    public StyleEditDialog(Shell parent, java.util.List<StyleInfo> items, StyleEDJManager styleEDJManager) {
+        super(parent);
+        setText(BuilderMessages.COMPONENT_DESIGNER_DIALOG_TITLE);
+        this.styles = items;
+        this.styleEDJManager = styleEDJManager;
+    }
+
+    public StyleEditDialog(StyleEditMethod parent) {
+        super(parent.getShell());
+        setText(BuilderMessages.COMPONENT_DESIGNER_DIALOG_TITLE);
+        this.styles = parent.getItems();
+        this.styleEDJManager = parent.getStyleEDJManager();
+        this.parent = parent;
+    }
+
+    private void createContents(final Shell shell) {
+        shell.setLayout(new FormLayout());
+
+        /*
+         * Label of description
+         */
+        lblDescript = new Label(shell, SWT.WRAP);
+        FormData formData = new FormData();
+        formData.left = new FormAttachment(0, 15);
+        formData.right = new FormAttachment(100, -15);
+        formData.top = new FormAttachment(0, 15);
+        lblDescript.setLayoutData(formData);
+        lblDescript.setText(BuilderMessages.COMPONENT_DESIGNER_DIALOG_LABEL);
+        lblDescript.setForeground(ColorResources.PROPERTIES_CD_DESCRIPTOR);
+
+        /*
+         * List of Styles
+         */
+        listStyle = new List(shell, SWT.BORDER | SWT.V_SCROLL | SWT.SINGLE);
+        formData = new FormData();
+        formData.left = new FormAttachment(0, 10);
+        formData.right = new FormAttachment(100, -10);
+        formData.top = new FormAttachment(lblDescript, 10);
+        formData.height = LIST_HEIGHT;
+        // if (PlatformUtil.getOS().equals(PlatformUtil.OS_LINUX)) {
+        // formData.height = 75;
+        // } else {
+        // formData.height = LIST_HEIGHT;
+        // }
+        listStyle.setLayoutData(formData);
+        listStyle.addSelectionListener(listStyleSelectionListener);
+        listStyle.addKeyListener(listStyleKeyListener);
+
+        /*
+         * Line
+         */
+        Composite lineComp = new Composite(shell, SWT.NONE);
+        lineComp.setBackground(ColorResources.PROPERTIES_SEPERARTOR);
+        formData = new FormData();
+        formData.top = new FormAttachment(listStyle, 10);
+        formData.left = new FormAttachment(0, 0);
+        formData.right = new FormAttachment(100, 0);
+        formData.height = 1;
+        lineComp.setLayoutData(formData);
+
+        /*
+         * Buttons (Delete, Modify, Extend, Reset)
+         */
+        btnDelete = new Button(shell, SWT.PUSH);
+        btnDelete.setText(BuilderMessages.COMPONENT_DESIGNER_BUTTON_DELETE);
+        formData = new FormData();
+        formData.top = new FormAttachment(lineComp, 18);
+        formData.left = new FormAttachment(0, 122);
+        formData.width = BUTTON_WIDTH;
+        formData.height = BUTTON_HEIGHT;
+        btnDelete.setLayoutData(formData);
+        btnDelete.addSelectionListener(btnSelectionListener);
+
+        btnModify = new Button(shell, SWT.PUSH);
+        btnModify.setText(BuilderMessages.COMPONENT_DESIGNER_BUTTON_MODIFY);
+        formData = new FormData();
+        formData.top = new FormAttachment(lineComp, 18);
+        formData.left = new FormAttachment(btnDelete, 8);
+        formData.width = BUTTON_WIDTH;
+        formData.height = BUTTON_HEIGHT;
+        btnModify.setLayoutData(formData);
+        btnModify.addSelectionListener(btnSelectionListener);
+
+        btnExtend = new Button(shell, SWT.PUSH);
+        btnExtend.setText(BuilderMessages.COMPONENT_DESIGNER_BUTTON_EXTEND);
+        formData = new FormData();
+        formData.top = new FormAttachment(lineComp, 18);
+        formData.left = new FormAttachment(btnModify, 8);
+        formData.width = BUTTON_WIDTH;
+        formData.height = BUTTON_HEIGHT;
+        btnExtend.setLayoutData(formData);
+        btnExtend.addSelectionListener(btnSelectionListener);
+
+        btnReset = new Button(shell, SWT.PUSH);
+        btnReset.setText(BuilderMessages.COMPONENT_DESIGNER_BUTTON_RESET);
+        formData = new FormData();
+        formData.top = new FormAttachment(lineComp, 18);
+        formData.left = new FormAttachment(btnExtend, 8);
+        formData.width = BUTTON_WIDTH;
+        formData.height = BUTTON_HEIGHT;
+        btnReset.setLayoutData(formData);
+        btnReset.addSelectionListener(btnSelectionListener);
+
+        updateStylesList(styles);
+        updateButtonState();
+    }
+
+    private void updateButtonState() {
+        StyleInfo style = getSelectedStyleInfo();
+        if (style == null) {
+            btnDelete.setEnabled(false);
+            btnModify.setEnabled(false);
+            btnExtend.setEnabled(false);
+            btnReset.setEnabled(false);
+        } else if (style.getType() == StyleType.CUSTOM) {
+            btnDelete.setEnabled(true);
+            btnModify.setEnabled(true);
+            btnExtend.setEnabled(true);
+            btnReset.setEnabled(false);
+        } else if (style.getType() == StyleType.MODIFIED) {
+            btnDelete.setEnabled(false);
+            btnModify.setEnabled(true);
+            btnExtend.setEnabled(true);
+            btnReset.setEnabled(true);
+        } else {
+            btnDelete.setEnabled(false);
+            btnModify.setEnabled(true);
+            btnExtend.setEnabled(true);
+            btnReset.setEnabled(false);
+        }
+    }
+
+    public void updateStylesList(java.util.List<StyleInfo> styles) {
+        this.styles = styles;
+        listStyle.removeAll();
+        for (int i = 0; i < styles.size(); i++) {
+            listStyle.add(styles.get(i).getDisplayName());
+        }
+        if (listStyle.getItemCount() > 0) {
+            listStyle.setSelection(0);
+        }
+    }
+
+    private void deleteStyle(boolean isCustomStyle) {
+        StyleInfo style = getSelectedStyleInfo();
+        if (style == null) {
+            return;
+        }
+        if (style.isItemStyle()) {
+            String itemStyle = style.getStyleName();
+            String parentStyle = styleEDJManager.findParentStyle(styleEDJManager.getCustomStyleNames().get(style.getWidgetName()), itemStyle);
+            styleEDJManager.removeStyleFromCustomStyleEDJ(style.getWidgetName(), parentStyle, itemStyle);
+        } else {
+            styleEDJManager.removeStyleFromCustomStyleEDJ(style.getWidgetName(),
+                                                          style.getStyleName(), null);
+        }
+        // if custom style is deleted, update models.
+        if (isCustomStyle) {
+            Part documentPart = styleEDJManager.getDocumentPart();
+            ComponentDescriptor componentDescriptor = ((DocumentPart) documentPart).getComponentDescriptor();
+            CompoundCommand compCmd = new DisableUndoCommand();
+            updateStyleOfModel(documentPart, componentDescriptor, style, compCmd);
+            parent.updateStyleAttributes(compCmd);
+        }
+    }
+
+    private void updateStyleOfModel(Part part, ComponentDescriptor componentDescriptor, StyleInfo style, CompoundCommand compCmd) {
+        if (part.getType() == PartType.COMPONENT) {
+            if ((style.isItemStyle() && style.getWidgetName().equals(componentDescriptor.getWidgetDescriptor(part.getDescriptorId()).getContainerID()))
+                    || (style.isItemStyle() == false && part.getDescriptorId().equals(style.getWidgetName()))) {
+                String value = part.getPropertyValue(LayoutSchemaConstants.STYLE);
+                if (value.equals(style.getStyleName())) {
+                    String defaultStyle =
+                            componentDescriptor.getPropertyDescriptor(part.getParent(), (ComponentPart) part, LayoutSchemaConstants.STYLE)
+                                    .getDefaultValue();
+                    compCmd.add(PartUtil.createSetPropertyCommand(part, LayoutSchemaConstants.STYLE,
+                                                                  defaultStyle));
+                }
+            } else {
+                // Do nothing
+            }
+        }
+        java.util.List<Part> children = part.getChildren();
+        for (int i = 0; i < children.size(); i++) {
+            updateStyleOfModel(children.get(i), componentDescriptor, style, compCmd);
+        }
+    }
+
+    private void editStyle(String exportStyleName) {
+        StyleInfo style = getSelectedStyleInfo();
+        if (style == null) {
+            return;
+        }
+        String widgetName = style.getWidgetName();
+        String srcStyleName = style.getStyleName();
+        String srcItemStyleName = null;
+        if (style.isItemStyle()) {
+            srcItemStyleName = style.getStyleName();
+        }
+        String srcEDJPath = null;
+        String exportEDJPath = styleEDJManager.getCustomThemePath();
+        String exportEDCPath = styleEDJManager.getCustomThemeDirectoryPath();
+        switch (style.getType()) {
+            case CUSTOM:
+            case MODIFIED:
+                srcEDJPath = styleEDJManager.getCustomThemePath();
+                if (style.isItemStyle()) {
+                    srcStyleName = styleEDJManager.findParentStyle(styleEDJManager.getCustomStyleNames().get(widgetName), srcItemStyleName);
+                }
+                break;
+            default:
+                if (style.isItemStyle()) {
+                    Iterator<String> iter = styleEDJManager.getDefaultStyleInfoMap().keySet().iterator();
+                    while (iter.hasNext()) {
+                        String defaultThemePath = iter.next();
+                        srcStyleName =
+                                styleEDJManager.findParentStyle(styleEDJManager.getDefaultStyleInfoMap().get(defaultThemePath).get(widgetName),
+                                                                srcItemStyleName);
+                        if (srcStyleName != null) {
+                            srcEDJPath = defaultThemePath;
+                            break;
+                        }
+                    }
+                } else {
+                    srcEDJPath = styleEDJManager.findDefaultThemePath(widgetName, srcStyleName);
+                }
+                if (styleEDJManager.isExistCustomThemeDirectory() == false) {
+                    styleEDJManager.createCustomThemeDirectory();
+                }
+                break;
+        }
+        ComponentDesignerExecuter.executeTool(widgetName, srcStyleName, srcItemStyleName, exportStyleName, srcEDJPath, exportEDJPath, exportEDCPath);
+    }
+
+    private StyleInfo getSelectedStyleInfo() {
+        int index = listStyle.getSelectionIndex();
+        if (index < 0) {
+            return null;
+        }
+        return styles.get(index);
+    }
+
+    public void open(int x, int y) {
+        shell = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+        shell.addDisposeListener(shellDisposeListener);
+        shell.setText(getText());
+        shell.setImage(ImageResources.getImage(ImageResources.PROPERTIES_CD_ICON));
+        shell.setSize(DIALOG_WIDTH, DIALOG_HEIGHT);
+        // Adjust location as Monitor environment.
+        Rectangle monitor = shell.getMonitor().getClientArea();
+        if (x < 0) {
+            x = monitor.x;
+        } else if (x + DIALOG_WIDTH > monitor.x + monitor.width) {
+            x = monitor.width - DIALOG_WIDTH;
+        }
+        if (y < 0) {
+            y = monitor.y;
+        } else if (y + DIALOG_HEIGHT > monitor.y + monitor.height) {
+            y = monitor.height - DIALOG_HEIGHT;
+        }
+        shell.setLocation(x, y);
+        createContents(shell);
+        shell.open();
+        Display display = getParent().getDisplay();
+        while (!shell.isDisposed()) {
+            if (!display.readAndDispatch()) {
+                display.sleep();
+            }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleEditMethod.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleEditMethod.java
new file mode 100644 (file)
index 0000000..66ded16
--- /dev/null
@@ -0,0 +1,331 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.style;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.MouseTrackAdapter;
+import org.eclipse.swt.events.MouseTrackListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.BuilderConstants;
+import org.tizen.efluibuilder.model.descriptors.ConstantDescriptor;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.ui.views.properties.PropertiesPageComposite;
+import org.tizen.efluibuilder.ui.views.properties.method.Editable;
+import org.tizen.efluibuilder.ui.views.properties.style.StyleInfo.StyleType;
+
+
+public class StyleEditMethod extends Editable {
+    private static final int BUTTON_IMAGE_WIDTH = 24;
+    private static final int METHOD_HEIGHT = 25;
+    private Combo combo;
+    private Canvas button;
+    private PropertiesPageComposite propertiesPage;
+    private StyleEDJManager styleEDJManager = null;
+    private List<StyleInfo> items = null;
+
+    private SelectionListener comboListener;
+    private PaintListener btnPaintListener;
+    private MouseListener btnMouseListener;
+    private MouseTrackListener btnMouseTrackListener;
+
+    /**
+     * Constructor.
+     *
+     * @see Editable
+     */
+    public StyleEditMethod(Composite parent, int style, MethodType type, String name, String value, String displayName, boolean hasFunc) {
+        super(parent, style, type, name, value, displayName, hasFunc);
+    }
+
+    @Override
+    protected Control createControl() {
+        Composite composite = new Composite(this, SWT.NONE);
+        composite.setLayout(new FormLayout());
+
+        FormData layoutData = new FormData();
+
+        /*
+         * Combo
+         */
+        layoutData.left = new FormAttachment(0, 0);
+        layoutData.top = new FormAttachment(0, 0);
+        layoutData.right = new FormAttachment(100, -28);
+        layoutData.height = METHOD_HEIGHT;
+        combo = new Combo(composite, SWT.READ_ONLY | SWT.DROP_DOWN);
+        combo.setLayoutData(layoutData);
+        comboListener = new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                int index = combo.getSelectionIndex();
+                StyleInfo style = items.get(index);
+                setValue(style.getStyleName());
+            }
+        };
+        combo.addSelectionListener(comboListener);
+
+        /*
+         * Button
+         */
+        layoutData = new FormData();
+        layoutData.top = new FormAttachment(0, 1);
+        layoutData.left = new FormAttachment(combo, 3);
+        layoutData.right = new FormAttachment(100, 0);
+        layoutData.width = BUTTON_IMAGE_WIDTH;
+        layoutData.height = METHOD_HEIGHT;
+
+        button = new Canvas(composite, SWT.NONE);
+        button.setLayoutData(layoutData);
+        button.setData(ImageResources.getImage(ImageResources.PROPERTIES_BTN_IC_LOCATION_NOR));
+        btnPaintListener = new PaintListener() {
+            @Override
+            public void paintControl(PaintEvent e) {
+                e.gc.drawImage((Image) button.getData(), 0, 0);
+            }
+        };
+        button.addPaintListener(btnPaintListener);
+        btnMouseListener = new MouseAdapter() {
+            @Override
+            public void mouseUp(MouseEvent e) {
+                if (styleEDJManager != null) {
+                    StyleEditDialog editDialog = new StyleEditDialog(StyleEditMethod.this);
+                    Point location = button.toDisplay(button.getSize().x, button.getSize().y);
+                    editDialog.open(location.x - button.getSize().x - StyleEditDialog.DIALOG_WIDTH - 10, location.y);
+                } else {
+                    logger.error("StyleEditMethod does not have styleEDJManager!!"); //$NON-NLS-1$
+                }
+                button.setData(ImageResources.getImage(ImageResources.PROPERTIES_BTN_IC_LOCATION_NOR));
+                button.redraw();
+            }
+
+            @Override
+            public void mouseDown(MouseEvent e) {
+                button.setData(ImageResources.getImage(ImageResources.PROPERTIES_BTN_IC_LOCATION_SEL));
+                button.redraw();
+            }
+        };
+        button.addMouseListener(btnMouseListener);
+        btnMouseTrackListener = new MouseTrackAdapter() {
+            @Override
+            public void mouseEnter(MouseEvent arg0) {
+                button.setData(ImageResources.getImage(ImageResources.PROPERTIES_BTN_IC_LOCATION_OVER));
+                button.redraw();
+            }
+
+            @Override
+            public void mouseExit(MouseEvent arg0) {
+                button.setData(ImageResources.getImage(ImageResources.PROPERTIES_BTN_IC_LOCATION_NOR));
+                button.redraw();
+            }
+        };
+        button.addMouseTrackListener(btnMouseTrackListener);
+        return composite;
+    }
+
+    @Override
+    public void dispose() {
+        if (combo != null && !combo.isDisposed()) {
+            combo.removeSelectionListener(comboListener);
+        }
+        if (button != null && !button.isDisposed()) {
+            button.removePaintListener(btnPaintListener);
+            button.removeMouseListener(btnMouseListener);
+            button.removeMouseTrackListener(btnMouseTrackListener);
+        }
+        super.dispose();
+    }
+
+    public List<StyleInfo> getItems() {
+        return items;
+    }
+
+    public void setStyleEDJManager(StyleEDJManager styleEDJManager) {
+        this.styleEDJManager = styleEDJManager;
+    }
+
+    public StyleEDJManager getStyleEDJManager() {
+        return styleEDJManager;
+    }
+
+    public void setPropertiesPageComposite(PropertiesPageComposite propertiesPage) {
+        this.propertiesPage = propertiesPage;
+    }
+
+    public void updateStyleAttributes(Command command) {
+        propertiesPage.getCommandStack().execute(command);
+    }
+
+    /**
+     * Gets index by value
+     *
+     * @param value
+     * @return index of value.
+     */
+    public int getIndex(String value) {
+        Assert.notNull(items);
+        for (int i = 0; i < items.size(); i++) {
+            StyleInfo style = items.get(i);
+            if (value.equals(style.getStyleName())) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    protected FormData getControlLayoutData() {
+        FormData data = super.getControlLayoutData();
+        data.bottom = new FormAttachment(100, -1);
+
+        return data;
+    }
+
+    @Override
+    public void refreshValue(String name, String value) {
+        int index = -1;
+        for (int i = 0; i < items.size(); i++) {
+            if (items.get(i).getStyleName().equals(value)) {
+                index = i;
+                break;
+            }
+        }
+        if (index != -1) {
+            combo.select(index);
+        }
+        super.refreshValue(name, value);
+    }
+
+    public void resetItems(List<StyleInfo> items) {
+        if (getControl().isDisposed()) {
+            logger.error("Control is disposed");
+            return;
+        }
+
+        this.items = items;
+        List<String> texts = new ArrayList<String>();
+        for (StyleInfo item : items) {
+            texts.add(item.getDisplayName());
+        }
+        String[] names = texts.toArray(new String[0]);
+
+        combo.removeAll();
+        if (names.length == 0) {
+            combo.setEnabled(false);
+            return;
+        }
+        combo.setEnabled(true);
+        combo.setItems(names);
+        // selection
+        String value = getValue();
+        if (value.equals(BuilderConstants.EMPTY)) {
+            combo.select(0);
+        } else {
+            int index = getIndex(value);
+            combo.select(index);
+        }
+    }
+
+    private void mergeStyleInfo(List<StyleInfo> items, String widgetName, String styleName, String displayName, boolean isItemStyle) {
+        StyleInfo styleInfo = null;
+        // Check if already exist style
+        for (int i = 0; i < items.size(); i++) {
+            if (styleName.equals(items.get(i).getStyleName())) {
+                styleInfo = items.get(i);
+            }
+        }
+        if (styleInfo != null) {
+            styleInfo.setType(StyleType.MODIFIED);
+        } else {
+            items.add(new StyleInfo(widgetName, styleName, styleName, isItemStyle, StyleType.CUSTOM));
+        }
+    }
+
+    public void updateItems(String componentName, List<ConstantDescriptor> descriptors, Map<String, Map<String, List<String>>> customStyleMap,
+                            boolean isItemContainer) {
+        final List<StyleInfo> items = new ArrayList<StyleInfo>();
+        for (int i = 0; i < descriptors.size(); i++) {
+            String styleName = descriptors.get(i).getValue();
+            String displayName = descriptors.get(i).getDisplayName();
+            items.add(new StyleInfo(componentName, styleName, displayName, isItemContainer, StyleType.DEFAULT));
+        }
+
+        if (customStyleMap != null) {
+            Map<String, List<String>> customStyles = customStyleMap.get(componentName);
+            if (customStyles != null) {
+                // Case : Style of Widget (e.g. button, gengrid)
+                if (isItemContainer == false) {
+                    Set<String> styles = customStyles.keySet();
+                    Iterator<String> iter = styles.iterator();
+                    while (iter.hasNext()) {
+                        String style = iter.next();
+                        mergeStyleInfo(items, componentName, style, style, isItemContainer);
+                    }
+                } else { // Case : Style of Item (e.g. gengriditem, genlistitem)
+                    Collection<List<String>> customItemStyles = customStyles.values();
+                    Iterator<List<String>> iterCustomItemStyle = customItemStyles.iterator();
+                    while (iterCustomItemStyle.hasNext()) {
+                        List<String> itemStyles = iterCustomItemStyle.next();
+                        if (itemStyles != null) {
+                            for (int i = 0; i < itemStyles.size(); i++) {
+                                String style = itemStyles.get(i);
+                                mergeStyleInfo(items, componentName, style, style, isItemContainer);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        Display.getDefault().syncExec(new Runnable() {
+            @Override
+            public void run() {
+                resetItems(items);
+            }
+        });
+
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleInfo.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleInfo.java
new file mode 100644 (file)
index 0000000..ac55b81
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.style;
+
+public class StyleInfo {
+    public enum StyleType {
+        DEFAULT, CUSTOM, MODIFIED
+    }
+
+    private String widgetName;
+    private String styleName;
+    private boolean isItemStyle;
+    private String displayName;
+    private StyleType type;
+
+    public StyleInfo(String widgetName, String styleName, String displayName, boolean isItemStyle, StyleType type) {
+        this.widgetName = widgetName;
+        this.styleName = styleName;
+        this.isItemStyle = isItemStyle;
+        this.displayName = displayName;
+        this.type = type;
+    }
+
+    public String getWidgetName() {
+        return widgetName;
+    }
+
+    public String getStyleName() {
+        return styleName;
+    }
+
+    public String getDisplayName() {
+        if (type == StyleType.CUSTOM) {
+            return "[ " + displayName + " ]"; // TODO find more appropriate mark than [ ].
+        } else if (type == StyleType.MODIFIED) {
+            return displayName + " (*)";
+        }
+        return displayName;
+    }
+
+    public StyleType getType() {
+        return type;
+    }
+
+    public void setType(StyleType type) {
+        this.type = type;
+    }
+
+    public boolean isItemStyle() {
+        return isItemStyle;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleInputDialog.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/views/properties/style/StyleInputDialog.java
new file mode 100644 (file)
index 0000000..f561370
--- /dev/null
@@ -0,0 +1,183 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.views.properties.style;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Widget;
+import org.tizen.efluibuilder.nl.BuilderMessages;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+
+
+public class StyleInputDialog extends Dialog {
+    private static final int DIALOG_WIDTH = 412;
+    private static final int DIALOG_HEIGHT = 98;
+    private static final int BUTTON_WIDTH = 86;
+    private static final int BUTTON_HEIGHT = 24;
+    private static final String StyleNameValidationRule = "[a-zA-Z0-9_]+$"; // TODO check again
+                                                                            // restriction of file
+                                                                            // name.
+
+    private String sourceStyle;
+    private String styleName;
+    private Shell shell;
+    private Text txtInput;
+    private Button btnOK;
+    private Button btnCancel;
+
+    private KeyListener textKeyListener = new KeyAdapter() {
+        @Override
+        public void keyReleased(KeyEvent arg0) {
+            String text = txtInput.getText();
+            if (!text.equals(sourceStyle) && text.matches(StyleNameValidationRule)) {
+                btnOK.setEnabled(true);
+            } else {
+                btnOK.setEnabled(false);
+            }
+        }
+    };
+
+    private SelectionListener btnSelectionListener = new SelectionAdapter() {
+        @Override
+        public void widgetSelected(SelectionEvent e) {
+            Widget widget = e.widget;
+            if (widget == btnOK) {
+                styleName = txtInput.getText();
+            } else {
+                styleName = null;
+            }
+            shell.close();
+        }
+    };
+
+    private DisposeListener shellDisposeListener = new DisposeListener() {
+        @Override
+        public void widgetDisposed(DisposeEvent arg0) {
+            if (txtInput != null && !txtInput.isDisposed()) {
+                txtInput.removeKeyListener(textKeyListener);
+            }
+            if (btnOK != null && !btnOK.isDisposed()) {
+                btnOK.removeSelectionListener(btnSelectionListener);
+            }
+            if (btnCancel != null && !btnCancel.isDisposed()) {
+                btnCancel.removeSelectionListener(btnSelectionListener);
+            }
+            shell.removeDisposeListener(shellDisposeListener);
+        }
+    };
+
+    public StyleInputDialog(Shell parent, String sourceStyle) {
+        super(parent);
+        this.sourceStyle = sourceStyle;
+    }
+
+    private void createContents(final Shell shell) {
+        shell.setLayout(new FormLayout());
+
+        Label label = new Label(shell, SWT.NONE);
+        label.setAlignment(SWT.CENTER);
+        label.setText(BuilderMessages.COMPONENT_DESIGNER_LABEL_INPUT);
+        FormData formData = new FormData();
+        formData.top = new FormAttachment(0, 24);
+        formData.left = new FormAttachment(0, 20);
+        formData.height = 22;
+        label.setLayoutData(formData);
+
+        txtInput = new Text(shell, SWT.BORDER);
+        formData = new FormData();
+        formData.top = new FormAttachment(0, 20);
+        formData.left = new FormAttachment(label, 15);
+        formData.right = new FormAttachment(100, -20);
+        formData.height = 22;
+        txtInput.setLayoutData(formData);
+        txtInput.addKeyListener(textKeyListener);
+
+        /*
+         * Buttons (Ok, Cancel)
+         */
+        Button btnLeft = new Button(shell, SWT.PUSH);
+        formData = new FormData();
+        formData.top = new FormAttachment(txtInput, 12);
+        formData.left = new FormAttachment(0, 210);
+        formData.width = BUTTON_WIDTH;
+        formData.height = BUTTON_HEIGHT;
+        btnLeft.setLayoutData(formData);
+
+        Button btnRight = new Button(shell, SWT.PUSH);
+        formData = new FormData();
+        formData.top = new FormAttachment(txtInput, 12);
+        formData.left = new FormAttachment(btnLeft, 8);
+        formData.width = BUTTON_WIDTH;
+        formData.height = BUTTON_HEIGHT;
+        btnRight.setLayoutData(formData);
+
+        btnCancel = btnLeft;
+        btnOK = btnRight;
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_WIN32)) {
+            btnCancel = btnRight;
+            btnOK = btnLeft;
+        }
+        btnCancel.setText(BuilderMessages.COMPONENT_DESIGNER_BUTTON_CANCEL);
+        btnCancel.addSelectionListener(btnSelectionListener);
+        btnOK.setText(BuilderMessages.COMPONENT_DESIGNER_BUTTON_OK);
+        btnOK.setEnabled(false);
+        btnOK.addSelectionListener(btnSelectionListener);
+    }
+
+    public String open() {
+        shell = new Shell(getParent(), SWT.APPLICATION_MODAL);
+        shell.setText(getText());
+        shell.setSize(DIALOG_WIDTH, DIALOG_HEIGHT);
+        shell.addDisposeListener(shellDisposeListener);
+        Rectangle parentBounds = getParent().getBounds();
+        shell.setLocation(parentBounds.x + (parentBounds.width - DIALOG_WIDTH) / 2,
+                          parentBounds.y + (parentBounds.height - DIALOG_HEIGHT) / 2);
+        createContents(shell);
+        shell.open();
+        Display display = getParent().getDisplay();
+        while (!shell.isDisposed()) {
+            if (!display.readAndDispatch()) {
+                display.sleep();
+            }
+        }
+        return styleName;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScale.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScale.java
new file mode 100644 (file)
index 0000000..4d3dd4d
--- /dev/null
@@ -0,0 +1,284 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.widgets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+
+
+public class TizenScale extends Canvas {
+
+    private static final int LEFT_AREA_WIDTH = 2;
+    private static final int RIGHT_AREA_WIDTH = 2;
+    private static final int AREA_HEIGHT = 2;
+    private static final int THUMB_HEIGHT = 13;
+    private static final int THUMB_WIDTH = 4;
+
+    private TizenScaleData attr = new TizenScaleData();
+    private TizenScaleRenderer renderer = new TizenScaleDefaultRenderer();
+    private SelectionListener selectionListener = null;
+    private List<Integer> selectPositions = new ArrayList<Integer>();
+    private int selection = 0;
+    private int maximum = 0;
+    private int minimum = 0;
+
+    private boolean mouseDown = false;
+
+    private Rectangle thumbRect = null;
+    private Rectangle areaRect = null;
+    private Rectangle leftRect = null;
+    private Rectangle rightRect = null;
+
+    /**
+     * TODO Apply Increment
+     */
+    private int increment = 1;
+    private int pageIncrement = 1;
+
+    public TizenScale(Composite parent, int style) {
+        super(parent, SWT.NONE);
+        addListener(SWT.MouseDown, mouseListener);
+        addListener(SWT.MouseUp, mouseListener);
+        addListener(SWT.MouseMove, mouseListener);
+        addPaintListener(paintListener);
+        addControlListener(controlListener);
+    }
+
+    public void setTizenScaleDefaultRenderer(TizenScaleDefaultRenderer renderer) {
+        this.renderer = renderer;
+    }
+
+    public void setIncrement(int increment) {
+        this.increment = increment;
+    }
+
+    public int getIncrement() {
+        return increment;
+    }
+
+    public void setPageIncrement(int increment) {
+        this.pageIncrement = increment;
+    }
+
+    public int getPageIncrement() {
+        return pageIncrement;
+    }
+
+    public void setMaximum(int max) {
+        maximum = max;
+    }
+
+    public int getMaximum() {
+        return maximum;
+    }
+
+    public void setMinimum(int min) {
+        minimum = min;
+    }
+
+    public int getMinimum() {
+        return minimum;
+    }
+
+    public int getSelection() {
+        double tick = getTickSize();
+        int thumbX = thumbRect.x + THUMB_WIDTH / 2;
+        double width = thumbX - areaRect.x;
+        return (int) ((width / tick) + minimum);
+    }
+
+    public void setSelection(int selection) {
+        if (selection > maximum) {
+            selection = maximum;
+        } else if (selection < minimum) {
+            selection = minimum;
+        }
+        this.selection = selection - minimum;
+        if (selectPositions.isEmpty() == false) {
+            int thumbPos = selectPositions.get(this.selection);
+            thumbRect = getThumbRect(thumbPos);
+            redraw();
+        }
+    }
+
+    public void setRenderer(TizenScaleRenderer renderer) {
+        this.renderer = renderer;
+    }
+
+    public void addSelectionListener(SelectionListener listener) {
+        if (null == listener) {
+            return;
+        }
+        selectionListener = listener;
+    }
+
+    private boolean pointInRect(Rectangle rect, Point p) {
+        if ((p.x > rect.x) && (p.x > rect.y) && (p.x < rect.x + rect.width) && (p.y < rect.y + rect.height)) {
+            return true;
+        }
+        return false;
+    }
+
+    private Rectangle getThumbRect(int pointX) {
+        int thumbHeight = THUMB_HEIGHT;
+        int thumbWidth = THUMB_WIDTH;
+
+        if (pointX < areaRect.x) {
+            pointX = areaRect.x;
+        } else if (pointX > areaRect.x + areaRect.width) {
+            pointX = areaRect.x + areaRect.width;
+        }
+        int y = areaRect.y - (thumbHeight - areaRect.height) / 2;
+        int x = pointX - thumbWidth / 2;
+        return new Rectangle(x, y, thumbWidth, thumbHeight);
+    }
+
+    private void setSelectionInternal(int pointX) {
+        if (pointX <= areaRect.x) {
+            selection = 0;
+        } else if (pointX >= areaRect.x + areaRect.width) {
+            selection = maximum - minimum;
+        } else {
+            double tick = getTickSize();
+            int width = pointX - areaRect.x;
+            selection = (int) (width / tick);
+        }
+    }
+
+    private double getTickSize() {
+        return (double) areaRect.width / (double) (maximum - minimum);
+    }
+
+    private void initSelectPosition() {
+        selectPositions.clear();
+        int size = maximum - minimum + 1;
+        double tickSize = getTickSize();
+
+        for (int i = 0; i < size; i++) {
+            if (i == 0) {
+                selectPositions.add(areaRect.x);
+            } else if (i == (size - 1)) {
+                selectPositions.add(areaRect.x + areaRect.width);
+            } else {
+                int pos = (int) (tickSize * i + areaRect.x);
+                selectPositions.add(pos);
+            }
+        }
+    }
+
+    /*
+     * Event Listener
+     */
+    private Listener mouseListener = new Listener() {
+        @Override
+        public void handleEvent(Event event) {
+            if (event.type == SWT.MouseDown) {
+                mouseDown = true;
+                if (pointInRect(thumbRect, new Point(event.x, event.y))) {
+                    mouseDown = true;
+                } else if ((event.x >= areaRect.x) && (event.x <= areaRect.x + areaRect.width)) {
+                    setSelectionInternal(event.x);
+                    thumbRect = getThumbRect(event.x);
+                    redraw();
+                }
+                if (null != selectionListener) {
+                    SelectionEvent e = new SelectionEvent(event);
+                    selectionListener.widgetSelected(e);
+                }
+            }
+            if (event.type == SWT.MouseUp) {
+                mouseDown = false;
+            }
+            if (event.type == SWT.MouseMove) {
+                if (mouseDown) {
+                    setSelectionInternal(event.x);
+                    thumbRect = getThumbRect(event.x);
+                    redraw();
+                    if (null != selectionListener) {
+                        SelectionEvent e = new SelectionEvent(event);
+                        selectionListener.widgetSelected(e);
+                    }
+                }
+            }
+        }
+    };
+
+    private PaintListener paintListener = new PaintListener() {
+        @Override
+        public void paintControl(PaintEvent e) {
+            attr.setAreaRect(areaRect);
+            attr.setLeftRect(leftRect);
+            attr.setRightRect(rightRect);
+            attr.setThumbRect(thumbRect);
+            attr.setEnabled(TizenScale.this.isEnabled());
+            renderer.draw(e.gc, (Canvas) e.widget, attr);
+        }
+    };
+
+    private ControlListener controlListener = new ControlAdapter() {
+        @Override
+        public void controlResized(ControlEvent e) {
+            Canvas canvas = (Canvas) e.widget;
+            Rectangle rect = canvas.getClientArea();
+
+            leftRect = new Rectangle(rect.x, rect.y, LEFT_AREA_WIDTH, rect.height);
+            rightRect = new Rectangle(rect.x + rect.width - RIGHT_AREA_WIDTH, rect.y, RIGHT_AREA_WIDTH, rect.height);
+
+            int areaWidth = rect.width - (leftRect.width + rightRect.width);
+            int areaY = rect.y + (rect.height - AREA_HEIGHT) / 2;
+            areaRect = new Rectangle(rect.x + LEFT_AREA_WIDTH, areaY, areaWidth, AREA_HEIGHT);
+
+            initSelectPosition();
+
+            int thumbPos = selectPositions.get(selection);
+            thumbRect = getThumbRect(thumbPos);
+        }
+    };
+
+    @Override
+    public void setEnabled(boolean enabled) {
+        super.setEnabled(enabled);
+        this.redraw();
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScaleData.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScaleData.java
new file mode 100644 (file)
index 0000000..c64db22
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.widgets;
+
+import org.eclipse.swt.graphics.Rectangle;
+
+
+public class TizenScaleData {
+    private Rectangle thumbRect = null;
+    private Rectangle areaRect = null;
+    private Rectangle leftRect = null;
+    private Rectangle rightRect = null;
+
+    private boolean isEnabled = false;
+
+    public boolean isEnabled() {
+        return isEnabled;
+    }
+
+    public void setEnabled(boolean isEnabled) {
+        this.isEnabled = isEnabled;
+    }
+
+    public Rectangle getThumbRect() {
+        return thumbRect;
+    }
+
+    public void setThumbRect(Rectangle thumbRect) {
+        this.thumbRect = thumbRect;
+    }
+
+    public Rectangle getAreaRect() {
+        return areaRect;
+    }
+
+    public void setAreaRect(Rectangle areaRect) {
+        this.areaRect = areaRect;
+    }
+
+    public Rectangle getLeftRect() {
+        return leftRect;
+    }
+
+    public void setLeftRect(Rectangle leftRect) {
+        this.leftRect = leftRect;
+    }
+
+    public Rectangle getRightRect() {
+        return rightRect;
+    }
+
+    public void setRightRect(Rectangle rightRect) {
+        this.rightRect = rightRect;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScaleDefaultRenderer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScaleDefaultRenderer.java
new file mode 100644 (file)
index 0000000..ceb5963
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.widgets;
+
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Canvas;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+
+public class TizenScaleDefaultRenderer implements TizenScaleRenderer {
+
+    @Override
+    public void draw(GC gc, Canvas canvas, TizenScaleData attr) {
+        if (attr.isEnabled()) {
+            gc.setBackground(ColorResources.TIZEN_SCALE_AREA_NOR);
+        } else {
+            gc.setBackground(ColorResources.TIZEN_SCALE_AREA_DIM);
+        }
+        gc.fillRectangle(attr.getAreaRect());
+
+        if (attr.isEnabled()) {
+            gc.setBackground(ColorResources.TIZEN_SCALE_THUMB_NOR);
+        } else {
+            gc.setBackground(ColorResources.TIZEN_SCALE_THUMB_DIM);
+        }
+        gc.fillRectangle(attr.getThumbRect().x, attr.getThumbRect().y, attr.getThumbRect().width, attr.getThumbRect().height);
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScaleRenderer.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/TizenScaleRenderer.java
new file mode 100644 (file)
index 0000000..d455b00
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.widgets;
+
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Canvas;
+
+
+public interface TizenScaleRenderer {
+    public void draw(GC gc, Canvas canvas, TizenScaleData attr);
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/UIBLabel.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/widgets/UIBLabel.java
new file mode 100644 (file)
index 0000000..09d031d
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JungWook Ryu <jungwook.ryu@samsung.com>
+ * ChulKi Kim <chulki7.kim@samsung.com>
+ * Yongseok Lee <ys1125.lee@samsung.com>
+ * Dongjo Hwang <dongjo.hwang@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.efluibuilder.ui.widgets;
+
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Composite;
+
+
+public class UIBLabel extends CLabel {
+    private final static String ELLIPSIS = Character.toString((char) (0x2026)); // Unicode of "..."
+
+    public UIBLabel(Composite parent, int style) {
+        super(parent, style);
+    }
+
+    /*
+     * Return shorten text (e.g. abcdefgh -> abcd...)
+     */
+    @Override
+    protected String shortenText(GC gc, String t, int width) {
+        if (t == null) {
+            return null;
+        }
+
+        // Make shortenText only if length is longer than 3 characters.
+        int tL = t.length();
+        if (tL <= 3) {
+            return t;
+        }
+
+        // Find appropriate shorten text.
+        int start = 0;
+        int end = tL;
+        int mid = tL / 2 > 3 ? tL / 2 : 3;
+        String result = t;
+        while (start < mid && mid < end) {
+            result = t.substring(0, mid) + ELLIPSIS;
+            int rW = gc.textExtent(result).x + 2;
+            if (rW < width) {
+                start = mid;
+                mid = (end + mid) / 2;
+            } else if (rW > width) {
+                end = mid;
+                mid = (start + mid) / 2;
+            } else {
+                break;
+            }
+        }
+
+        // Shorten text should be longer than 3 characters. (e.g.) ab...(x), abc...(O)
+        return (mid >= 3) ? result : t.substring(0, 3) + ELLIPSIS;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/newfile/EdcFileWizard.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/newfile/EdcFileWizard.java
new file mode 100644 (file)
index 0000000..325a980
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.newfile;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+
+
+public class EdcFileWizard extends Wizard implements INewWizard {
+    private static final String WIZARD_TITLE = "New EDC File";
+    protected IStructuredSelection selection;
+    private WizardNewFileCreationPage newXMLFilePage;
+    IFile createdFile = null;
+
+    @Override
+    public void init(IWorkbench arg0, IStructuredSelection arg1) {
+    }
+
+    @Override
+    public boolean performFinish() {
+        createdFile = newXMLFilePage.createNewFile();
+        if (createdFile != null && createdFile.exists()) {
+            return true;
+        }
+        return false;
+    }
+
+    public void setSelection(IStructuredSelection arg1) {
+        this.selection = arg1;
+    }
+
+    @Override
+    public void addPages() {
+        newXMLFilePage = new WizardNewFileCreationPage(WIZARD_TITLE, this.selection);
+        newXMLFilePage.setTitle(WIZARD_TITLE);
+        newXMLFilePage.setDescription(WIZARD_TITLE);
+        newXMLFilePage.setFileExtension("edc");
+        super.addPage(newXMLFilePage);
+    }
+
+    public IFile getCreatedFile() {
+        return this.createdFile;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/AbstractWizard.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/AbstractWizard.java
new file mode 100644 (file)
index 0000000..748a7e7
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.snippet;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.model.app.AppManager;
+
+
+public abstract class AbstractWizard extends Wizard {
+    private Object model = null;
+    protected String platform;
+
+    public AbstractWizard() {
+        super();
+
+        loadAppManager();
+    }
+
+    @Deprecated
+    private void loadAppManager() {
+        AppManager appManager = AppManager.getAppManager();
+        Assert.notNull(appManager);
+
+        platform = appManager.getPlatform();
+    }
+
+    public void setModel(Object model) {
+        this.model = model;
+    }
+
+    public Object getModel() {
+        return model;
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/AbstractWizardPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/AbstractWizardPage.java
new file mode 100644 (file)
index 0000000..b980035
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.snippet;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.WizardPage;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.core.configuration.device.DeviceManager;
+import org.tizen.efluibuilder.model.app.AppManager;
+
+
+public abstract class AbstractWizardPage extends WizardPage {
+
+    protected DeviceManager deviceManager;
+    protected String profile;
+
+    public AbstractWizardPage(String pageName, String title, ImageDescriptor titleImage) {
+        super(pageName, title, titleImage);
+
+        loadAppManager();
+    }
+
+    protected void setMessage(String message, String errorMessage) {
+        setMessage(message);
+        setErrorMessage(errorMessage);
+    }
+
+    @Deprecated
+    private void loadAppManager() {
+        AppManager appManager = AppManager.getAppManager();
+        Assert.notNull(appManager);
+
+        deviceManager = appManager.getDeviceManager();
+        profile = appManager.getProfile();
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewSnippetDialogPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewSnippetDialogPage.java
new file mode 100644 (file)
index 0000000..7d4f2b1
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.snippet;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.efluibuilder.BuilderPlugin;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.snippet.ISnippet;
+import org.tizen.efluibuilder.model.snippet.ISnippetManager;
+import org.tizen.efluibuilder.model.snippet.Snippet;
+import org.tizen.efluibuilder.model.snippet.SnippetManager;
+import org.tizen.efluibuilder.model.util.PartMarshaller;
+import org.tizen.efluibuilder.ui.resources.ImageResources;
+import org.tizen.efluibuilder.utility.PlatformUtil;
+import org.tizen.efluibuilder.utility.ResourceUtil;
+import org.w3c.dom.Document;
+
+
+public class NewSnippetDialogPage extends Dialog {
+    public static final String NAME = NewSnippetDialogPage.class.getName();
+
+    private Object model = null;
+    private Text nameText;
+    private Text descriptionText;
+    private String name = "";
+    private String description = "";
+    private Button okButton;
+    private Button cancelButton;
+
+    public void setModel(Object model) {
+        this.model = model;
+    }
+
+    public Object getModel() {
+        return model;
+    }
+
+    public NewSnippetDialogPage(Shell parentShell) {
+        super(parentShell);
+    }
+
+    @Override
+    protected void configureShell(Shell shell) {
+        super.configureShell(shell);
+        shell.setText(NewSnippetWizardMessages.WIZARD_TITLE);
+    }
+
+    public Text getNameText() {
+        return nameText;
+    }
+
+    public void setNameText(Text nameText) {
+        this.nameText = nameText;
+    }
+
+    public Text getDescriptionText() {
+        return descriptionText;
+    }
+
+    public void setDescriptionText(Text descriptionText) {
+        this.descriptionText = descriptionText;
+    }
+
+    @Override
+    protected Control createDialogArea(Composite parent) {
+
+        Composite container = (Composite) super.createDialogArea(parent);
+        GridLayout layout = new GridLayout(2, false);
+        layout.marginRight = 20;
+        layout.marginLeft = 20;
+        layout.marginTop = 20;
+        layout.marginBottom = 20;
+        layout.horizontalSpacing = 8;
+        layout.verticalSpacing = 10;
+        container.setLayout(layout);
+
+        Label lblName = new Label(container, SWT.NONE);
+        lblName.setText(NewSnippetWizardMessages.FIRST_PAGE_NAME_LABEL);
+
+        nameText = new Text(container, SWT.BORDER);
+        nameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false,
+                                            1, 1));
+        nameText.setText(name);
+        nameText.addModifyListener(new ModifyListener() {
+
+            @Override
+            public void modifyText(ModifyEvent e) {
+                Text textWidget = (Text) e.getSource();
+                name = textWidget.getText();
+                if (!name.isEmpty()) {
+                    okButton.setEnabled(true);
+                } else {
+                    okButton.setEnabled(false);
+
+                }
+            }
+        });
+
+        Label lblDescription = new Label(container, SWT.NONE);
+        GridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false,
+                                               false, 1, 1);
+        lblDescription.setLayoutData(gd_lblNewLabel);
+        lblDescription.setText(NewSnippetWizardMessages.FIRST_PAGE_DESCRIPTION_LABEL);
+
+        descriptionText = new Text(container, SWT.BORDER);
+        descriptionText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
+                                                   false, 1, 1));
+        descriptionText.setText(description);
+        descriptionText.addModifyListener(new ModifyListener() {
+
+            @Override
+            public void modifyText(ModifyEvent e) {
+                Text textWidget = (Text) e.getSource();
+                description = textWidget.getText();
+                if (!name.isEmpty()) {
+                    okButton.setEnabled(true);
+                } else {
+                    okButton.setEnabled(false);
+
+                }
+            }
+        });
+
+        Label sepLabel = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
+        sepLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
+                                            false, 1, 1));
+        return container;
+    }
+
+    @Override
+    protected void createButtonsForButtonBar(Composite parent) {
+        if (PlatformUtil.getOS().equals(PlatformUtil.OS_WIN32)) {
+            okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+            cancelButton = createButton(parent, IDialogConstants.CANCEL_ID,
+                                        IDialogConstants.CANCEL_LABEL, false);
+        } else {
+            cancelButton = createButton(parent, IDialogConstants.CANCEL_ID,
+                                        IDialogConstants.CANCEL_LABEL, false);
+            okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+        }
+        okButton.setSize(86, 24);
+        cancelButton.setSize(86, 24);
+        okButton.setEnabled(false);
+    }
+
+    @Override
+    protected Point getInitialSize() {
+        return new Point(510, 188);
+    }
+
+    @Override
+    protected void okPressed() {
+        // set default icon
+        ImageDescriptor imageDescriptor = ResourceUtil.getImageDescriptor(BuilderPlugin.PLUGIN_ID, ImageResources.SNIPPET_DEFAULT_SNIPPET_IMAGE);
+
+        Part part = (Part) getModel();
+
+        PartMarshaller marshaller = new PartMarshaller();
+        Document document = marshaller.marshall(part);
+
+        // create snippet
+        ISnippet snippet = new Snippet();
+        snippet.setName(name);
+        snippet.setDescription(description);
+        snippet.setType(Snippet.TYPE_WIDGET);
+        snippet.setModel(document);
+        snippet.setImage(imageDescriptor);
+        ISnippetManager manager = SnippetManager.getDefault();
+        manager.create(snippet);
+        super.okPressed();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewSnippetWizardMessages.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewSnippetWizardMessages.java
new file mode 100644 (file)
index 0000000..6b54465
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.snippet;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public class NewSnippetWizardMessages {
+    private static final String BUNDLE_NAME = NewSnippetWizardMessages.class.getName();
+
+    // Wizard
+    public static String WIZARD_TITLE;
+
+    // First Page
+    public static String FIRST_PAGE_TITLE;
+    public static String FIRST_PAGE_DESCRIPTION;
+    public static String FIRST_PAGE_NAME_LABEL;
+    public static String FIRST_PAGE_DESCRIPTION_LABEL;
+
+    // Error Messages
+    public static String ERROR_INVALID_NAME;
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, NewSnippetWizardMessages.class);
+    }
+
+    private NewSnippetWizardMessages() {
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewSnippetWizardMessages.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewSnippetWizardMessages.properties
new file mode 100644 (file)
index 0000000..c46a9c5
--- /dev/null
@@ -0,0 +1,11 @@
+# Wizard
+WIZARD_TITLE=New Snippet
+
+# First Page
+FIRST_PAGE_TITLE=Snippet
+FIRST_PAGE_DESCRIPTION=Create a new Snippet.
+FIRST_PAGE_NAME_LABEL=Name
+FIRST_PAGE_DESCRIPTION_LABEL=Description
+
+# Error Message
+ERROR_INVALID_NAME=Invalid name.
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewComposite.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewComposite.java
new file mode 100644 (file)
index 0000000..9895c99
--- /dev/null
@@ -0,0 +1,281 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.snippet;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.nebula.widgets.gallery.DefaultGalleryItemRenderer;
+import org.eclipse.nebula.widgets.gallery.Gallery;
+import org.eclipse.nebula.widgets.gallery.GalleryItem;
+import org.eclipse.nebula.widgets.gallery.NoGroupRenderer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
+import org.tizen.efluibuilder.core.configurator.ConfiguratorConstants;
+import org.tizen.efluibuilder.model.app.AppManager;
+import org.tizen.efluibuilder.model.snippet.ISnippet;
+import org.tizen.efluibuilder.model.snippet.ISnippetManager;
+import org.tizen.efluibuilder.model.snippet.SnippetManager;
+import org.tizen.efluibuilder.ui.SelectionProviderAdapter;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.tizen.efluibuilder.ui.resources.FontResources;
+import org.tizen.efluibuilder.ui.views.outline.OutlineConstants;
+import org.tizen.efluibuilder.utility.ImageUtil;
+
+
+public final class NewViewComposite extends Composite implements ISelectionProvider, KeyListener, SelectionListener {
+    public static final String NAME = NewViewComposite.class.getName();
+    private static final int WIDTH = 620;
+    private static final int HEIGHT = 240;
+
+    private static final int TEMPLATE_IMAGE_WIDTH = 80;
+    private static final int TEMPLATE_IMAGE_HEIGHT = 140;
+
+    // Selection
+    private SelectionProviderAdapter selectionProvider = null;
+
+    // controlls
+    private Gallery gallery = null;
+
+    private SelectionProviderAdapter getSelectionProvider() {
+        return selectionProvider;
+    }
+
+    public NewViewComposite(Composite parent, int style) {
+        super(parent, style);
+        selectionProvider = new SelectionProviderAdapter();
+        setLayout(new GridLayout(1, false));
+        GridData gridData = new GridData(GridData.FILL_BOTH);
+        gridData.widthHint = WIDTH;
+        gridData.heightHint = HEIGHT;
+        setLayoutData(gridData);
+
+        gallery = new Gallery(this, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+        gallery.setBackground(ColorResources.DIALOG_TABLE_BG);
+
+        NoGroupRenderer groupRenderer = new NoGroupRenderer();
+        groupRenderer.setItemHeight(TEMPLATE_IMAGE_HEIGHT);
+        groupRenderer.setItemWidth(TEMPLATE_IMAGE_WIDTH);
+        groupRenderer.setMinMargin(16);
+        groupRenderer.setAutoMargin(true);
+        gallery.setGroupRenderer(groupRenderer);
+        DefaultGalleryItemRenderer itemRenderer = new DefaultGalleryItemRenderer();
+        gallery.setItemRenderer(itemRenderer);
+        gallery.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 3));
+
+        addListeners();
+        refresh();
+        this.getShell().setMinimumSize(660, 461);
+        this.getShell().setLocation(SWT.CENTER, SWT.CENTER);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.swt.widgets.Widget#dispose()
+     */
+    @Override
+    public void dispose() {
+        removeListeners();
+        gallery.dispose();
+        gallery = null;
+        selectionProvider = null;
+        super.dispose();
+    }
+
+    private void addListeners() {
+        gallery.addSelectionListener(this);
+        gallery.addKeyListener(this);
+    }
+
+    private void removeListeners() {
+        gallery.removeSelectionListener(this);
+        gallery.removeKeyListener(this);
+    }
+
+    private void refresh() {
+        gallery.removeAll();
+
+        ISnippetManager manager = SnippetManager.getDefault();
+        Collection<ISnippet> snippets = manager.getViewTemplates();
+        GalleryItem group = new GalleryItem(gallery, SWT.BORDER);
+        group.setText("group");
+        for (ISnippet snippet : snippets) {
+            if (!AppManager.getAppManager().getProfile().equals(ConfiguratorConstants.PROFILE_MOBILE)) {
+                // This template is not supported in wearable profile
+                if ((snippet.getName().equals(OutlineConstants.KEY_POPUP_VIEW)) || (snippet.getName().equals(OutlineConstants.KEY_CTXPOPUP_VIEW))) {
+                    continue;
+                }
+            }
+
+            final GalleryItem item = new GalleryItem(group, SWT.NONE);
+            item.addDisposeListener(new DisposeListener() {
+                @Override
+                public void widgetDisposed(DisposeEvent arg0) {
+                    Image image = item.getImage();
+                    if (image != null && image.isDisposed() == false) {
+                        image.dispose();
+                    }
+                }
+            });
+
+            item.setFont(FontResources.BOLD);
+            item.setText(snippet.getName());
+            Image lineImage = snippet.getImage().createImage();
+            item.setImage(ImageUtil.addBorderImage(lineImage, TEMPLATE_IMAGE_WIDTH, TEMPLATE_IMAGE_HEIGHT,
+                                                   ColorResources.DIALOG_IMAGE_BORDER_COLOR));
+            lineImage.dispose();
+            item.setData(snippet);
+        }
+
+        gallery.redraw();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
+     */
+    @Override
+    public ISelection getSelection() {
+        return getSelectionProvider().getSelection();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.
+     * ISelection )
+     */
+    @Override
+    public void setSelection(ISelection selection) {
+        getSelectionProvider().setSelection(selection);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface
+     * .viewers.ISelectionChangedListener)
+     */
+    @Override
+    public void addSelectionChangedListener(ISelectionChangedListener listener) {
+        getSelectionProvider().addSelectionChangedListener(listener);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface
+     * .viewers.ISelectionChangedListener)
+     */
+    @Override
+    public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+        getSelectionProvider().removeSelectionChangedListener(listener);
+    }
+
+    @Override
+    public void widgetSelected(SelectionEvent event) {
+        if (!event.widget.equals(gallery)) {
+            return;
+        }
+
+        GalleryItem[] selections = gallery.getSelection();
+        if (selections.length == 0) {
+            setSelection(StructuredSelection.EMPTY);
+            return;
+        }
+
+        Object object = selections[0].getData();
+        IStructuredSelection selection = new StructuredSelection(object);
+        setSelection(selection);
+
+    }
+
+    @Override
+    public void widgetDefaultSelected(SelectionEvent event) {
+        widgetSelected(event);
+    }
+
+    @Override
+    public void keyPressed(KeyEvent event) {
+    }
+
+    @Override
+    public void keyReleased(KeyEvent event) {
+        if (event.character == SWT.DEL) {
+            delete();
+        }
+    }
+
+    private void delete() {
+        ISelection selection = getSelection();
+
+        Assert.isTrue(selection instanceof StructuredSelection);
+        if (selection.equals(StructuredSelection.EMPTY)) {
+            return;
+        }
+
+        StructuredSelection ss = (StructuredSelection) selection;
+        Object object = ss.getFirstElement();
+        if (object instanceof ISnippet) {
+            ISnippet snippet = (ISnippet) object;
+            String category = snippet.getCategory();
+
+            if (category.equals(ISnippet.CATEGORY_SYSTEM)) {
+                MessageBox msgBox = new MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_INFORMATION);
+                msgBox.setMessage("Default template can not be deleted.");
+                msgBox.open();
+                return;
+            }
+
+            MessageBox msgBox = new MessageBox(Display.getDefault().getActiveShell(), SWT.YES | SWT.NO | SWT.ICON_QUESTION);
+            msgBox.setMessage("Do you really want to delete this template? \nDeleted template can not be restored.");
+            int result = msgBox.open();
+            if (result == SWT.YES) {
+                ISnippetManager manager = SnippetManager.getDefault();
+                manager.remove(snippet);
+                refresh();
+            }
+        }
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizard.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizard.java
new file mode 100644 (file)
index 0000000..75cac07
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.snippet;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.snippet.ISnippet;
+import org.tizen.efluibuilder.model.snippet.ISnippetManager;
+import org.tizen.efluibuilder.model.snippet.Snippet;
+import org.tizen.efluibuilder.model.snippet.SnippetManager;
+import org.tizen.efluibuilder.model.util.PartMarshaller;
+import org.w3c.dom.Document;
+
+
+public final class NewViewTemplateWizard extends AbstractWizard {
+    private NewViewTemplateWizardFirstPage firstPage = null;
+
+    public NewViewTemplateWizard() {
+        super();
+        setWindowTitle(NewViewTemplateWizardMessages.WIZARD_TITLE);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
+    @Override
+    public void addPages() {
+        super.addPages();
+        firstPage = new NewViewTemplateWizardFirstPage(NewViewTemplateWizardFirstPage.NAME, NewViewTemplateWizardMessages.FIRST_PAGE_TITLE, null);
+        addPage(firstPage);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+     */
+    @Override
+    public boolean performFinish() {
+        String name = firstPage.getViewName();
+        ImageDescriptor imageDescriptor = firstPage.getImageDescriptor();
+
+        Part part = (Part) getModel();
+        PartMarshaller marshaller = new PartMarshaller();
+        Document document = marshaller.marshall(part);
+
+        ISnippet snippet = new Snippet();
+        snippet.setName(name);
+        snippet.setType(ISnippet.TYPE_VIEW);
+        snippet.setImage(imageDescriptor);
+        snippet.setModel(document);
+        ISnippetManager manager = SnippetManager.getDefault();
+        manager.create(snippet);
+
+        return true;
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizardFirstPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizardFirstPage.java
new file mode 100644 (file)
index 0000000..aee93ea
--- /dev/null
@@ -0,0 +1,250 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.snippet;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.common.util.Assert;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.mscreen.configurator.MScreenQualifierManager;
+import org.tizen.efluibuilder.ui.editor.CombineEditorPart;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+
+import graphicalDataManager.ComponentGraphicalData;
+
+
+public final class NewViewTemplateWizardFirstPage extends AbstractWizardPage implements ModifyListener {
+    public static final String NAME = NewViewTemplateWizardFirstPage.class.getName();
+
+    // controls
+    private Composite rootComposite = null;
+    private Composite imageComposite = null;
+    private Composite nameComposite = null;
+
+    private Canvas imageCanvas = null;
+
+    private Label nameLabel = null;
+    private Text nameText = null;
+    private ImageDescriptor imageDescriptor = null;
+
+    public String getViewName() {
+        return nameText.getText();
+    }
+
+    public ImageDescriptor getImageDescriptor() {
+        return imageDescriptor;
+    }
+
+    public NewViewTemplateWizardFirstPage(String pageName, String title, ImageDescriptor titleImage) {
+        super(pageName, title, titleImage);
+        setTitle(NewViewTemplateWizardMessages.FIRST_PAGE_TITLE);
+        setDescription(NewViewTemplateWizardMessages.FIRST_PAGE_DESCRIPTION);
+    }
+
+    private ImageDescriptor getImageDescriptorFromViewPart(ViewPart selectedViewPart) {
+        CombineEditorPart combineEditorPart = (CombineEditorPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+        MScreenQualifierManager screenQualifierMgr = combineEditorPart.getDesignEditor().getViewer().getMScreenQualifierManager();
+
+        ComponentGraphicalData graphicalData =
+                combineEditorPart.getGraphiclaDataManager().getGraphicalData(selectedViewPart.getUniqueId(), screenQualifierMgr.getCurrentDevice(),
+                                                                             screenQualifierMgr.getCurrentOrientation(), screenQualifierMgr.getCurrentLocale());
+        if (graphicalData != null) {
+            return graphicalData.imageDescriptor;
+        }
+        return null;
+
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    @Override
+    public void createControl(Composite parent) {
+        // Root Composite
+        rootComposite = new Composite(parent, SWT.NONE);
+        rootComposite.setLayout(new GridLayout(1, true));
+        rootComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+        setControl(rootComposite);
+
+        imageComposite = new Composite(rootComposite, SWT.BORDER);
+        imageComposite.setLayout(new GridLayout(1, false));
+        imageComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+        IWizard wizard = getWizard();
+        AbstractWizard abstractWizard = (AbstractWizard) wizard;
+
+        imageDescriptor = getImageDescriptorFromViewPart((ViewPart) abstractWizard.getModel());
+
+        imageCanvas = new Canvas(imageComposite, SWT.NONE);
+        imageCanvas.addPaintListener(new PaintListener() {
+            @Override
+            public void paintControl(PaintEvent e) {
+                if (imageDescriptor != null) {
+                    Image image = imageDescriptor.createImage();
+                    try {
+                        /*
+                         * Calculate image size to fit in Canvas.
+                         */
+                        int originalWidth = image.getBounds().width;
+                        int originalHeight = image.getBounds().height;
+                        int diffWidth = (e.width - originalWidth);
+                        int diffHeight = (e.height - originalHeight);
+                        int resizedWidth = originalWidth;
+                        int resizedHeight = originalHeight;
+                        if (diffWidth < 0 || diffHeight < 0) { // If image size is larger than
+                                                               // Canvas
+                                                               // size,
+                            if (diffWidth - diffHeight > 0) {
+                                resizedHeight = e.height;
+                                resizedWidth *= ((double) e.height / (double) originalHeight);
+                            } else {
+                                resizedWidth = e.width;
+                                resizedHeight *= ((double) e.width / (double) originalWidth);
+                            }
+                        }
+                        int drawX = (e.width - resizedWidth) / 2;
+                        int drawY = (e.height - resizedHeight) / 2;
+                        e.gc.drawImage(image, 0, 0, image.getBounds().width, image.getBounds().height,
+                                       drawX, drawY, resizedWidth, resizedHeight);
+
+                        e.gc.setBackground(ColorResources.DIALOG_IMAGECOMPOSITE_BG_COLOR);
+
+                    } finally {
+
+                        image.dispose();
+
+                    }
+                }
+            }
+        });
+
+        imageCanvas.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+        // Name Composite
+        nameComposite = new Composite(rootComposite, SWT.NONE);
+        nameComposite.setLayout(new GridLayout(2, false));
+        nameComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        nameLabel = new Label(nameComposite, SWT.NONE);
+        nameLabel.setLayoutData(new GridData(GridData.BEGINNING));
+        nameLabel.setText(NewViewTemplateWizardMessages.FIRST_PAGE_NAME_LABEL);
+        nameText = new Text(nameComposite, SWT.SINGLE | SWT.BORDER);
+        nameText.setBackground(ColorResources.DIALOG_NEW_VIEW_NAME_TEXT_BG);
+        nameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        nameText.setFocus();
+
+        setPageComplete(false);
+        addListeners();
+        this.getShell().setMinimumSize(500, 461);
+        this.getShell().setLocation(SWT.CENTER, SWT.CENTER);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.dialogs.DialogPage#dispose()
+     */
+    @Override
+    public void dispose() {
+        removeListeners();
+        super.dispose();
+        rootComposite = null;
+        imageComposite = null;
+        nameComposite = null;
+        nameLabel = null;
+        nameText = null;
+    }
+
+    private void addListeners() {
+        nameText.addModifyListener(this);
+    }
+
+    private void removeListeners() {
+        nameText.removeModifyListener(this);
+    }
+
+    private void validate() {
+        if (!isValidPage()) {
+            setPageComplete(false);
+        } else {
+            setMessage(NewViewTemplateWizardMessages.FIRST_PAGE_DESCRIPTION, null);
+            setPageComplete(true);
+        }
+    }
+
+    private boolean isValidPage() {
+        if (!isValidName(getViewName())) {
+            setMessage(null, NewViewTemplateWizardMessages.ERROR_INVALID_NAME);
+            return false;
+        }
+
+        if (!isValidImage()) {
+            // condition can not be here
+            Assert.isTrue(false);
+            return false;
+        }
+        return true;
+    }
+
+    private boolean isValidName(String name) {
+        if (name.length() == 0) {
+            return false;
+        }
+
+        return true;
+    }
+
+    private boolean isValidImage() {
+        if (imageDescriptor == null) {
+            return false;
+        }
+        return true;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+     */
+    @Override
+    public void modifyText(ModifyEvent e) {
+        if (e.widget.equals(nameText)) {
+            validate();
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizardMessages.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizardMessages.java
new file mode 100644 (file)
index 0000000..7e3fa75
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.snippet;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public class NewViewTemplateWizardMessages {
+    private static final String BUNDLE_NAME = NewViewTemplateWizardMessages.class.getName();
+
+    // Wizard
+    public static String WIZARD_TITLE;
+
+    // First Page
+    public static String FIRST_PAGE_TITLE;
+    public static String FIRST_PAGE_DESCRIPTION;
+    public static String FIRST_PAGE_NAME_LABEL;
+
+    // Error Dialog
+    public static String ERROR_DIALOG_TITLE;
+
+    // Error Messages
+    public static String ERROR_INVALID_GROUP;
+    public static String ERROR_INVALID_NAME;
+    public static String ERROR_EXIST_NAME;
+    public static String ERROR_EMPTY_FILENAME;
+    public static String ERROR_EXIST_FILENAME;
+    public static String ERROR_CREATE_FOLDER;
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, NewViewTemplateWizardMessages.class);
+    }
+
+    private NewViewTemplateWizardMessages() {
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizardMessages.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewTemplateWizardMessages.properties
new file mode 100644 (file)
index 0000000..a6c03b6
--- /dev/null
@@ -0,0 +1,18 @@
+# Wizard
+WIZARD_TITLE=Save As Vew Template
+
+# First Page
+FIRST_PAGE_TITLE=View Template
+FIRST_PAGE_DESCRIPTION=Save the view as a template for futher use.
+FIRST_PAGE_NAME_LABEL=Name: 
+
+# Error Dialog Title
+ERROR_DIALOG_TITLE=Problem Occurred.
+
+# Error Message
+ERROR_INVALID_GROUP=No template group specified.
+ERROR_INVALID_NAME=Enter a valid name.
+ERROR_EXIST_NAME=Name already exists.
+ERROR_EMPTY_FILENAME=Filename is emptied.
+ERROR_EXIST_FILENAME=Filename already exists.
+ERROR_CREATE_FOLDER=Template folder creation failed.
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizard.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizard.java
new file mode 100644 (file)
index 0000000..cc556b2
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.snippet;
+
+import org.eclipse.gef.commands.Command;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.ViewPart;
+
+
+public final class NewViewWizard extends AbstractWizard {
+
+    private NewViewWizardFirstPage firstPage = null;
+private DesignViewer viewer = null;
+    public NewViewWizard(DesignViewer viewer) {
+        this.viewer = viewer;
+        setWindowTitle(NewViewWizardMessages.WIZARD_TITLE);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
+    @Override
+    public void addPages() {
+        super.addPages();
+        firstPage = new NewViewWizardFirstPage(getModel(), NewViewWizardFirstPage.NAME, NewViewWizardMessages.FIRST_PAGE_TITLE, null, viewer);
+        addPage(firstPage);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+     */
+    @Override
+    public boolean performFinish() {
+        Object model = getModel();
+        if (model instanceof ViewPart) {
+            return firstPage.createCommand(platform, (ViewPart) model);
+        }
+
+        return false;
+    }
+
+    public Command getCommnad() {
+        return firstPage.getCommand();
+    }
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizardFirstPage.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizardFirstPage.java
new file mode 100644 (file)
index 0000000..4e05be4
--- /dev/null
@@ -0,0 +1,237 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.snippet;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.efluibuilder.gef.policies.containers.DesignEditorUtil;
+import org.tizen.efluibuilder.gef.viewer.DesignViewer;
+import org.tizen.efluibuilder.model.part.DocumentPart;
+import org.tizen.efluibuilder.model.part.Part;
+import org.tizen.efluibuilder.model.part.ViewPart;
+import org.tizen.efluibuilder.model.part.ViewsPart;
+import org.tizen.efluibuilder.model.snippet.ISnippet;
+import org.tizen.efluibuilder.model.util.LayoutSchemaConstants;
+import org.tizen.efluibuilder.model.util.PartUnmarshaller;
+import org.tizen.efluibuilder.model.util.PartUtil;
+import org.tizen.efluibuilder.ui.resources.ColorResources;
+import org.w3c.dom.Document;
+
+
+public final class NewViewWizardFirstPage extends AbstractWizardPage implements ModifyListener, ISelectionChangedListener {
+    public static final String NAME = NewViewWizardFirstPage.class.getName();
+    private ISnippet snippet = null;
+    // controls
+    private NewViewComposite templateComposite = null;
+    private Composite rootComposite = null;
+    private Text nameText = null;
+    private Command command = null;
+    private Part viewsPart = null;
+    private DesignViewer viewer = null;
+
+    protected NewViewWizardFirstPage(Object model, String pageName, String title, ImageDescriptor titleImage, DesignViewer viewer) {
+        super(pageName, title, titleImage);
+        if (model instanceof ViewPart) {
+            this.viewsPart = ((Part) model).getParent();
+        }
+        setTitle(NewViewWizardMessages.FIRST_PAGE_TITLE);
+        this.viewer = viewer; 
+    }
+
+    public String getViewName() {
+        return nameText.getText();
+    }
+
+    private void setSnippet(ISnippet snippet) {
+        this.snippet = snippet;
+    }
+
+    public ISnippet getSnippet() {
+        return snippet;
+    }
+
+    @Override
+    public void createControl(Composite parent) {
+        rootComposite = new Composite(parent, SWT.NONE);
+        rootComposite.setLayout(new GridLayout(1, false));
+        rootComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+        setControl(rootComposite);
+
+        templateComposite = new NewViewComposite(rootComposite, SWT.NONE);
+        Composite composite = new Composite(rootComposite, SWT.NONE);
+        composite.setLayout(new GridLayout(2, false));
+        composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        Label label = new Label(composite, SWT.NONE);
+
+        label.setText(NewViewWizardMessages.FIRST_PAGE_LABEL_ID);
+        label.setForeground(ColorResources.DIALOG_NEW_VIEW_ID_LABEL);
+
+        nameText = new Text(composite, SWT.BORDER | SWT.SINGLE);
+        nameText.setBackground(ColorResources.DIALOG_NEW_VIEW_NAME_TEXT_BG);
+
+        nameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        setPageComplete(false);
+        addListeners();
+    }
+
+    @Override
+    public void dispose() {
+        removeListeners();
+        super.dispose();
+    }
+
+    private void addListeners() {
+        nameText.addModifyListener(this);
+        templateComposite.addSelectionChangedListener(this);
+    }
+
+    private void removeListeners() {
+        nameText.removeModifyListener(this);
+        templateComposite.removeSelectionChangedListener(this);
+    }
+
+    private void validate() {
+        if (!isValid()) {
+            setPageComplete(false);
+        } else {
+            setMessage(null, null);
+            setPageComplete(true);
+        }
+    }
+
+    private boolean isValid() {
+        if (!isValidName(getViewName())) {
+            return false;
+        }
+
+        if (!isValidTemplate(getSnippet())) {
+            return false;
+        }
+        return true;
+    }
+
+    private boolean isValidName(String name) {
+        if (name.length() == 0) {
+            setMessage(null, NewViewWizardMessages.ERROR_EMPTY_ID);
+            return false;
+        }
+
+        IWizard wizard = getWizard();
+        Assert.isTrue(wizard instanceof AbstractWizard);
+        if (viewsPart != null) {
+            int result = PartUtil.isValidViewName(viewsPart, name);
+            if (result == PartUtil.ERROR_ID_EXISTS) {
+                setMessage(null, NewViewWizardMessages.ERROR_EXIST_ID);
+                return false;
+            } else if (result == PartUtil.ERROR_INVALID_ID) {
+                setMessage(null, NewViewWizardMessages.ERROR_INVALID_ID);
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    private boolean isValidTemplate(ISnippet template) {
+        if (template == null) {
+            setMessage(null, NewViewWizardMessages.ERROR_EMPTY_TEMPLATE);
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public void modifyText(ModifyEvent e) {
+        if (e.widget.equals(nameText)) {
+            validate();
+        }
+    }
+
+    @Override
+    public void selectionChanged(SelectionChangedEvent event) {
+        if (event.getSelection().equals(StructuredSelection.EMPTY)) {
+            setSnippet(null);
+            validate();
+            return;
+        }
+        ISelection selection = event.getSelection();
+        Assert.isTrue(selection instanceof StructuredSelection);
+        StructuredSelection ss = (StructuredSelection) selection;
+        Object object = ss.getFirstElement();
+        Assert.isTrue(object instanceof ISnippet);
+        ISnippet snippet = (ISnippet) object;
+        setSnippet(snippet);
+        validate();
+    }
+
+    public boolean createCommand(String platform, ViewPart selectedPart) {
+        String name = getViewName();
+        ISnippet snippet = getSnippet();
+
+        Document document = snippet.getModel();
+        DocumentPart docPart = selectedPart.getOwnerDocumentPart();
+
+        PartUnmarshaller unmarshaller = new PartUnmarshaller();
+        Part part = unmarshaller.unmarshall(docPart, document, false);
+
+        // get ViewPart from part
+        Part viewPart = null;
+        viewPart = (part instanceof ViewsPart) ? part.getChildren().get(0) : part;
+
+        // update id for part that unmarshall from snippet
+        docPart.setPartPropertyIdRecursive(part);
+        viewPart.setPropertyValue("id", name);
+
+        Part parent = selectedPart.getParent();
+        Part nextSibiling = selectedPart.getNextSibling();
+        
+        Point screenSize = viewer.getMScreenQualifierManager().getScreenSize();
+        Point viewPosition = DesignEditorUtil.getNextViewPosition(parent, screenSize.x, screenSize.y);
+        viewPart.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_X, Integer.toString(viewPosition.x));
+        viewPart.setPropertyValue(LayoutSchemaConstants.PAGE_LOCATION_Y, Integer.toString(viewPosition.y));
+        
+        command = PartUtil.createAddPartCommand(parent, viewPart, nextSibiling);
+        return true;
+    }
+
+    public Command getCommand() {
+        return command;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizardMessages.java b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizardMessages.java
new file mode 100644 (file)
index 0000000..f9a6793
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.efluibuilder.ui.wizard.snippet;
+
+import org.eclipse.osgi.util.NLS;
+
+
+public class NewViewWizardMessages {
+    private static final String BUNDLE_NAME = NewViewWizardMessages.class.getName();
+
+    // Wizard
+    public static String WIZARD_TITLE;
+
+    // First Page
+    public static String FIRST_PAGE_TITLE;
+    public static String FIRST_PAGE_LABEL_ID;
+
+    // Error messages
+    public static String ERROR_PROJECT_EMPTY;
+    public static String ERROR_EMPTY_ID;
+    public static String ERROR_EXIST_ID;
+    public static String ERROR_INVALID_ID;
+    public static String ERROR_EMPTY_TEMPLATE;
+    public static String ERROR_INVALID_TEMPLATE;
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, NewViewWizardMessages.class);
+    }
+
+    private NewViewWizardMessages() {
+    }
+
+}
diff --git a/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizardMessages.properties b/org.tizen.efluibuilder/src/org/tizen/efluibuilder/ui/wizard/snippet/NewViewWizardMessages.properties
new file mode 100644 (file)
index 0000000..64cdb5e
--- /dev/null
@@ -0,0 +1,15 @@
+# NewPageWizard
+WIZARD_TITLE=New View
+
+# FirstPage
+FIRST_PAGE_TITLE=Select a view to add 
+FIRST_PAGE_LABEL_ID=ID: 
+
+#Error Message
+ERROR_PROJECT_EMPTY=No project specified.
+ERROR_EMPTY_ID=Enter an ID for the view.
+ERROR_EXIST_ID=The ID already exists.
+ERROR_INVALID_ID =The ID is invalid.
+ERROR_EMPTY_TEMPLATE=No template is selected.
+ERROR_INVALID_TEMPLATE=A deleted view cannot be restored. Are you sure that you want to delete the selected view? 
+
diff --git a/package/build.linux b/package/build.linux
new file mode 100755 (executable)
index 0000000..249d44a
--- /dev/null
@@ -0,0 +1,79 @@
+#!/bin/bash -xe
+
+__copy_necessary_binaries()
+{
+    echo "add necessary files."
+    ## ex)
+    ##     ide_root_path_name=IDE
+    ##     cp -rf ~~~~/file.file ${INSTALL_DIR}/${ide_root_path_name}/
+    ##     cp -rf ${SRCDIR}/package/addingFiles/* ${INSTALL_DIR}/
+}
+
+__set_parameter()
+{
+    #echo "TARGET_OS : ${TARGET_OS}"
+    build_script_path=${ROOTDIR}/pde-build
+}
+
+# clean
+clean()
+{
+    echo "=========================================CLEAN============================================"
+    __set_parameter
+    ${build_script_path}/clean.sh ${package_name}
+}
+
+# build
+build() 
+{
+    echo "=========================================BUILD============================================"
+    pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
+    for pkgname_and_platform in ${pkgname_and_platform_list}
+    do
+        pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
+        package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
+        platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+    
+        if [ "x${TARGET_OS}" = "x${platform}" ]
+        then
+            if [ "x${package_name}" = "xefl-ui-builder-eplugin" ]
+            then
+                __set_parameter
+                ${build_script_path}/build.sh ${package_name}
+           fi
+        else
+            echo ""
+        fi
+    done
+}
+
+# install
+install() 
+{
+    pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
+    for pkgname_and_platform in ${pkgname_and_platform_list}
+    do
+        echo "=========================================INSTALL============================================"
+        pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
+        package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
+        platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+
+        if [ "x${TARGET_OS}" = "x${platform}" ]
+        then
+            if [ "x${package_name}" = "xefl-ui-builder-eplugin" ]
+            then
+                INSTALL_DIR="${SRCDIR}/package/${package_name}.package.${TARGET_OS}/data"
+                mkdir -p ${INSTALL_DIR}
+                __set_parameter
+                ${build_script_path}/install.sh ${package_name}
+                __copy_necessary_binaries
+            fi
+        else
+            echo ""
+        fi
+    done    
+}
+
+[ "$1" = "clean" ] && clean
+[ "$1" = "build" ] && build
+[ "$1" = "install" ] && install
diff --git a/package/changelog b/package/changelog
new file mode 100644 (file)
index 0000000..9fc8f21
--- /dev/null
@@ -0,0 +1,1189 @@
+* 0.6.130
+- fix bugs & remove unused code in storyboard
+== Jungwook Ryu <jungwook.ryu@samsung.com> 2017-10-26
+* 0.6.129
+- fix runtime issue when binding remote data source.
+== Karthik Bhat <kv.bhat@samsung.com> 2017-10-26
+* 0.6.128
+- update user string & image in the UIB Project Converter
+- update color of home icon in the view title 
+- addWhen the view is deleted, the efl-renderer system resource resource is destroyed.
+- fix failuer during remote data source parsing
+== ByoungChang Son <sonbc121.son@samsung.com> 2017-10-26
+* 0.6.127
+- Bug fix for release resource issue in NUIBBuilder(Open with previously layout.xml)
+== Seongwon Shim <sw83.shim@samsung.com> 2017-10-23
+* 0.6.126
+- Bug fix for properties view
+== Seongwon Shim <sw83.shim@samsung.com> 2017-10-23
+* 0.6.125
+- Bug fix
+- Add contextmenu in the Design Editor for the Storyboard
+- Improvement performance the Properties View (eg: Entry UI Component)
+== ByoungChang Son <sonbc121.son@samsung.com> 2017-10-23
+* 0.6.124
+- Remove tab ui and add editor switch button
+== Seongwon Shim <sw83.shim@samsung.com> 2017-10-13
+* 0.6.123
+- Stabilize & bug fix
+== ByoungChang Son <sonbc121.son@samsung.com> 2017-10-10 
+* 0.6.122
+- Stabilize XML Editor
+- Unified Design tab, Storyboard tab in the WYSIWYG Editor
+== ByoungChang Son <sonbc121.son@samsung.com> 2017-09-29
+* 0.6.121
+- Removes the Connection Explorer View.
+== Sujin Kim <sujin921.kim@samsung.com> 2017-09-20
+* 0.6.120
+- Support tizen 4.0 wearable
+== Dongjo Hwang <dongjo.hwang@samsung.com> 2017-09-04
+* 0.6.119
+- PROFILE: Add mobile3.0 project in uitool(SPTSDKUX=4256)
+== YongSeok Lee <ys1125.lee@samsung.com> 2017-07-17
+* 0.6.118
+- Initial packaging after migration to github
+- Revise validation of XML editor
+== DongJo Hwang <dongjo.hwang@samsung.com> 2017-06-21
+* 0.6.117
+- bugfix - #3947  Failed to initialize layout editor due to eception
+- [Databinding] Fix for databinding filter windows compatibility issue
+- Binding info icon should turn up, on drop of model item if show binding info is enabled
+== DongJo Hwang <dongjo.hwang@samsung.com> 2017-05-23
+* 0.6.116
+- 'Widget' string replaced with 'UI Component' in UI
+- [Databinding][SPTSDKUX-3926] After renaming data source it doesn't update in attached data model
+== Aditya Aswani <a.aswani@samsung.com> 2017-04-27
+* 0.6.115
+- [Databinding][SPTSDKUX-3826] Unable to bind datamodel to a supported
+- [Databinding][SPTSDKUX-3825] Data source/ Data model can't remove
+== Aditya Aswani <a.aswani@samsung.com> 2017-04-10
+* 0.6.114
+- Bug fixed radio variation in mobile 2.3(SPTSDKUX-3789)
+- Bug fixed gengriditem in mobile 2.3(SPTSDKUX-3790)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2017-04-07
+* 0.6.113
+- Bug Fix: [Databinding] Disable drag of  non primitive array tree item
+- Remove databinding for unsupported Tizen platform and profiles
+- Resolve generated code warnings
+- Enable databinding for wearable 3.0
+== Mukul Yadav <mukul.yadav@samsung.com> 2017-04-06
+* 0.6.112
+- Property name changed from 'data-bind' to 'data_bind'
+- [Databinding] Path for binding items changed from Json format to xPath format
+- [Databinding]Collapse all functionality added for source and model panel
+- [Databinding] Bug: Binding not happening when a event is added to a widget
+== Aditya Aswani <a.aswani@samsung.com> 2017-03-28
+* 0.6.111
+- Bug fix: ListItem drop
+- Bug fix: Improper index generation on selection of Array in Combo box
+== DongJo Hwang <dongjo.hwang@samsung.com> 2017-03-17
+* 0.6.110
+- Enabled XML support for data sources(IDE side)
+- Add xml support(Code generation)
+- Change databinding icons to grayscale color scheme
+== Aditya Aswani <a.aswani@samsung.com> 2017-03-21
+* 0.6.109
+- Fixed a build error for MANIFEST.MF of databinding commit
+== DongJo Hwang <dongjo.hwang@samsung.com> 2017-03-17
+* 0.6.108
+- Change project java runtime version from 1.7 to 1.8
+-Merge branch 'databinding_develop' into develop
+== DongJo Hwang <dongjo.hwang@samsung.com> 2017-03-17
+* 0.6.107
+- update image files(PROJECT MIGRATOR)
+- apply new UX/UI*PROJECT MIGRATOR)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2017-03-10
+* 0.6.106
+- Bug fixed layout.xml variation in mobile 3.0(SPTSDKUX-3540)
+- Bug fixed layout.xml variation in wearable_circle3.0(SPTSDKUX-3540)
+- Bug fixed layout.xml variation in wearable_circle2.3.1(SPTSDKUX-3540)
+- Bug fixed layout.xml variation in mobile 2.3(SPTSDKUX-3540)
+- Bug fixed layout.xml variation in mobile 2.4(SPTSDKUX-3540)
+- Bug fixed layout.xml variation in wearable2.3.1(SPTSDKUX-3540)
+- Bug fix for copy & paste in m-screen(SPTSDKUX-3540)
+- bug fixed - #3426  - add multiple widgets into box container by DND
+== DongJo Hwang <dongjo.hwang@samsung.com> 2017-03-09
+* 0.6.105
+Modify to support Multi-byte character
+== DongJo Hwang <dongjo.hwang@samsung.com> 2017-02-21
+* 0.6.104
+Change label's ellipsis property default true(SPTDKUX-3348)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2017-02-14
+* 0.6.103
+- remove useless layout
+- Storyboard not allowing to delete startup view
+- Undo after delete of startup view is not working properly
+== DongJo Hwang <dongjo.hwang@samsung.com> 2017-02-13
+* 0.6.102
+- Apply GUI guide for edit dialog
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-26
+* 0.6.101
+- Fixed genlistitem image bug in wearable(SPTSDKUX-2693)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-20
+* 0.6.100
+- bug-fix, Resolve issue of Finish button malfunction in user view page.
+-[StoryBoard] Device view change width issue resolved
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-20
+* 0.6.99
+- Generate elm_datetime_format_set when style is default(SPTSDKUX-3052)
+- Remove getVisitor interface from IProjectMigrator and rename some classes
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-16
+* 0.6.98
+- changes component create rule on canvas - #3051
+- Rename UIBEnabler -> ProjectMigrator
+- Block event that framework not supporting
+- fixed a layout bug -#3028
+- Bug fixed panel in mscreen(TSCP-750)
+- Bug fixed scroller in mscreen(TSCP-751)
+- revise execution option - handle specific character '&'
+- Fixed issue where numbers were removed from the clone project if the source project name contained a number
+- Disable cancle in add user view mode
+- Bug fixed panes in mscreen(TSCP-746)
+- Bug fixed box in mscreen(TSCP-749)
+- Bug fixed grid in mscreen when wearable(TSCP-748)
+- Bug fixed table in mscreen(TSCP-747)
+- [StoryBoard] fixed Landscape/Portrait view change bug
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-16
+* 0.6.97
+- fixed a selection bug in propertiesView - #2979
+- Change color api codegen flexible(TSCP-744)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-13
+* 0.6.96
+- fixed a bug in pasteAction - #2829
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-12
+* 0.6.95
+- revise command line execution option [SPTSDKUX-2965]
+- Bug fixed in mscreen(TSCP-446)
+- Add color_class_api
+- Change col and rows in table(SPTSDKUX-2821)
+- support copy&paste for toolbarItem & hoverselItem - #2980
+- Add color_class_api
+- fix the logic to get efl-renderer path for wearable (SPTSDKUX-2978)
+- Add color_class_api
+- update user strings and related images
+- Unable to delete view from storyboard.
+- Refactoring uibconberter
+- update user string
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-12
+* 0.6.94
+- Add execution option -o to open the style directly
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-05
+* 0.6.93
+- reduce unnecessary redrawing in canvas
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-05
+* 0.6.92
+- Rename method and move some job
+- fixed a memory leak in Storyboard
+- Delete button colors in wearable
+- Stabilize in the user_view page
+- Fixed an issue where an error tooltip could not be displayed (check tooltip disposed)
+- Fixed an issue where the Finish button was disabled when the user view was added.
+- Fixed index error when clearing
+- update comment of template/user_view
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-05
+* 0.6.91
+- Add descriptor for wearable-circle-3.0
+- Added the 'colors' attribute for wearable circle 3.0
+- Fixed and add hoversel in mobile3.0
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-02
+* 0.6.90
+-Revise Component designer dialog description
+- Add res folder in build.properties
+- bugfix in pastePartColorAction
+- Add a restriction for style of wearable circle 3.0
+- Add a restriction for style of mobile 3.0
+- Delete horizontal in index descriptor(SPTDKUX-2876)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-02
+* 0.6.89
+- support item copy&paste - #2892
+- Color_api bug fixed
+-Merge branch 'color_api' into develop
+- Seperate app main visitor to handle exception
+- add protect code for empty document
+- Bug fix for view template(SPTSDKUX-2917)
+- update delete policy of user view manager
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-01
+* 0.6.88
+- Add delete user view file logic
+- Change codegen in toolbar(SPTSDKUX-2868)
+- Merge from support_legacy branch
+- Support java 1.8 environment.
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-12-01
+* 0.6.87
+- Add file path adapted OS to EDJResourceSyncManager
+- Add description to guide refresh project
+- Add Hoversel
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-11-29
+* 0.6.86
+- Remove unnecessary context menu (GUI Fetch)
+- Fix screen configuration sync
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-11-28
+* 0.6.85
+- Fix a bug of Component designer in Windows
+- Fixed a bug of tableComponent in canvas - #2855
+- Change toolbar property for bug fixed(SPTSDKUX-2742)
+- Fixed some java 7 code to java 6.
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-11-26
+* 0.6.84
+- Add non-schema based validator
+- Support Windows OS
+- add workaround code for flickering in canvas - #2772
+- fixed a exception in edjResourceManager - TSCP#717
+- Fixed a bug in ResourceFileDuplicator
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-11-25
+* 0.6.83
+- modify feedback size of placeholder
+- modify D&D mechanism in outline view - #2829
+- fixed a bug in connector - TSCP#709
+- Fixed restrictions of screen configuration
+- Change a policy of XML fault.
+- apply open edc editor icon
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-11-24
+* 0.6.82
+- Fixed drawing bugs in canvas - TSCP#705
+- Add execution option for Windows, Mac OS.
+- Custom style set currently can be deleted.
+- change parameter name for _post function in connection
+- Bug fix for popup
+-[StoryBoard]- Popup and CtxPopup code generation(SPTSDKUX-2613)
+-Remove unused file.
+- Refactored some codes.
+- Fixed class cast exception in canvas - TSCP#704
+- Add create api for popup and ctxpopup uib_create_popup, uib_create_ctxpopup
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-11-22
+* 0.6.81
+- Stabilize the feature for Component designer
+- Fixed some NPEs.
+- draw outlines to item & item container
+- fixed default value of color in background widget(TSCP-688)
+- Fixed warning bug in layout.xml(TSCP-669)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-11-14
+* 0.6.80
+- fixed a D&D bug in canvas - TSCP#683
+- fixed a drawing bugs in canvas
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-11-10
+* 0.6.79
+- WYSIWYG : modify feedbacks in canvas
+- PALETTE: When the user drag the same icon, the issue of the invalid selected ...
+- UI : apply design guide for Component designer
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-11-08
+* 0.6.78
+- Fixed wrong lowest position of scale widget. (SPTSDKUX-1363)
+- Change minmax property issue in spinner(SPTSDKUX-2468)
+-Connection with Component designer.
+- Upgrade drag-and-drop for the direct manipulation.
+- apply none scalable feedback
+- Remove removed attribute from view template
+- modify boilerplate
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-11-02
+* 0.6.77
+-Bug fix - invalid regex for double (SPTSDKUX-2401)
+-[StoryBoard] - Resolved New page view name change Properties not displaying in properties tab
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-10-25
+* 0.6.76
+-[StoryBoard] - Panning functionality implementation
+-[StoryBoard] Flicker issue fix
+- Add disable codegen  in wearable-square progressbar(SPTSDKUX-2387)
+- Delete naviframe/title_icon style in button(SPTDKUX-2386)
+- Disable Entry's ediatable property when password property is true, in wearable(SPTSDKUX-2359)
+- Fixed order bug in ComponentValidator(SPTSDKUX-2336, TSCP-628)
+- Fixed bug in WeightHint(SPTSDKUX-2336, TSCP-628)
+- Fixed schema based validation problem. (SPTSDKUX-2271, 2338)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-10-24
+* 0.6.75
+- Add max constraint value for padding in table and box(SPTSDKUX-2334)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-10-19
+* 0.6.74
+- Fix wrong spelling for editfield style(SPTSDKUX-2321)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-10-18
+* 0.6.73
+- Change disable set in circle_progressbar(SPTSDKUX-2226)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-10-13
+* 0.6.72
+- Single line property disable when password is true(SPTSDKUX-2276)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-10-13
+* 0.6.71
+- Single line property disable when password is true(SPTSDKUX-2276)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-10-13
+* 0.6.70
+- Add integer range check logic for Integer type(SPTSDKUX-2269)
+- Fixed some problems that cursor is moved suddenly.
+- Fixed the line remaining problem about removed elements
+- Change properties spelled and tooltip add(SPTSDKUX-2274)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-10-12
+* 0.6.69
+- Remove circle surface create code(SPTSDKUX-2229)
+- Added error reason dialog for initialization failure.
+- Change user string
+- Modify constants for end_image_path and add image_path for resource management
+- Change disable set in circle_progressbar(SPTSDKUX-2226)
+- Add elm_datetime_format_set for wearable square style(datepicker_layout, timepicker_layout)(SPTSDKUX-2236)
+- Remove map component from wearable(SPTSDKUX-2224)
+- Fixed some bugs
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-10-12
+* 0.6.68
+- Switch child components of Panes
+- Add max value for cols and rows(SPTSDKUX-2201)
+- radio button text is cropped.
+- Fixed added middle elements sync problem.
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-30
+* 0.6.67
+- WYSIWYG : When image is set, Redraw renderer in Windows OS.
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-28
+* 0.6.66
+- Fix Storyboard UI Issues (SPTSDKUX-2160 and SPTSDKUX-2161)
+== Karthik Bhat <kv.bhat@samsung.com> 2016-09-27
+* 0.6.65
+- Fixed fatal error state problem when delete modified project without saving (TSCP-435)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-27
+* 0.6.64
+- use copied resource files for rendering in windows OS
+- Update current max id when id is changed(TSCP-533)
+-Add package dependency to enventor-eplugin
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-26
+* 0.6.63
+- Fixed synchronization of .uproject file
+- Improved child element synchronization accuracy
+- set proxy info to environment for map component(TSAM-5775)
+-[StoryBoard] Button delete connection not deleting issue resolved
+-[StoryBoard] Resolved Button delete conflicting with view delete issue
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-22
+* 0.6.62
+- Fixed NPE with varient part in model.
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-21
+* 0.6.61
+- Add icon callback logic for genlist item(SPTSDKUX-2086)
+- Add scroller & panel component paste action(SPTSDKUX-2121)
+- Bug fixed in macos-x change the last column width of mscreen table
+- Fixed the crashed layout editor openning case
+- Fixed project deletion failure sometimes (SPTSDKUX-1954)
+- Change the last column width because all OS's mscreen table show similar
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-20
+* 0.6.60
+- Add tooltip about mode property in list widget(SPTSDKUX-2005)
+- Fixed bug when add button click in mscreen dialog(SPTSDKUX-2039)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-19
+* 0.6.59
+- change bundle information
+- Fixed synchronization from TextEditor to DesignEditor
+-[StoryBoard] Resolved Button delete conflicting with view delete issue
+- Change of view id in properties view should reflect in storyboard view
+- SPTSDKUX-1994)
+-[TSCP-456/TSCP-444] Fix UI issues when deleting a view from Storyboard Tab.
+- Refactored some codes
+- Replace ctxpopup/popup parent id(tizen.view -> view)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-19
+* 0.6.58
+- Fixed some bugs & refactored codes.
+- apply design guide (SPTSDKUX-1864)
+- disable menu items (List and Icons Only) of in the context menu
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-07
+* 0.6.57
+- Fixed that some added child elements are not synchronized. (SPTSDKUX-1964)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-06
+* 0.6.56
+- Add style property codegen in Scroller Container(SPTSDKUX-1995)
+- Adjust textbox width of CheckScaleMethod in Ubuntu OS
+- Bug fix for calendar component
+- Bug fix for ctxpopup direction property(SPTSDKUX-1964)
+- set short cuts to Zorder actions
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-09-02
+* 0.6.55
+- Delete disable block code when check widget style changed(SPTSDKUX-1912)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-26
+* 0.6.54
+- Remove item_type property from genlist item(SPTSDKUX-1917)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-26
+* 0.6.53
+- fix, screen_orientation of views(SPTSDKUX-1913)
+- Table pack in mscreen configurator for Linux os(TSCP-522)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-26
+* 0.6.52
+- Removed duplicated actions
+- remove watch service
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-23
+* 0.6.51
+- Delete diable property in progressbar(SPTSDKUX-1854)
+- Add cursor into screen configurator dialog when user add screen(SPTSDKUX-1754)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-23
+* 0.6.50
+-  [SPTSDKUX-1880] Fix Orientation issue in storyboard.
+== Karthik Bhat <kv.bhat@samsung.com> 2016-08-22
+* 0.6.49
+-Apply user strings in Properties view
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-22
+* 0.6.48
+- Revision category (Common, UI Component specification => General)
+- to prevent create a new view from template with same view id
+- update user strings (UI Component, UI Container -> UI components, UI containers)
+- modify info-feedback's font size in design editor - TSCP #501
+- Apply user string to New View Template dialog
+- Apply user string to Snippets-
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-22
+* 0.6.47
+- Apply popup and ctxpopup template in mobile profile
+- remove popup&ctxpopup from storyboard's context  menu in wearable project
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-22
+* 0.6.46
+- auto update edj files when file changed - #1690
+- apply user strings in outline view
+- Screen Config changed when Screen deleted(SPTSDKUX-1762)
+- Bug fixed when every name field does not filled(TSCP-449)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-19
+* 0.6.45
+- Update package version
+== Seongwon Shim <sw83.shim@samsung.com> 2016-08-17
+* 0.6.44
+- Bug fix genlistitem image for wearable circle
+- Refactored ResourceChangedEvent for editor
+- Added lines of exact position for number of ruler
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-16
+* 0.6.43
+- Fixed Finish button(SPTSDKUX-1755)
+- Delete disable option of index(SPTSDKUX-1811)
+- Delete disable option of label(SPTSDKUX-1810)
+- Tuned spaces for UX guide
+- Fixed to can't open editor with exceptions (SPTSDKUX-1808)
+- modify selection UX - #1709
+- Removed unnecessary codes.
+- remove unnecessary casting
+- improve UX in design view -#1799, #1756, #420, #413  - modify margin when Fit To Screen  - apply Fit To Screen when screen configuration changed  - maintain Fit To Screen while 2s when editor open
+- improve delete action - #457
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-16
+* 0.6.42
+- Add view (Ctx)popup of the Context menus are available only on mobile
+- Change UserString
+- Change mscreen Orientation Image
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-11
+* 0.6.41
+- Fix a bug that property changes doesnot set for viewpart
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-11
+* 0.6.40
+- Applied user strings for new UX
+- removed Pinned action
+- apply user string in Palette
+- Delete context menu option(SPTSDKUX-1765)
+- Change wizard GUI(SPTSDKUX-1732)
+- apply user strings in design view
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-11
+* 0.6.39
+- Remove dependency condition between style and disable property in button
+- Fixed bug in preview toolbar(SPTSDKUX-1494)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-04
+* 0.6.38
+- Hide some attributes of Index component in wearable
+- Remove logic that display name replace value when value is empty string
+- Codegenerator : Change set order image and icon to list item
+- Change sourcetab toolbar layout
+- Add include uib_views_inc.h to event handler
+== Jungwook Ryu <jungwook.ryu@samsung.com> 2016-08-03
+* 0.6.37
+- Fixed that locale changes are not applied.
+- layout component
+- StoryBoard - Bug fix for startup page icon change
+- Disable combo when combo is empty
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-08-01
+* 0.6.36
+- Make Snippet dialog
+- Remove invalid code
+- Change textbox to combobox (group attribute of Layout)
+- Changed xsl indentation to whitespaces
+- Applied backslash escaping for file path (SPTSDKUX-1640)
+- Fixed validation problem.
+- bugfix in EdjResourceSyncManager
+- Fixed xml synchronization (SPTSDKUX-1632)
+- Change Dialog GUI & BUG FIXED
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-28
+* 0.6.35
+- update groupnames when edj changed - #1264
+- Revert Auto perspective change
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-26
+* 0.6.34
+-Auto perspective change
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-26
+* 0.6.33
+- Fixed NPE when disposing sometimes.
+- Revise ellipsis of Label
+- Add Dialog Resource Icon File
+- show available components in paletteView - #112
+- supported, showing dynamically categories
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-25
+* 0.6.32
+- [StoryBoard] Maximize-Minimize feature for Landscape mode
+- invalid font dispose
+- Change efl-renderer path to support platform 3.0-wearable
+- Refactoring for maintaining font resources.
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-22
+* 0.6.31
+- Fixed bugs (SPTSDKUX-1479)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-21
+* 0.6.30
+- [SPTSDKUX-1472] Fix Rotation being applied on Storyboard from preview pane.
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-19
+* 0.6.29
+- Refactoring for maintaining color resources.
+- fixed a redraw bug in design view - #1493
+- Set Anit-alias preview Background Image
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-18
+* 0.6.28
+- Refactoring for maintaining image resources.
+- Rempve annotation (SDKRM-1075)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-15
+* 0.6.27
+- refresh design viewer when edj file changed - #1477
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-13
+* 0.6.26
+- Update gengrid style
+- update font_util, apply font cache into palette
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-13
+* 0.6.25
+- Remove disable property from map
+- Update genlist style
+- set a part's first id num to 1 - #1365
+- Bug fix in sourcetab toolbar orientation tooltip-text
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-12
+* 0.6.24
+- fixed a casting error in textEditor
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-11
+* 0.6.23
+- Change SourceTab Preview Background Image
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-08
+* 0.6.22
+- Apply wearable widget code
+- Change asset preview image
+- Delete Progressbar style, invert option in wearable-circle(TWC-56)
+- Remove constraints to set disable within specific style for check component(TWC-58)
+- Change default value for autohide enable property in index(TWC-62)
+-[StoryBoard] - Bug fix for switching between layout.xml of different projects Bug fixed for wrong code generation in StoryBoard.
+-[StoryBoard] - Removed White line decorator from Connection
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-08
+* 0.6.21
+- Remove wearable-2.3.2 descriptor/xsd
+-[StoryBoard] Maximize-Minimize feature for each pages
+-Fix Screen Configuration not getting synced between Design and Storyboard view.
+- Delete Horizontal Direction in list widget(TWC-67)
+- Apply new widget code without 2.3.1
+- Fixed the attribute missing of plugin.xml for org.eclipse.wst.sse.ui.sourcevalidation
+- New Asset about Preview_lines
+- fix the image paht of view extension
+- Apply new widget code without 2.3.1
+- Add wearable-circle 2.3.2 descriptor & xsd
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-05
+* 0.6.20
+- The scrollbar's triangle widgets changed into the images.
+- Change the layout.xml icon
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-04
+* 0.6.19
+- Get the Code When Toolbar Style Changes navigationbar
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-01
+* 0.6.18
+- change disable api elm_object_disabled_set -> eext_circle_object_disabled_set
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-01
+* 0.6.17
+- add 'default' style for genlist in mobile profile
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-01
+* 0.6.16
+- Enable wearable 2.3.2
+bugfix in PasteAction - #1357
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-07-01
+* 0.6.15
+- Enable wearable 2.3.2
+== Seongwon Shim <sw83.shim@samsung.com> 2016-07-01
+* 0.6.14
+- delete a custom UI Component snippet
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-30
+* 0.6.13
+- Remove gengrid/multibuttonentry related code from wearable profile in genereated code
+- Change sourceTab toolbar left control height
+== Seongwon Shim <sw83.shim@samsung.com> 2016-06-28
+* 0.6.12
+- Change Sourcetab Toolbar Using ComboBox
+- Change preview background image
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-27
+* 0.6.11
+-Adjust align of Textbox by CheckScale (Left -> Center)
+- Preview Toolbar and canvas change
+- Reverted changes for Combo to ToolItem
+- update UI category's scrolling button (color, dimension)
+-Don't show Context Menu Option for Views which do not have event assosiated with them.
+-[StoryBoard] Page header color change in StoryBoard tab
+-[TNEF-7091] Fix Context Menu events not received in MAC when establishing a Page Connection.
+-  Custom font didn't apply in the beginning time
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-23
+* 0.6.10
+- apply gui guide (PALETTE & OUTLINE)
+- Revision color of Scale
+- Fixed the percent image clipping problem in toolbar
+- Sourcetab toolbar v-align mac linux
+- add protect code for rendering - #1238
+- Apply Properties view GUI guide
+- Apply ascending sort in Palette items
+- Delete warning messages when no UI component
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-22
+* 0.6.9
+- The too many generated problem is solved (SPTSDKUX-1027)
+- Updated new icons for the UI guide of toolbar
+- Applied UX guide for editor ruler & canvas
+- add graphicalDataInitializeFailedException
+- Sourcetab toolbar seperator and valign
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-17
+* 0.6.8
+- Enable Scrollbar in the Tizen palette
+- Add protect code - #1201
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-16
+* 0.6.7
+- Fix for schema loading issue
+- Bug fix for m-screen
+- support mscreen in copy&paste action - #1088
+- bugfix - layout component into designer view in landscape mode  (TSCP #254)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-16
+* 0.6.6
+- Tuned details for toolbar
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-15
+* 0.6.5
+- Fixed a rendering bug in previewer
+- Add protect code for errors in renderer
+- internalization of gef.palette
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-15
+* 0.6.4
+- BUILD PROJECT BUG CHANGED
+- Apply formatter to xsl, xml, xsd
+- Applied the UX guide for toolbar
+- Fixed a potential bug.
+- Added project specific code analysis options
+- Modify create_window_obj function in tv profile
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-15
+* 0.6.3
+- WYSIWYG: Changed combos in editor toolbar to dropdown toolitem by UX guide.
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-13
+* 0.6.2
+- Bug fix for exception when loading descriptor
+== Seongwon Shim <sw83.shim@samsung.com> 2016-06-10\18
+* 0.6.1
+- [UX] Apply advanced UX
+- [Model] Apply re-implementation model
+== Seongwon Shim <sw83.shim@samsung.com> 2016-06-10
+* 0.5.53
+- bugfix in source tab -  #749
+- Fixed clipped combos in toolbar for Windows
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-01
+* 0.5.52
+- Bug fix for msconfigurator
+- modify position of ToolItem
+- fix, X positon of ToolItem in PreviewToolbar
+- Fix a bug that Title is not changed in properties view
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-06-01
+* 0.5.51
+- apply gui guide
+- Fixed a bug (Undo on TextEditor)
+-Adjust location of Text in CheckScaleMethod
+-Fix width of perspective layout
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-31
+* 0.5.50
+-Adjust minimum scroll size of Properties view
+-Adjust size of Text in CheckScaleMethod
+-[StoryBoard] Synching of Configuration Toolbar between StoryBoard and Design tab
+- Merge tv profile related code from develop
+- Fixed hover problems for align actions
+- Bug fix for gengrid direction property
+- Change configuration for tizen_3.0
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-31
+* 0.5.49
+- fix ClassCastException in OutlineCreateTemplateAction
+- Added a horizontal line seperator between toolbar and editor area
+-Adjust view ratio (Project Explorer and Outline view)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-30
+* 0.5.48
+- Fixed the toolbar crash problem when editor tabs are changed.
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-27
+* 0.5.47
+- Fixed a bug (codegen on storyboard)
+- Fixed a bug (Sync. Selection on SourceTab)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-27
+* 0.5.46
+-[StoryBoard] Fix of the Connection Creation not creating Event Part and Connection Deletion deleting all the connections of Component
+- Added scale sides like plus, minus
+- tunning UI for gui guide
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-27
+* 0.5.45
+- Bug fix for set startup view
+- Apply new icon (OUTLINE, PROPERTIES, PALETTE)
+- Apply UI - Connection in Properties view
+- Bug fix for progressbar
+- Applied icons of the action tool item
+- Add reset properties for component which parent is box container
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-26
+* 0.5.44
+- Fixed a bug about connection codegen (storyboard, header)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-26
+* 0.5.43
+- Fixed a bug about conection codegen (storyboard)
+- Apply add view (template, ctxpopup, popup) when not focusing
+- Adjust Perspective ratio
+- Changed information toolitems to combo
+- fix perspective layout
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-26
+* 0.5.42
+- Add title line in Properties view
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-26
+* 0.5.41
+- Revision GUI of Event in Properties view
+- Add initvalue for view
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-26
+* 0.5.40
+- Add reset properties in policy
+- Add null check before access propertydescriptor
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-26
+* 0.5.39
+- Bug fix for toolbar
+- Fixed a bug (NPE)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-26
+* 0.5.38
+- apply gui guide in texteditorComposite
+- update icon file(listiem, toolbar icon), update widget descriptor file (all platforms)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-25
+* 0.5.37
+-[StoryBoard] Connection delete fix for StoryBoard
+- Toolitem sequence is changed.
+- update perspective icon
+- Modify not to marshal location_x, location_y, to xml
+-[StoryBoard] Removing selection handle on selection of the page
+-Apply GUI Guide for Properties view
+-[StoryBoard] Location info getting refreshed in properties page on moving page
+- Set initValue for view type
+- Remove & Change property name/value
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-25
+* 0.5.36
+-Adjust location of View in Native UI Builder perspective
+-Fix bug in Properties view
+- fix, change locale in ScreenDesignToolbar
+-Stabilizing Properpties view
+- Bug fix for layout group
+- Remove col_count from panes
+- fix, resource annotation in properties view
+-[StoryBoard] Fix of Add View option from StoryBoard view
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-25
+* 0.5.35
+- Apply Design Guide for Scale
+- A shared toolbar in editor is divided.
+- [StoryBoard] Setting up Startup view from StoryBoard
+- Modify style value for spinner in xsd(default -> horizontal)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-25
+* 0.5.34
+- bugfix in outline view  - update root editpart when views property changed
+- View id change on change of loaction info
+- [StoryBoard] Header text alignment to Left-Center
+- Add default value for span_size in progressbar
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-24
+* 0.5.33
+- remove org.tizen.efluibuilder.gef.fragment plugin in feature.xml
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-24
+* 0.5.32
+- fix palette NotFoundClass Exception
+- [StoryBoard] Unselected Page header color change in StoryBoard tab
+- apply gui guide (OUTLINE, PALETTE)
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-24
+* 0.5.31
+-[StoryBoard] - Location info added in Properties tab for view
+== DongJo Hwang <dongjo.hwang@samsung.com> 2016-05-24
+* 0.5.30
+- Apply GUI Guide for Properties view
+- [StoryBoard] Connection Arrow UI change
+- [StoryBoard] Goto Designer Tab on double click of the view
+- Apply UI Guide for Properties view
+- apply startup unichodeCh (\ u 2 7 A A)
+- Fixed a bug about NPE
+== ${SINGLE_NAME} <dongjo.hwang@samsung.com> 2016-05-23
+* 0.5.29
+initial version up using automatic package version-up tool
+== ${SINGLE_NAME} <dongjo.hwang@samsung.com> 2016-05-23
+* 0.5.28
+- update version
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-05-23
+* 0.5.27
+- merge from new model to advux
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-05-17
+* 0.5.26
+- Fixed a build problem that depends with JDT & JUnit
+== Jihoon Song <jihoon.song@samsung.com> 2016-05-14
+* 0.5.25
+- PALETTE: apply GUI Guide (Palette title area)
+- Add style descriptor for toolbar, index, popup, scroller
+== Jungwook Ryu <jungwook.ryu@samsung.com> 2016-05-13
+* 0.5.24
+- View managing function from Navigation View in outline view
+- Revision Properties view
+- Change location of Preview (right -> left)
+- PALETTE: applied GUI Guide of Palette
+== Seongwon Shim <sw83.shim@samsung.com> 2016-05-04
+* 0.5.23
+- Add New Empty View in Outline view
+- Remove a view  in Outline view
+- Fixed remove a view in Outline view
+== ByoungChang Son <sonbc121.son@samsung.com> 2016-04-18
+* 0.5.21
+- Navigation view is removed
+- Outline view is changed to views
+== Seongwon Shim <sw83.shim@samsung.com> 2016-04-14
+* 0.5.20
+- Moved location property from layout.xml to .uproject
+- Show messagebox of drag and drop for resource of invalid project path
+== Seongwon Shim <sw83.shim@samsung.com> 2016-03-31
+* 0.5.19
+- Update texteditor
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-03-28
+* 0.5.18
+- Update texteditor
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-03-28
+* 0.5.17
+- Update texteditor
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-03-28
+* 0.5.16
+- Update texteditor
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-03-28
+* 0.5.15
+- Update texteditor
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-03-28
+* 0.5.14
+- Update texteditor about mscreen's configurations
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-03-25
+* 0.5.13
+- update texteditor logic
+== Seongwon Shim <sw83.shim@samsung.com> 2016-03-25
+* 0.5.12
+- Fixed incorrect code in preview
+== Seongwon Shim <sw83.shim@samsung.com> 2016-03-21
+* 0.5.11
+- Fixed a Undo Error
+- Fixed a bug that when generator reads resources-path
+- Modify converter for error handling
+- Fixed a bug about connections of storyboard
+== Seongwon Shim <sw83.shim@samsung.com> 2016-03-20
+* 0.5.10
+- XML SCHEMA : Change app.xml -> .uproject
+- M-Screen : Apply new device
+== Seongwon Shim <sw83.shim@samsung.com> 2016-03-18
+* 0.5.9
+- Fixed a bug (If you open config.xml, emitted NPE)
+to "Entry"'
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-03-14
+* 0.5.8
+- Rollback 'Fixed a issue (sometimes entry widget's text is changed
+to "Entry"'
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-03-11
+* 0.5.7
+- XML SCHEMA : remove col_count attribute from panes widget
+- Update logics about LayoutSchemaProvider
+- extend checking unused editor logic  
+- Modify radio's value property default value
+- Seperate convert plugin
+- Fixed a bug that you can't see a feedback when you create a obj into Box
+- Fixed Bug: View Count not getting cleared on dispose
+- [StoryBoard] Fixed Issues due to synching with develop.
+- fix Get projectPath about drag-and-drop from Project explorer in ...
+- rollback event for item widget
+- XML SCHEMA : correct element name of toolbaritem add postponed widgets that ...      
+- Change event signal for view
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-03-11
+* 0.5.6
+- [BugFix] Bug fix for external schema location provider
+- [BugFix] Bug fix for code gernerator(container widget)
+= Seongwon Shim <sw83.shim@samsung.com> 2016-03-09
+* 0.5.5
+- [BugFix] Validate xml by xsd properly
+- [BugFix] Change selection policy between editor and properties view
+- [BugFix] Update event handler list for each widget\18
+= Seongwon Shim <sw83.shim@samsung.com> 2016-03-08
+* 0.5.4
+- [BugFix] Modify Mscreen configurator\18
+= Seongwon Shim <sw83.shim@samsung.com> 2016-03-08
+* 0.5.3
+- [BugFix] Modify convert logic
+- [BugFix] Update texteditor(view sync etc)
+= Seongwon Shim <sw83.shim@samsung.com> 2016-03-07
+* 0.5.2
+- Merage revisions from develop to tizen_sdk
+= Hyeonsu Seo <hyeonsu.seo@samsung.com> 2016-03-04
+* 0.5.1
+- [Feature] MScreen
+- [Feature] XML Editor(two-way)
+= JeongHwan Kim <hwani82.kim@samsung.com> 2016-03-03
+* 0.4.15
+- [BugFix] Connection not being loaded for widget inside internal container
+= JeongHwan Kim <hwani82.kim@samsung.com> 2015-10-15
+* 0.4.14
+- Set property condition (toolbar)
+= JeongHwan Kim <hwani82.kim@samsung.com> 2015-10-13
+* 0.4.13
+- Modify refresh (whole --> partial) in Navigation
+- [BugFix] Operation error in Storyboard
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-10-12
+* 0.4.12
+- [BugFix] Resolve resource issue
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-10-08
+* 0.4.11
+- [BugFix] Resolve storyboard merge issue  
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-10-08
+* 0.4.10
+- [BugFix] Increase in CPU consumption on switching to storyboard
+- [BugFix] View shadows remain in storyboard
+- Sort widget categories in Palette
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-09-30
+* 0.4.9
+- [BugFix] Modify conditions of Properties
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-09-24
+* 0.4.8
+- Remove message box in Renderer
+- Update pixel to grid logic 
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-09-24
+* 0.4.7
+- Add environment variables for EFL
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-09-24
+* 0.4.6
+- [BugFix] Remove exception in storyboard
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-09-22
+* 0.4.5
+- [BugFix] Remove DnD exception in Editor.
+- [BugFix] Parent widget selection UX in Editor.
+- [BugFix] Destroy renderers when Editor is disposed.
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-09-15
+* 0.4.4
+- [BugFix] verify selection condition for navigation
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-09-09
+* 0.4.3
+- [Usability] Add previous selecton management of Navigation
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-09-09
+* 0.4.2
+- [Performance] Modify thread sleep time
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-09-05
+* 0.4.1
+- [BugFix] Renderer does not work
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-09-05
+* 0.4.0
+- Multi platform support (in Renderer)
+- Add event handler comments
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-09-01
+* 0.3.15
+- Revert 0.3.12
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-08-04
+* 0.3.14
+- Revert 0.3.12
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-08-04
+* 0.3.13
+- Remove memory leak in Navigation
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-08-03
+* 0.3.12
+- Fixed storyboard bug
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-07-24
+* 0.3.11
+- Merge develop
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-07-22
+* 0.3.10
+- Fixed storyboard bug
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-07-22
+* 0.3.9
+- merge get_uib_view_data function in common.c
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-07-22
+* 0.3.8
+- Add descriptor for tizen-2.4
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-07-21
+* 0.3.7
+- Modify renderer path
+- Fixed a bug (auto fit)
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-07-20
+* 0.3.6
+- Fixed a bug that Selection feedback
+- Initial commit of storyboard into develop
+- DESC : hide UI components
+== Seongwon Shim <sw83.shim@samsung.com> 2015-07-17
+* 0.3.5
+- New Feature , Direct Editing for Text,Label,Sub-Lable
+== Seongwon Shim <sw83.shim@samsung.com> 2015-07-08
+* 0.3.4
+- Replace "widget" to "UI Component" 
+- Modify the codgen for wearable circle
+== Seongwon Shim <sw83.shim@samsung.com> 2015-07-08
+* 0.3.3
+- Add code fore avoiding NPE when save action on MAC
+- Update WYSIWYG UX(Resting Creation)
+== Seongwon Shim <sw83.shim@samsung.com> 2015-07-07
+* 0.3.2
+- Remove Exception in Descriptor
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-07-03
+* 0.3.1
+- View template(Can not delete default view template)
+- WYSIWYG UX enhanced(Can select a Widget behind its child)
+- Add cropping for circle profile
+== Seongwon Shim <sw83.shim@samsung.com> 2015-07-03
+* 0.3.0
+- Add Feature 
+-- Snippet
+-- Z-order
+-- Nesting creation widget
+== JeongHwan Kim <hwani82.kim@samsung.com> 2015-06-24
+* 0.2.54
+- Implement that a widget is positioning at out side of a view
+- Implement a new feature about wearable-circle
+== Seongwon Shim <sw83.shim@samsung.com> 2015-06-24
+* 0.2.53
+- Implemented about nesting creation widgets on WYSIWYG Editor
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-06-15
+* 0.2.52
+- modify base scale of 360x480 resolution
+== Seongwon Shim <seongwon.shim@samsung.com> 2015-06-04
+* 0.2.51
+- Fixed a Bug(Can not build the project in windows)
+== Seongwon Shim <seongwon.shim@samsung.com> 2015-05-27
+* 0.2.50
+- Remove Subtitle Property
+== Seongwon Shim <seongwon.shim@samsung.com> 2015-05-20
+* 0.2.49
+- Arrange resolution information for wearable profile
+== Seongwon Shim <seongwon.shim@samsung.com> 2015-05-19
+* 0.2.48
+- Add Indent for xml files, Modify interfaces
+== Seongwon Shim <seongwon.shim@samsung.com> 2015-05-15
+* 0.2.47
+- Add Scrollbar in navigation, Modify preferences
+== Seongwon Shim <seongwon.shim@samsung.com> 2015-05-12
+* 0.2.46
+- Add mobile-2.3, wearable-2.4 to mapping table for descriptor & device info
+== Seongwon Shim <seongwon.shim@samsung.com> 2015-05-06
+* 0.2.45
+- Add windows version
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-04-29
+* 0.2.44
+- Add view template
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-04-28
+* 0.2.43
+- Modify Navigation UX of move views
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-04-24
+* 0.2.42
+- Modify Navigation UI Design
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-04-23
+* 0.2.41
+- Modify Renderer execution path
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-04-23
+* 0.2.40
+- Support wearable-2.3.1
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-04-16
+* 0.2.39
+- Support mobile-2.3.1
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-04-14
+* 0.2.38
+- Modify Nature name 
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-04-14
+* 0.2.37
+- Impelement navigaion
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-04-10
+* 0.2.36
+- Fixed a bug : about selection action
+== Seongwon Shim <seongwon.shim@samsung.com> 2015-02-10
+* 0.2.35
+- Modify the datetime property
+== Seongwon Shim <seongwon.shim@samsung.com> 2015-02-10
+* 0.2.34
+- Remove horizontal style in index 
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-02-09
+* 0.2.33
+- enable change resolution
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2015-02-06
+* 0.2.32
+- Modify codegen logic
+== Seongwon Shim <seongwon.shim@samsung.com> 2015-02-06
+* 0.2.31
+- Enable change resolution
+== Hyeonsu Seo <hyeonsu.seo@samsung.com> 2015-02-05
+* 0.2.30
+- Remove Warnings
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-02-05
+* 0.2.29
+- Apply multi resolution
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-02-04
+* 0.2.28
+- Bugfix modify selection logic in Editor
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-28
+* 0.2.27
+- Modify widget properties
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-27
+* 0.2.26
+- Modify view template
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-27
+* 0.2.25
+- Modify create template UX 
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-23
+* 0.2.24
+- Modify icons
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-22
+* 0.2.23
+- Modify naviframe properties
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-21
+* 0.2.22
+- Add datatime
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-19
+* 0.2.21
+- Modify selection logic
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-17
+* 0.2.20
+- Modify index properties
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-16
+* 0.2.19
+- Add tooltips
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-15
+* 0.2.18
+- Modify widget icons
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-13
+* 0.2.17
+- Add comment to the generated source
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-07
+* 0.2.16
+- Register codegenerator to build / clean
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2015-01-06
+* 0.2.15
+- Rename tizen.page to tizen.view in CodeGenerator
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-30
+* 0.2.14
+- Rename tizen.page to tizen.view
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-30
+* 0.2.13
+- Modify widget descriptor
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-29
+* 0.2.12
+- Add widgets
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-26
+* 0.2.11
+- Modify Renderer interfaces
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-23
+* 0.2.10
+- Modify CodeGenerator for using url
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-23
+* 0.2.9
+- Modify CodeGenerator for using url
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-22
+* 0.2.8
+- Modify descriptor
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-19
+* 0.2.7
+- Refactoring renderer
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-19
+* 0.2.6
+- BugFix null pointer dereference in Designer
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-16
+* 0.2.5
+- Update context menu in Designer
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-16
+* 0.2.4
+- Add Perspective
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-12
+* 0.2.3
+- Add Resources View 
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-12
+* 0.2.2
+- Modify configuration
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-01
+* 0.2.1
+- Create 
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-01
+* 0.1.522
+- Test
+== JeongHwan Kim <jeonghwan0613.kim@samsung.com> 2014-12-01
diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest
new file mode 100644 (file)
index 0000000..b251110
--- /dev/null
@@ -0,0 +1,28 @@
+Version:0.6.130
+Source:efl-ui-builder-eplugin
+Maintainer:ByoungChang Son <sonbc121.son@samsung.com> 
+
+Package:efl-ui-builder-eplugin
+OS:ubuntu-32
+Build-host-os:ubuntu-32
+Build-dependency:common-eplugin [ubuntu-32],  nativecore-ext-eplugin [ubuntu-32], pde-build [ubuntu-32], enventor-eplugin [ubuntu-32]
+
+Package:efl-ui-builder-eplugin
+OS:ubuntu-64
+Build-host-os:ubuntu-64
+Build-dependency:common-eplugin [ubuntu-64],  nativecore-ext-eplugin [ubuntu-64], pde-build [ubuntu-64], enventor-eplugin [ubuntu-64]
+
+Package:efl-ui-builder-eplugin
+OS:windows-32
+Build-host-os:ubuntu-32
+Build-dependency:common-eplugin [windows-32],  nativecore-ext-eplugin [windows-32], pde-build [windows-32], enventor-eplugin [windows-32]
+
+Package:efl-ui-builder-eplugin
+OS:windows-64
+Build-host-os:ubuntu-64
+Build-dependency:common-eplugin [windows-64],  nativecore-ext-eplugin [windows-64], pde-build [windows-64], enventor-eplugin [windows-64]
+
+Package:efl-ui-builder-eplugin
+OS:macos-64
+Build-host-os:ubuntu-64
+Build-dependency:common-eplugin [macos-64],  nativecore-ext-eplugin [macos-64], pde-build [macos-64], enventor-eplugin [macos-64]
diff --git a/script/boilerplate.txt b/script/boilerplate.txt
new file mode 100644 (file)
index 0000000..f744b4d
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
diff --git a/script/check-boilerplate.sh b/script/check-boilerplate.sh
new file mode 100755 (executable)
index 0000000..e70a330
--- /dev/null
@@ -0,0 +1,13 @@
+SOURCES=`find . -name *.java`
+
+for source in ${SOURCES}
+do
+       boilerplate=`cat boilerplate.txt`
+       `cat ${source} | head -n 21 1> temp.txt`
+       file_head=`cat temp.txt`
+       if [ "${boilerplate}" != "${file_head}" ]
+       then
+               echo ${source} >> result.txt 
+       fi
+
+done